Giter VIP home page Giter VIP logo

blamegame's People

Contributors

dependabot[bot] avatar lortza avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

blamegame's Issues

Deploy actioncable redis etc to heroku

Fix heroku warning about Sentry configuration

Got this output from this build: https://dashboard.heroku.com/apps/blamegame/activity/builds/26aad1c5-c6e3-4b8d-9a89-4dbb2d3b929b

       W, [2022-04-03T16:18:56.629684 #1018]  WARN -- sentry: You are running on Heroku but haven't enabled Dyno Metadata. For Sentry's release detection to work correctly, please run `heroku labs:enable runtime-dyno-metadata`

       D, [2022-04-03T16:18:56.629820 #1018] DEBUG -- sentry: Sentry HTTP Transport will connect to https://o59235.ingest.sentry.io

       D, [2022-04-03T16:18:56.630091 #1018] DEBUG -- sentry: initialized a background worker with 2 threads

       D, [2022-04-03T16:18:56.630219 #1018] DEBUG -- sentry: [Sessions] Sessions won't be captured without a valid release

Set up pundit

Get authorization in place.

For example, currently all of these are failing:

# spec/requests/games_spec.rb

  describe "Authenticated access to another user's games" do

Post-ActionCable Cleanup

  • update readme #31
  • add codeclimate badge #31
  • remove unneeded controller methods or controllers #35
  • investigate that route for redis #36
  • clean up styles #31
  • fix player edit form
  • fix h1s and buttons on index pages for mobile #34

Break questions into Decks

Instead of having one giant pool of questions, break them into decks. This way a user can write questions with a specific theme and choose that deck depending on who is playing. Ex: if i'm playing at work, i'd include a web dev deck and the original game pack. If I'm playing with family, i'd maybe include some inside jokes with the fam, but skip the web dev questions.

  • create deck table, model, and relationship to questions
  • insert filtering for archived questions
  • remove delete buttons from questions
  • include admin-owned packs for user game selection, but exclude them from being able to be edited
  • update round-generation logic to include: by deck, adult content, archived questions
  • update those specs, y'all! (game specs are very broken a.t.m.)

deploy

  • heroku app
  • set master key
  • rake db:migrate
  • rake db:populate_questions
  • create new admin user

consider using real words as game codes

https://github.com/dwyl/english-words/blob/master/words_alpha.txt

and https://www.evernote.com/shard/s266/nl/36137749/52208e27-eb9f-40dd-88c5-66c984ba6781/

require 'open-uri'

def cloud_anagrams(input)
  puts "Fetching your anagram data from the web..."

  web_dictionary = open('http://s3.amazonaws.com/viking_education/web_development/web_app_eng/enable.txt') {|f| f = f.readlines}

  processed_input = input.downcase.chars.sort.join
  matches = []

  web_dictionary.each do |word|
    word = word.sub("\n", "")
    processed_word = word.downcase.chars.sort.join
    matches << word if (processed_word == processed_input) && (word != input)
  end

  if matches.length > 0
    puts "Anagrams for '#{input}' are:"
    puts matches
  else
    puts "Sorry, there are no anagrams for '#{input}'."
  end
end

cloud_anagrams('pears')

# Output
Fetching data from web...
Anagrams for 'pears' are:
apers
apres
asper
pares...

remember current user with browser state

We don't ask users to sign in. This means we don't have a current_user to remember a user name. However, we don't want to ask people to submit their own name as a nominator every time they vote. I'd like to:

  • use local browser storage to hold on to the name they submit when they add themselves as a player for a game.
  • remember that user and submit it as a param on the submissions/new form
  • purge that data at the end of the game (on the game#show page)

https://www.theodinproject.com/courses/ruby-on-rails/lessons/sessions-cookies-and-authentication

make it prettier

make the styles a little nicer and also start making the REST interface a bit more JS friendly

archive a deck

Since we're not deleting decks, it would be nice to be able to archive one. An archived deck...

  • would not appear on the user's decks index page
  • would show up in searches in case a person wants to unarchive it
  • would not allow any of its questions to be added to a game

ActionCableize

protect game with game code token

we already generate a game.code. we'd like to:

  • have people go to a link with that code in it
  • require that code for people to access a game

Make button to add new game

Use a regular game form (without players for "new"). I'd like to be able to decide on including adult content and how many rounds to play (default = 10).

make access to certain game pages expire after a game becomes "past"

We may want to leave access to the results page open. Ex: https://blamegame.herokuapp.com/games/1

But it would be better if the url used the game code, ex: https://blamegame.herokuapp.com/games/THSG

But close down access to any of the other new | create | show pages when a game falls into the scope of past games.

Get a build passing in heroku

Latest build and failure:
https://dashboard.heroku.com/apps/blamegame/activity/builds/710e2a31-e5f4-48b2-8141-906932942705

       yarn install v1.22.17
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       error [email protected]: The platform "linux" is incompatible with this module.
       error Found incompatible module.
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
       Compiling...
       Compilation failed:
       yarn run v1.22.17
       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

       error Command "webpack" not found.
 !
 !     Precompiling assets failed.

Possible leads:

Update current_codes when creating a game

If a player goes to the /play endpoint before the admin user creates a game, when the admin user creates the game, that new game code will not be loaded in the array of valid game codes. The player will have to refresh the page in order for that error to go away. :(

Action cable can solve this one too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.