cri 2.15.11 → 2.15.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/Gemfile.lock +33 -44
- data/LICENSE +1 -1
- data/NEWS.md +6 -0
- data/README.md +1 -5
- data/cri.gemspec +2 -1
- data/lib/cri/help_renderer.rb +3 -3
- data/lib/cri/version.rb +1 -1
- data/test/helper.rb +1 -4
- data/test/test_argument_list.rb +1 -1
- data/test/test_command.rb +1 -1
- data/test/test_command_dsl.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d81666ca6a340e984db64435f69d16a568ec524f5f4339414f17a7b2a357ebd7
|
4
|
+
data.tar.gz: a082b81e9645556563989909db54d57dd44c12a7848562e3c44c7a61fc29a938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 416908fc772aa7a643232dcab1bb3b2b63e64b285b4f4c2f6289cb1a8bf586591e2c2f1e733d79b031ba65391b4d7679b58813bbec2adfd73f0d30e5ce249d64
|
7
|
+
data.tar.gz: 789004b071d88642cec16f501a3d0f94a2bb9a23c95582782102378a2e6122bdafe209227d4bb77cdcc4304d6f40f02bb1dd8e7835080e7c58a7eb238fd8a49e
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,67 +1,56 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cri (2.15.
|
4
|
+
cri (2.15.12)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
term-ansicolor (~> 1.3)
|
14
|
-
thor (>= 0.19.4, < 2.0)
|
15
|
-
tins (~> 1.6)
|
16
|
-
docile (1.3.4)
|
17
|
-
json (2.5.1)
|
18
|
-
m (1.5.1)
|
9
|
+
ast (2.4.2)
|
10
|
+
json (2.7.2)
|
11
|
+
language_server-protocol (3.17.0.3)
|
12
|
+
m (1.6.2)
|
19
13
|
method_source (>= 0.6.7)
|
20
14
|
rake (>= 0.9.2.2)
|
21
|
-
method_source (1.
|
22
|
-
minitest (5.
|
23
|
-
parallel (1.
|
24
|
-
parser (3.
|
15
|
+
method_source (1.1.0)
|
16
|
+
minitest (5.23.1)
|
17
|
+
parallel (1.25.1)
|
18
|
+
parser (3.3.2.0)
|
25
19
|
ast (~> 2.4.1)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
racc
|
21
|
+
racc (1.8.0)
|
22
|
+
rainbow (3.1.1)
|
23
|
+
rake (13.2.1)
|
24
|
+
regexp_parser (2.9.2)
|
25
|
+
rexml (3.2.9)
|
26
|
+
strscan
|
27
|
+
rubocop (1.64.1)
|
28
|
+
json (~> 2.3)
|
29
|
+
language_server-protocol (>= 3.17.0)
|
31
30
|
parallel (~> 1.10)
|
32
|
-
parser (>=
|
31
|
+
parser (>= 3.3.0.2)
|
33
32
|
rainbow (>= 2.2.2, < 4.0)
|
34
33
|
regexp_parser (>= 1.8, < 3.0)
|
35
|
-
rexml
|
36
|
-
rubocop-ast (>= 1.
|
34
|
+
rexml (>= 3.2.5, < 4.0)
|
35
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
37
36
|
ruby-progressbar (~> 1.7)
|
38
|
-
unicode-display_width (>=
|
39
|
-
rubocop-ast (1.3
|
40
|
-
parser (>=
|
41
|
-
rubocop-minitest (0.10.
|
37
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
38
|
+
rubocop-ast (1.31.3)
|
39
|
+
parser (>= 3.3.1.0)
|
40
|
+
rubocop-minitest (0.10.3)
|
42
41
|
rubocop (>= 0.87, < 2.0)
|
43
42
|
rubocop-rake (0.5.1)
|
44
43
|
rubocop
|
45
|
-
ruby-progressbar (1.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
simplecov-html (~> 0.10.0)
|
50
|
-
simplecov-html (0.10.2)
|
51
|
-
sync (0.5.0)
|
52
|
-
term-ansicolor (1.7.1)
|
53
|
-
tins (~> 1.0)
|
54
|
-
thor (1.0.1)
|
55
|
-
tins (1.26.0)
|
56
|
-
sync
|
57
|
-
unicode-display_width (1.7.0)
|
58
|
-
yard (0.9.26)
|
44
|
+
ruby-progressbar (1.13.0)
|
45
|
+
strscan (3.1.0)
|
46
|
+
unicode-display_width (2.5.0)
|
47
|
+
yard (0.9.36)
|
59
48
|
|
60
49
|
PLATFORMS
|
61
|
-
|
50
|
+
arm64-darwin-23
|
51
|
+
ruby
|
62
52
|
|
63
53
|
DEPENDENCIES
|
64
|
-
coveralls
|
65
54
|
cri!
|
66
55
|
m (~> 1.5)
|
67
56
|
minitest
|
@@ -72,4 +61,4 @@ DEPENDENCIES
|
|
72
61
|
yard
|
73
62
|
|
74
63
|
BUNDLED WITH
|
75
|
-
2.
|
64
|
+
2.5.11
|
data/LICENSE
CHANGED
data/NEWS.md
CHANGED
data/README.md
CHANGED
@@ -2,17 +2,13 @@
|
|
2
2
|
|
3
3
|
[![Gem](http://img.shields.io/gem/v/cri.svg)](http://rubygems.org/gems/cri)
|
4
4
|
[![Gem downloads](https://img.shields.io/gem/dt/cri.svg)](http://rubygems.org/gems/cri)
|
5
|
-
[![Travis](http://img.shields.io/travis/ddfreyne/cri.svg)](https://travis-ci.org/ddfreyne/cri)
|
6
|
-
[![Coveralls](http://img.shields.io/coveralls/ddfreyne/cri.svg)](https://coveralls.io/r/ddfreyne/cri)
|
7
|
-
[![Codeclimate](http://img.shields.io/codeclimate/github/ddfreyne/cri.svg)](https://codeclimate.com/github/ddfreyne/cri)
|
8
|
-
[![Inch](http://inch-ci.org/github/ddfreyne/cri.svg)](http://inch-ci.org/github/ddfreyne/cri/)
|
9
5
|
|
10
6
|
Cri is a library for building easy-to-use command-line tools with support for
|
11
7
|
nested commands.
|
12
8
|
|
13
9
|
## Requirements
|
14
10
|
|
15
|
-
Cri requires Ruby 2.
|
11
|
+
Cri requires Ruby 2.6 or newer (including Ruby 3.x).
|
16
12
|
|
17
13
|
## Compatibility policy
|
18
14
|
|
data/cri.gemspec
CHANGED
@@ -16,8 +16,9 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.files = Dir['[A-Z]*'] + Dir['{lib,test}/**/*'] + ['cri.gemspec']
|
17
17
|
s.require_paths = ['lib']
|
18
18
|
|
19
|
-
s.required_ruby_version = '>= 2.
|
19
|
+
s.required_ruby_version = '>= 2.6'
|
20
20
|
|
21
21
|
s.rdoc_options = ['--main', 'README.md']
|
22
22
|
s.extra_rdoc_files = ['LICENSE', 'README.md', 'NEWS.md']
|
23
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
23
24
|
end
|
data/lib/cri/help_renderer.rb
CHANGED
@@ -78,7 +78,7 @@ module Cri
|
|
78
78
|
|
79
79
|
text << "\n"
|
80
80
|
text << fmt.format_as_title('description', @io) << "\n"
|
81
|
-
text << fmt.wrap_and_indent(@cmd.description, LINE_WIDTH, DESC_INDENT) + "\n"
|
81
|
+
text << (fmt.wrap_and_indent(@cmd.description, LINE_WIDTH, DESC_INDENT) + "\n")
|
82
82
|
end
|
83
83
|
|
84
84
|
def append_subcommands(text)
|
@@ -120,7 +120,7 @@ module Cri
|
|
120
120
|
string << '-X'
|
121
121
|
|
122
122
|
if opt_defn.long
|
123
|
-
string << ' --' + opt_defn.long
|
123
|
+
string << (' --' + opt_defn.long)
|
124
124
|
end
|
125
125
|
|
126
126
|
case opt_defn.argument
|
@@ -213,7 +213,7 @@ module Cri
|
|
213
213
|
opt_text_len += 2 + opt_defn.long.size if opt_defn.long
|
214
214
|
opt_text_len += long_value_postfix.size
|
215
215
|
|
216
|
-
' ' + opt_text + ' ' * (length + OPT_DESC_SPACING - opt_text_len)
|
216
|
+
' ' + opt_text + (' ' * (length + OPT_DESC_SPACING - opt_text_len))
|
217
217
|
end
|
218
218
|
end
|
219
219
|
end
|
data/lib/cri/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'coveralls'
|
4
|
-
Coveralls.wear!
|
5
|
-
|
6
3
|
require 'minitest'
|
7
4
|
require 'minitest/autorun'
|
8
5
|
|
@@ -52,4 +49,4 @@ module Cri
|
|
52
49
|
end
|
53
50
|
|
54
51
|
# Unexpected system exit is unexpected
|
55
|
-
::
|
52
|
+
::Minitest::Test::PASSTHROUGH_EXCEPTIONS.delete(SystemExit)
|
data/test/test_argument_list.rb
CHANGED
@@ -98,7 +98,7 @@ module Cri
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def test_transform
|
101
|
-
param_defns = [Cri::ParamDefinition.new(name: 'filename', transform:
|
101
|
+
param_defns = [Cri::ParamDefinition.new(name: 'filename', transform: lambda(&:upcase))]
|
102
102
|
args = Cri::ArgumentList.new(%w[notbad.jpg], false, param_defns)
|
103
103
|
|
104
104
|
assert_equal(['NOTBAD.JPG'], args.to_a)
|
data/test/test_command.rb
CHANGED
@@ -950,7 +950,7 @@ module Cri
|
|
950
950
|
def test_required_option_defaults_to_given_value_with_transform
|
951
951
|
cmd = Cri::Command.define do
|
952
952
|
name 'a'
|
953
|
-
option :a, :animal, 'specify animal', argument: :required, transform:
|
953
|
+
option :a, :animal, 'specify animal', argument: :required, transform: lambda(&:upcase), default: 'cow'
|
954
954
|
|
955
955
|
run do |opts, _args, _cmd|
|
956
956
|
puts "Animal = #{opts[:animal]}"
|
data/test/test_command_dsl.rb
CHANGED
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.12
|
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: 2024-06-09 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.
|
@@ -56,7 +56,8 @@ files:
|
|
56
56
|
homepage: https://github.com/ddfreyne/cri
|
57
57
|
licenses:
|
58
58
|
- MIT
|
59
|
-
metadata:
|
59
|
+
metadata:
|
60
|
+
rubygems_mfa_required: 'true'
|
60
61
|
post_install_message:
|
61
62
|
rdoc_options:
|
62
63
|
- "--main"
|
@@ -67,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
68
|
requirements:
|
68
69
|
- - ">="
|
69
70
|
- !ruby/object:Gem::Version
|
70
|
-
version: '2.
|
71
|
+
version: '2.6'
|
71
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
73
|
requirements:
|
73
74
|
- - ">="
|
74
75
|
- !ruby/object:Gem::Version
|
75
76
|
version: '0'
|
76
77
|
requirements: []
|
77
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.5.11
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: a library for building easy-to-use command-line tools
|