mutant 0.10.5 → 0.10.6

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: c2e6667e21b413029cf11b268c6d36986a5960921945aad01199aaff5881a3c2
4
- data.tar.gz: 3434159c18f80d786ecc728b3fde7eaa5e2c3939ec70c5d931e717288ba6d48f
3
+ metadata.gz: 1b5a7d1620b6792fa1cef90ead01124cf50287a165a0bdd415fbc9aab9ecfde8
4
+ data.tar.gz: 758609938988d4d8de30a6f95a47c603fc4d5365ba98ad1a113a6de11f8e074f
5
5
  SHA512:
6
- metadata.gz: a036402f0e95f0a41b16dbbede078a56f5ccee4d241052b034022fd6a7db505037cefb5b093061d2d12326f6a4e2ae7bd250ad7bb160586aa14dc831d019a398
7
- data.tar.gz: 188b1bb29e0639c6a7f3c72b5ee4ca24ac25bc799181b1f7d2e6f0b056fb92aabe6b7c657345ac080e4002625dad227752c1e7c4a57d5e0f506d608f3c4be28d
6
+ metadata.gz: 3ecd6aea62e2d01cb68cc9c9c651190305459b7f1b796f4360ce872ce0dbb1871cb40821744d1c09a029a80f39a93cbda9a242591ceae405e47ed971d3d861f9
7
+ data.tar.gz: '09e132e435163308309c0185abdd39ea9b6be0d2bd0efa0956049c366f0b521df866a3b7fd04d2e13550bd4f2b09993c659530f86b00142adff69ebc14af3a16'
@@ -105,7 +105,7 @@ module Mutant
105
105
  def parse
106
106
  Either
107
107
  .wrap_error(OptionParser::InvalidOption) { parser.order(arguments) }
108
- .lmap { |error| "#{full_name}: #{error}" }
108
+ .lmap(&method(:with_help))
109
109
  .bind(&method(:parse_remaining))
110
110
  end
111
111
 
@@ -159,9 +159,7 @@ module Mutant
159
159
  command_name, *arguments = arguments
160
160
 
161
161
  if command_name.nil?
162
- Either::Left.new(
163
- "Missing required subcommand!\n\n#{parser}"
164
- )
162
+ Either::Left.new(with_help('Missing required subcommand!'))
165
163
  else
166
164
  find_command(command_name).bind do |command|
167
165
  command.parse(**to_h, parent: self, arguments: arguments)
@@ -187,9 +185,13 @@ module Mutant
187
185
  if subcommand
188
186
  Either::Right.new(subcommand)
189
187
  else
190
- Either::Left.new("#{full_name}: Cannot find subcommand #{name.inspect}")
188
+ Either::Left.new(with_help("Cannot find subcommand #{name.inspect}"))
191
189
  end
192
190
  end
191
+
192
+ def with_help(message)
193
+ "#{full_name}: #{message}\n\n#{parser}"
194
+ end
193
195
  end # Command
194
196
  # rubocop:enable Metrics/ClassLength
195
197
  end # CLI
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.10.5'
5
+ VERSION = '0.10.6'
6
6
  end # Mutant
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-04 00:00:00.000000000 Z
11
+ date: 2020-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: abstract_type
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 0.5.3
187
+ version: 0.5.4
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 0.5.3
194
+ version: 0.5.4
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: variable
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -226,28 +226,28 @@ dependencies:
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '3.9'
229
+ version: '3.10'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '3.9'
236
+ version: '3.10'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rspec-core
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '3.9'
243
+ version: '3.10'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '3.9'
250
+ version: '3.10'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: rspec-its
253
253
  requirement: !ruby/object:Gem::Requirement
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '1.0'
271
+ version: '1.2'
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: '1.0'
278
+ version: '1.2'
279
279
  description: Mutation Testing for Ruby.
280
280
  email:
281
281
  - mbj@schirp-dso.com