lino 2.7.0 → 3.1.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +34 -25
- data/lib/lino/appliables.rb +2 -2
- data/lib/lino/command_line_builder.rb +5 -5
- data/lib/lino/options.rb +4 -4
- data/lib/lino/subcommand_builder.rb +1 -1
- data/lib/lino/utilities.rb +10 -2
- data/lib/lino/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62497dec31d67bd71fe85be6bb9a929e3d9ee091ce37abaaf6cc31f9bd6d2272
|
4
|
+
data.tar.gz: 8917544e588a44ae995559c2bfc623c76b06ed407ba995b24ac5956b01756ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deb67da721db8b9988fec21facaa416d204b19014f7fc26120bae8283cea1e237a4cb1e0e3eb491ad85bcdab5cb009669254af46880bb6452720c57633c2a394
|
7
|
+
data.tar.gz: ccbc289eb9760fdb759c79baf5ff9b38b938691280c079310fd122e6508b1c9148263236bf293a06249767e03280cec0d2f7e666e1c6218dc8d25c546674401c
|
data/Gemfile.lock
CHANGED
@@ -1,37 +1,47 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lino (
|
4
|
+
lino (3.1.0.pre.2)
|
5
5
|
hamster (~> 3.0)
|
6
6
|
open4 (~> 1.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (6.1.
|
11
|
+
activesupport (6.1.4.1)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 1.6, < 2)
|
14
14
|
minitest (>= 5.1)
|
15
15
|
tzinfo (~> 2.0)
|
16
16
|
zeitwerk (~> 2.3)
|
17
|
-
addressable (2.
|
17
|
+
addressable (2.8.0)
|
18
18
|
public_suffix (>= 2.0.2, < 5.0)
|
19
19
|
ast (2.4.2)
|
20
20
|
colored2 (3.1.2)
|
21
|
-
concurrent-ruby (1.1.
|
21
|
+
concurrent-ruby (1.1.9)
|
22
22
|
diff-lcs (1.4.4)
|
23
|
-
docile (1.
|
24
|
-
excon (0.
|
25
|
-
faraday (1.
|
23
|
+
docile (1.4.0)
|
24
|
+
excon (0.87.0)
|
25
|
+
faraday (1.8.0)
|
26
|
+
faraday-em_http (~> 1.0)
|
27
|
+
faraday-em_synchrony (~> 1.0)
|
26
28
|
faraday-excon (~> 1.1)
|
29
|
+
faraday-httpclient (~> 1.0.1)
|
27
30
|
faraday-net_http (~> 1.0)
|
28
31
|
faraday-net_http_persistent (~> 1.1)
|
32
|
+
faraday-patron (~> 1.0)
|
33
|
+
faraday-rack (~> 1.0)
|
29
34
|
multipart-post (>= 1.2, < 3)
|
30
35
|
ruby2_keywords (>= 0.0.4)
|
36
|
+
faraday-em_http (1.0.0)
|
37
|
+
faraday-em_synchrony (1.0.0)
|
31
38
|
faraday-excon (1.1.0)
|
39
|
+
faraday-httpclient (1.0.1)
|
32
40
|
faraday-net_http (1.0.1)
|
33
|
-
faraday-net_http_persistent (1.
|
34
|
-
|
41
|
+
faraday-net_http_persistent (1.2.0)
|
42
|
+
faraday-patron (1.0.0)
|
43
|
+
faraday-rack (1.0.0)
|
44
|
+
gem-release (2.2.2)
|
35
45
|
hamster (3.0.0)
|
36
46
|
concurrent-ruby (~> 1.0)
|
37
47
|
i18n (1.8.10)
|
@@ -42,12 +52,12 @@ GEM
|
|
42
52
|
faraday (>= 0.9)
|
43
53
|
sawyer (~> 0.8.0, >= 0.5.3)
|
44
54
|
open4 (1.3.4)
|
45
|
-
parallel (1.
|
46
|
-
parser (3.0.
|
55
|
+
parallel (1.21.0)
|
56
|
+
parser (3.0.2.0)
|
47
57
|
ast (~> 2.4.1)
|
48
58
|
public_suffix (4.0.6)
|
49
59
|
rainbow (3.0.0)
|
50
|
-
rake (13.0.
|
60
|
+
rake (13.0.6)
|
51
61
|
rake_circle_ci (0.9.0)
|
52
62
|
colored2 (~> 3.1)
|
53
63
|
excon (~> 0.72)
|
@@ -61,7 +71,7 @@ GEM
|
|
61
71
|
octokit (~> 4.16)
|
62
72
|
rake_factory (~> 0.23)
|
63
73
|
sshkey (~> 2.0)
|
64
|
-
rake_gpg (0.
|
74
|
+
rake_gpg (0.16.0)
|
65
75
|
rake_factory (>= 0.23, < 1)
|
66
76
|
ruby_gpg2 (>= 0.6, < 1)
|
67
77
|
rake_ssh (0.6.0)
|
@@ -83,24 +93,23 @@ GEM
|
|
83
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
84
94
|
rspec-support (~> 3.10.0)
|
85
95
|
rspec-support (3.10.2)
|
86
|
-
rubocop (1.
|
96
|
+
rubocop (1.22.1)
|
87
97
|
parallel (~> 1.10)
|
88
98
|
parser (>= 3.0.0.0)
|
89
99
|
rainbow (>= 2.2.2, < 4.0)
|
90
100
|
regexp_parser (>= 1.8, < 3.0)
|
91
101
|
rexml
|
92
|
-
rubocop-ast (>= 1.
|
102
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
93
103
|
ruby-progressbar (~> 1.7)
|
94
104
|
unicode-display_width (>= 1.4.0, < 3.0)
|
95
|
-
rubocop-ast (1.
|
96
|
-
parser (>=
|
97
|
-
rubocop-rake (0.
|
98
|
-
rubocop
|
99
|
-
rubocop-rspec (2.3.0)
|
105
|
+
rubocop-ast (1.12.0)
|
106
|
+
parser (>= 3.0.1.1)
|
107
|
+
rubocop-rake (0.6.0)
|
100
108
|
rubocop (~> 1.0)
|
101
|
-
|
109
|
+
rubocop-rspec (2.5.0)
|
110
|
+
rubocop (~> 1.19)
|
102
111
|
ruby-progressbar (1.11.0)
|
103
|
-
ruby2_keywords (0.0.
|
112
|
+
ruby2_keywords (0.0.5)
|
104
113
|
ruby_gpg2 (0.8.0)
|
105
114
|
lino (>= 1.5)
|
106
115
|
sawyer (0.8.2)
|
@@ -111,11 +120,11 @@ GEM
|
|
111
120
|
simplecov-html (~> 0.11)
|
112
121
|
simplecov_json_formatter (~> 0.1)
|
113
122
|
simplecov-html (0.12.3)
|
114
|
-
simplecov_json_formatter (0.1.
|
123
|
+
simplecov_json_formatter (0.1.3)
|
115
124
|
sshkey (2.0.0)
|
116
125
|
tzinfo (2.0.4)
|
117
126
|
concurrent-ruby (~> 1.0)
|
118
|
-
unicode-display_width (2.
|
127
|
+
unicode-display_width (2.1.0)
|
119
128
|
zeitwerk (2.4.2)
|
120
129
|
|
121
130
|
PLATFORMS
|
@@ -137,4 +146,4 @@ DEPENDENCIES
|
|
137
146
|
simplecov (~> 0.16)
|
138
147
|
|
139
148
|
BUNDLED WITH
|
140
|
-
2.2.
|
149
|
+
2.2.29
|
data/lib/lino/appliables.rb
CHANGED
@@ -7,13 +7,13 @@ module Lino
|
|
7
7
|
include Lino::Utilities
|
8
8
|
|
9
9
|
def with_appliable(appliable)
|
10
|
-
return self if
|
10
|
+
return self if nil?(appliable)
|
11
11
|
|
12
12
|
appliable.apply(self)
|
13
13
|
end
|
14
14
|
|
15
15
|
def with_appliables(appliables)
|
16
|
-
return self if
|
16
|
+
return self if nil_or_empty?(appliables)
|
17
17
|
|
18
18
|
appliables.inject(self) do |s, appliable|
|
19
19
|
s.with_appliable(appliable)
|
@@ -44,7 +44,7 @@ module Lino
|
|
44
44
|
# rubocop:enable Metrics/ParameterLists
|
45
45
|
|
46
46
|
def with_subcommand(subcommand, &block)
|
47
|
-
return self if
|
47
|
+
return self if nil?(subcommand)
|
48
48
|
|
49
49
|
with(
|
50
50
|
subcommands: @subcommands.add(
|
@@ -56,7 +56,7 @@ module Lino
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def with_subcommands(subcommands, &block)
|
59
|
-
return self if
|
59
|
+
return self if nil_or_empty?(subcommands)
|
60
60
|
|
61
61
|
without_block = subcommands[0...-1]
|
62
62
|
with_block = subcommands.last
|
@@ -91,13 +91,13 @@ module Lino
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def with_argument(argument)
|
94
|
-
return self if
|
94
|
+
return self if nil?(argument)
|
95
95
|
|
96
96
|
with(arguments: @arguments.add({ components: [argument] }))
|
97
97
|
end
|
98
98
|
|
99
99
|
def with_arguments(arguments)
|
100
|
-
return self if
|
100
|
+
return self if nil_or_empty?(arguments)
|
101
101
|
|
102
102
|
arguments.inject(self) { |s, argument| s.with_argument(argument) }
|
103
103
|
end
|
@@ -114,7 +114,7 @@ module Lino
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def with_environment_variables(environment_variables)
|
117
|
-
return self if
|
117
|
+
return self if nil_or_empty?(environment_variables)
|
118
118
|
|
119
119
|
environment_variables.entries.inject(self) do |s, var|
|
120
120
|
s.with_environment_variable(
|
data/lib/lino/options.rb
CHANGED
@@ -13,7 +13,7 @@ module Lino
|
|
13
13
|
quoting: nil,
|
14
14
|
placement: nil
|
15
15
|
)
|
16
|
-
return self if
|
16
|
+
return self if nil?(value)
|
17
17
|
|
18
18
|
with(options: @options.add(
|
19
19
|
{
|
@@ -26,7 +26,7 @@ module Lino
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def with_options(options)
|
29
|
-
return self if
|
29
|
+
return self if nil_or_empty?(options)
|
30
30
|
|
31
31
|
options.entries.inject(self) do |s, entry|
|
32
32
|
s.with_option(
|
@@ -58,13 +58,13 @@ module Lino
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def with_flag(flag)
|
61
|
-
return self if
|
61
|
+
return self if nil?(flag)
|
62
62
|
|
63
63
|
with(options: @options.add({ components: [flag] }))
|
64
64
|
end
|
65
65
|
|
66
66
|
def with_flags(flags)
|
67
|
-
return self if
|
67
|
+
return self if nil_or_empty?(flags)
|
68
68
|
|
69
69
|
flags.inject(self) { |s, flag| s.with_flag(flag) }
|
70
70
|
end
|
data/lib/lino/utilities.rb
CHANGED
@@ -22,8 +22,16 @@ module Lino
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
26
|
-
value.nil?
|
25
|
+
def nil?(value)
|
26
|
+
value.nil?
|
27
|
+
end
|
28
|
+
|
29
|
+
def empty?(value)
|
30
|
+
value.respond_to?(:empty?) && value.empty?
|
31
|
+
end
|
32
|
+
|
33
|
+
def nil_or_empty?(value)
|
34
|
+
nil?(value) || empty?(value)
|
27
35
|
end
|
28
36
|
|
29
37
|
private
|
data/lib/lino/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.1.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- InfraBlocks Maintainers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hamster
|
@@ -208,7 +208,7 @@ dependencies:
|
|
208
208
|
version: '0.16'
|
209
209
|
description: Command line builders and executors.
|
210
210
|
email:
|
211
|
-
-
|
211
|
+
- maintainers@infrablocks.io
|
212
212
|
executables: []
|
213
213
|
extensions: []
|
214
214
|
extra_rdoc_files: []
|
@@ -244,9 +244,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
244
|
version: '2.6'
|
245
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
246
|
requirements:
|
247
|
-
- - "
|
247
|
+
- - ">"
|
248
248
|
- !ruby/object:Gem::Version
|
249
|
-
version:
|
249
|
+
version: 1.3.1
|
250
250
|
requirements: []
|
251
251
|
rubygems_version: 3.0.1
|
252
252
|
signing_key:
|