render_turbo_stream 1.4.8 → 1.4.9

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: 2867377565fa534235ee93511f311d9c1c89ad883fc03f09a49e5e4675a5a491
4
- data.tar.gz: 130ad91aabf627e127ab35bd68e496a559f51611116ae0beff7a9c4d923ec7ff
3
+ metadata.gz: a9b6a483735fb6cb6abf28e28da8a18993727faaa76f22c77a52e99b5df3f738
4
+ data.tar.gz: 0773d821f8a94b1094cdd99054365ad2792b006be27fc93445e379e8d8bb46a2
5
5
  SHA512:
6
- metadata.gz: c6649a22e9d313a214023d4bf2cb06128bdd4352fe41f0790a51938d5091048c03520c87bcb70398f1b7b32daa0ca67100fe6445b15b336193bdf22ce93de221
7
- data.tar.gz: 3e964aec46ed46844c479d07267c2887c8c9392a14d6ea416f0975dfafb41fdfb32c6a3ca94bfacef3144dc5d0deaca6c3c6c2c1ce9d0d0854820d63464b5f64
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.8"
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.8
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian