circleci-cli 2.3.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/.all-contributorsrc +12 -1
- 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 +12 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +182 -7
- data/Gemfile.lock +163 -100
- data/Guardfile +1 -1
- data/README.md +38 -29
- data/circleci-cli.gemspec +25 -20
- data/lib/circleci/cli/command/base_command.rb +7 -14
- data/lib/circleci/cli/command/build_command.rb +1 -1
- data/lib/circleci/cli/command/builds_command.rb +9 -9
- data/lib/circleci/cli/command/projects_command.rb +1 -1
- data/lib/circleci/cli/command/watch_command/build_repository.rb +7 -2
- data/lib/circleci/cli/command/watch_command/build_watcher.rb +18 -11
- data/lib/circleci/cli/command/watch_command.rb +6 -1
- data/lib/circleci/cli/networking/pusher_client.rb +16 -22
- data/lib/circleci/cli/printer/build_printer.rb +9 -9
- data/lib/circleci/cli/printer/project_printer.rb +2 -1
- data/lib/circleci/cli/printer/step_printer.rb +9 -9
- data/lib/circleci/cli/printer.rb +25 -1
- data/lib/circleci/cli/response/action.rb +1 -0
- data/lib/circleci/cli/response/build.rb +7 -7
- data/lib/circleci/cli/response/step.rb +1 -2
- data/lib/circleci/cli/version.rb +1 -1
- data/lib/circleci/cli.rb +119 -31
- metadata +77 -44
- data/.circleci/config.yml +0 -68
data/Gemfile.lock
CHANGED
@@ -1,61 +1,104 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
circleci-cli (
|
5
|
-
circleci (
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
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)
|
10
9
|
pusher-client (~> 0.6.2)
|
11
|
-
rugged (>= 0.26, <
|
10
|
+
rugged (>= 0.26, < 1.8)
|
12
11
|
terminal-notifier (~> 2.0.0)
|
13
|
-
terminal-table (
|
14
|
-
thor (
|
12
|
+
terminal-table (>= 1.8, < 3.1)
|
13
|
+
thor (>= 0.20, < 1.3)
|
15
14
|
|
16
15
|
GEM
|
17
16
|
remote: https://rubygems.org/
|
18
17
|
specs:
|
19
|
-
|
18
|
+
abbrev (0.1.2)
|
19
|
+
activesupport (6.1.7.6)
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
|
-
i18n (>=
|
22
|
-
minitest (
|
23
|
-
tzinfo (~>
|
24
|
-
zeitwerk (~> 2.
|
25
|
-
addressable (2.
|
26
|
-
public_suffix (>= 2.0.2, <
|
27
|
-
ast (2.4.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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)
|
52
|
+
coderay (1.1.3)
|
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)
|
74
|
+
faraday (>= 0.8)
|
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)
|
45
87
|
activesupport
|
88
|
+
async (>= 1.25.0)
|
89
|
+
async-http-faraday
|
46
90
|
faraday-http-cache
|
47
91
|
multi_json
|
48
92
|
octokit (~> 4.6)
|
49
|
-
rainbow (>= 2.1)
|
93
|
+
rainbow (>= 2.2.1)
|
50
94
|
rake (>= 10.0)
|
51
|
-
|
52
|
-
guard (2.15.1)
|
95
|
+
guard (2.18.1)
|
53
96
|
formatador (>= 0.2.4)
|
54
97
|
listen (>= 2.7, < 4.0)
|
55
98
|
lumberjack (>= 1.0.12, < 2.0)
|
56
99
|
nenv (~> 0.1)
|
57
100
|
notiffany (~> 0.0)
|
58
|
-
pry (>= 0.
|
101
|
+
pry (>= 0.13.0)
|
59
102
|
shellany (~> 0.0)
|
60
103
|
thor (>= 0.18.1)
|
61
104
|
guard-compat (1.2.1)
|
@@ -63,93 +106,113 @@ GEM
|
|
63
106
|
guard (~> 2.1)
|
64
107
|
guard-compat (~> 1.1)
|
65
108
|
rspec (>= 2.99.0, < 4.0)
|
66
|
-
guard-rubocop (1.
|
109
|
+
guard-rubocop (1.5.0)
|
67
110
|
guard (~> 2.0)
|
68
|
-
rubocop (
|
69
|
-
highline (2.0
|
70
|
-
i18n (1.
|
111
|
+
rubocop (< 2.0)
|
112
|
+
highline (2.1.0)
|
113
|
+
i18n (1.14.5)
|
71
114
|
concurrent-ruby (~> 1.0)
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
listen (3.
|
115
|
+
json (2.7.2)
|
116
|
+
launchy (3.0.1)
|
117
|
+
addressable (~> 2.8)
|
118
|
+
childprocess (~> 5.0)
|
119
|
+
listen (3.9.0)
|
77
120
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
78
121
|
rb-inotify (~> 0.9, >= 0.9.10)
|
79
|
-
lumberjack (1.
|
80
|
-
method_source (
|
81
|
-
minitest (5.
|
82
|
-
multi_json (1.
|
83
|
-
multipart-post (2.
|
122
|
+
lumberjack (1.2.10)
|
123
|
+
method_source (1.1.0)
|
124
|
+
minitest (5.15.0)
|
125
|
+
multi_json (1.15.0)
|
126
|
+
multipart-post (2.4.1)
|
84
127
|
nenv (0.3.0)
|
128
|
+
nio4r (2.7.3)
|
85
129
|
notiffany (0.1.3)
|
86
130
|
nenv (~> 0.1)
|
87
131
|
shellany (~> 0.0)
|
88
|
-
octokit (4.
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
132
|
+
octokit (4.25.1)
|
133
|
+
faraday (>= 1, < 3)
|
134
|
+
sawyer (~> 0.9)
|
135
|
+
parallel (1.24.0)
|
136
|
+
parser (3.3.2.0)
|
137
|
+
ast (~> 2.4.1)
|
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)
|
147
|
+
coderay (~> 1.1)
|
148
|
+
method_source (~> 1.0)
|
149
|
+
public_suffix (4.0.7)
|
97
150
|
pusher-client (0.6.2)
|
98
151
|
json
|
99
152
|
websocket (~> 1.0)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
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)
|
104
158
|
ffi (~> 1.0)
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
rspec-
|
109
|
-
rspec-
|
110
|
-
|
111
|
-
|
112
|
-
|
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)
|
113
168
|
diff-lcs (>= 1.2.0, < 2.0)
|
114
|
-
rspec-support (~> 3.
|
115
|
-
rspec-mocks (3.
|
169
|
+
rspec-support (~> 3.13.0)
|
170
|
+
rspec-mocks (3.13.1)
|
116
171
|
diff-lcs (>= 1.2.0, < 2.0)
|
117
|
-
rspec-support (~> 3.
|
118
|
-
rspec-support (3.
|
119
|
-
rubocop (
|
120
|
-
jaro_winkler (~> 1.5.1)
|
172
|
+
rspec-support (~> 3.13.0)
|
173
|
+
rspec-support (3.13.1)
|
174
|
+
rubocop (1.28.2)
|
121
175
|
parallel (~> 1.10)
|
122
|
-
parser (>=
|
176
|
+
parser (>= 3.1.0.0)
|
123
177
|
rainbow (>= 2.2.2, < 4.0)
|
178
|
+
regexp_parser (>= 1.8, < 3.0)
|
179
|
+
rexml
|
180
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
124
181
|
ruby-progressbar (~> 1.7)
|
125
|
-
unicode-display_width (>= 1.4.0, <
|
126
|
-
|
127
|
-
|
128
|
-
|
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)
|
129
189
|
addressable (>= 2.3.5)
|
130
|
-
faraday (
|
190
|
+
faraday (>= 0.17.3, < 3)
|
131
191
|
shellany (0.0.1)
|
132
|
-
simplecov (0.
|
192
|
+
simplecov (0.21.2)
|
133
193
|
docile (~> 1.1)
|
134
|
-
|
135
|
-
|
136
|
-
simplecov-html (0.
|
194
|
+
simplecov-html (~> 0.11)
|
195
|
+
simplecov_json_formatter (~> 0.1)
|
196
|
+
simplecov-html (0.12.3)
|
197
|
+
simplecov_json_formatter (0.1.4)
|
137
198
|
terminal-notifier (2.0.0)
|
138
|
-
terminal-table (
|
139
|
-
unicode-display_width (
|
140
|
-
thor (
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
websocket (1.2.
|
147
|
-
zeitwerk (2.
|
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)
|
148
209
|
|
149
210
|
PLATFORMS
|
150
211
|
ruby
|
151
212
|
|
152
213
|
DEPENDENCIES
|
214
|
+
abbrev
|
215
|
+
base64
|
153
216
|
bundler
|
154
217
|
circleci-cli!
|
155
218
|
codecov
|
@@ -163,4 +226,4 @@ DEPENDENCIES
|
|
163
226
|
simplecov
|
164
227
|
|
165
228
|
BUNDLED WITH
|
166
|
-
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,17 +1,15 @@
|
|
1
1
|
# circleci-cli
|
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
|
-
Notice: This gem is renamed from `circler` to `circleci-cli` on 2019/09/22
|
12
10
|
circleci-cli is a CLI tool for [Circle CI](https://circleci.com).
|
13
11
|
|
14
|
-

|
15
13
|
|
16
14
|
## Installation
|
17
15
|
|
@@ -28,26 +26,33 @@ export CIRCLE_CI_TOKEN=your-circle-ci-token
|
|
28
26
|
## Usage
|
29
27
|
```
|
30
28
|
Commands:
|
31
|
-
circleci-cli browse
|
32
|
-
circleci-cli build
|
33
|
-
circleci-cli builds
|
34
|
-
circleci-cli
|
35
|
-
circleci-cli
|
36
|
-
circleci-cli
|
37
|
-
circleci-cli
|
38
|
-
circleci-cli
|
29
|
+
circleci-cli browse # Open CircleCI website
|
30
|
+
circleci-cli build # Show the build result
|
31
|
+
circleci-cli builds # List builds
|
32
|
+
circleci-cli cancel # Cancel a build
|
33
|
+
circleci-cli help [COMMAND] # Describe available commands or one specific command
|
34
|
+
circleci-cli projects # List projects
|
35
|
+
circleci-cli retry # Retry a build
|
36
|
+
circleci-cli version # Show gem version
|
37
|
+
circleci-cli watch # Watch builds in real time
|
39
38
|
|
40
39
|
Options:
|
41
|
-
-p user_name/project
|
42
|
-
|
43
|
-
|
44
|
-
-
|
45
|
-
|
46
|
-
```
|
40
|
+
-p user_name/project # Specify repository
|
41
|
+
# Default to the Git remote of current directory
|
42
|
+
|
43
|
+
-b branch # Specify branch name
|
44
|
+
# Default to the current Git branch
|
47
45
|
|
48
|
-
|
46
|
+
-a, --all, --no-all # Ignore the branch option and stop being filtered by the branch
|
47
|
+
# Default to false
|
49
48
|
|
50
|
-
|
49
|
+
-n build_number # Specify build number.
|
50
|
+
-l last # Get or retry last failed build.
|
51
|
+
-v verbose # Show all the logs if applied to watch command.
|
52
|
+
|
53
|
+
--pretty=true/false, --no-pretty # Make outputs pretty or not
|
54
|
+
# Default to true
|
55
|
+
```
|
51
56
|
|
52
57
|
### Examples
|
53
58
|
|
@@ -78,7 +83,7 @@ $ circleci-cli browse
|
|
78
83
|
|
79
84
|
## Contributing
|
80
85
|
|
81
|
-
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.
|
82
87
|
|
83
88
|
## License
|
84
89
|
|
@@ -89,15 +94,19 @@ The gem is available as open source under the terms of the [MIT License](http://
|
|
89
94
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
90
95
|
|
91
96
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
92
|
-
<!-- prettier-ignore -->
|
97
|
+
<!-- prettier-ignore-start -->
|
98
|
+
<!-- markdownlint-disable -->
|
93
99
|
<table>
|
94
100
|
<tr>
|
95
|
-
<td align="center"><a href="http://blog.unhappychoice.com"><img src="https://avatars3.githubusercontent.com/u/5608948?v=4" width="100px;" alt="
|
96
|
-
<td align="center"><a href="https://mattbrictson.com/"><img src="https://avatars0.githubusercontent.com/u/189693?v=4" width="100px;" alt="
|
97
|
-
<td align="center"><a href="http://fzf.me"><img src="https://avatars0.githubusercontent.com/u/1462357?v=4" width="100px;" alt="
|
101
|
+
<td align="center"><a href="http://blog.unhappychoice.com"><img src="https://avatars3.githubusercontent.com/u/5608948?v=4" width="100px;" alt=""/><br /><sub><b>Yuji Ueki</b></sub></a><br /><a href="https://github.com/unhappychoice/circleci-cli/commits?author=unhappychoice" title="Code">💻</a></td>
|
102
|
+
<td align="center"><a href="https://mattbrictson.com/"><img src="https://avatars0.githubusercontent.com/u/189693?v=4" width="100px;" alt=""/><br /><sub><b>Matt Brictson</b></sub></a><br /><a href="https://github.com/unhappychoice/circleci-cli/commits?author=mattbrictson" title="Code">💻</a> <a href="https://github.com/unhappychoice/circleci-cli/commits?author=mattbrictson" title="Tests">⚠️</a></td>
|
103
|
+
<td align="center"><a href="http://fzf.me"><img src="https://avatars0.githubusercontent.com/u/1462357?v=4" width="100px;" alt=""/><br /><sub><b>Fletcher Fowler</b></sub></a><br /><a href="https://github.com/unhappychoice/circleci-cli/issues?q=author%3Afzf" title="Bug reports">🐛</a> <a href="#ideas-fzf" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/unhappychoice/circleci-cli/commits?author=fzf" title="Code">💻</a></td>
|
104
|
+
<td align="center"><a href="https://datadoghq.com"><img src="https://avatars3.githubusercontent.com/u/583503?v=4" width="100px;" alt=""/><br /><sub><b>Marco Costa</b></sub></a><br /><a href="#ideas-marcotc" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/unhappychoice/circleci-cli/commits?author=marcotc" title="Code">💻</a></td>
|
98
105
|
</tr>
|
99
106
|
</table>
|
100
107
|
|
108
|
+
<!-- markdownlint-enable -->
|
109
|
+
<!-- prettier-ignore-end -->
|
101
110
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
102
111
|
|
103
112
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
data/circleci-cli.gemspec
CHANGED
@@ -5,19 +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 '
|
10
|
-
spec.add_dependency '
|
11
|
-
spec.add_dependency '
|
12
|
-
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'
|
13
12
|
spec.add_dependency 'pusher-client', '~> 0.6.2'
|
14
|
-
spec.add_dependency 'rugged', '>= 0.26', '<
|
13
|
+
spec.add_dependency 'rugged', '>= 0.26', '< 1.8'
|
15
14
|
spec.add_dependency 'terminal-notifier', '~> 2.0.0'
|
16
|
-
spec.add_dependency 'terminal-table', '
|
17
|
-
spec.add_dependency 'thor', '
|
15
|
+
spec.add_dependency 'terminal-table', '>= 1.8', '< 3.1'
|
16
|
+
spec.add_dependency 'thor', '>= 0.20', '< 1.3'
|
18
17
|
end
|
19
18
|
|
20
19
|
def development_dependency(spec)
|
20
|
+
spec.add_development_dependency 'abbrev'
|
21
|
+
spec.add_development_dependency 'base64'
|
21
22
|
spec.add_development_dependency 'bundler'
|
22
23
|
spec.add_development_dependency 'codecov'
|
23
24
|
spec.add_development_dependency 'github_changelog_generator'
|
@@ -37,19 +38,23 @@ def project_files
|
|
37
38
|
end
|
38
39
|
|
39
40
|
Gem::Specification.new do |spec|
|
40
|
-
spec.name
|
41
|
-
spec.version
|
42
|
-
spec.
|
43
|
-
spec.
|
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
|
@@ -7,37 +7,30 @@ module CircleCI
|
|
7
7
|
class << self
|
8
8
|
def setup_token
|
9
9
|
CircleCi.configure do |config|
|
10
|
-
config.token = ENV
|
10
|
+
config.token = ENV.fetch('CIRCLE_CI_TOKEN', nil) || ask('Circle CI token ? :')
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def project_name(options)
|
15
15
|
if options.project
|
16
16
|
options.project
|
17
|
-
elsif reponame
|
18
|
-
reponame
|
19
17
|
else
|
20
18
|
say Printer::ProjectPrinter.new(Response::Project.all).to_s
|
21
19
|
ask('Input user-name/project-name :')
|
22
20
|
end
|
23
21
|
end
|
24
22
|
|
25
|
-
def
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
nil
|
23
|
+
def branch_name(options)
|
24
|
+
if options.all
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
options.branch
|
28
|
+
end
|
32
29
|
end
|
33
30
|
|
34
31
|
def build_number(options)
|
35
32
|
options.build || ask('Input build number')
|
36
33
|
end
|
37
|
-
|
38
|
-
def should_be_pretty(options)
|
39
|
-
options['format'] != 'simple'
|
40
|
-
end
|
41
34
|
end
|
42
35
|
end
|
43
36
|
end
|
@@ -7,16 +7,16 @@ module CircleCI
|
|
7
7
|
class << self
|
8
8
|
def run(options)
|
9
9
|
setup_token
|
10
|
-
|
10
|
+
project_name = project_name(options)
|
11
|
+
username, reponame = project_name.split('/')
|
12
|
+
branch = branch_name(options)
|
13
|
+
builds = if branch
|
14
|
+
Response::Build.branch(username, reponame, branch)
|
15
|
+
else
|
16
|
+
Response::Build.all(username, reponame)
|
17
|
+
end
|
11
18
|
|
12
|
-
builds
|
13
|
-
if options.branch
|
14
|
-
Response::Build.branch(username, reponame, options.branch)
|
15
|
-
else
|
16
|
-
Response::Build.all(username, reponame)
|
17
|
-
end
|
18
|
-
|
19
|
-
say Printer::BuildPrinter.new(builds, pretty: should_be_pretty(options)).to_s
|
19
|
+
say Printer::BuildPrinter.new(builds, project_name, pretty: options.pretty).to_s
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -7,7 +7,7 @@ module CircleCI
|
|
7
7
|
class << self
|
8
8
|
def run(options)
|
9
9
|
setup_token
|
10
|
-
say Printer::ProjectPrinter.new(Response::Project.all, pretty:
|
10
|
+
say Printer::ProjectPrinter.new(Response::Project.all, pretty: options.pretty).to_s
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -14,8 +14,13 @@ module CircleCI
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def update
|
17
|
-
|
18
|
-
|
17
|
+
response = if @branch
|
18
|
+
Response::Build.branch(@username, @reponame, @branch)
|
19
|
+
else
|
20
|
+
Response::Build.all(@username, @reponame)
|
21
|
+
end
|
22
|
+
|
23
|
+
@builds = (response + @builds).uniq(&:build_number)
|
19
24
|
end
|
20
25
|
|
21
26
|
def mark_as_shown(build_number)
|