refinements 6.2.1 → 6.2.2

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: 1b21487cb95bfc1a582b174707b5bba12a9bcb8b61502146499a645c42edc5d9
4
- data.tar.gz: 3530da4226dc27c115fae4bf3c3f9dc50f644176a430f4cfe7749529c2a47690
3
+ metadata.gz: d5ba775099d5db3e1c9d5cc47aa06412cc0adeddfbfc52f6cf8862f13af7441a
4
+ data.tar.gz: 3ee7c50aa7c658d0eab3dba89079bfe34c1b8c36935a5747248956fc27444e5e
5
5
  SHA512:
6
- metadata.gz: 9ec4dc0f3e3f4f6647e6089bfaf5ad38ef0abf035bddaa681680b401f90b758fdfb60177e0b439afd8247cd40367f5d42075e973203c87e5610a8ffeff28256a
7
- data.tar.gz: ccb9990528fe32e2940417bf5fad59f046363059608394483567bc8eaf5e870c61168bdfb594fca8abd47d9858f82103b810782872a154ee3a95047cc4957a5f
6
+ metadata.gz: 24d00666e8499824b2434a49b145811f9b227c7990c1dd83dcacb369869636b445564d14027893a7ed8b4c661619101bfa285985a2916757ffbfa6115b0f9b74
7
+ data.tar.gz: 3ef9f9fc3b89754eca711a5152bbef5ac2bc5cbc5ad320d147f6585f699df6ff097e718f7de5ca498b0e269b2b686b1bc18f8f7a94c162504cff0ba8252cbe4d
@@ -1,4 +1,4 @@
1
- p
2
- !�ͳ.� �*����\�����`�-��D���1V���{
3
- R�������d���=4ßSC(#]7o�R\w���
4
- ��r>�q��4�&.}�;�iR]�é*������2�^�S濄��>�?�Πlm;�,��Ns�� ���ګ�2r�����sX��2o��/{�Lm{Z���Q��ߗ�
1
+ O'�la-U�2e��p�<��%1
2
+ (La����}<�����g<}&6 �wb�`WĦH��w��>�4(����|����l2���ǹ��ٓ��݁3��
3
+ 'U���#;(�Jݒ�Ry
4
+ �Lc��� A�V����pH�PX��_w�犕A+�ì��,����B�='oy���B���� �\E�/ �cp��Z +=#Ng4�|�d�5���S�N U �]Y~������?�9'��<C,��� ���X��x
data.tar.gz.sig CHANGED
Binary file
@@ -47,8 +47,9 @@ module Refinements
47
47
  def use &block
48
48
  return [] unless block_given?
49
49
 
50
- values = block.parameters.map { |(_type, key)| self[key] }
51
- yield values
50
+ block.parameters
51
+ .map { |(_type, key)| self[key] }
52
+ .then { |values| yield values }
52
53
  end
53
54
  end
54
55
  end
@@ -12,7 +12,7 @@ module Refinements
12
12
  end
13
13
 
14
14
  def self.version
15
- "6.2.1"
15
+ "6.2.2"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -52,8 +52,9 @@ module Refinements
52
52
 
53
53
  def camelcase
54
54
  if match? self.class.delimiters
55
- result = join_parts split(%r(\s*\-\s*|\s*\/\s*|\s*\:+\s*)), method: :up, delimiter: "::"
56
- join_parts result.split(/\s*\_\s*|\s+/), method: :up
55
+ split(%r(\s*\-\s*|\s*\/\s*|\s*\:+\s*)).then { |parts| combine parts, :up, "::" }
56
+ .then { |text| text.split(/\s*\_\s*|\s+/) }
57
+ .then { |parts| combine parts, :up }
57
58
  else
58
59
  up
59
60
  end
@@ -61,8 +62,9 @@ module Refinements
61
62
 
62
63
  def snakecase
63
64
  if match? self.class.delimiters
64
- result = join_parts split(%r(\s*\-\s*|\s*\/\s*|\s*\:+\s*)), method: :down, delimiter: "/"
65
- join_parts result.split(/(?=[A-Z])|\s*\_\s*|\s+/), method: :down, delimiter: "_"
65
+ split(%r(\s*\-\s*|\s*\/\s*|\s*\:+\s*)).then { |parts| combine parts, :down, "/" }
66
+ .then { |txt| txt.split(/(?=[A-Z])|\s*\_\s*|\s+/) }
67
+ .then { |parts| combine parts, :down, "_" }
66
68
  else
67
69
  downcase
68
70
  end
@@ -70,8 +72,9 @@ module Refinements
70
72
 
71
73
  def titleize
72
74
  if match? self.class.delimiters
73
- result = join_parts split(/(?=[A-Z])|\s*\_\s*|\s*\-\s*|\s+/), method: :up, delimiter: " "
74
- join_parts result.split(%r(\s*\/\s*|\s*\:+\s*)), method: :up, delimiter: "/"
75
+ split(/(?=[A-Z])|\s*\_\s*|\s*\-\s*|\s+/).then { |parts| combine parts, :up, " " }
76
+ .then { |text| text.split %r(\s*\/\s*|\s*\:+\s*) }
77
+ .then { |parts| combine parts, :up, "/" }
75
78
  else
76
79
  capitalize
77
80
  end
@@ -81,7 +84,7 @@ module Refinements
81
84
 
82
85
  # :reek:DuplicateMethodCall
83
86
  # :reek:UtilityFunction
84
- def join_parts parts, method:, delimiter: ""
87
+ def combine parts, method, delimiter = ""
85
88
  parts.reduce "" do |result, part|
86
89
  next part.__send__ method if result.empty?
87
90
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinements
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.1
4
+ version: 6.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
29
29
  y84=
30
30
  -----END CERTIFICATE-----
31
- date: 2019-05-02 00:00:00.000000000 Z
31
+ date: 2019-06-01 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: awesome_print
@@ -78,28 +78,28 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '13.0'
81
+ version: '13.5'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '13.0'
88
+ version: '13.5'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: git-cop
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '3.0'
95
+ version: '3.5'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '3.0'
102
+ version: '3.5'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: guard-rspec
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '5.0'
179
+ version: '5.4'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '5.0'
186
+ version: '5.4'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: rspec
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -204,42 +204,42 @@ dependencies:
204
204
  requirements:
205
205
  - - "~>"
206
206
  - !ruby/object:Gem::Version
207
- version: '0.67'
207
+ version: '0.69'
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
- version: '0.67'
214
+ version: '0.69'
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: rubocop-performance
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - "~>"
220
220
  - !ruby/object:Gem::Version
221
- version: '1.1'
221
+ version: '1.3'
222
222
  type: :development
223
223
  prerelease: false
224
224
  version_requirements: !ruby/object:Gem::Requirement
225
225
  requirements:
226
226
  - - "~>"
227
227
  - !ruby/object:Gem::Version
228
- version: '1.1'
228
+ version: '1.3'
229
229
  - !ruby/object:Gem::Dependency
230
230
  name: rubocop-rspec
231
231
  requirement: !ruby/object:Gem::Requirement
232
232
  requirements:
233
233
  - - "~>"
234
234
  - !ruby/object:Gem::Version
235
- version: '1.30'
235
+ version: '1.33'
236
236
  type: :development
237
237
  prerelease: false
238
238
  version_requirements: !ruby/object:Gem::Requirement
239
239
  requirements:
240
240
  - - "~>"
241
241
  - !ruby/object:Gem::Version
242
- version: '1.30'
242
+ version: '1.33'
243
243
  - !ruby/object:Gem::Dependency
244
244
  name: simplecov
245
245
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file