refinements 7.13.0 → 7.14.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: 58f24ccfa83d2f2af820c05d19c575e371ed5c6471177c8c58648006cf3ca945
4
- data.tar.gz: 7fccb86818487e2de337969b42c8ec81f52e28bc1a3edb1d8cc0bf2c206ee2b0
3
+ metadata.gz: 4abbbd79616d97836ca58503bb4638e2638e14732e76e7c00b3f5c033f708edc
4
+ data.tar.gz: 516c79b5361a7512ca4e63c72303d8fb0d2cb85c693bc9aa13c36ef767580f10
5
5
  SHA512:
6
- metadata.gz: 773c5bf918f8e7f958dc602b9c6d7edefc29d644d7d928db0f21e2fa93616781e075b1c4743281b025daf8335c13761d460d149caa470c8000a11aecc91f25f8
7
- data.tar.gz: 1cbe58132380e683a0e47813fe676440055fa2a9af1bd582bf8661c3778b1aa354cda5d3939f07b69a6190f72b28e9635890aaa6810af7c9255fef27c025e1a5
6
+ metadata.gz: 2f15aa4b466d6e610a2ffc45ad16285d27107c93a4260d214abcee42e66005951a5f2a708da6b04a28826ab3abd0a85ad0e1a707782b6ba5c51ef5cb0b705ec7
7
+ data.tar.gz: ec214191217bb870ca264fbfe3fa31d57b6c37c28e0f92806f779d3ea8400fbac11ee4aa38c82d6d10d7b07187a2360a7aa810ef802e6d219a217043cd76e69c
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -125,24 +125,24 @@ example.compress! # => ["An", "Example"]
125
125
  example # => ["An", "Example"]
126
126
  ----
127
127
 
128
- ===== #exclude
128
+ ===== #excluding
129
129
 
130
130
  Removes given array or elements without mutating itself.
131
131
 
132
132
  [source,ruby]
133
133
  ----
134
- [1, 2, 3, 4, 5].exclude [4, 5] # => [1, 2, 3]
135
- [1, 2, 3, 4, 5].exclude 4, 5 # => [1, 2, 3]
134
+ [1, 2, 3, 4, 5].excluding [4, 5] # => [1, 2, 3]
135
+ [1, 2, 3, 4, 5].excluding 4, 5 # => [1, 2, 3]
136
136
  ----
137
137
 
138
- ===== #include
138
+ ===== #including
139
139
 
140
140
  Adds given array or elements without mutating itself.
141
141
 
142
142
  [source,ruby]
143
143
  ----
144
- [1, 2, 3].include [4, 5] # => [1, 2, 3, 4, 5]
145
- [1, 2, 3].include 4, 5 # => [1, 2, 3, 4, 5]
144
+ [1, 2, 3].including [4, 5] # => [1, 2, 3, 4, 5]
145
+ [1, 2, 3].including 4, 5 # => [1, 2, 3, 4, 5]
146
146
  ----
147
147
 
148
148
  ===== #intersperse
@@ -12,10 +12,20 @@ module Refinements
12
12
  end
13
13
 
14
14
  def exclude *elements
15
+ warn "[DEPRECATION]: #exclude is deprecated, use #excluding instead."
16
+ excluding(*elements)
17
+ end
18
+
19
+ def excluding *elements
15
20
  self - elements.flatten
16
21
  end
17
22
 
18
23
  def include *elements
24
+ warn "[DEPRECATION]: #include is deprecated, use #including instead."
25
+ including(*elements)
26
+ end
27
+
28
+ def including *elements
19
29
  self + elements.flatten
20
30
  end
21
31
 
@@ -5,7 +5,7 @@ module Refinements
5
5
  module Identity
6
6
  NAME = "refinements"
7
7
  LABEL = "Refinements"
8
- VERSION = "7.13.0"
8
+ VERSION = "7.14.0"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}"
10
10
  end
11
11
  end
@@ -14,8 +14,7 @@ module Refinements
14
14
 
15
15
  refine Pathname do
16
16
  def change_dir &block
17
- Dir.chdir(self, &block)
18
- self
17
+ block_given? ? Dir.chdir(self, &block) : (Dir.chdir self and self)
19
18
  end
20
19
 
21
20
  def copy to
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: 7.13.0
4
+ version: 7.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
29
  QWc=
30
30
  -----END CERTIFICATE-----
31
- date: 2020-11-07 00:00:00.000000000 Z
31
+ date: 2020-11-14 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler-audit
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.6'
39
+ version: '0.7'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.6'
46
+ version: '0.7'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler-leak
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -58,34 +58,6 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.2'
61
- - !ruby/object:Gem::Dependency
62
- name: gemsmith
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '14.2'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '14.2'
75
- - !ruby/object:Gem::Dependency
76
- name: git-lint
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '1.0'
89
61
  - !ruby/object:Gem::Dependency
90
62
  name: guard-rspec
91
63
  requirement: !ruby/object:Gem::Requirement
@@ -162,42 +134,42 @@ dependencies:
162
134
  requirements:
163
135
  - - "~>"
164
136
  - !ruby/object:Gem::Version
165
- version: '3.9'
137
+ version: '3.10'
166
138
  type: :development
167
139
  prerelease: false
168
140
  version_requirements: !ruby/object:Gem::Requirement
169
141
  requirements:
170
142
  - - "~>"
171
143
  - !ruby/object:Gem::Version
172
- version: '3.9'
144
+ version: '3.10'
173
145
  - !ruby/object:Gem::Dependency
174
146
  name: rubocop
175
147
  requirement: !ruby/object:Gem::Requirement
176
148
  requirements:
177
149
  - - "~>"
178
150
  - !ruby/object:Gem::Version
179
- version: '0.89'
151
+ version: '1.3'
180
152
  type: :development
181
153
  prerelease: false
182
154
  version_requirements: !ruby/object:Gem::Requirement
183
155
  requirements:
184
156
  - - "~>"
185
157
  - !ruby/object:Gem::Version
186
- version: '0.89'
158
+ version: '1.3'
187
159
  - !ruby/object:Gem::Dependency
188
160
  name: rubocop-performance
189
161
  requirement: !ruby/object:Gem::Requirement
190
162
  requirements:
191
163
  - - "~>"
192
164
  - !ruby/object:Gem::Version
193
- version: '1.5'
165
+ version: '1.8'
194
166
  type: :development
195
167
  prerelease: false
196
168
  version_requirements: !ruby/object:Gem::Requirement
197
169
  requirements:
198
170
  - - "~>"
199
171
  - !ruby/object:Gem::Version
200
- version: '1.5'
172
+ version: '1.8'
201
173
  - !ruby/object:Gem::Dependency
202
174
  name: rubocop-rake
203
175
  requirement: !ruby/object:Gem::Requirement
@@ -218,14 +190,14 @@ dependencies:
218
190
  requirements:
219
191
  - - "~>"
220
192
  - !ruby/object:Gem::Version
221
- version: '1.39'
193
+ version: '2.0'
222
194
  type: :development
223
195
  prerelease: false
224
196
  version_requirements: !ruby/object:Gem::Requirement
225
197
  requirements:
226
198
  - - "~>"
227
199
  - !ruby/object:Gem::Version
228
- version: '1.39'
200
+ version: '2.0'
229
201
  - !ruby/object:Gem::Dependency
230
202
  name: simplecov
231
203
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file