tag_options 0.9.2 → 0.9.3

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: ebd8c6dbf9d51ce9410214a8e2623af013ddf29bbb649670535d5cd68a1d391d
4
- data.tar.gz: fad5d880b06610791446b12c634ef6e710c2ecafb120106052b220e15c64fb12
3
+ metadata.gz: fb408340ce9d19af1ea31d33d3589bf341cead0595fae98905f183370e27fe5e
4
+ data.tar.gz: 40f0b893d5a513bf5d4a15a66e984ba2d331cfe674832b408b28a09f3f2da073
5
5
  SHA512:
6
- metadata.gz: a4b41eb76d3b30812602fd2dd9bdac56df1f5b9d73404890cca2797722598673a1c794a9b3dd0a1a4e1056ecf784204c79268de36c2314f77126fb70ec10cac7
7
- data.tar.gz: a63edc40042d78a94f6fe43d03cc2848144312724b64d78b18798a35bdd210aa0226448c8c610ec9865d0caf3fe6b3ab51ccae86896f95def96c7bd855b55eeb
6
+ metadata.gz: 88bee13cbc9235499350735d61299f9aa0f06db4227200f07c93708672133b7e7bd378871376fa0c221405aeb8487df85b60b1aede65356ef48383a31ab75529
7
+ data.tar.gz: f883c852b8704e940e59c43f067aaac197ba1bf6857977b1676a76e5d1b155cbe7aa13e300a4c55dad2bac466b3468cbc787a68869d777398306e7bd9f7cf3bf
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.3] - 2021-11-11
6
+
7
+ - Added TagOptions::Hash() ease-of-use method
8
+ - Bug fixes for Ruby 3.0
9
+
5
10
  ## [0.9.2] - 2021-11-09
6
11
 
7
12
  - Added optional TailwindCSS property handler
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'rails/generators'
4
+
3
5
  module TagOptions
4
6
  class InstallGenerator < Rails::Generators::Base
5
7
  source_root File.expand_path('templates', __dir__)
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/core_ext/string'
4
+ require 'active_support/core_ext/array'
4
5
  require 'forwardable'
5
6
  require 'tag_options/property_handler/resolve_value'
6
7
 
@@ -117,8 +118,9 @@ module TagOptions
117
118
  end
118
119
  end
119
120
 
120
- def store(property, *values, **conditions)
121
+ def store(property, *values)
121
122
  property = normalize_property(property)
123
+ conditions = values.extract_options!
122
124
  value = resolve_value(property, *values, **conditions)
123
125
  value.empty? ? @data.delete(property) : @data[property] = value
124
126
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TagOptions
4
- VERSION = '0.9.2'
4
+ VERSION = '0.9.3'
5
5
  end
data/lib/tag_options.rb CHANGED
@@ -9,3 +9,9 @@ require 'tag_options/configuration'
9
9
  require 'tag_options/hash'
10
10
  require 'tag_options/railtie'
11
11
  require 'tag_options/version'
12
+
13
+ module TagOptions
14
+ def self.Hash(hash={})
15
+ TagOptions::Hash.new(hash)
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tag_options
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Monroe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-09 00:00:00.000000000 Z
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug