plissken 1.3.0 → 2.0.0

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: fd6c52b52cd32b976a8d81cb028a167df111ff599edc1e859d6dfc43039bb6df
4
- data.tar.gz: c064b14121a74c962c83dbcf0934bbd8dd92295641aa13b5c515c7bfb110b573
3
+ metadata.gz: a3eed593d974744cc4b272490d781eb6c51410d085a8aac872937f57bbee538f
4
+ data.tar.gz: 68d5b45803ab129c7f9a10c9cd6fc8a2e7f3b639f0576b535adee1adf87531e6
5
5
  SHA512:
6
- metadata.gz: 81e31a0d3fa33ea153be0c01e8d6f6595ae7187ce4e996bac550151cae11c15a673e79562d6bea8f4bb6528a32300418bf3471aaaf1521758659b98eed016c51
7
- data.tar.gz: d99ceeab78e31e031eeb46f993d8d446da12fdb82f215f2714b9a5bb9fe49826a7f5c8b88f1f58302c3c3980a745290d1a85c04b012f8abda397030b90fbc171
6
+ metadata.gz: 90266a92824aee9bbfacb5b7676da9516cef3deacb39f50a9727913fe4f41ddc34c5cbf03bad3a21d5f13b993d1be4a3e8f0ab4777e9c8ea93541bf61a6a13e9
7
+ data.tar.gz: ef019c34e4fd4b6b415d027d0e5f41043ae53c329154a9050be59e2b09568edcf0a473842874ffa884f72c1a2ba0ac304268e14dc46fec2a5a80c1c4311182ad
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2021 Technical Panda Ltd
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,13 +1,18 @@
1
1
  # Plissken
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/plissken.svg)](https://badge.fury.io/rb/plissken)
4
+ ![CI](https://github.com/technicalpanda/plissken/workflows/CI/badge.svg)
4
5
 
5
6
  Have you ever needed to automatically convert JSON-style `camelBack` or `CamelCase` hash keys into more Rubyish `snake_case`?
6
7
 
7
- Plissken to the rescue.
8
+ Plissken to the rescue!
8
9
 
9
10
  This gem recursively converts all camelBack or CamelCase keys in either a Hash structure, or an Array of Hashes, to snake_case.
10
11
 
12
+ ## Requirements
13
+
14
+ * Ruby >= 2.7
15
+
11
16
  ## Installation
12
17
 
13
18
  Add this to your Gemfile:
@@ -52,16 +57,14 @@ Plissken works on either string keys or symbolized keys. It has no dependencies,
52
57
  If you've already got `snake_case` and need to `CamelCase` it, you are encouraged to try
53
58
  the [Awrence](http://github.com/futurechimp/awrence) gem.
54
59
 
55
- ## Contributing to plissken
60
+ ## Contributing
61
+
62
+ Bug reports and pull requests are welcome on GitHub at https://github.com/technicalpanda/plissken. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
63
+
64
+ ## License
56
65
 
57
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
58
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
59
- * Fork the project.
60
- * Start a feature/bugfix branch.
61
- * Commit and push until you are happy with your contribution.
62
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
63
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
66
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
64
67
 
65
- ## Copyright
68
+ ## Code of Conduct
66
69
 
67
- Copyright (c) 2017 Dave Hrycyszyn. See LICENSE.txt for further details.
70
+ Everyone interacting with this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/technicalpanda/plissken/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require "bundler/setup"
3
5
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 2.0.0
@@ -20,13 +20,14 @@ module Plissken
20
20
  private
21
21
 
22
22
  def snake_hash(value)
23
- Hash[value.map { |k, v| [underscore_key(k), to_snake_keys(v)] }]
23
+ value.to_h { |k, v| [underscore_key(k), to_snake_keys(v)] }
24
24
  end
25
25
 
26
26
  def underscore_key(key)
27
- if key.is_a? Symbol
27
+ case key
28
+ when Symbol
28
29
  underscore(key.to_s).to_sym
29
- elsif key.is_a? String
30
+ when String
30
31
  underscore(key)
31
32
  else
32
33
  key # Plissken can't snakify anything except strings and symbols
metadata CHANGED
@@ -1,31 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plissken
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Hrycyszyn
8
- - Michael Chrisco
9
8
  - Stuart Chinery
10
- autorequire:
9
+ autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2019-01-14 00:00:00.000000000 Z
12
+ date: 2022-01-23 00:00:00.000000000 Z
14
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: byebug
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '11.1'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '11.1'
15
28
  - !ruby/object:Gem::Dependency
16
29
  name: minitest
17
30
  requirement: !ruby/object:Gem::Requirement
18
31
  requirements:
19
32
  - - "~>"
20
33
  - !ruby/object:Gem::Version
21
- version: '5.0'
34
+ version: '5.14'
22
35
  type: :development
23
36
  prerelease: false
24
37
  version_requirements: !ruby/object:Gem::Requirement
25
38
  requirements:
26
39
  - - "~>"
27
40
  - !ruby/object:Gem::Version
28
- version: '5.0'
41
+ version: '5.14'
29
42
  - !ruby/object:Gem::Dependency
30
43
  name: minitest-fail-fast
31
44
  requirement: !ruby/object:Gem::Requirement
@@ -40,34 +53,90 @@ dependencies:
40
53
  - - "~>"
41
54
  - !ruby/object:Gem::Version
42
55
  version: '0.1'
56
+ - !ruby/object:Gem::Dependency
57
+ name: minitest-macos-notification
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.3'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.3'
43
70
  - !ruby/object:Gem::Dependency
44
71
  name: minitest-reporters
45
72
  requirement: !ruby/object:Gem::Requirement
46
73
  requirements:
47
74
  - - "~>"
48
75
  - !ruby/object:Gem::Version
49
- version: '1.3'
76
+ version: '1.4'
50
77
  type: :development
51
78
  prerelease: false
52
79
  version_requirements: !ruby/object:Gem::Requirement
53
80
  requirements:
54
81
  - - "~>"
55
82
  - !ruby/object:Gem::Version
56
- version: '1.3'
83
+ version: '1.4'
57
84
  - !ruby/object:Gem::Dependency
58
85
  name: rake
59
86
  requirement: !ruby/object:Gem::Requirement
60
87
  requirements:
61
88
  - - "~>"
62
89
  - !ruby/object:Gem::Version
63
- version: '12.0'
90
+ version: '13.0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '13.0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '1.7'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '1.7'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rubocop-minitest
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '0.10'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '0.10'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-rake
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '0.5'
64
133
  type: :development
65
134
  prerelease: false
66
135
  version_requirements: !ruby/object:Gem::Requirement
67
136
  requirements:
68
137
  - - "~>"
69
138
  - !ruby/object:Gem::Version
70
- version: '12.0'
139
+ version: '0.5'
71
140
  description: |-
72
141
  Have you ever needed to automatically convert JSON-style camelBack or CamelCase hash keys into more Rubyish snake_case?
73
142
 
@@ -75,11 +144,13 @@ description: |-
75
144
 
76
145
  This gem recursively converts all camelBack or CamelCase keys in a hash structure to snake_case.
77
146
  email:
78
- - dhrycyszyn@zonedigital.com
147
+ - dave@constructiveproof.com
148
+ - code@technicalpanda.co.uk
79
149
  executables: []
80
150
  extensions: []
81
151
  extra_rdoc_files: []
82
152
  files:
153
+ - MIT-LICENSE
83
154
  - README.md
84
155
  - Rakefile
85
156
  - VERSION
@@ -88,11 +159,12 @@ files:
88
159
  - lib/plissken/ext/hash/to_snake_keys.rb
89
160
  - lib/plissken/methods.rb
90
161
  - lib/plissken/version.rb
91
- homepage: https://github.com/futurechimp/plissken
162
+ homepage: https://github.com/technicalpanda/plissken
92
163
  licenses:
93
164
  - MIT
94
- metadata: {}
95
- post_install_message:
165
+ metadata:
166
+ rubygems_mfa_required: 'true'
167
+ post_install_message:
96
168
  rdoc_options: []
97
169
  require_paths:
98
170
  - lib
@@ -100,15 +172,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
172
  requirements:
101
173
  - - ">="
102
174
  - !ruby/object:Gem::Version
103
- version: '0'
175
+ version: '2.7'
104
176
  required_rubygems_version: !ruby/object:Gem::Requirement
105
177
  requirements:
106
178
  - - ">="
107
179
  - !ruby/object:Gem::Version
108
180
  version: '0'
109
181
  requirements: []
110
- rubygems_version: 3.0.1
111
- signing_key:
182
+ rubygems_version: 3.2.33
183
+ signing_key:
112
184
  specification_version: 4
113
185
  summary: Snakify your camel keys when working with JSON APIs
114
186
  test_files: []