refinements 4.3.1 → 5.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee05d82fabb4c5c6471ee2156f35fc896d1fdc8de02a66336c18e08261450039
4
- data.tar.gz: 32fd9b4d0c3525cd12034cb319dbf2c45cf75b6366a1bfb6233a9c928b060b48
3
+ metadata.gz: c36cd632d68f733ce1eb8c417906fa3cf594bb12ecc14ae45b1a390f56282f75
4
+ data.tar.gz: b28e0796dc2b378eb9ec254e6f288b9006d49d56d680cbc2e2fe0e217d6528be
5
5
  SHA512:
6
- metadata.gz: feab9ef171a97bffa90ad17ef5675711d4c1bc89c05909206fc130e9ac9e692ac78291ee52d516f9aa204998c0993fe3e7ed790145385f7552dc7eaa1f647172
7
- data.tar.gz: 60d97e8909afa215ea0bba61155544870d736e3990a63fa8f470832bfceeb3ad6b2c98e376ee427b1ec476f90a46d6c6fb10e1e7345c439534e05f83041398d2
6
+ metadata.gz: 9f0d920a79b542f65c2bfafb4d79ac25604f6ce74a9e7789d4007ff3eeaff2d3eb608ad9c2ffceccc7c9c13c37d965043d3872c45ca72e4838fbc74e8471fc7b
7
+ data.tar.gz: fd91756efd889d84c875c2ad2c9009b9ba5d0d765cf6633ce60f6bc7c66804767222e2aa8453a8421d82257be810e2d99e446aa339bd7c1fd86d77f2a163ca2c
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,3 @@
1
- R�ÈF (��,�P#�4/%���D��=�qZ��!
1
+ k
2
+ �@�tD)zIӞ��� �=
3
+ >?״��q����<�hN�8b��zŅO�WWҎ��q��1zI>0ϻ������Ԋg?���F�`M�BOD�-��wW��G�e6nxЉ����q�;��F��&N�����+5n�Ϥ[U!
data/LICENSE.md CHANGED
@@ -1,20 +1,163 @@
1
- Copyright (c) 2015 [Alchemists](https://www.alchemists.io).
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.
1
+ # Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ ## 1. Definitions
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
12
+ Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is
15
+ granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are
18
+ controlled by, or are under common control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the direction or management of such
20
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this
24
+ License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications, including but not limited to
27
+ software source code, documentation source, and configuration files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a
30
+ Source form, including but not limited to compiled object code, generated documentation, and
31
+ conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the
34
+ License, as indicated by a copyright notice that is included in or attached to the work (an example
35
+ is provided in the Appendix below).
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or
38
+ derived from) the Work and for which the editorial revisions, annotations, elaborations, or other
39
+ modifications represent, as a whole, an original work of authorship. For the purposes of this
40
+ License, Derivative Works shall not include works that remain separable from, or merely link (or
41
+ bind by name) to the interfaces of, the Work and Derivative Works thereof.
42
+
43
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any
44
+ modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted
45
+ to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity
46
+ authorized to submit on behalf of the copyright owner. For the purposes of this definition,
47
+ "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or
48
+ its representatives, including but not limited to communication on electronic mailing lists, source
49
+ code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor
50
+ for the purpose of discussing and improving the Work, but excluding communication that is
51
+ conspicuously marked or otherwise designated in writing by the copyright owner as "Not a
52
+ Contribution."
53
+
54
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
55
+ Contribution has been received by Licensor and subsequently incorporated within the Work.
56
+
57
+ ## 2. Grant of Copyright License
58
+
59
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a
60
+ perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
61
+ reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
62
+ distribute the Work and such Derivative Works in Source or Object form.
63
+
64
+ ## 3. Grant of Patent License
65
+
66
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a
67
+ perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
68
+ section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer
69
+ the Work, where such license applies only to those patent claims licensable by such Contributor that
70
+ are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s)
71
+ with the Work to which such Contribution(s) was submitted. If You institute patent litigation
72
+ against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or
73
+ a Contribution incorporated within the Work constitutes direct or contributory patent infringement,
74
+ then any patent licenses granted to You under this License for that Work shall terminate as of the
75
+ date such litigation is filed.
76
+
77
+ ## 4. Redistribution
78
+
79
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
80
+ or without modifications, and in Source or Object form, provided that You meet the following
81
+ conditions:
82
+
83
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
84
+
85
+ 2. You must cause any modified files to carry prominent notices stating that You changed the
86
+ files; and
87
+
88
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
+ patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
+ notices that do not pertain to any part of the Derivative Works; and
91
+
92
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
93
+ Works that You distribute must include a readable copy of the attribution notices contained
94
+ within such NOTICE file, excluding those notices that do not pertain to any part of the
95
+ Derivative Works, in at least one of the following places: within a NOTICE text file
96
+ distributed as part of the Derivative Works; within the Source form or documentation, if
97
+ provided along with the Derivative Works; or, within a display generated by the Derivative
98
+ Works, if and wherever such third-party notices normally appear. The contents of the NOTICE
99
+ file are for informational purposes only and do not modify the License. You may add Your own
100
+ attribution notices within Derivative Works that You distribute, alongside or as an addendum to
101
+ the NOTICE text from the Work, provided that such additional attribution notices cannot be
102
+ construed as modifying the License.
103
+
104
+ You may add Your own copyright statement to Your modifications and may provide additional or
105
+ different license terms and conditions for use, reproduction, or distribution of Your modifications,
106
+ or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
107
+ the Work otherwise complies with the conditions stated in this License.
108
+
109
+ ## 5. Submission of Contributions
110
+
111
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
112
+ Work by You to the Licensor shall be under the terms and conditions of this License, without any
113
+ additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify
114
+ the terms of any separate license agreement you may have executed with Licensor regarding such
115
+ Contributions.
116
+
117
+ ## 6. Trademarks
118
+
119
+ This License does not grant permission to use the trade names, trademarks, service marks, or product
120
+ names of the Licensor, except as required for reasonable and customary use in describing the origin
121
+ of the Work and reproducing the content of the NOTICE file.
122
+
123
+ ## 7. Disclaimer of Warranty
124
+
125
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
126
+ Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
127
+ KIND, either express or implied, including, without limitation, any warranties or conditions of
128
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
129
+ responsible for determining the appropriateness of using or redistributing the Work and assume any
130
+ risks associated with Your exercise of permissions under this License.
131
+
132
+ ## 8. Limitation of Liability
133
+
134
+ In no event and under no legal theory, whether in tort (including negligence), contract, or
135
+ otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
136
+ agreed to in writing, shall any Contributor be liable to You for damages, including any direct,
137
+ indirect, special, incidental, or consequential damages of any character arising as a result of this
138
+ License or out of the use or inability to use the Work (including but not limited to damages for
139
+ loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
140
+ damages or losses), even if such Contributor has been advised of the possibility of such damages.
141
+
142
+ ## 9. Accepting Warranty or Additional Liability
143
+
144
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
145
+ for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
146
+ consistent with this License. However, in accepting such obligations, You may act only on Your own
147
+ behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You
148
+ agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or
149
+ claims asserted against, such Contributor by reason of your accepting any such warranty or
150
+ additional liability.
151
+
152
+ END OF TERMS AND CONDITIONS
153
+
154
+ Copyright 2015 [Alchemists](https://www.alchemists.io).
155
+
156
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
157
+ compliance with the License. You may obtain a [copy](http://www.apache.org/licenses/LICENSE-2.0) of
158
+ the License.
159
+
160
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
161
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
162
+ implied. See the License for the specific language governing permissions and limitations under the
163
+ License.
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Refinements
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/refinements.svg)](http://badge.fury.io/rb/refinements)
4
- [![Code Climate GPA](https://codeclimate.com/github/bkuhlmann/refinements.svg)](https://codeclimate.com/github/bkuhlmann/refinements)
5
- [![Code Climate Coverage](https://codeclimate.com/github/bkuhlmann/refinements/coverage.svg)](https://codeclimate.com/github/bkuhlmann/refinements)
4
+ [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/98be62123a95d5ac32d2/maintainability)](https://codeclimate.com/github/bkuhlmann/refinements/maintainability)
5
+ [![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/98be62123a95d5ac32d2/test_coverage)](https://codeclimate.com/github/bkuhlmann/refinements/test_coverage)
6
6
  [![Gemnasium Status](https://gemnasium.com/bkuhlmann/refinements.svg)](https://gemnasium.com/bkuhlmann/refinements)
7
7
  [![Circle CI Status](https://circleci.com/gh/bkuhlmann/refinements.svg?style=svg)](https://circleci.com/gh/bkuhlmann/refinements)
8
8
  [![Patreon](https://img.shields.io/badge/patreon-donate-brightgreen.svg)](https://www.patreon.com/bkuhlmann)
9
9
 
10
- Provides a collection of refinements to core Ruby objects.
10
+ Provides additional enhancements (refinements) to core Ruby objects.
11
11
 
12
12
  <!-- Tocer[start]: Auto-generated, don't remove. -->
13
13
 
@@ -46,8 +46,6 @@ Provides a collection of refinements to core Ruby objects.
46
46
  - `except!` - Answers new hash with given with given keys removed while modifying calling hash.
47
47
  - `#symbolize_keys` - Converts keys to symbols without modifying itself.
48
48
  - `#symbolize_keys!` - Converts keys to symbols while modifying itself.
49
- - `#slice` - Selects hash subset for given keys without modifying itself.
50
- - `#slice!` - Selects hash subset for given keys while modifying itself.
51
49
  - `#deep_merge` - Merges deeply nested hashes together without modifying itself.
52
50
  - `#deep_merge!` - Merges deeply nested hashes together while modifying itself.
53
51
  - `#reverse_merge` - Merges calling hash into passed in hash without modifying calling hash.
@@ -72,16 +70,7 @@ Provides a collection of refinements to core Ruby objects.
72
70
 
73
71
  ## Setup
74
72
 
75
- For a secure install, type the following from the command line (recommended):
76
-
77
- gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
78
- gem install refinements --trust-policy MediumSecurity
79
-
80
- NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification
81
- while allowing the installation of unsigned dependencies since they are beyond the scope of this
82
- gem.
83
-
84
- For an insecure install, type the following (not recommended):
73
+ Type the following to install:
85
74
 
86
75
  gem install refinements
87
76
 
@@ -7,7 +7,7 @@ module Refinements
7
7
  module BigDecimals
8
8
  refine BigDecimal do
9
9
  def inspect
10
- format "#<BigDecimal:%x %s>", object_id, to_s("F")
10
+ format "#<BigDecimal:%{id} %{string}>", id: object_id, string: to_s("F")
11
11
  end
12
12
  end
13
13
  end
@@ -22,14 +22,7 @@ module Refinements
22
22
  keys.each { |key| self[key.to_sym] = delete key }
23
23
  self
24
24
  end
25
-
26
- def slice *keys
27
- select { |key, _value| keys.include? key }
28
- end
29
-
30
- def slice! *keys
31
- replace slice(*keys)
32
- end
25
+ # rubocop:enable Performance/HashEachMethods
33
26
 
34
27
  def deep_merge other
35
28
  dup.deep_merge! other
@@ -64,5 +57,6 @@ module Refinements
64
57
  yield values
65
58
  end
66
59
  end
60
+ # rubocop:enable Metrics/BlockLength
67
61
  end
68
62
  end
@@ -12,7 +12,7 @@ module Refinements
12
12
  end
13
13
 
14
14
  def self.version
15
- "4.3.1"
15
+ "5.0.1"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -87,5 +87,6 @@ module Refinements
87
87
  end
88
88
  end
89
89
  end
90
+ # rubocop:enable Metrics/BlockLength
90
91
  end
91
92
  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: 4.3.1
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -30,7 +30,7 @@ cert_chain:
30
30
  MQXa5aqjoFEODxVbBBI6NyNVH4gMKDsILEFlH/mcBQKKQwXj2McJmB8jIG+WuKoE
31
31
  GyTL6s+8CnN9sL2Spfh/YdRn/29r4g2qi6FomQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2017-11-19 00:00:00.000000000 Z
33
+ date: 2018-01-01 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: awesome_print
@@ -88,34 +88,6 @@ dependencies:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
90
  version: '1.0'
91
- - !ruby/object:Gem::Dependency
92
- name: gemsmith
93
- requirement: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: '10.4'
98
- type: :development
99
- prerelease: false
100
- version_requirements: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: '10.4'
105
- - !ruby/object:Gem::Dependency
106
- name: git-cop
107
- requirement: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '1.7'
112
- type: :development
113
- prerelease: false
114
- version_requirements: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '1.7'
119
91
  - !ruby/object:Gem::Dependency
120
92
  name: guard-rspec
121
93
  requirement: !ruby/object:Gem::Requirement
@@ -172,20 +144,6 @@ dependencies:
172
144
  - - "~>"
173
145
  - !ruby/object:Gem::Version
174
146
  version: '3.5'
175
- - !ruby/object:Gem::Dependency
176
- name: pry-state
177
- requirement: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - "~>"
180
- - !ruby/object:Gem::Version
181
- version: '0.1'
182
- type: :development
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - "~>"
187
- - !ruby/object:Gem::Version
188
- version: '0.1'
189
147
  - !ruby/object:Gem::Dependency
190
148
  name: rake
191
149
  requirement: !ruby/object:Gem::Requirement
@@ -234,14 +192,14 @@ dependencies:
234
192
  requirements:
235
193
  - - "~>"
236
194
  - !ruby/object:Gem::Version
237
- version: '0.51'
195
+ version: '0.52'
238
196
  type: :development
239
197
  prerelease: false
240
198
  version_requirements: !ruby/object:Gem::Requirement
241
199
  requirements:
242
200
  - - "~>"
243
201
  - !ruby/object:Gem::Version
244
- version: '0.51'
202
+ version: '0.52'
245
203
  - !ruby/object:Gem::Dependency
246
204
  name: wirb
247
205
  requirement: !ruby/object:Gem::Requirement
@@ -285,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
285
243
  requirements:
286
244
  - - "~>"
287
245
  - !ruby/object:Gem::Version
288
- version: '2.4'
246
+ version: '2.5'
289
247
  required_rubygems_version: !ruby/object:Gem::Requirement
290
248
  requirements:
291
249
  - - ">="
@@ -293,8 +251,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
251
  version: '0'
294
252
  requirements: []
295
253
  rubyforge_project:
296
- rubygems_version: 2.7.2
254
+ rubygems_version: 2.7.4
297
255
  signing_key:
298
256
  specification_version: 4
299
- summary: Provides a collection of refinements to core Ruby objects.
257
+ summary: Provides additional enhancements (refinements) to core Ruby objects.
300
258
  test_files: []
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- "�#Cpc�����&X[HE�<�=
1
+ f�.T�x�Q�w������H�TS��]��?�Q�h&}W�t�f����%�+���|��C/w���-���"�N��$���?Y��D��>U��*�� F��U�?�v�+R� �;'��1#)���ÎW0X
2
+ �̔ܭg�*����+uJ�8u:������b�|�cs�n��M >����)���9�aXs��6�4n�����8�0�c���S`����C�|����(�Ѕ3���,��ހz
3
+ W����i���