refinements 6.1.0 → 6.2.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: a52d154d8596b5431d7238b4b6a8cb9c895bb395d1cd62412fe9e8043db62698
4
- data.tar.gz: d3fdf4ff62d204f51ed46d8b3fd1b7621c7d683ec4e55dd2bc97f1bdb522cc92
3
+ metadata.gz: adf4a5bfa549c00fa3bd61b60b06de874a1b51f5aab50b8c9eb6533782756fbc
4
+ data.tar.gz: e64e5515a48caa7676856135652d8a3db93638ed8bc7cc8c7572c4c77fb3b88e
5
5
  SHA512:
6
- metadata.gz: 6987350a4caeabe1d34ccf4208341f01e9ede1ede85460c4bec8badfe7b88a035a67b40679a4f859f599838d544257e77d3d701fc998f0e57ce2dd74fec4c07e
7
- data.tar.gz: fb608b317a0b41278bf5c10d726cbbec279f8350b22ebc726d4ca0ed2e950b38a3f3513e6016f062d7ba6e9c83f7b7984a671da4282e3aefc9c8a3ae854ef959
6
+ metadata.gz: 5b5b19992c8338c0d94ea23583af9ee8b28af4d745016598df6ccbad94153e86532d8b2ed6c4a4a658f33ff28acd1d40b7e27d6441c0bfddac7d4e728b54f03f
7
+ data.tar.gz: f7180a47a4e3a23bdb1f7c825fe853d5511fce6a33c48ce4f6e6fd1df4ce5cbc5ece60d1d8830d864c72dc8a543bd99237e9a71aaa1fa0d28720c48de2cadb1a
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -40,8 +40,8 @@ Provides additional enhancements (refinements) to core Ruby objects.
40
40
  - Provides BigDecimal refinements:
41
41
  - `#inspect` - Allows one to inspect a big decimal with numeric representation.
42
42
  - Provides Hash refinements:
43
- - `#except` - Answers new hash with given with given keys removed without modifying calling hash.
44
- - `#except!` - Answers new hash with given with given keys removed while modifying calling hash.
43
+ - `#except` - Answers new hash with given keys removed without modifying calling hash.
44
+ - `#except!` - Answers new hash with given keys removed while modifying calling hash.
45
45
  - `#symbolize_keys` - Converts keys to symbols without modifying itself.
46
46
  - `#symbolize_keys!` - Converts keys to symbols while modifying itself.
47
47
  - `#deep_merge` - Merges deeply nested hashes together without modifying itself.
@@ -174,7 +174,7 @@ The following sections demonstrate how each refinement enriches your objects wit
174
174
  "example".first 4 # => "exam"
175
175
 
176
176
  "instant".last # => "t"
177
- "instant".first 3 # => "ant"
177
+ "instant".last 3 # => "ant"
178
178
 
179
179
  " \n\t\r".blank? # => true
180
180
  "example".up # => "Example"
@@ -9,7 +9,7 @@ module Refinements
9
9
  end
10
10
 
11
11
  def compress!
12
- replace(compress)
12
+ replace compress
13
13
  end
14
14
  end
15
15
  end
@@ -12,7 +12,7 @@ module Refinements
12
12
  end
13
13
 
14
14
  def self.version
15
- "6.1.0"
15
+ "6.2.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -51,7 +51,7 @@ module Refinements
51
51
  end
52
52
 
53
53
  def camelcase
54
- if match?(self.class.delimiters)
54
+ if match? self.class.delimiters
55
55
  result = join_parts split(%r(\s*\-\s*|\s*\/\s*|\s*\:+\s*)), method: :up, delimiter: "::"
56
56
  join_parts result.split(/\s*\_\s*|\s+/), method: :up
57
57
  else
@@ -60,7 +60,7 @@ module Refinements
60
60
  end
61
61
 
62
62
  def snakecase
63
- if match?(self.class.delimiters)
63
+ if match? self.class.delimiters
64
64
  result = join_parts split(%r(\s*\-\s*|\s*\/\s*|\s*\:+\s*)), method: :down, delimiter: "/"
65
65
  join_parts result.split(/(?=[A-Z])|\s*\_\s*|\s+/), method: :down, delimiter: "_"
66
66
  else
@@ -69,7 +69,7 @@ module Refinements
69
69
  end
70
70
 
71
71
  def titleize
72
- if match?(self.class.delimiters)
72
+ if match? self.class.delimiters
73
73
  result = join_parts split(/(?=[A-Z])|\s*\_\s*|\s*\-\s*|\s+/), method: :up, delimiter: " "
74
74
  join_parts result.split(%r(\s*\/\s*|\s*\:+\s*)), method: :up, delimiter: "/"
75
75
  else
@@ -83,7 +83,7 @@ module Refinements
83
83
  # :reek:UtilityFunction
84
84
  def join_parts parts, method:, delimiter: ""
85
85
  parts.reduce "" do |result, part|
86
- next part.__send__(method) if result.empty?
86
+ next part.__send__ method if result.empty?
87
87
 
88
88
  "#{result}#{delimiter}#{part.__send__ method}"
89
89
  end
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.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,26 +10,25 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xODAyMTQxNTA4NDVaFw0xOTAyMTQx
15
- NTA4NDVaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBAjANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xOTAyMTcxNjAxMTFaFw0yMDAyMTcx
15
+ NjAxMTFaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
19
19
  9z0A8KcGhz67SdcoQiD7qiCjL/2NTeWHOzkpPrdGlt088+VerEEGf5I13QCvaftP
20
20
  D5vkU0YlAm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UvcyyQrGj5sQRxMTzuMXzzQxtHnuTuKrcz16HMTX/O
28
+ dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
29
+ y84=
31
30
  -----END CERTIFICATE-----
32
- date: 2019-02-02 00:00:00.000000000 Z
31
+ date: 2019-04-01 00:00:00.000000000 Z
33
32
  dependencies:
34
33
  - !ruby/object:Gem::Dependency
35
34
  name: awesome_print
@@ -294,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
293
  - !ruby/object:Gem::Version
295
294
  version: '0'
296
295
  requirements: []
297
- rubygems_version: 3.0.2
296
+ rubygems_version: 3.0.3
298
297
  signing_key:
299
298
  specification_version: 4
300
299
  summary: Provides additional enhancements (refinements) to core Ruby objects.
metadata.gz.sig CHANGED
Binary file