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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bb92014dbe016429251eefb589dfcc53838c3d09142784e03ac3bf25189ca0c
4
- data.tar.gz: af1b6cd458cc0fa3d2a0577c28d3eb61dfb84717b2430530f2225fe67557b08d
3
+ metadata.gz: bbf291f3b013dc94aeb688c561698828e4f3d9b9a1616f58cce11d22e615cd12
4
+ data.tar.gz: 955dd5f01c570617998e8611be5559ef81444d244c06f1d1dd734c6c5e5aa141
5
5
  SHA512:
6
- metadata.gz: 1ad84177f8e9d94cf7aef2cec3958d8d5611f8b95534be874660ca8f6a481426558f8f6b51c272c8260a31438a4a518b4a22305d427103d66dcd6c0c16e046bc
7
- data.tar.gz: c21a7f8b671f8ae594101c1eecf669ec16e1aeae2470e7d455e3aa7cd050e045b98aedfaf6ba27f25112d8e1a9795bfaf98ccdb365057674e505c7d319bab09b
6
+ metadata.gz: c57f9294a7a9deaaec95f0a54b437d9f6c70f81e5acdfa5899a6516a6c6426159625bf24263e2f1649a02cd7133aa5bd471697f98031b929b8fe64b8411e85f5
7
+ data.tar.gz: 8c34716835bf869c79d4f310b4e89944472dc3c3062aaca56bfe42657a8fb2bfc962a63d7dc202a51747cbac1158f97d227979f1d3201d8dbf45abda2647c1cf
@@ -1,14 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cri (2.15.3)
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.1.0)
18
+ json (2.2.0)
21
19
  minitest (5.11.3)
22
- parallel (1.13.0)
23
- parser (2.6.0.0)
20
+ parallel (1.17.0)
21
+ parser (2.6.3.0)
24
22
  ast (~> 2.4.0)
25
- powerpack (0.1.2)
23
+ psych (3.1.0)
26
24
  rainbow (3.0.0)
27
25
  rake (12.3.2)
28
- rubocop (0.63.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
- powerpack (~> 0.1)
30
+ psych (>= 3.1.0)
33
31
  rainbow (>= 2.2.2, < 4.0)
34
32
  ruby-progressbar (~> 1.7)
35
- unicode-display_width (~> 1.4.0)
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.4.1)
47
- yard (0.9.16)
44
+ unicode-display_width (1.5.0)
45
+ yard (0.9.19)
48
46
 
49
47
  PLATFORMS
50
48
  ruby
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Cri News
2
2
 
3
+ ## 2.15.4
4
+
5
+ Fixes:
6
+
7
+ * Removed dependency on `colored`, which restores functionality to gems that `colored` breaks (e.g. `awesome_print`) (#89, #90)
8
+
3
9
  ## 2.15.3
4
10
 
5
11
  Fixes:
data/README.md CHANGED
@@ -12,7 +12,7 @@ nested commands.
12
12
 
13
13
  ## Requirements
14
14
 
15
- Cri requires Ruby 2.3 or newer.
15
+ Cri requires Ruby 2.4 or newer.
16
16
 
17
17
  ## Usage
18
18
 
@@ -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 = 'http://stoneship.org/software/cri/' # TODO: CREATE A WEB SITE YOU SILLY PERSON
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.3'
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
@@ -20,8 +20,6 @@ end
20
20
 
21
21
  require 'set'
22
22
 
23
- require 'colored'
24
-
25
23
  require_relative 'cri/version'
26
24
  require_relative 'cri/argument_list'
27
25
  require_relative 'cri/command'
@@ -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.red.bold
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.green
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.yellow
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cri
4
4
  # The current Cri version.
5
- VERSION = '2.15.3'
5
+ VERSION = '2.15.4'
6
6
  end
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.3
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-01-19 00:00:00.000000000 Z
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: http://stoneship.org/software/cri/
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.3'
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.2
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