cri 2.15.2 → 2.15.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -12
- data/NEWS.md +6 -0
- data/README.md +1 -0
- data/cri.gemspec +0 -2
- data/lib/cri/argument_list.rb +2 -0
- data/lib/cri/command_dsl.rb +8 -8
- data/lib/cri/option_definition.rb +8 -8
- data/lib/cri/version.rb +1 -1
- data/test/test_argument_list.rb +6 -0
- data/test/test_parser.rb +8 -8
- metadata +3 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bb92014dbe016429251eefb589dfcc53838c3d09142784e03ac3bf25189ca0c
|
4
|
+
data.tar.gz: af1b6cd458cc0fa3d2a0577c28d3eb61dfb84717b2430530f2225fe67557b08d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ad84177f8e9d94cf7aef2cec3958d8d5611f8b95534be874660ca8f6a481426558f8f6b51c272c8260a31438a4a518b4a22305d427103d66dcd6c0c16e046bc
|
7
|
+
data.tar.gz: c21a7f8b671f8ae594101c1eecf669ec16e1aeae2470e7d455e3aa7cd050e045b98aedfaf6ba27f25112d8e1a9795bfaf98ccdb365057674e505c7d319bab09b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cri (2.15.
|
4
|
+
cri (2.15.3)
|
5
5
|
colored (~> 1.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -16,41 +16,40 @@ GEM
|
|
16
16
|
thor (~> 0.19.4)
|
17
17
|
tins (~> 1.6)
|
18
18
|
docile (1.3.1)
|
19
|
-
jaro_winkler (1.5.
|
19
|
+
jaro_winkler (1.5.2)
|
20
20
|
json (2.1.0)
|
21
21
|
minitest (5.11.3)
|
22
|
-
parallel (1.
|
23
|
-
parser (2.
|
22
|
+
parallel (1.13.0)
|
23
|
+
parser (2.6.0.0)
|
24
24
|
ast (~> 2.4.0)
|
25
25
|
powerpack (0.1.2)
|
26
26
|
rainbow (3.0.0)
|
27
|
-
rake (12.3.
|
28
|
-
rubocop (0.
|
27
|
+
rake (12.3.2)
|
28
|
+
rubocop (0.63.0)
|
29
29
|
jaro_winkler (~> 1.5.1)
|
30
30
|
parallel (~> 1.10)
|
31
31
|
parser (>= 2.5, != 2.5.1.1)
|
32
32
|
powerpack (~> 0.1)
|
33
33
|
rainbow (>= 2.2.2, < 4.0)
|
34
34
|
ruby-progressbar (~> 1.7)
|
35
|
-
unicode-display_width (~> 1.
|
35
|
+
unicode-display_width (~> 1.4.0)
|
36
36
|
ruby-progressbar (1.10.0)
|
37
37
|
simplecov (0.16.1)
|
38
38
|
docile (~> 1.1)
|
39
39
|
json (>= 1.8, < 3)
|
40
40
|
simplecov-html (~> 0.10.0)
|
41
41
|
simplecov-html (0.10.2)
|
42
|
-
term-ansicolor (1.
|
42
|
+
term-ansicolor (1.7.1)
|
43
43
|
tins (~> 1.0)
|
44
44
|
thor (0.19.4)
|
45
|
-
tins (1.
|
46
|
-
unicode-display_width (1.4.
|
45
|
+
tins (1.20.2)
|
46
|
+
unicode-display_width (1.4.1)
|
47
47
|
yard (0.9.16)
|
48
48
|
|
49
49
|
PLATFORMS
|
50
50
|
ruby
|
51
51
|
|
52
52
|
DEPENDENCIES
|
53
|
-
bundler (~> 1.6)
|
54
53
|
coveralls
|
55
54
|
cri!
|
56
55
|
minitest
|
@@ -59,4 +58,4 @@ DEPENDENCIES
|
|
59
58
|
yard
|
60
59
|
|
61
60
|
BUNDLED WITH
|
62
|
-
|
61
|
+
2.0.1
|
data/NEWS.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Cri
|
2
2
|
|
3
3
|
[![Gem](http://img.shields.io/gem/v/cri.svg)](http://rubygems.org/gems/cri)
|
4
|
+
[![Gem downloads](https://img.shields.io/gem/dt/cri.svg)](http://rubygems.org/gems/cri)
|
4
5
|
[![Travis](http://img.shields.io/travis/ddfreyne/cri.svg)](https://travis-ci.org/ddfreyne/cri)
|
5
6
|
[![Coveralls](http://img.shields.io/coveralls/ddfreyne/cri.svg)](https://coveralls.io/r/ddfreyne/cri)
|
6
7
|
[![Codeclimate](http://img.shields.io/codeclimate/github/ddfreyne/cri.svg)](https://codeclimate.com/github/ddfreyne/cri)
|
data/cri.gemspec
CHANGED
data/lib/cri/argument_list.rb
CHANGED
data/lib/cri/command_dsl.rb
CHANGED
@@ -160,15 +160,15 @@ module Cri
|
|
160
160
|
transform: nil,
|
161
161
|
&block)
|
162
162
|
@command.option_definitions << Cri::OptionDefinition.new(
|
163
|
-
short:
|
164
|
-
long:
|
165
|
-
desc:
|
166
|
-
argument:
|
167
|
-
multiple:
|
168
|
-
hidden:
|
169
|
-
default:
|
163
|
+
short: short&.to_s,
|
164
|
+
long: long&.to_s,
|
165
|
+
desc: desc,
|
166
|
+
argument: argument,
|
167
|
+
multiple: multiple,
|
168
|
+
hidden: hidden,
|
169
|
+
default: default,
|
170
170
|
transform: transform,
|
171
|
-
block:
|
171
|
+
block: block,
|
172
172
|
)
|
173
173
|
end
|
174
174
|
alias opt option
|
@@ -35,14 +35,14 @@ module Cri
|
|
35
35
|
|
36
36
|
def to_h
|
37
37
|
{
|
38
|
-
short:
|
39
|
-
long:
|
40
|
-
desc:
|
41
|
-
argument:
|
42
|
-
multiple:
|
43
|
-
block:
|
44
|
-
hidden:
|
45
|
-
default:
|
38
|
+
short: @short,
|
39
|
+
long: @long,
|
40
|
+
desc: @desc,
|
41
|
+
argument: @argument,
|
42
|
+
multiple: @multiple,
|
43
|
+
block: @block,
|
44
|
+
hidden: @hidden,
|
45
|
+
default: @default,
|
46
46
|
transform: @transform,
|
47
47
|
}
|
48
48
|
end
|
data/lib/cri/version.rb
CHANGED
data/test/test_argument_list.rb
CHANGED
@@ -33,6 +33,12 @@ module Cri
|
|
33
33
|
assert_equal(%w[A B C], args.map(&:upcase))
|
34
34
|
end
|
35
35
|
|
36
|
+
def test_enum_without_block
|
37
|
+
args = Cri::ArgumentList.new(%w[a b c], false, [])
|
38
|
+
|
39
|
+
assert_equal(%w[A B C], args.each.map(&:upcase))
|
40
|
+
end
|
41
|
+
|
36
42
|
def test_no_method_error
|
37
43
|
args = Cri::ArgumentList.new(%w[a b c], false, [])
|
38
44
|
|
data/test/test_parser.rb
CHANGED
@@ -552,14 +552,14 @@ module Cri
|
|
552
552
|
|
553
553
|
def make_opt_defn(hash)
|
554
554
|
Cri::OptionDefinition.new(
|
555
|
-
short:
|
556
|
-
long:
|
557
|
-
desc:
|
558
|
-
argument:
|
559
|
-
multiple:
|
560
|
-
block:
|
561
|
-
hidden:
|
562
|
-
default:
|
555
|
+
short: hash.fetch(:short, nil),
|
556
|
+
long: hash.fetch(:long, nil),
|
557
|
+
desc: hash.fetch(:desc, nil),
|
558
|
+
argument: hash.fetch(:argument, nil),
|
559
|
+
multiple: hash.fetch(:multiple, nil),
|
560
|
+
block: hash.fetch(:block, nil),
|
561
|
+
hidden: hash.fetch(:hidden, nil),
|
562
|
+
default: hash.fetch(:default, nil),
|
563
563
|
transform: hash.fetch(:transform, nil),
|
564
564
|
)
|
565
565
|
end
|
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.
|
4
|
+
version: 2.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.2'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.6'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.6'
|
41
27
|
description: Cri allows building easy-to-use command-line interfaces with support
|
42
28
|
for subcommands.
|
43
29
|
email: denis.defreyne@stoneship.org
|
@@ -102,8 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
88
|
- !ruby/object:Gem::Version
|
103
89
|
version: '0'
|
104
90
|
requirements: []
|
105
|
-
|
106
|
-
rubygems_version: 2.7.7
|
91
|
+
rubygems_version: 3.0.2
|
107
92
|
signing_key:
|
108
93
|
specification_version: 4
|
109
94
|
summary: a library for building easy-to-use command-line tools
|