motion 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d25829b24f8c2781bcc44f9132061532d3c5b3466e60e69ab646407d27c32519
4
- data.tar.gz: c3e69af9595e1fe7b659a6ed51a57c252d2028581aa4f154e4a150ee2a74b12c
3
+ metadata.gz: 68e4222065f95cc117a8fc9233e8b421f05cdc8bbb58b966c618b82487723be7
4
+ data.tar.gz: c9c1927a3ae081faeb6d346246a05e8dbfdc8f2da91185073fdf18d8abf7ab83
5
5
  SHA512:
6
- metadata.gz: f1bb6c0022e3636d62d6ba054aeac9e16c353bc5d646aa83c460a0eaf1f0fc0774efd71b03d3eb47456a033a66521907fc3e23e29fc02c4d09124a03732e940c
7
- data.tar.gz: aa336213b2487da46b868b8c89f74ff55ec745078ffdb1e75fdeafe7d7707870f8f140013d8d9218e68998f89911813f9e0437d75f9261ccc29ec957990b6b02
6
+ metadata.gz: 218b161a0c04029315fcda296545156ddda990cd6ab98b664c3896ee1d15f93a1092bb1c0f4b50a550b848d5242d929b178fecde05b34b723c5354c016dd00ad
7
+ data.tar.gz: ed56e7e3f78851fa7e8ee6643a334016d3013ac00c813e766a2f4190d5698f6c976dce5dfef4465e882bcbed3df33aff63b8952687830e30ea61769bc9e9f89c
@@ -23,6 +23,9 @@ module Motion
23
23
  @controller
24
24
  @request
25
25
  @tag_builder
26
+
27
+ @asset_resolver_strategies
28
+ @assets_environment
26
29
  ].freeze
27
30
 
28
31
  private_constant :STATE_EXCLUDED_IVARS
@@ -41,7 +41,7 @@ module Motion
41
41
  end
42
42
 
43
43
  def process_motion(motion, event = nil)
44
- timing("Proccessed #{motion}") do
44
+ timing("Processed #{motion}") do
45
45
  component.process_motion(motion, event)
46
46
  end
47
47
 
@@ -53,7 +53,7 @@ module Motion
53
53
  end
54
54
 
55
55
  def process_broadcast(broadcast, message)
56
- timing("Proccessed broadcast to #{broadcast}") do
56
+ timing("Processed broadcast to #{broadcast}") do
57
57
  component.process_broadcast broadcast, message
58
58
  end
59
59
 
@@ -65,7 +65,7 @@ module Motion
65
65
  end
66
66
 
67
67
  def process_periodic_timer(timer)
68
- timing("Proccessed periodic timer #{timer}") do
68
+ timing("Processed periodic timer #{timer}") do
69
69
  component.process_periodic_timer timer
70
70
  end
71
71
 
@@ -16,14 +16,18 @@ module Motion
16
16
  component.motions.include?(motion_name.to_s)
17
17
  end
18
18
 
19
- def run_motion(component, motion_name)
19
+ def run_motion(component, motion_name, event = motion_event)
20
20
  if block_given?
21
21
  c = component.dup
22
- c.process_motion(motion_name.to_s)
22
+ c.process_motion(motion_name.to_s, event)
23
23
  yield c
24
24
  else
25
- component.process_motion(motion_name.to_s)
25
+ component.process_motion(motion_name.to_s, event)
26
26
  end
27
27
  end
28
+
29
+ def motion_event(attributes = {})
30
+ Motion::Event.new(ActiveSupport::JSON.decode(attributes.to_json))
31
+ end
28
32
  end
29
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motion
4
- VERSION = "0.4.3"
4
+ VERSION = "0.4.4"
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alec Larsen
8
8
  - Drew Ulmer
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-22 00:00:00.000000000 Z
12
+ date: 2020-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -102,7 +102,7 @@ metadata:
102
102
  source_code_uri: https://github.com/unabridged/motion
103
103
  post_install_message: |
104
104
  Friendly reminder: When updating the motion gem, don't forget to update the
105
- NPM package as well (`bin/yarn add '@unabridged/motion@0.4.3'`).
105
+ NPM package as well (`bin/yarn add '@unabridged/motion@0.4.4'`).
106
106
  rdoc_options: []
107
107
  require_paths:
108
108
  - lib
@@ -117,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubygems_version: 3.0.3
121
- signing_key:
120
+ rubygems_version: 3.1.2
121
+ signing_key:
122
122
  specification_version: 4
123
123
  summary: Reactive frontend UI components for Rails in pure Ruby.
124
124
  test_files: []