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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ffb3eac4152f6f8450a1cafad2a319cc3946420de5c5a2d03d2330ac05714a9
4
- data.tar.gz: 914f27475515b0fcad6023ec2ab70ad08b3245e0a4e24ed07130f1c472ee46b5
3
+ metadata.gz: 7bb92014dbe016429251eefb589dfcc53838c3d09142784e03ac3bf25189ca0c
4
+ data.tar.gz: af1b6cd458cc0fa3d2a0577c28d3eb61dfb84717b2430530f2225fe67557b08d
5
5
  SHA512:
6
- metadata.gz: a1f0c7fe961d41ac672b11364037fc2f05c3263966b662aa8d439300812c2a7a5f5a932f7f213cf4d28cd96d43e9b159c32badb696d33adf050aad70a7473a27
7
- data.tar.gz: 88a32db01b1c5b2c0c5b0e3967f779f1e99f6ef355f586b6dd94a7b05b0c06cb7873539002af644f45a0575d8f4574dd5d4ff76796a2cc57896ba0481012c86a
6
+ metadata.gz: 1ad84177f8e9d94cf7aef2cec3958d8d5611f8b95534be874660ca8f6a481426558f8f6b51c272c8260a31438a4a518b4a22305d427103d66dcd6c0c16e046bc
7
+ data.tar.gz: c21a7f8b671f8ae594101c1eecf669ec16e1aeae2470e7d455e3aa7cd050e045b98aedfaf6ba27f25112d8e1a9795bfaf98ccdb365057674e505c7d319bab09b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cri (2.15.2)
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.1)
19
+ jaro_winkler (1.5.2)
20
20
  json (2.1.0)
21
21
  minitest (5.11.3)
22
- parallel (1.12.1)
23
- parser (2.5.1.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.1)
28
- rubocop (0.59.2)
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.0, >= 1.0.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.6.0)
42
+ term-ansicolor (1.7.1)
43
43
  tins (~> 1.0)
44
44
  thor (0.19.4)
45
- tins (1.17.0)
46
- unicode-display_width (1.4.0)
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
- 1.16.2
61
+ 2.0.1
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Cri News
2
2
 
3
+ ## 2.15.3
4
+
5
+ Fixes:
6
+
7
+ * Made `ArgumentList#each` callable without a block, in which case it returns an `Enumerator` (mimicking `Array`) (#87, #88)
8
+
3
9
  ## 2.15.2
4
10
 
5
11
  Fixes:
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)
@@ -20,8 +20,6 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_dependency('colored', '~> 1.2')
22
22
 
23
- s.add_development_dependency('bundler', '~> 1.6')
24
-
25
23
  s.rdoc_options = ['--main', 'README.md']
26
24
  s.extra_rdoc_files = ['LICENSE', 'README.md', 'NEWS.md']
27
25
  end
@@ -37,6 +37,8 @@ module Cri
37
37
  end
38
38
 
39
39
  def each
40
+ return to_enum(__method__) unless block_given?
41
+
40
42
  @arguments_array.each { |e| yield(e) }
41
43
  self
42
44
  end
@@ -160,15 +160,15 @@ module Cri
160
160
  transform: nil,
161
161
  &block)
162
162
  @command.option_definitions << Cri::OptionDefinition.new(
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,
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: 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: @short,
39
- long: @long,
40
- desc: @desc,
41
- argument: @argument,
42
- multiple: @multiple,
43
- block: @block,
44
- hidden: @hidden,
45
- default: @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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cri
4
4
  # The current Cri version.
5
- VERSION = '2.15.2'
5
+ VERSION = '2.15.3'
6
6
  end
@@ -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
 
@@ -552,14 +552,14 @@ module Cri
552
552
 
553
553
  def make_opt_defn(hash)
554
554
  Cri::OptionDefinition.new(
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),
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.2
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: 2018-10-20 00:00:00.000000000 Z
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
- rubyforge_project:
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