Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: motion v0.4.0 #15

Merged
merged 2 commits into from Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions Gemfile.lock
Expand Up @@ -87,7 +87,7 @@ GEM
globalid (0.4.2)
activesupport (>= 4.2.0)
honeybadger (4.7.0)
i18n (1.8.3)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
i18n_data (0.10.0)
listen (3.2.1)
Expand All @@ -105,7 +105,7 @@ GEM
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
motion (0.2.2)
motion (0.4.0)
nokogiri
rails (>= 5.2)
msgpack (1.3.3)
Expand Down Expand Up @@ -230,10 +230,10 @@ GEM
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.3.1)
zeitwerk (2.4.0)

PLATFORMS
ruby
Expand Down
3 changes: 2 additions & 1 deletion app/components/clicker_game_component.rb
Expand Up @@ -7,6 +7,7 @@ class ClickerGameComponent < ViewComponent::Base
delegate :channel, to: :game
delegate :score, to: :player

after_disconnect :destroy_player
map_motion :click
map_motion :lucky_click

Expand Down Expand Up @@ -36,7 +37,7 @@ def lucky_click(event)
player.score_points(scored)
end

def disconnected
def destroy_player
player.destroy
game.destroy if game.clicker_players.count == 0

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -6,7 +6,7 @@
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "4.2.2",
"@unabridged/motion": "^0.2.2",
"@unabridged/motion": "0.4.0",
"stimulus": "^1.1.1",
"turbolinks": "^5.2.0"
},
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -922,10 +922,10 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24"
integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==

"@unabridged/motion@^0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@unabridged/motion/-/motion-0.2.2.tgz#98921ed287c8cf9c53229f0d1bedf8cb236f9e02"
integrity sha512-bZ+mz3D66Eud9lS4sYLu9UwS9afT3icAVHuhrh+IkjhbftkkQ/6SClgz/5sx0+NtqCpGgSzsZl1ksUfPxv3Ybg==
"@unabridged/motion@0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@unabridged/motion/-/motion-0.4.0.tgz#ef06e94289bd1f760dda447748dd69dc6fde5bf9"
integrity sha512-SSqZuaM2RlzJekIqHnXBMACAr1qgCsbLonemCGM50z3e+IWucNFXdi+rMGdwUVRtEh6/XC0p2yi8pSYBJnOC9Q==
dependencies:
"@rails/actioncable" ">= 6.0"
morphdom "^2.6.1"
Expand Down