cri 2.15.9 → 2.15.10

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: 4401ab0bc18e9f1603e6de169020202c419a49b25c4afac97e979d60bc866ef3
4
- data.tar.gz: eb540e18c8a84d7b8fbfb2b995c538f668455a0d13d90557ea3ac404c66eb17e
3
+ metadata.gz: 4ac76773abd662b4cdd83c22ade38073436ae16afeef75ad95060578b71c23ea
4
+ data.tar.gz: 4386555ef8c6d3c27f77205120291efc1898be80973550a81271a89ddaef8495
5
5
  SHA512:
6
- metadata.gz: d2fd32fe7476d4be56325e8911372a41c7048627bac07d7eae5fa847e82a4994c00d244c84ccfd5335c18e957ab49be79eb54746125141106c0d1fc88f62a8b1
7
- data.tar.gz: 97d558d0037d6a90ba758e42b0777c2060a91df46b8d773ba04c35f53a5f1d4db3da8372dfd1e24c6cbf2a4960e7607c77f0ed322335d59c0fd68e73f9cb259e
6
+ metadata.gz: f096a5583428ecdca24ad0a800488cb07269d181bc853c6872d34caf7167b6d2d42fb0c2851da24eee4ed4fd1d0ed9e83aa2c75ed644275cb88ac081f0950ed7
7
+ data.tar.gz: 02645607f896fcc9ebf2f432d16f3b1b37f8688e4eca21d288bfa0e781c4e0cd2aa5125172ffde92fdec2a14f18220f93e454feb57449f88f7a95f1a0d2b9ef0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cri (2.15.9)
4
+ cri (2.15.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,22 +14,22 @@ GEM
14
14
  thor (>= 0.19.4, < 2.0)
15
15
  tins (~> 1.6)
16
16
  docile (1.3.2)
17
- jaro_winkler (1.5.2)
18
- json (2.2.0)
17
+ jaro_winkler (1.5.4)
18
+ json (2.3.0)
19
19
  m (1.5.1)
20
20
  method_source (>= 0.6.7)
21
21
  rake (>= 0.9.2.2)
22
22
  method_source (0.9.2)
23
- minitest (5.11.3)
24
- parallel (1.17.0)
25
- parser (2.6.3.0)
23
+ minitest (5.14.0)
24
+ parallel (1.19.1)
25
+ parser (2.7.0.2)
26
26
  ast (~> 2.4.0)
27
27
  rainbow (3.0.0)
28
- rake (12.3.2)
29
- rubocop (0.71.0)
28
+ rake (13.0.1)
29
+ rubocop (0.79.0)
30
30
  jaro_winkler (~> 1.5.1)
31
31
  parallel (~> 1.10)
32
- parser (>= 2.6)
32
+ parser (>= 2.7.0.1)
33
33
  rainbow (>= 2.2.2, < 4.0)
34
34
  ruby-progressbar (~> 1.7)
35
35
  unicode-display_width (>= 1.4.0, < 1.7)
@@ -39,12 +39,14 @@ GEM
39
39
  json (>= 1.8, < 3)
40
40
  simplecov-html (~> 0.10.0)
41
41
  simplecov-html (0.10.2)
42
+ sync (0.5.0)
42
43
  term-ansicolor (1.7.1)
43
44
  tins (~> 1.0)
44
- thor (0.20.3)
45
- tins (1.20.3)
46
- unicode-display_width (1.6.0)
47
- yard (0.9.19)
45
+ thor (1.0.1)
46
+ tins (1.24.0)
47
+ sync
48
+ unicode-display_width (1.6.1)
49
+ yard (0.9.24)
48
50
 
49
51
  PLATFORMS
50
52
  ruby
@@ -59,4 +61,4 @@ DEPENDENCIES
59
61
  yard
60
62
 
61
63
  BUNDLED WITH
62
- 2.0.2
64
+ 2.1.2
data/NEWS.md CHANGED
@@ -1,16 +1,22 @@
1
1
  # Cri News
2
2
 
3
+ ## 2.15.10
4
+
5
+ Fixes:
6
+
7
+ - Fixed warnings appearing in Ruby 2.7 (9a3d810)
8
+
3
9
  ## 2.15.9
4
10
 
5
11
  Fixes:
6
12
 
7
- * Fixed bug which could cause options from one command appear in other commands (#101, #102)
13
+ - Fixed bug which could cause options from one command appear in other commands (#101, #102)
8
14
 
9
15
  ## 2.15.8
10
16
 
11
17
  Fixes:
12
18
 
13
- * Don’t explicitly set default values for options (#99)
19
+ - Don’t explicitly set default values for options (#99)
14
20
 
15
21
  This release reverts a backwards-incompatible change introduced in 2.15.7.
16
22
 
@@ -63,89 +69,89 @@ This backwards-incompatible change was not intentional. To fix issue #94, a chan
63
69
 
64
70
  Fixes:
65
71
 
66
- * Options with a forbidden argument now default to false, rather than nil (#94, #96)
72
+ - Options with a forbidden argument now default to false, rather than nil (#94, #96)
67
73
 
68
74
  ## 2.15.6
69
75
 
70
76
  Fixes:
71
77
 
72
- * Fixed problem with help header not being shown if the summary is missing (#93)
78
+ - Fixed problem with help header not being shown if the summary is missing (#93)
73
79
 
74
80
  ## 2.15.5
75
81
 
76
82
  Fixes:
77
83
 
78
- * Restored compatibility with Ruby 2.3. (#91)
84
+ - Restored compatibility with Ruby 2.3. (#91)
79
85
 
80
86
  ## 2.15.4
81
87
 
82
88
  Fixes:
83
89
 
84
- * Removed dependency on `colored`, which restores functionality to gems that `colored` breaks (e.g. `awesome_print`) (#89, #90)
90
+ - Removed dependency on `colored`, which restores functionality to gems that `colored` breaks (e.g. `awesome_print`) (#89, #90)
85
91
 
86
92
  ## 2.15.3
87
93
 
88
94
  Fixes:
89
95
 
90
- * Made `ArgumentList#each` callable without a block, in which case it returns an `Enumerator` (mimicking `Array`) (#87, #88)
96
+ - Made `ArgumentList#each` callable without a block, in which case it returns an `Enumerator` (mimicking `Array`) (#87, #88)
91
97
 
92
98
  ## 2.15.2
93
99
 
94
100
  Fixes:
95
101
 
96
- * Fixed option propagation for two levels or more (#85, #86)
102
+ - Fixed option propagation for two levels or more (#85, #86)
97
103
 
98
104
  ## 2.15.1
99
105
 
100
106
  Fixes:
101
107
 
102
- * Made -h/--help not fail when parameters are defined for the command that -h/--help is called on (#76, #78)
108
+ - Made -h/--help not fail when parameters are defined for the command that -h/--help is called on (#76, #78)
103
109
 
104
110
  Enhancements:
105
111
 
106
- * Made `#option` raise an error when unrecognised parameters are passed to it (#77) [Marc-André Lafortune]
112
+ - Made `#option` raise an error when unrecognised parameters are passed to it (#77) [Marc-André Lafortune]
107
113
 
108
114
  ## 2.15.0
109
115
 
110
116
  Features:
111
117
 
112
- * Added support for parameter transformation (#72)
118
+ - Added support for parameter transformation (#72)
113
119
 
114
120
  ## 2.14.0
115
121
 
116
122
  Features:
117
123
 
118
- * Added `Cri::Command.load_file`
124
+ - Added `Cri::Command.load_file`
119
125
 
120
126
  ## 2.13.0
121
127
 
122
128
  Features:
123
129
 
124
- * Added support for explicitly specifying zero parameters using `#no_params` (#71)
130
+ - Added support for explicitly specifying zero parameters using `#no_params` (#71)
125
131
 
126
132
  ## 2.12.0
127
133
 
128
134
  Features:
129
135
 
130
- * Added support for parameter naming and validation (#70)
136
+ - Added support for parameter naming and validation (#70)
131
137
 
132
138
  ## 2.11.0
133
139
 
134
140
  Features:
135
141
 
136
- * Added support for transforming option values (#68)
142
+ - Added support for transforming option values (#68)
137
143
 
138
144
  ## 2.10.1
139
145
 
140
146
  Fixes:
141
147
 
142
- * Restored Ruby 2.1 compatibility (for now)
148
+ - Restored Ruby 2.1 compatibility (for now)
143
149
 
144
150
  ## 2.10.0
145
151
 
146
152
  Features:
147
153
 
148
- * Added support for skipping option parsing (#62) [Tim Sharpe]
154
+ - Added support for skipping option parsing (#62) [Tim Sharpe]
149
155
 
150
156
  This release drops support for Ruby 2.1, which is no longer supported.
151
157
 
@@ -153,102 +159,102 @@ This release drops support for Ruby 2.1, which is no longer supported.
153
159
 
154
160
  Fixes:
155
161
 
156
- * Made default values be always returned, even when not explicitly specified (#57, #58)
162
+ - Made default values be always returned, even when not explicitly specified (#57, #58)
157
163
 
158
164
  ## 2.9.0
159
165
 
160
166
  Features:
161
167
 
162
- * Allowed specifying default option value (#55)
168
+ - Allowed specifying default option value (#55)
163
169
 
164
170
  Enhancements:
165
171
 
166
- * Added support for specifying values for combined options (#56)
172
+ - Added support for specifying values for combined options (#56)
167
173
 
168
174
  ## 2.8.0
169
175
 
170
176
  Features:
171
177
 
172
- * Allowed passing `hard_exit: false` to `Command#run` to prevent `SystemExit` (#51)
173
- * Allowed specifying the default subcommand (#54)
178
+ - Allowed passing `hard_exit: false` to `Command#run` to prevent `SystemExit` (#51)
179
+ - Allowed specifying the default subcommand (#54)
174
180
 
175
181
  ## 2.7.1
176
182
 
177
183
  Fixes:
178
184
 
179
- * Fixed some grammatical mistakes
185
+ - Fixed some grammatical mistakes
180
186
 
181
187
  ## 2.7.0
182
188
 
183
189
  Features:
184
190
 
185
- * Added support for hidden options (#43, #44) [Bart Mesuere]
191
+ - Added support for hidden options (#43, #44) [Bart Mesuere]
186
192
 
187
193
  Enhancements:
188
194
 
189
- * Added option values to help output (#37, #40, #41)
190
- * Made option descriptions wrap (#36, #45) [Bart Mesuere]
195
+ - Added option values to help output (#37, #40, #41)
196
+ - Made option descriptions wrap (#36, #45) [Bart Mesuere]
191
197
 
192
198
  ## 2.6.1
193
199
 
194
- * Disable ANSI color codes when not supported (#31, #32)
200
+ - Disable ANSI color codes when not supported (#31, #32)
195
201
 
196
202
  ## 2.6.0
197
203
 
198
- * Added support for multi-valued options (#29) [Toon Willems]
204
+ - Added support for multi-valued options (#29) [Toon Willems]
199
205
 
200
206
  ## 2.5.0
201
207
 
202
- * Made the default help command handle subcommands (#27)
203
- * Added `#raw` method to argument arrays, returning all arguments including `--` (#22)
208
+ - Made the default help command handle subcommands (#27)
209
+ - Added `#raw` method to argument arrays, returning all arguments including `--` (#22)
204
210
 
205
211
  ## 2.4.1
206
212
 
207
- * Fixed ordering of option groups on Ruby 1.8.x (#14, #15)
208
- * Fixed ordering of commands when --verbose is passed (#16, #18)
213
+ - Fixed ordering of option groups on Ruby 1.8.x (#14, #15)
214
+ - Fixed ordering of commands when --verbose is passed (#16, #18)
209
215
 
210
216
  ## 2.4.0
211
217
 
212
- * Allowed either short or long option to be, eh, optional (#9, #10) [Ken Coar]
213
- * Fixed wrap-and-indent behavior (#12) [Ken Coar]
214
- * Moved version information into `cri/version`
218
+ - Allowed either short or long option to be, eh, optional (#9, #10) [Ken Coar]
219
+ - Fixed wrap-and-indent behavior (#12) [Ken Coar]
220
+ - Moved version information into `cri/version`
215
221
 
216
222
  ## 2.3.0
217
223
 
218
- * Added colors (#1)
219
- * Added support for marking commands as hidden
224
+ - Added colors (#1)
225
+ - Added support for marking commands as hidden
220
226
 
221
227
  ## 2.2.1
222
228
 
223
- * Made command help sort subcommands
229
+ - Made command help sort subcommands
224
230
 
225
231
  ## 2.2.0
226
232
 
227
- * Allowed commands with subcommands to have a run block
233
+ - Allowed commands with subcommands to have a run block
228
234
 
229
235
  ## 2.1.0
230
236
 
231
- * Added support for runners
232
- * Split up local/global command options
237
+ - Added support for runners
238
+ - Split up local/global command options
233
239
 
234
240
  ## 2.0.2
235
241
 
236
- * Added command filename to stack traces
242
+ - Added command filename to stack traces
237
243
 
238
244
  ## 2.0.1
239
245
 
240
- * Sorted ambiguous command names
241
- * Restored compatibility with Ruby 1.8.x
246
+ - Sorted ambiguous command names
247
+ - Restored compatibility with Ruby 1.8.x
242
248
 
243
249
  ## 2.0.0
244
250
 
245
- * Added DSL
246
- * Added support for nested commands
251
+ - Added DSL
252
+ - Added support for nested commands
247
253
 
248
254
  ## 1.0.1
249
255
 
250
- * Made gem actually include code. D'oh.
256
+ - Made gem actually include code. D'oh.
251
257
 
252
258
  ## 1.0.0
253
259
 
254
- * Initial release!
260
+ - Initial release!
@@ -343,7 +343,7 @@ module Cri
343
343
  explicitly_no_params?,
344
344
  )
345
345
  handle_errors_while { parser.run }
346
- local_opts = parser.options
346
+ local_opts = parser.options
347
347
  global_opts = parent_opts.merge(parser.options)
348
348
  global_opts = add_defaults(global_opts)
349
349
 
@@ -375,8 +375,8 @@ module Cri
375
375
  #
376
376
  # @option params [IO] :io ($stdout) the IO the help text is intended for.
377
377
  # This influences the decision to enable/disable colored output.
378
- def help(params = {})
379
- HelpRenderer.new(self, params).render
378
+ def help(**params)
379
+ HelpRenderer.new(self, **params).render
380
380
  end
381
381
 
382
382
  # Compares this command's name to the other given command's name.
@@ -215,9 +215,9 @@ module Cri
215
215
  # @deprecated
216
216
  #
217
217
  # @see #option
218
- def required(short, long, desc, params = {}, &block)
218
+ def required(short, long, desc, **params, &block)
219
219
  params = params.merge(argument: :required)
220
- option(short, long, desc, params, &block)
220
+ option(short, long, desc, **params, &block)
221
221
  end
222
222
 
223
223
  # Adds a new option with a forbidden argument to the command. If a block
@@ -238,9 +238,9 @@ module Cri
238
238
  # @return [void]
239
239
  #
240
240
  # @see #option
241
- def flag(short, long, desc, params = {}, &block)
241
+ def flag(short, long, desc, **params, &block)
242
242
  params = params.merge(argument: :forbidden)
243
- option(short, long, desc, params, &block)
243
+ option(short, long, desc, **params, &block)
244
244
  end
245
245
  alias forbidden flag
246
246
 
@@ -264,9 +264,9 @@ module Cri
264
264
  # @deprecated
265
265
  #
266
266
  # @see #option
267
- def optional(short, long, desc, params = {}, &block)
267
+ def optional(short, long, desc, **params, &block)
268
268
  params = params.merge(argument: :optional)
269
- option(short, long, desc, params, &block)
269
+ option(short, long, desc, **params, &block)
270
270
  end
271
271
 
272
272
  # Sets the run block to the given block. The given block should have two
@@ -19,7 +19,7 @@ module Cri
19
19
  #
20
20
  # @option params [Boolean] :verbose true if the help output should be
21
21
  # verbose, false otherwise.
22
- def initialize(cmd, params = {})
22
+ def initialize(cmd, **params)
23
23
  @cmd = cmd
24
24
  @is_verbose = params.fetch(:verbose, false)
25
25
  @io = params.fetch(:io, $stdout)
@@ -13,16 +13,16 @@ module Cri
13
13
  attr_reader :default
14
14
  attr_reader :transform
15
15
 
16
- def initialize(params = {})
17
- @short = params.fetch(:short)
18
- @long = params.fetch(:long)
19
- @desc = params.fetch(:desc)
20
- @argument = params.fetch(:argument)
21
- @multiple = params.fetch(:multiple)
22
- @block = params.fetch(:block)
23
- @hidden = params.fetch(:hidden)
24
- @default = params.fetch(:default)
25
- @transform = params.fetch(:transform)
16
+ def initialize(short:, long:, desc:, argument:, multiple:, block:, hidden:, default:, transform:)
17
+ @short = short
18
+ @long = long
19
+ @desc = desc
20
+ @argument = argument
21
+ @multiple = multiple
22
+ @block = block
23
+ @hidden = hidden
24
+ @default = default
25
+ @transform = transform
26
26
 
27
27
  if @short.nil? && @long.nil?
28
28
  raise ArgumentError, 'short and long options cannot both be nil'
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cri
4
4
  # The current Cri version.
5
- VERSION = '2.15.9'
5
+ VERSION = '2.15.10'
6
6
  end
@@ -549,7 +549,7 @@ module Cri
549
549
  end
550
550
 
551
551
  def test_hidden_commands_multiple
552
- cmd = nested_cmd
552
+ cmd = nested_cmd
553
553
 
554
554
  subcmd = simple_cmd
555
555
  cmd.add_command subcmd
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cri
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.9
4
+ version: 2.15.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-14 00:00:00.000000000 Z
11
+ date: 2020-01-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Cri allows building easy-to-use command-line interfaces with support
14
14
  for subcommands.
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubygems_version: 3.0.4
77
+ rubygems_version: 3.1.2
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: a library for building easy-to-use command-line tools