strip_attributes 1.13.0 → 1.14.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: 2a084a26dc5a486dfdc66bca645db741751cd1df037d433b130755b703bd24dd
4
- data.tar.gz: 57043d564f688b990865a01394f85d2286a0b6e67796e965a3d298264a6d1ca7
3
+ metadata.gz: 9d901257abbca144b30becb86cd248e512f8f8b140a6f822d3965f1896356d7c
4
+ data.tar.gz: 798c083261f25f554767c216cfb399961e48e723a5d06355a12f82cb591eed45
5
5
  SHA512:
6
- metadata.gz: 969f91697ba28733de84de1bb6f8f0fa512fb45d7d25c30640ce5dd51a5b5e035cee8e58adbf019fafa3d6c3a9e0179bf8734208eff613b197774614a9e4b8b9
7
- data.tar.gz: bd9dd9e046b01f0281331ed58415a872c401b5d2fc8b3ee963cc88e90993ef89ed33b73ea148c8539e8a198438ff51b6c78d13c370c455dfcf834efb4946f2d0
6
+ metadata.gz: 01a7956efa14fa00820e59171bbc1324d015a457db4224f1d5903d1c9ecce31b39d2cc9fb34c26a7e9ae2dcf868fc49034682d5d2f6a0bb532ab89c16898a938
7
+ data.tar.gz: 41ac5050c3810cd7de390efff4564a6cec3b025fc90455ce3b6c084444821a3deeb4873155b4ee00cc86f9dfaa426a31f88d1aeaca8195ee0965c606ea56d04b
@@ -1,3 +1,3 @@
1
1
  module StripAttributes
2
- VERSION = "1.13.0"
2
+ VERSION = "1.14.1"
3
3
  end
@@ -83,11 +83,11 @@ module StripAttributes
83
83
  # Necessary because Rails has removed the narrowing of attributes using :only
84
84
  # and :except on Base#attributes
85
85
  def self.narrow(attributes, options = {})
86
- if except = options[:except]
87
- except = Array(except).collect { |attribute| attribute.to_s }
86
+ if options[:except]
87
+ except = Array(options[:except]).map(&:to_s)
88
88
  attributes.except(*except)
89
- elsif only = options[:only]
90
- only = Array(only).collect { |attribute| attribute.to_s }
89
+ elsif options[:only]
90
+ only = Array(options[:only]).map(&:to_s)
91
91
  attributes.slice(*only)
92
92
  else
93
93
  attributes
@@ -95,10 +95,7 @@ module StripAttributes
95
95
  end
96
96
 
97
97
  def self.validate_options(options)
98
- if keys = options.keys
99
- unless (keys - VALID_OPTIONS).empty?
100
- raise ArgumentError, "Options does not specify #{VALID_OPTIONS} (#{options.keys.inspect})"
101
- end
102
- end
98
+ return if (options.keys - VALID_OPTIONS).empty?
99
+ raise ArgumentError, "Options does not specify #{VALID_OPTIONS} (#{options.keys.inspect})"
103
100
  end
104
101
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strip_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan McGeary
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '8.0'
22
+ version: '9.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '8.0'
32
+ version: '9.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: active_attr
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -48,22 +48,16 @@ dependencies:
48
48
  name: minitest
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '5.0'
54
- - - "<"
55
- - !ruby/object:Gem::Version
56
- version: '6.0'
57
54
  type: :development
58
55
  prerelease: false
59
56
  version_requirements: !ruby/object:Gem::Requirement
60
57
  requirements:
61
- - - ">="
58
+ - - "~>"
62
59
  - !ruby/object:Gem::Version
63
60
  version: '5.0'
64
- - - "<"
65
- - !ruby/object:Gem::Version
66
- version: '6.0'
67
61
  - !ruby/object:Gem::Dependency
68
62
  name: minitest-matchers_vaccine
69
63
  requirement: !ruby/object:Gem::Requirement
@@ -133,6 +127,7 @@ metadata:
133
127
  bug_tracker_uri: https://github.com/rmm5t/strip_attributes/issues
134
128
  changelog_uri: https://github.com/rmm5t/strip_attributes/blob/master/CHANGELOG.md
135
129
  source_code_uri: https://github.com/rmm5t/strip_attributes
130
+ funding_uri: https://github.com/sponsors/rmm5t
136
131
  post_install_message:
137
132
  rdoc_options: []
138
133
  require_paths:
@@ -148,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
143
  - !ruby/object:Gem::Version
149
144
  version: '0'
150
145
  requirements: []
151
- rubygems_version: 3.3.12
146
+ rubygems_version: 3.5.23
152
147
  signing_key:
153
148
  specification_version: 4
154
149
  summary: Whitespace cleanup for ActiveModel attributes