snaky_hash 2.0.5 → 2.0.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.
@@ -22,12 +22,12 @@ module SnakyHash
22
22
  extended_module = Modulizer.to_extended_mod
23
23
  base.extend(extended_module)
24
24
  base.include(ConvenienceInstanceMethods)
25
- # :nocov:
25
+ # simplecov:disable
26
26
  # This will be run in CI on Ruby 2.3, but we only collect coverage from current Ruby
27
27
  unless base.method_defined?(:transform_values)
28
28
  base.include(BackportedInstanceMethods)
29
29
  end
30
- # :nocov:
30
+ # simplecov:enable
31
31
  end
32
32
  end
33
33
 
@@ -87,7 +87,7 @@ module SnakyHash
87
87
 
88
88
  # Provides backported methods for older Ruby versions
89
89
  module BackportedInstanceMethods
90
- # :nocov:
90
+ # simplecov:disable
91
91
  # Transforms values of a hash using the given block
92
92
  #
93
93
  # @yield [Object] block to transform each value
@@ -105,7 +105,7 @@ module SnakyHash
105
105
  end
106
106
  result
107
107
  end
108
- # :nocov:
108
+ # simplecov:enable
109
109
  end
110
110
 
111
111
  # Provides convenient instance methods for serialization
@@ -189,11 +189,11 @@ module SnakyHash
189
189
  if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7")
190
190
  res
191
191
  else
192
- # :nocov:
192
+ # simplecov:disable
193
193
  # In Ruby <= 2.6 Hash#transform_values returned a new vanilla Hash,
194
194
  # rather than a hash of the class being transformed.
195
195
  self[res]
196
- # :nocov:
196
+ # simplecov:enable
197
197
  end
198
198
  end
199
199
 
@@ -56,7 +56,7 @@ module SnakyHash
56
56
  def to_mod(key_type)
57
57
  Module.new do
58
58
  case key_type
59
- when :string then
59
+ when :string
60
60
  # Converts a key to a string if it is symbolizable, after underscoring
61
61
  #
62
62
  # @note checks for to_sym instead of to_s, because nearly everything responds_to?(:to_s)
@@ -67,7 +67,7 @@ module SnakyHash
67
67
  # @param key [Object] the key to convert
68
68
  # @return [String, Object] the converted key or original if not convertible
69
69
  define_method(:convert_key) { |key| key.respond_to?(:to_sym) ? underscore_string(key.to_s) : key }
70
- when :symbol then
70
+ when :symbol
71
71
  # Converts a key to a symbol if possible, after underscoring
72
72
  #
73
73
  # @param key [Object] the key to convert
@@ -1,8 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnakyHash
4
+ # Version namespace for this gem.
4
5
  module Version
5
- VERSION = "2.0.5"
6
+ # Current gem version.
7
+ VERSION = "2.0.9"
6
8
  end
9
+ # Current gem version exposed at the traditional constant location.
7
10
  VERSION = Version::VERSION # Traditional Constant Location
8
11
  end
data/lib/snaky_hash.rb CHANGED
@@ -4,12 +4,12 @@
4
4
  require "hashie"
5
5
  require "version_gem"
6
6
 
7
- require_relative "snaky_hash/version"
8
7
  require_relative "snaky_hash/extensions"
9
8
  require_relative "snaky_hash/serializer"
10
9
  require_relative "snaky_hash/snake"
11
10
  require_relative "snaky_hash/string_keyed"
12
11
  require_relative "snaky_hash/symbol_keyed"
12
+ require_relative "snaky_hash/version"
13
13
 
14
14
  # SnakyHash provides hash-like objects with automatic key conversion capabilities
15
15
  #
@@ -37,6 +37,7 @@ end
37
37
  # Enable version introspection via VersionGem
38
38
  #
39
39
  # @api private
40
+
40
41
  SnakyHash::Version.class_eval do
41
42
  extend VersionGem::Basic
42
43
  end
data/sig/snaky_hash.rbs CHANGED
@@ -1,4 +1,7 @@
1
1
  module SnakyHash
2
- VERSION: String
3
2
  # See the writing guide of rbs: https://github.com/ruby/rbs#guides
3
+ module Version
4
+ VERSION: String
5
+ end
6
+ VERSION: String
4
7
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaky_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
- - Peter Boling
7
+ - Peter H. Boling
8
8
  bindir: exe
9
9
  cert_chain:
10
10
  - |
@@ -61,42 +61,42 @@ dependencies:
61
61
  name: version_gem
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">="
64
+ - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: 1.1.8
67
- - - "<"
66
+ version: '1.1'
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '3'
69
+ version: 1.1.16
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 1.1.8
77
- - - "<"
76
+ version: '1.1'
77
+ - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: '3'
79
+ version: 1.1.16
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: kettle-dev
82
82
  requirement: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: '2.1'
86
+ version: '3.1'
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.1.1
89
+ version: 3.1.24
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '2.1'
96
+ version: '3.1'
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 2.1.1
99
+ version: 3.1.24
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: bundler-audit
102
102
  requirement: !ruby/object:Gem::Requirement
@@ -145,26 +145,46 @@ dependencies:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: 1.0.4
148
+ - !ruby/object:Gem::Dependency
149
+ name: anonymous_loader
150
+ requirement: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: '0.1'
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: 0.1.4
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: '0.1'
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: 0.1.4
148
168
  - !ruby/object:Gem::Dependency
149
169
  name: appraisal2
150
170
  requirement: !ruby/object:Gem::Requirement
151
171
  requirements:
152
172
  - - "~>"
153
173
  - !ruby/object:Gem::Version
154
- version: '3.1'
174
+ version: '3.2'
155
175
  - - ">="
156
176
  - !ruby/object:Gem::Version
157
- version: 3.1.1
177
+ version: 3.2.6
158
178
  type: :development
159
179
  prerelease: false
160
180
  version_requirements: !ruby/object:Gem::Requirement
161
181
  requirements:
162
182
  - - "~>"
163
183
  - !ruby/object:Gem::Version
164
- version: '3.1'
184
+ version: '3.2'
165
185
  - - ">="
166
186
  - !ruby/object:Gem::Version
167
- version: 3.1.1
187
+ version: 3.2.6
168
188
  - !ruby/object:Gem::Dependency
169
189
  name: kettle-test
170
190
  requirement: !ruby/object:Gem::Requirement
@@ -174,7 +194,7 @@ dependencies:
174
194
  version: '2.0'
175
195
  - - ">="
176
196
  - !ruby/object:Gem::Version
177
- version: 2.0.3
197
+ version: 2.0.27
178
198
  type: :development
179
199
  prerelease: false
180
200
  version_requirements: !ruby/object:Gem::Requirement
@@ -184,27 +204,27 @@ dependencies:
184
204
  version: '2.0'
185
205
  - - ">="
186
206
  - !ruby/object:Gem::Version
187
- version: 2.0.3
207
+ version: 2.0.27
188
208
  - !ruby/object:Gem::Dependency
189
209
  name: turbo_tests2
190
210
  requirement: !ruby/object:Gem::Requirement
191
211
  requirements:
192
212
  - - "~>"
193
213
  - !ruby/object:Gem::Version
194
- version: '3.1'
214
+ version: '4.0'
195
215
  - - ">="
196
216
  - !ruby/object:Gem::Version
197
- version: 3.1.1
217
+ version: 4.0.0
198
218
  type: :development
199
219
  prerelease: false
200
220
  version_requirements: !ruby/object:Gem::Requirement
201
221
  requirements:
202
222
  - - "~>"
203
223
  - !ruby/object:Gem::Version
204
- version: '3.1'
224
+ version: '4.0'
205
225
  - - ">="
206
226
  - !ruby/object:Gem::Version
207
- version: 3.1.1
227
+ version: 4.0.0
208
228
  - !ruby/object:Gem::Dependency
209
229
  name: ruby-progressbar
210
230
  requirement: !ruby/object:Gem::Requirement
@@ -228,7 +248,7 @@ dependencies:
228
248
  version: '1.0'
229
249
  - - ">="
230
250
  - !ruby/object:Gem::Version
231
- version: 1.0.3
251
+ version: 1.0.9
232
252
  type: :development
233
253
  prerelease: false
234
254
  version_requirements: !ruby/object:Gem::Requirement
@@ -238,7 +258,7 @@ dependencies:
238
258
  version: '1.0'
239
259
  - - ">="
240
260
  - !ruby/object:Gem::Version
241
- version: 1.0.3
261
+ version: 1.0.9
242
262
  - !ruby/object:Gem::Dependency
243
263
  name: gitmoji-regex
244
264
  requirement: !ruby/object:Gem::Requirement
@@ -248,7 +268,7 @@ dependencies:
248
268
  version: '2.0'
249
269
  - - ">="
250
270
  - !ruby/object:Gem::Version
251
- version: 2.0.1
271
+ version: 2.0.15
252
272
  type: :development
253
273
  prerelease: false
254
274
  version_requirements: !ruby/object:Gem::Requirement
@@ -258,7 +278,7 @@ dependencies:
258
278
  version: '2.0'
259
279
  - - ">="
260
280
  - !ruby/object:Gem::Version
261
- version: 2.0.1
281
+ version: 2.0.15
262
282
  - !ruby/object:Gem::Dependency
263
283
  name: backports
264
284
  requirement: !ruby/object:Gem::Requirement
@@ -279,33 +299,16 @@ dependencies:
279
299
  - - ">="
280
300
  - !ruby/object:Gem::Version
281
301
  version: 3.25.1
282
- description: "\U0001F40D A Hashie::Mash joint to make #snakelife better"
302
+ description: "\U0001F52E A Hashie::Mash joint to make #snakelife better"
283
303
  email:
284
304
  - floss@galtzo.com
285
- - oauth-ruby@googlegroups.com
286
305
  executables: []
287
306
  extensions: []
288
- extra_rdoc_files:
289
- - CHANGELOG.md
290
- - CITATION.cff
291
- - CODE_OF_CONDUCT.md
292
- - CONTRIBUTING.md
293
- - FUNDING.md
294
- - LICENSE.md
295
- - README.md
296
- - RUBOCOP.md
297
- - SECURITY.md
307
+ extra_rdoc_files: []
298
308
  files:
299
309
  - CHANGELOG.md
300
- - CITATION.cff
301
- - CODE_OF_CONDUCT.md
302
- - CONTRIBUTING.md
303
- - FUNDING.md
304
310
  - LICENSE.md
305
311
  - README.md
306
- - RUBOCOP.md
307
- - SECURITY.md
308
- - certs/pboling.pem
309
312
  - lib/snaky_hash.rb
310
313
  - lib/snaky_hash/extensions.rb
311
314
  - lib/snaky_hash/serializer.rb
@@ -314,24 +317,24 @@ files:
314
317
  - lib/snaky_hash/symbol_keyed.rb
315
318
  - lib/snaky_hash/version.rb
316
319
  - sig/snaky_hash.rbs
317
- - sig/snaky_hash/version.rbs
318
320
  homepage: https://github.com/ruby-oauth/snaky_hash
319
321
  licenses:
320
322
  - MIT
321
323
  metadata:
322
324
  homepage_uri: https://snaky-hash.galtzo.com
323
- source_code_uri: https://github.com/ruby-oauth/snaky_hash/tree/v2.0.5
324
- changelog_uri: https://github.com/ruby-oauth/snaky_hash/blob/v2.0.5/CHANGELOG.md
325
+ source_code_uri: https://github.com/ruby-oauth/snaky_hash/tree/v2.0.9
326
+ changelog_uri: https://github.com/ruby-oauth/snaky_hash/blob/v2.0.9/CHANGELOG.md
325
327
  bug_tracker_uri: https://github.com/ruby-oauth/snaky_hash/issues
326
- documentation_uri: https://www.rubydoc.info/gems/snaky_hash/2.0.5
328
+ documentation_uri: https://www.rubydoc.info/gems/snaky_hash/2.0.9
327
329
  funding_uri: https://github.com/sponsors/pboling
328
330
  wiki_uri: https://github.com/ruby-oauth/snaky_hash/wiki
329
331
  news_uri: https://www.railsbling.com/tags/snaky_hash
330
332
  discord_uri: https://discord.gg/3qme4XHNKN
333
+ mailing_list_uri: https://www.rubyforum.org/tag/ruby-oauth
331
334
  rubygems_mfa_required: 'true'
332
335
  rdoc_options:
333
336
  - "--title"
334
- - "snaky_hash - \U0001F40D A very snaky hash"
337
+ - "snaky_hash - \U0001F52E A very snaky hash"
335
338
  - "--main"
336
339
  - README.md
337
340
  - "--exclude"
@@ -352,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
355
  - !ruby/object:Gem::Version
353
356
  version: '0'
354
357
  requirements: []
355
- rubygems_version: 4.0.10
358
+ rubygems_version: 4.0.20
356
359
  specification_version: 4
357
- summary: "\U0001F40D A very snaky hash"
360
+ summary: "\U0001F52E A very snaky hash"
358
361
  test_files: []
metadata.gz.sig CHANGED
Binary file
data/CITATION.cff DELETED
@@ -1,20 +0,0 @@
1
- cff-version: 1.2.0
2
- title: "snaky_hash"
3
- message: >-
4
- If you use this work and you want to cite it,
5
- then you can use the metadata from this file.
6
- type: software
7
- authors:
8
- - given-names: "Peter H."
9
- family-names: "Boling"
10
- email: "floss@galtzo.com"
11
- affiliation: "galtzo.com"
12
- orcid: 'https://orcid.org/0009-0008-8519-441X'
13
- identifiers:
14
- - type: url
15
- value: 'https://github.com/ruby-oauth/snaky_hash'
16
- description: "snaky_hash"
17
- repository-code: 'https://github.com/ruby-oauth/snaky_hash'
18
- abstract: >-
19
- snaky_hash
20
- license: See license file
data/CODE_OF_CONDUCT.md DELETED
@@ -1,134 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, caste, color, religion, or sexual
10
- identity and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the overall
26
- community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- * The use of sexualized language or imagery, and sexual attention or advances of
31
- any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email address,
35
- without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
- Examples of representing our community include using an official email address,
56
- posting via an official social media account, or acting as an appointed
57
- representative at an online or offline event.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
- reported to the community leaders responsible for enforcement at
63
- [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact].
64
- All complaints will be reviewed and investigated promptly and fairly.
65
-
66
- All community leaders are obligated to respect the privacy and security of the
67
- reporter of any incident.
68
-
69
- ## Enforcement Guidelines
70
-
71
- Community leaders will follow these Community Impact Guidelines in determining
72
- the consequences for any action they deem in violation of this Code of Conduct:
73
-
74
- ### 1. Correction
75
-
76
- **Community Impact**: Use of inappropriate language or other behavior deemed
77
- unprofessional or unwelcome in the community.
78
-
79
- **Consequence**: A private, written warning from community leaders, providing
80
- clarity around the nature of the violation and an explanation of why the
81
- behavior was inappropriate. A public apology may be requested.
82
-
83
- ### 2. Warning
84
-
85
- **Community Impact**: A violation through a single incident or series of
86
- actions.
87
-
88
- **Consequence**: A warning with consequences for continued behavior. No
89
- interaction with the people involved, including unsolicited interaction with
90
- those enforcing the Code of Conduct, for a specified period of time. This
91
- includes avoiding interactions in community spaces as well as external channels
92
- like social media. Violating these terms may lead to a temporary or permanent
93
- ban.
94
-
95
- ### 3. Temporary Ban
96
-
97
- **Community Impact**: A serious violation of community standards, including
98
- sustained inappropriate behavior.
99
-
100
- **Consequence**: A temporary ban from any sort of interaction or public
101
- communication with the community for a specified period of time. No public or
102
- private interaction with the people involved, including unsolicited interaction
103
- with those enforcing the Code of Conduct, is allowed during this period.
104
- Violating these terms may lead to a permanent ban.
105
-
106
- ### 4. Permanent Ban
107
-
108
- **Community Impact**: Demonstrating a pattern of violation of community
109
- standards, including sustained inappropriate behavior, harassment of an
110
- individual, or aggression toward or disparagement of classes of individuals.
111
-
112
- **Consequence**: A permanent ban from any sort of public interaction within the
113
- community.
114
-
115
- ## Attribution
116
-
117
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
- version 2.1, available at
119
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
-
121
- Community Impact Guidelines were inspired by
122
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
-
124
- For answers to common questions about this code of conduct, see the FAQ at
125
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
- [https://www.contributor-covenant.org/translations][translations].
127
-
128
- [homepage]: https://www.contributor-covenant.org
129
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
- [Mozilla CoC]: https://github.com/mozilla/diversity
131
- [FAQ]: https://www.contributor-covenant.org/faq
132
- [translations]: https://www.contributor-covenant.org/translations
133
- [🚂maint-contact]: http://www.railsbling.com/contact
134
- [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red