stimulus_tag_helper 0.4.0 → 0.4.1

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: d78596e159f3730ada65d162fd8cdf8cff63404bdb72f6770fb544e45693dd8d
4
- data.tar.gz: 3bed5f63460088309fdb0d5f8448b415a31a86d0efe3b1a17e7b1cb7d354daa4
3
+ metadata.gz: 884fa188e7ce8465fe8b7a33f0fd95f38c689dd33d548aecc23c83d6dd7e005a
4
+ data.tar.gz: 97cce9dbe7b99e3bd40a5f31d07691636d367d9cf7ee2d673bba8764209c3e46
5
5
  SHA512:
6
- metadata.gz: 34ce331ca313d214394b301bf5017a469c8d64aa36464c73a1ac6fd580f5e488ca029631318c2cde54b34158284d6323c00ff1614f1e3f2cd690c3b0c1a7faf5
7
- data.tar.gz: 20fa325fcae63d52d057143213eb707d362028fd54d0b5ee8bd6852d90407c398159b45139a008ac237695c498caa3fcb3b2aeedc9b6258705ff0200c45d50bf
6
+ metadata.gz: abfcfb468f4f6ffe8436edcc2732fe565e0b402aedc8f3156a17f07f2b905f3cea091c7b3e24b389b0b1429b3916e7f533529dab3b582a6bd756afe03072c4ae
7
+ data.tar.gz: aac053f558ca00ae6cf6989581f74bf00f884c6847c95980cfcffdcb64eedafc33d794f5aa0a0bfc704ab5d18ac30bde186151f622cdc2b6b1b92702e3b55777
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusTagHelper
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
@@ -5,6 +5,7 @@ require "zeitwerk"
5
5
  Zeitwerk::Loader.for_gem.setup
6
6
 
7
7
  module StimulusTagHelper
8
+ TAG_BUILDER_OPTIMIZED_VERION = Gem::Version.new("7.2.0")
8
9
  def self.properties
9
10
  %i[controllers values classes targets actions outlets].freeze
10
11
  end
@@ -64,7 +65,11 @@ module StimulusTagHelper
64
65
  controller: data[:controller] || controller, # nil is allowed, because the args will be prepended by the identifier
65
66
  **args.extract!(*StimulusTagHelper.all_possible_properties_names - %i[class])
66
67
  ))
67
- tag_builder.tag_string(tag, **args.merge(data: data), &block)
68
+ if ActionView.version >= TAG_BUILDER_OPTIMIZED_VERION
69
+ tag_builder.tag_string(tag, nil, args.merge(data: data), &block)
70
+ else
71
+ tag_builder.tag_string(tag, **args.merge(data: data), &block)
72
+ end
68
73
  end
69
74
 
70
75
  def stimulus_attributes(...)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_tag_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Topchii
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-12 00:00:00.000000000 Z
11
+ date: 2024-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  requirements: []
91
- rubygems_version: 3.3.7
91
+ rubygems_version: 3.5.21
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: A form_for like, compact and elegant way to define stimulus attributes in