view_component_reflex 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5ffbf1eef5f6b3a5d7d65f4d541dffb0d396125b23c4db8f768928a2e5d7477
4
- data.tar.gz: 67e7902d699879181cf2bfba948a93967eda19d355b85e785b61f41a3f89e0dc
3
+ metadata.gz: 2fdf34d064e1a90d42f689dbeac337bfcefdecb34da14005a3333985de710d32
4
+ data.tar.gz: 8de6a22148047c13913d7363fb87c61cee167c7cb7d6b3ddc841f4d5af259233
5
5
  SHA512:
6
- metadata.gz: 6912fa047d572bf7d666e5cb1f151164103709d93b473ab1a40642d2828b64807928fb064621ce1804a6144899483a98b5440f1d615eb7bf451e924d8e8f21ed
7
- data.tar.gz: 5f4c565c378d6caad49fd2f18064dc474535fbff28f64c8480354398cb23e9d164a45138424cf2dc70c983bb1cbd6b842a8fed57c83356e4be2a9e3c268ae7c3
6
+ metadata.gz: 0f4f49aca8e48a7addfdc6590cff4d2e8bf21c2aca5c9588af7ed673b90614f12d043cdfdd760a6653efaa6a064c536c693e1373be1d89130e78c4d21fc3845b
7
+ data.tar.gz: b0e40d72439efa641a044eef1c36842a6d3532a27ff6c029b7d0fa0798a61c72e468879289c5f85f4f2cb95db561c35f39af0d59653ad110e54f1ee2f620f35c
data/README.md CHANGED
@@ -219,7 +219,7 @@ ViewComponentReflex uses session for its state by default. To change this, add
219
219
  an initializer to `config/initializers/view_component_reflex.rb`.
220
220
 
221
221
  ```ruby
222
- ViewComponentReflex.configure do |config|
222
+ ViewComponentReflex::Engine.configure do |config|
223
223
  config.state_adapter = YourAdapter
224
224
  end
225
225
  ```
@@ -2,10 +2,10 @@ module ViewComponentReflex
2
2
  class Component < ViewComponent::Base
3
3
  class << self
4
4
  def init_stimulus_reflex
5
- if name.include? "::"
6
- @stimulus_reflex ||= module_parent.const_set(name.split("::").last + "Reflex", Class.new(Reflex))
5
+ @stimulus_reflex ||= if name.include? "::"
6
+ module_parent.const_set(name.split("::").last + "Reflex", Class.new(Reflex))
7
7
  else
8
- @stimulus_reflex ||= Object.const_set(name + "Reflex", Class.new(Reflex))
8
+ Object.const_set(name + "Reflex", Class.new(Reflex))
9
9
  end
10
10
  @stimulus_reflex.component_class = self
11
11
  end
@@ -24,11 +24,11 @@ module ViewComponentReflex
24
24
  init_key
25
25
 
26
26
  tag = :div
27
- if opts_or_tag.is_a? Hash
28
- options = opts_or_tag
27
+ options = if opts_or_tag.is_a? Hash
28
+ opts_or_tag
29
29
  else
30
30
  tag = opts_or_tag
31
- options = opts
31
+ opts
32
32
  end
33
33
  options[:data] = {
34
34
  controller: self.class.stimulus_controller,
@@ -1,3 +1,3 @@
1
1
  module ViewComponentReflex
2
- VERSION = '2.1.3'
2
+ VERSION = '2.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua LeBlanc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-06 00:00:00.000000000 Z
11
+ date: 2020-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails