render_turbo_stream 1.4.7 → 1.4.9

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: 0cf85719220f2451edcc8c407b63ca8e02349990da42de189ff688a127c1be84
4
- data.tar.gz: 64bda3cf73b0e593312c1a42bf7b6abd179a61dd26514dcad7f53be8df3f9b6d
3
+ metadata.gz: a9b6a483735fb6cb6abf28e28da8a18993727faaa76f22c77a52e99b5df3f738
4
+ data.tar.gz: 0773d821f8a94b1094cdd99054365ad2792b006be27fc93445e379e8d8bb46a2
5
5
  SHA512:
6
- metadata.gz: 0f43fe156e6b6b453a7fba19c532a713c8449981457dd02dfdea6a4109e831bd36f2a74060313e9b3be2a776125049360e45d840c9b4676f2701e5f8abefe951
7
- data.tar.gz: aec323da9c493d84001644927b3127bd2f6e5a13ff1107657a082c098a8d8f7236bb44003ebac8478a2066802de516582fe8de4ecb089b3b712692321aecb923
6
+ metadata.gz: 96637194a72cfc53cc649056021967e107a150bfb702b7ad951c611c23fab424c72554c9b1aea6d82606546a4342259c797a38c4a08405ceed568869e62acba0
7
+ data.tar.gz: 4008a55b80afe4b2493d3fa980213554f501c39bdda1aa1cd15a6522876198f987aff0a65e83f1e0ea754f13be31938f17bbcbadc06efe570b7a25f59e0b95c2
data/README.md CHANGED
@@ -276,10 +276,10 @@ includes the plugin and has tests done by rspec/request and capybara.
276
276
 
277
277
  ## More Configs
278
278
 
279
- On test helpers, the marker for a turbo-stream target is in most cases the id of the target element. This is true for the standard turbo-stream functions. On `turbo_power` it is the same in most cases. `RenderTurboStream::Libs.first_attr_is_html_id()` checks for which methods this is true. You can override this:
279
+ On test helpers, the marker for a turbo-stream target is in most cases the id of the target element. This is true for the standard turbo-stream functions. On `turbo_power` it is the same in most cases. `RenderTurboStream::Libs.first_arg_is_html_id()` checks for which methods this is true. You can override this:
280
280
 
281
281
  ```ruby
282
- config.x.render_turbo_stream.first_attribute_is_html_id = %[replace append prepend turbo_frame_set_src]
282
+ config.x.render_turbo_stream.first_argument_is_html_id = %[replace append prepend turbo_frame_set_src]
283
283
  ```
284
284
 
285
285
  This setting is relevant for testing helpers.
@@ -4,7 +4,7 @@
4
4
  <% streams.each do |s| %>
5
5
 
6
6
  <% if s.is_a?(Array) %>
7
- <% attr_id = RenderTurboStream::Libs.first_attr_is_html_id(s.first) %>
7
+ <% attr_id = RenderTurboStream::Libs.first_arg_is_html_id(s.first) %>
8
8
  <% h = { attributes: s, type: 'command' } %>
9
9
  <% h[:target] = "##{s.second}" if attr_id %>
10
10
  <% rendered_partials.push(h) %>
@@ -62,7 +62,7 @@ module RenderTurboStream
62
62
 
63
63
  if r['type'] == 'command'
64
64
  act = r['attributes'].first
65
- is_id = RenderTurboStream::Libs.first_attr_is_html_id(act)
65
+ is_id = RenderTurboStream::Libs.first_arg_is_html_id(act)
66
66
  if action.to_s == act && is_id && r['attributes'].second == id.to_s
67
67
  k = [act, r['attributes'].second].join('-')
68
68
  counts[k] ||= 0
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "1.4.7"
2
+ VERSION = "1.4.9"
3
3
  end
@@ -260,8 +260,8 @@ module RenderTurboStream
260
260
  # This method checks for that
261
261
  # it includes the methods from turbo-power
262
262
  # used for test helpers
263
- def self.first_attr_is_html_id(method)
264
- config = Rails.configuration.x.render_turbo_stream.first_attribute_is_html_id
263
+ def self.first_arg_is_html_id(method)
264
+ config = Rails.configuration.x.render_turbo_stream.first_argument_is_html_id
265
265
  default = [
266
266
  :graft,
267
267
  :morph,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_turbo_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian
@@ -27,7 +27,7 @@ dependencies:
27
27
  description: This gem handles translated flash messages, sets status, and renders
28
28
  partials via turbo-stream directly from the controller. No need to write *.turbo_stream.*
29
29
  templates. Together with the turbo_power gem or custom turbo-stream actions, you
30
- can also handle predefined javascript. Redirects can now be handled easily. Includes
30
+ can run javascript. Redirects can now be handled easily and in multiple ways. Includes
31
31
  helpers for enabling request tests.
32
32
  email:
33
33
  - christian@sedlmair.ch