lortza / blamegame Goto Github PK
View Code? Open in Web Editor NEWwip toy game project
wip toy game project
Error connecting to Redis on localhost:6379
michael hartl https://www.learnenough.com/action-cable-tutorial/advanced_enhancements#sec-deploying_to_production
semi-useful post: https://medium.com/swlh/deploying-a-rails-react-app-with-actioncable-to-heroku-cb5d42f41a2a
heroku docs: https://devcenter.heroku.com/articles/getting-started-with-rails6
annoyingly poor redis gem docs: https://github.com/redis/redis-rb
env configs: https://dashboard.heroku.com/apps/blamegame/settings
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
Instead of one "build" i'd like to have these checks
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
It's confusing!
builds will fail starting April 1, 2023
https://help.heroku.com/X5OE6BCA/heroku-18-end-of-life-faq
https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
Ruby 3.1.0 required
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
started process here: https://app.circleci.com/pipelines/github/lortza/voting_game
base build config
version: 2.1
orbs:
ruby: circleci/[email protected]
jobs:
build:
docker:
- image: circleci/ruby:2.6.3-stretch-node
executor: ruby/default
steps:
- checkout
- run:
name: Which bundler?
command: bundle -v
- ruby/bundle-install
x
out WIP testsInstead 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.
archived
questionsgame
specs are very broken a.t.m.)i think i'd like to refer to games as /games/ABCD
instead of /games/1
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...
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:
submissions/new
formgame#show
page)https://www.theodinproject.com/courses/ruby-on-rails/lessons/sessions-cookies-and-authentication
make the styles a little nicer and also start making the REST interface a bit more JS friendly
Since we're not deleting decks, it would be nice to be able to archive one. An archived deck...
rails docs: https://edgeguides.rubyonrails.org/action_cable_overview.html
example with stimulus: https://onrails.blog/2019/01/23/subscribing-to-many-channels-in-actioncable/
getting started: https://medium.com/@jelaniwoods/get-started-with-action-cable-in-rails-6-4c605f93c9b8
multiple channels: https://medium.com/@jelaniwoods/rails-6-subscribing-to-multiple-channels-in-action-cable-c61e0f2b1e96
multiple channels in rails 5 + prod setup: https://www.thegreatcodeadventure.com/rails-5-action-cable-with-multiple-chatroom-subscriptions/
If someone enters an invalid game code, we 500 instead of giving a useful error. let's fix that.
On blur
, check that game code is included in the Game.current
via javascript:
http://lortza.github.io/2018/08/04/ruby-data-in-js.html
Maybe something like...
<script type="text/javascript">
validateGame(<%= Game.current %>)
function validateGame(currentGames) {
console.log()
...
}
</script>
we already generate a game.code
. we'd like to:
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).
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.
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:
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.
see lortza/food_planner#559
lortza/food_planner#566
for reference
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.