circleci-cli 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +38 -0
- data/.github/workflows/release.yaml +41 -0
- data/.github/workflows/test.yml +20 -3
- data/.gitignore +57 -0
- data/.rubocop.yml +4 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +182 -7
- data/Gemfile.lock +154 -92
- data/Guardfile +1 -1
- data/README.md +6 -7
- data/circleci-cli.gemspec +25 -20
- data/lib/circleci/cli/command/base_command.rb +1 -1
- data/lib/circleci/cli/networking/pusher_client.rb +6 -6
- data/lib/circleci/cli/printer/build_printer.rb +2 -2
- data/lib/circleci/cli/printer/step_printer.rb +1 -1
- data/lib/circleci/cli/version.rb +1 -1
- data/lib/circleci/cli.rb +5 -4
- metadata +62 -28
- data/.circleci/config.yml +0 -68
data/Gemfile.lock
CHANGED
@@ -1,58 +1,104 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
circleci-cli (
|
5
|
-
circleci (
|
6
|
-
faraday (>= 0.14, <
|
7
|
-
highline (>= 1.7.8, < 2.
|
8
|
-
launchy (>= 2.4.3, <
|
4
|
+
circleci-cli (4.0.0)
|
5
|
+
circleci (>= 2.1.0)
|
6
|
+
faraday (>= 0.14, < 2.8)
|
7
|
+
highline (>= 1.7.8, < 2.2.0)
|
8
|
+
launchy (>= 2.4.3, < 3.1.0)
|
9
9
|
pusher-client (~> 0.6.2)
|
10
|
-
rugged (>= 0.26, < 1.
|
10
|
+
rugged (>= 0.26, < 1.8)
|
11
11
|
terminal-notifier (~> 2.0.0)
|
12
|
-
terminal-table (
|
13
|
-
thor (>= 0.20, < 1.
|
12
|
+
terminal-table (>= 1.8, < 3.1)
|
13
|
+
thor (>= 0.20, < 1.3)
|
14
14
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
|
18
|
+
abbrev (0.1.2)
|
19
|
+
activesupport (6.1.7.6)
|
19
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
|
-
i18n (>=
|
21
|
-
minitest (
|
22
|
-
tzinfo (~>
|
23
|
-
zeitwerk (~> 2.
|
24
|
-
addressable (2.
|
25
|
-
public_suffix (>= 2.0.2, <
|
26
|
-
ast (2.4.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
i18n (>= 1.6, < 2)
|
22
|
+
minitest (>= 5.1)
|
23
|
+
tzinfo (~> 2.0)
|
24
|
+
zeitwerk (~> 2.3)
|
25
|
+
addressable (2.8.6)
|
26
|
+
public_suffix (>= 2.0.2, < 6.0)
|
27
|
+
ast (2.4.2)
|
28
|
+
async (1.32.1)
|
29
|
+
console (~> 1.10)
|
30
|
+
nio4r (~> 2.3)
|
31
|
+
timers (~> 4.1)
|
32
|
+
async-http (0.60.2)
|
33
|
+
async (>= 1.25)
|
34
|
+
async-io (>= 1.28)
|
35
|
+
async-pool (>= 0.2)
|
36
|
+
protocol-http (~> 0.24.0)
|
37
|
+
protocol-http1 (~> 0.15.0)
|
38
|
+
protocol-http2 (~> 0.15.0)
|
39
|
+
traces (>= 0.10.0)
|
40
|
+
async-http-faraday (0.12.0)
|
41
|
+
async-http (~> 0.42)
|
42
|
+
faraday
|
43
|
+
async-io (1.43.2)
|
44
|
+
async
|
45
|
+
async-pool (0.4.0)
|
46
|
+
async (>= 1.25)
|
47
|
+
base64 (0.3.0)
|
48
|
+
childprocess (5.0.0)
|
49
|
+
circleci (2.1.0)
|
50
|
+
codecov (0.6.0)
|
51
|
+
simplecov (>= 0.15, < 0.22)
|
31
52
|
coderay (1.1.3)
|
32
|
-
concurrent-ruby (1.1
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
faraday
|
53
|
+
concurrent-ruby (1.3.1)
|
54
|
+
console (1.15.3)
|
55
|
+
fiber-local
|
56
|
+
diff-lcs (1.5.1)
|
57
|
+
docile (1.4.0)
|
58
|
+
faraday (1.10.3)
|
59
|
+
faraday-em_http (~> 1.0)
|
60
|
+
faraday-em_synchrony (~> 1.0)
|
61
|
+
faraday-excon (~> 1.1)
|
62
|
+
faraday-httpclient (~> 1.0)
|
63
|
+
faraday-multipart (~> 1.0)
|
64
|
+
faraday-net_http (~> 1.0)
|
65
|
+
faraday-net_http_persistent (~> 1.0)
|
66
|
+
faraday-patron (~> 1.0)
|
67
|
+
faraday-rack (~> 1.0)
|
68
|
+
faraday-retry (~> 1.0)
|
69
|
+
ruby2_keywords (>= 0.0.4)
|
70
|
+
faraday-em_http (1.0.0)
|
71
|
+
faraday-em_synchrony (1.0.0)
|
72
|
+
faraday-excon (1.1.0)
|
73
|
+
faraday-http-cache (2.5.1)
|
38
74
|
faraday (>= 0.8)
|
39
|
-
|
40
|
-
|
41
|
-
|
75
|
+
faraday-httpclient (1.0.1)
|
76
|
+
faraday-multipart (1.0.4)
|
77
|
+
multipart-post (~> 2)
|
78
|
+
faraday-net_http (1.0.1)
|
79
|
+
faraday-net_http_persistent (1.2.0)
|
80
|
+
faraday-patron (1.0.0)
|
81
|
+
faraday-rack (1.0.0)
|
82
|
+
faraday-retry (1.0.3)
|
83
|
+
ffi (1.17.0)
|
84
|
+
fiber-local (1.0.0)
|
85
|
+
formatador (1.1.0)
|
86
|
+
github_changelog_generator (1.16.4)
|
42
87
|
activesupport
|
88
|
+
async (>= 1.25.0)
|
89
|
+
async-http-faraday
|
43
90
|
faraday-http-cache
|
44
91
|
multi_json
|
45
92
|
octokit (~> 4.6)
|
46
93
|
rainbow (>= 2.2.1)
|
47
94
|
rake (>= 10.0)
|
48
|
-
|
49
|
-
guard (2.16.2)
|
95
|
+
guard (2.18.1)
|
50
96
|
formatador (>= 0.2.4)
|
51
97
|
listen (>= 2.7, < 4.0)
|
52
98
|
lumberjack (>= 1.0.12, < 2.0)
|
53
99
|
nenv (~> 0.1)
|
54
100
|
notiffany (~> 0.0)
|
55
|
-
pry (>= 0.
|
101
|
+
pry (>= 0.13.0)
|
56
102
|
shellany (~> 0.0)
|
57
103
|
thor (>= 0.18.1)
|
58
104
|
guard-compat (1.2.1)
|
@@ -60,97 +106,113 @@ GEM
|
|
60
106
|
guard (~> 2.1)
|
61
107
|
guard-compat (~> 1.1)
|
62
108
|
rspec (>= 2.99.0, < 4.0)
|
63
|
-
guard-rubocop (1.
|
109
|
+
guard-rubocop (1.5.0)
|
64
110
|
guard (~> 2.0)
|
65
|
-
rubocop (
|
66
|
-
highline (2.0
|
67
|
-
i18n (1.
|
111
|
+
rubocop (< 2.0)
|
112
|
+
highline (2.1.0)
|
113
|
+
i18n (1.14.5)
|
68
114
|
concurrent-ruby (~> 1.0)
|
69
|
-
json (2.
|
70
|
-
launchy (
|
71
|
-
addressable (~> 2.
|
72
|
-
|
115
|
+
json (2.7.2)
|
116
|
+
launchy (3.0.1)
|
117
|
+
addressable (~> 2.8)
|
118
|
+
childprocess (~> 5.0)
|
119
|
+
listen (3.9.0)
|
73
120
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
74
121
|
rb-inotify (~> 0.9, >= 0.9.10)
|
75
|
-
lumberjack (1.2.
|
76
|
-
method_source (1.
|
77
|
-
minitest (5.
|
122
|
+
lumberjack (1.2.10)
|
123
|
+
method_source (1.1.0)
|
124
|
+
minitest (5.15.0)
|
78
125
|
multi_json (1.15.0)
|
79
|
-
multipart-post (2.
|
126
|
+
multipart-post (2.4.1)
|
80
127
|
nenv (0.3.0)
|
128
|
+
nio4r (2.7.3)
|
81
129
|
notiffany (0.1.3)
|
82
130
|
nenv (~> 0.1)
|
83
131
|
shellany (~> 0.0)
|
84
|
-
octokit (4.
|
85
|
-
faraday (>=
|
86
|
-
sawyer (~> 0.
|
87
|
-
parallel (1.
|
88
|
-
parser (
|
132
|
+
octokit (4.25.1)
|
133
|
+
faraday (>= 1, < 3)
|
134
|
+
sawyer (~> 0.9)
|
135
|
+
parallel (1.24.0)
|
136
|
+
parser (3.3.2.0)
|
89
137
|
ast (~> 2.4.1)
|
90
|
-
|
138
|
+
racc
|
139
|
+
protocol-hpack (1.4.2)
|
140
|
+
protocol-http (0.24.7)
|
141
|
+
protocol-http1 (0.15.1)
|
142
|
+
protocol-http (~> 0.22)
|
143
|
+
protocol-http2 (0.15.1)
|
144
|
+
protocol-hpack (~> 1.4)
|
145
|
+
protocol-http (~> 0.18)
|
146
|
+
pry (0.14.2)
|
91
147
|
coderay (~> 1.1)
|
92
148
|
method_source (~> 1.0)
|
93
|
-
public_suffix (4.0.
|
149
|
+
public_suffix (4.0.7)
|
94
150
|
pusher-client (0.6.2)
|
95
151
|
json
|
96
152
|
websocket (~> 1.0)
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
rb-
|
153
|
+
racc (1.8.0)
|
154
|
+
rainbow (3.1.1)
|
155
|
+
rake (13.2.1)
|
156
|
+
rb-fsevent (0.11.2)
|
157
|
+
rb-inotify (0.11.1)
|
101
158
|
ffi (~> 1.0)
|
102
|
-
regexp_parser (
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
rspec-
|
107
|
-
rspec-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
rspec-expectations (3.9.2)
|
159
|
+
regexp_parser (2.9.2)
|
160
|
+
rexml (3.3.9)
|
161
|
+
rspec (3.13.0)
|
162
|
+
rspec-core (~> 3.13.0)
|
163
|
+
rspec-expectations (~> 3.13.0)
|
164
|
+
rspec-mocks (~> 3.13.0)
|
165
|
+
rspec-core (3.13.0)
|
166
|
+
rspec-support (~> 3.13.0)
|
167
|
+
rspec-expectations (3.13.0)
|
112
168
|
diff-lcs (>= 1.2.0, < 2.0)
|
113
|
-
rspec-support (~> 3.
|
114
|
-
rspec-mocks (3.
|
169
|
+
rspec-support (~> 3.13.0)
|
170
|
+
rspec-mocks (3.13.1)
|
115
171
|
diff-lcs (>= 1.2.0, < 2.0)
|
116
|
-
rspec-support (~> 3.
|
117
|
-
rspec-support (3.
|
118
|
-
rubocop (
|
172
|
+
rspec-support (~> 3.13.0)
|
173
|
+
rspec-support (3.13.1)
|
174
|
+
rubocop (1.28.2)
|
119
175
|
parallel (~> 1.10)
|
120
|
-
parser (>=
|
176
|
+
parser (>= 3.1.0.0)
|
121
177
|
rainbow (>= 2.2.2, < 4.0)
|
122
|
-
regexp_parser (>= 1.
|
178
|
+
regexp_parser (>= 1.8, < 3.0)
|
123
179
|
rexml
|
124
|
-
rubocop-ast (>=
|
180
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
125
181
|
ruby-progressbar (~> 1.7)
|
126
|
-
unicode-display_width (>= 1.4.0, <
|
127
|
-
rubocop-ast (
|
128
|
-
parser (>=
|
129
|
-
ruby-progressbar (1.
|
130
|
-
|
131
|
-
|
182
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
183
|
+
rubocop-ast (1.17.0)
|
184
|
+
parser (>= 3.1.1.0)
|
185
|
+
ruby-progressbar (1.13.0)
|
186
|
+
ruby2_keywords (0.0.5)
|
187
|
+
rugged (1.7.2)
|
188
|
+
sawyer (0.9.2)
|
132
189
|
addressable (>= 2.3.5)
|
133
|
-
faraday (
|
190
|
+
faraday (>= 0.17.3, < 3)
|
134
191
|
shellany (0.0.1)
|
135
|
-
simplecov (0.
|
192
|
+
simplecov (0.21.2)
|
136
193
|
docile (~> 1.1)
|
137
194
|
simplecov-html (~> 0.11)
|
138
|
-
|
195
|
+
simplecov_json_formatter (~> 0.1)
|
196
|
+
simplecov-html (0.12.3)
|
197
|
+
simplecov_json_formatter (0.1.4)
|
139
198
|
terminal-notifier (2.0.0)
|
140
|
-
terminal-table (
|
141
|
-
unicode-display_width (
|
142
|
-
thor (1.
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
199
|
+
terminal-table (3.0.2)
|
200
|
+
unicode-display_width (>= 1.1.1, < 3)
|
201
|
+
thor (1.2.2)
|
202
|
+
timers (4.3.5)
|
203
|
+
traces (0.11.1)
|
204
|
+
tzinfo (2.0.6)
|
205
|
+
concurrent-ruby (~> 1.0)
|
206
|
+
unicode-display_width (2.5.0)
|
207
|
+
websocket (1.2.10)
|
208
|
+
zeitwerk (2.6.15)
|
149
209
|
|
150
210
|
PLATFORMS
|
151
211
|
ruby
|
152
212
|
|
153
213
|
DEPENDENCIES
|
214
|
+
abbrev
|
215
|
+
base64
|
154
216
|
bundler
|
155
217
|
circleci-cli!
|
156
218
|
codecov
|
@@ -164,4 +226,4 @@ DEPENDENCIES
|
|
164
226
|
simplecov
|
165
227
|
|
166
228
|
BUNDLED WITH
|
167
|
-
2.
|
229
|
+
2.4.18
|
data/Guardfile
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
#
|
18
18
|
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
19
19
|
|
20
|
-
#
|
20
|
+
# NOTE: The cmd option is now required due to the increasing number of ways
|
21
21
|
# rspec may be run, below are examples of the most common uses.
|
22
22
|
# * bundler: 'bundle exec rspec'
|
23
23
|
# * bundler binstubs: 'bin/rspec'
|
data/README.md
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
# circleci-cli
|
2
2
|
[](#contributors-)
|
3
3
|
[](https://badge.fury.io/rb/circleci-cli)
|
4
|
-
[](https://libraries.io/github/unhappychoice/circleci-cli)
|
4
|
+
[](https://codeclimate.com/github/circleci-tools/circleci-cli)
|
5
|
+
[](https://codecov.io/gh/circleci-tools/circleci-cli)
|
6
|
+
[](https://libraries.io/github/circleci-tools/circleci-cli)
|
8
7
|

|
9
|
-

|
10
9
|
|
11
10
|
circleci-cli is a CLI tool for [Circle CI](https://circleci.com).
|
12
11
|
|
13
|
-

|
14
13
|
|
15
14
|
## Installation
|
16
15
|
|
@@ -84,7 +83,7 @@ $ circleci-cli browse
|
|
84
83
|
|
85
84
|
## Contributing
|
86
85
|
|
87
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
86
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/circleci-tools/circleci-cli.
|
88
87
|
|
89
88
|
## License
|
90
89
|
|
data/circleci-cli.gemspec
CHANGED
@@ -5,18 +5,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'circleci/cli/version'
|
6
6
|
|
7
7
|
def production_dependency(spec)
|
8
|
-
spec.add_dependency 'circleci', '
|
9
|
-
spec.add_dependency 'faraday', '>= 0.14', '<
|
10
|
-
spec.add_dependency 'highline', '>= 1.7.8', '< 2.
|
11
|
-
spec.add_dependency 'launchy', '>= 2.4.3', '<
|
8
|
+
spec.add_dependency 'circleci', '>= 2.1.0'
|
9
|
+
spec.add_dependency 'faraday', '>= 0.14', '< 2.8'
|
10
|
+
spec.add_dependency 'highline', '>= 1.7.8', '< 2.2.0'
|
11
|
+
spec.add_dependency 'launchy', '>= 2.4.3', '< 3.1.0'
|
12
12
|
spec.add_dependency 'pusher-client', '~> 0.6.2'
|
13
|
-
spec.add_dependency 'rugged', '>= 0.26', '< 1.
|
13
|
+
spec.add_dependency 'rugged', '>= 0.26', '< 1.8'
|
14
14
|
spec.add_dependency 'terminal-notifier', '~> 2.0.0'
|
15
|
-
spec.add_dependency 'terminal-table', '
|
16
|
-
spec.add_dependency 'thor', '>= 0.20', '< 1.
|
15
|
+
spec.add_dependency 'terminal-table', '>= 1.8', '< 3.1'
|
16
|
+
spec.add_dependency 'thor', '>= 0.20', '< 1.3'
|
17
17
|
end
|
18
18
|
|
19
19
|
def development_dependency(spec)
|
20
|
+
spec.add_development_dependency 'abbrev'
|
21
|
+
spec.add_development_dependency 'base64'
|
20
22
|
spec.add_development_dependency 'bundler'
|
21
23
|
spec.add_development_dependency 'codecov'
|
22
24
|
spec.add_development_dependency 'github_changelog_generator'
|
@@ -36,20 +38,23 @@ def project_files
|
|
36
38
|
end
|
37
39
|
|
38
40
|
Gem::Specification.new do |spec|
|
39
|
-
spec.name
|
40
|
-
spec.version
|
41
|
-
spec.required_ruby_version = '>=
|
42
|
-
spec.authors
|
43
|
-
spec.email
|
41
|
+
spec.name = 'circleci-cli'
|
42
|
+
spec.version = CircleCI::CLI::VERSION
|
43
|
+
spec.required_ruby_version = '>= 3.1'
|
44
|
+
spec.authors = ['unhappychoice']
|
45
|
+
spec.email = ['unhappychoice@gmail.com']
|
44
46
|
|
45
|
-
spec.summary
|
46
|
-
spec.description
|
47
|
-
spec.homepage
|
48
|
-
spec.license
|
49
|
-
spec.files
|
50
|
-
spec.bindir
|
51
|
-
spec.executables
|
52
|
-
spec.require_paths
|
47
|
+
spec.summary = 'CLI tool for CircleCI'
|
48
|
+
spec.description = 'A command line tool for CircleCI'
|
49
|
+
spec.homepage = 'https://github.com/circleci-tools/circleci-cli'
|
50
|
+
spec.license = 'MIT'
|
51
|
+
spec.files = project_files
|
52
|
+
spec.bindir = 'exe'
|
53
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
54
|
+
spec.require_paths = ['lib']
|
55
|
+
spec.metadata = {
|
56
|
+
'rubygems_mfa_required' => 'true'
|
57
|
+
}
|
53
58
|
|
54
59
|
production_dependency spec
|
55
60
|
development_dependency spec
|
@@ -11,13 +11,13 @@ module CircleCI
|
|
11
11
|
socket.connect(true)
|
12
12
|
end
|
13
13
|
|
14
|
-
def bind(channel, event, &
|
14
|
+
def bind(channel, event, &)
|
15
15
|
socket.subscribe(channel)
|
16
|
-
socket[channel].bind(event, &
|
16
|
+
socket[channel].bind(event, &)
|
17
17
|
end
|
18
18
|
|
19
|
-
def bind_event_json(channel, event, &
|
20
|
-
bind(channel, event) { |data| JSON.parse(data).each(&
|
19
|
+
def bind_event_json(channel, event, &)
|
20
|
+
bind(channel, event) { |data| JSON.parse(data).each(&) }
|
21
21
|
end
|
22
22
|
|
23
23
|
def unsubscribe(channel)
|
@@ -36,10 +36,10 @@ module CircleCI
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def auth(socket_id, channel)
|
39
|
-
token = ENV
|
39
|
+
token = ENV.fetch('CIRCLE_CI_TOKEN', nil) || ask('Circle CI token ? :')
|
40
40
|
res = connection.post(
|
41
41
|
"/auth/pusher?circle-token=#{token}",
|
42
|
-
{ socket_id
|
42
|
+
{ socket_id:, channel_name: channel.name }
|
43
43
|
)
|
44
44
|
JSON.parse(res.body)['auth']
|
45
45
|
end
|
@@ -12,7 +12,7 @@ module CircleCI
|
|
12
12
|
["Author: #{build.author_name}"],
|
13
13
|
["Workflow: #{build.workflow_name}/#{build.workflow_job_name}"]
|
14
14
|
]
|
15
|
-
Terminal::Table.new(title
|
15
|
+
Terminal::Table.new(title:, rows: texts, style: { width: 120 }).to_s
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -33,7 +33,7 @@ module CircleCI
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def print_pretty
|
36
|
-
Terminal::Table.new(title
|
36
|
+
Terminal::Table.new(title:, headings:, rows:).to_s
|
37
37
|
end
|
38
38
|
|
39
39
|
def title
|
data/lib/circleci/cli/version.rb
CHANGED
data/lib/circleci/cli.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'circleci'
|
4
4
|
require 'faraday'
|
5
|
-
require 'launchy'
|
6
|
-
require 'terminal-table'
|
7
5
|
require 'highline/import'
|
6
|
+
require 'launchy'
|
7
|
+
require 'ostruct'
|
8
8
|
require 'rugged'
|
9
|
-
require 'circleci'
|
10
9
|
require 'terminal-notifier'
|
10
|
+
require 'terminal-table'
|
11
|
+
require 'thor'
|
11
12
|
|
12
13
|
require 'circleci/cli/version'
|
13
14
|
require 'circleci/cli/command'
|