view_component_reflex 0.2.3 → 0.2.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: 7f33f828c6eb7e41485294b552248fc561925c2390144fa990b4c63cf9016633
4
- data.tar.gz: 64b879ffa7759e40b2d60c805cda0f578a4210a061bdc3d9ca6ad17e0bf92629
3
+ metadata.gz: e5ffa83358af12b225a6a5d4e7fc16a27275e1f2815b2f5e6105a555d7d3faa8
4
+ data.tar.gz: 2822a3c179dac3550eb1be5c7d30f997cd8942422429d2af92f167880652f28c
5
5
  SHA512:
6
- metadata.gz: d90f9f7e38d3b767b5b0370fd5cea40c3295ee01e8261e6669cfa691d003ec15066da6186ccce2e794ea0d97d8eeec1c6f0405cf5a891d5636edb7ab50ef2732
7
- data.tar.gz: c60512a9eaaf8dbb4912f35c38d4d2ca46cf2dbe3a4597be04c5200bb7a22179802d5313e366a37a6b1c56c636310f0f8c890d00f321f453f3bcdd581571c97e
6
+ metadata.gz: f85e4d51fef8d3ba242a48b9b8c3f5c800cbd746582c055d0cb68eba6b6309b2678362fd18b55fec103a1a26d08df728603304ccb5c2f7d0f9bca6c96ce24de6
7
+ data.tar.gz: 0a9624dff9b4127e59d28ecb0a574186dda9214f772cf332cd23aeca740ef8a3633ff0066d9c8e323fc4c612efb87e81fb9ac24c70aaaab3fc8ece07561bd243
@@ -4,15 +4,3 @@ require 'stimulus_reflex'
4
4
  module ViewComponentReflex
5
5
  # Your code goes here...
6
6
  end
7
-
8
- module StimulusReflexChannelExtension
9
- def render_page_and_broadcast_morph(reflex, selectors, data = {})
10
- html = render_page(reflex)
11
- if reflex.respond_to? :stimulus_controller
12
- selectors = ["[data-controller=\"#{reflex.stimulus_controller}\"]"]
13
- end
14
- broadcast_morphs selectors, data, html if html.present?
15
- end
16
- end
17
-
18
- StimulusReflex::Channel.include StimulusReflexChannelExtension
@@ -1,4 +1,16 @@
1
1
  module ViewComponentReflex
2
2
  class Engine < ::Rails::Engine
3
+ config.to_prepare do
4
+ class StimulusReflex::Channel < ActionCable::Channel::Base
5
+ def render_page_and_broadcast_morph(reflex, selectors, data = {})
6
+ html = render_page(reflex)
7
+ if reflex.respond_to? :stimulus_controller
8
+ selectors = ["[data-controller=\"#{reflex.stimulus_controller}\"]"]
9
+ end
10
+ broadcast_morphs selectors, data, html if html.present?
11
+ end
12
+ end
13
+
14
+ end
3
15
  end
4
16
  end
@@ -1,3 +1,3 @@
1
1
  module ViewComponentReflex
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua LeBlanc
@@ -34,16 +34,16 @@ dependencies:
34
34
  name: stimulus_reflex
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - '='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 3.2.2.pre1
39
+ version: '0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - '='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 3.2.2.pre1
46
+ version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: view_component
49
49
  requirement: !ruby/object:Gem::Requirement