cri 2.15.3 → 2.15.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -12
- data/NEWS.md +6 -0
- data/README.md +1 -1
- data/cri.gemspec +2 -4
- data/lib/cri.rb +0 -2
- data/lib/cri/string_formatter.rb +19 -3
- data/lib/cri/version.rb +1 -1
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbf291f3b013dc94aeb688c561698828e4f3d9b9a1616f58cce11d22e615cd12
|
4
|
+
data.tar.gz: 955dd5f01c570617998e8611be5559ef81444d244c06f1d1dd734c6c5e5aa141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c57f9294a7a9deaaec95f0a54b437d9f6c70f81e5acdfa5899a6516a6c6426159625bf24263e2f1649a02cd7133aa5bd471697f98031b929b8fe64b8411e85f5
|
7
|
+
data.tar.gz: 8c34716835bf869c79d4f310b4e89944472dc3c3062aaca56bfe42657a8fb2bfc962a63d7dc202a51747cbac1158f97d227979f1d3201d8dbf45abda2647c1cf
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cri (2.15.
|
5
|
-
colored (~> 1.2)
|
4
|
+
cri (2.15.4)
|
6
5
|
|
7
6
|
GEM
|
8
7
|
remote: https://rubygems.org/
|
9
8
|
specs:
|
10
9
|
ast (2.4.0)
|
11
|
-
colored (1.2)
|
12
10
|
coveralls (0.8.22)
|
13
11
|
json (>= 1.8, < 3)
|
14
12
|
simplecov (~> 0.16.1)
|
@@ -17,22 +15,22 @@ GEM
|
|
17
15
|
tins (~> 1.6)
|
18
16
|
docile (1.3.1)
|
19
17
|
jaro_winkler (1.5.2)
|
20
|
-
json (2.
|
18
|
+
json (2.2.0)
|
21
19
|
minitest (5.11.3)
|
22
|
-
parallel (1.
|
23
|
-
parser (2.6.
|
20
|
+
parallel (1.17.0)
|
21
|
+
parser (2.6.3.0)
|
24
22
|
ast (~> 2.4.0)
|
25
|
-
|
23
|
+
psych (3.1.0)
|
26
24
|
rainbow (3.0.0)
|
27
25
|
rake (12.3.2)
|
28
|
-
rubocop (0.
|
26
|
+
rubocop (0.67.2)
|
29
27
|
jaro_winkler (~> 1.5.1)
|
30
28
|
parallel (~> 1.10)
|
31
29
|
parser (>= 2.5, != 2.5.1.1)
|
32
|
-
|
30
|
+
psych (>= 3.1.0)
|
33
31
|
rainbow (>= 2.2.2, < 4.0)
|
34
32
|
ruby-progressbar (~> 1.7)
|
35
|
-
unicode-display_width (
|
33
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
36
34
|
ruby-progressbar (1.10.0)
|
37
35
|
simplecov (0.16.1)
|
38
36
|
docile (~> 1.1)
|
@@ -43,8 +41,8 @@ GEM
|
|
43
41
|
tins (~> 1.0)
|
44
42
|
thor (0.19.4)
|
45
43
|
tins (1.20.2)
|
46
|
-
unicode-display_width (1.
|
47
|
-
yard (0.9.
|
44
|
+
unicode-display_width (1.5.0)
|
45
|
+
yard (0.9.19)
|
48
46
|
|
49
47
|
PLATFORMS
|
50
48
|
ruby
|
data/NEWS.md
CHANGED
data/README.md
CHANGED
data/cri.gemspec
CHANGED
@@ -5,7 +5,7 @@ require_relative 'lib/cri/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'cri'
|
7
7
|
s.version = Cri::VERSION
|
8
|
-
s.homepage = '
|
8
|
+
s.homepage = 'https://github.com/ddfreyne/cri'
|
9
9
|
s.summary = 'a library for building easy-to-use command-line tools'
|
10
10
|
s.description = 'Cri allows building easy-to-use command-line interfaces with support for subcommands.'
|
11
11
|
s.license = 'MIT'
|
@@ -16,9 +16,7 @@ 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.
|
20
|
-
|
21
|
-
s.add_dependency('colored', '~> 1.2')
|
19
|
+
s.required_ruby_version = '~> 2.4'
|
22
20
|
|
23
21
|
s.rdoc_options = ['--main', 'README.md']
|
24
22
|
s.extra_rdoc_files = ['LICENSE', 'README.md', 'NEWS.md']
|
data/lib/cri.rb
CHANGED
data/lib/cri/string_formatter.rb
CHANGED
@@ -82,7 +82,7 @@ module Cri
|
|
82
82
|
# in the help
|
83
83
|
def format_as_title(str, io)
|
84
84
|
if Cri::Platform.color?(io)
|
85
|
-
str.upcase
|
85
|
+
bold(red(str.upcase))
|
86
86
|
else
|
87
87
|
str.upcase
|
88
88
|
end
|
@@ -94,7 +94,7 @@ module Cri
|
|
94
94
|
# in the help
|
95
95
|
def format_as_command(str, io)
|
96
96
|
if Cri::Platform.color?(io)
|
97
|
-
str
|
97
|
+
green(str)
|
98
98
|
else
|
99
99
|
str
|
100
100
|
end
|
@@ -106,10 +106,26 @@ module Cri
|
|
106
106
|
# of a command in the help
|
107
107
|
def format_as_option(str, io)
|
108
108
|
if Cri::Platform.color?(io)
|
109
|
-
str
|
109
|
+
yellow(str)
|
110
110
|
else
|
111
111
|
str
|
112
112
|
end
|
113
113
|
end
|
114
|
+
|
115
|
+
def red(str)
|
116
|
+
"\e[31m#{str}\e[0m"
|
117
|
+
end
|
118
|
+
|
119
|
+
def green(str)
|
120
|
+
"\e[32m#{str}\e[0m"
|
121
|
+
end
|
122
|
+
|
123
|
+
def yellow(str)
|
124
|
+
"\e[33m#{str}\e[0m"
|
125
|
+
end
|
126
|
+
|
127
|
+
def bold(str)
|
128
|
+
"\e[1m#{str}\e[0m"
|
129
|
+
end
|
114
130
|
end
|
115
131
|
end
|
data/lib/cri/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
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.4
|
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-
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: colored
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.2'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.2'
|
11
|
+
date: 2019-04-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
27
13
|
description: Cri allows building easy-to-use command-line interfaces with support
|
28
14
|
for subcommands.
|
29
15
|
email: denis.defreyne@stoneship.org
|
@@ -67,7 +53,7 @@ files:
|
|
67
53
|
- test/test_help_renderer.rb
|
68
54
|
- test/test_parser.rb
|
69
55
|
- test/test_string_formatter.rb
|
70
|
-
homepage:
|
56
|
+
homepage: https://github.com/ddfreyne/cri
|
71
57
|
licenses:
|
72
58
|
- MIT
|
73
59
|
metadata: {}
|
@@ -81,14 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
67
|
requirements:
|
82
68
|
- - "~>"
|
83
69
|
- !ruby/object:Gem::Version
|
84
|
-
version: '2.
|
70
|
+
version: '2.4'
|
85
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
88
74
|
- !ruby/object:Gem::Version
|
89
75
|
version: '0'
|
90
76
|
requirements: []
|
91
|
-
rubygems_version: 3.0.
|
77
|
+
rubygems_version: 3.0.3
|
92
78
|
signing_key:
|
93
79
|
specification_version: 4
|
94
80
|
summary: a library for building easy-to-use command-line tools
|