circleci-cli 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +68 -0
- data/.rubocop.yml +5 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +136 -0
- data/Guardfile +49 -0
- data/LICENSE.txt +21 -0
- data/README.md +51 -0
- data/Rakefile +8 -0
- data/bin/circle +6 -0
- data/bin/console +15 -0
- data/bin/setup +7 -0
- data/circler.gemspec +55 -0
- data/exe/circle +6 -0
- data/lib/circler.rb +6 -0
- data/lib/circler/cli.rb +88 -0
- data/lib/circler/command/base_command.rb +41 -0
- data/lib/circler/command/browse_command.rb +20 -0
- data/lib/circler/command/build_command.rb +15 -0
- data/lib/circler/command/builds_command.rb +21 -0
- data/lib/circler/command/cancel_command.rb +19 -0
- data/lib/circler/command/projects_command.rb +12 -0
- data/lib/circler/command/retry_command.rb +19 -0
- data/lib/circler/command/watch_command.rb +73 -0
- data/lib/circler/networking/pusher_client.rb +56 -0
- data/lib/circler/printer/build_printer.rb +59 -0
- data/lib/circler/printer/project_printer.rb +33 -0
- data/lib/circler/printer/step_printer.rb +53 -0
- data/lib/circler/response/account.rb +17 -0
- data/lib/circler/response/action.rb +35 -0
- data/lib/circler/response/build.rb +100 -0
- data/lib/circler/response/project.rb +17 -0
- data/lib/circler/response/step.rb +18 -0
- data/lib/circler/version.rb +5 -0
- data/movie/rec.gif +0 -0
- metadata +363 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d0d7f94b9e9ab370f379d14c0face1967e11968f1b1ada03bb2eb7969094b211
|
4
|
+
data.tar.gz: b93a93c8c72e496c3dfc17dea23142dec3cd0c14b08bf9228dbcafc7a9dd43aa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 89894c5a304c926ccc064353e544e80dd5a682fe81e55dc69b9f2c46a09bbb6e386a231022b904a56bccbb21054bba3889a60a3c2b7a4dcf9e3ba9bc1449dc3b
|
7
|
+
data.tar.gz: 2e962e7dd84b1f06bc703b1702b412ab944fb92b9d880b7dcc7bac4b6346e53af25152a1abfdb133b6c10d48a8ad51140fc1e7c26b4d852da78081645ad75cea
|
@@ -0,0 +1,68 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
update_bundler: &update_bundler
|
4
|
+
run:
|
5
|
+
name: update bundler
|
6
|
+
command: gem update bundler
|
7
|
+
|
8
|
+
bundle_install: &bundle_install
|
9
|
+
run:
|
10
|
+
name: bundle install
|
11
|
+
command: bundle update --bundler && bundle install --path vendor/bundle --jobs 4
|
12
|
+
|
13
|
+
restore_bundle_cache: &restore_bundle_cache
|
14
|
+
restore_cache:
|
15
|
+
key: cache-bundler-{{ checksum "Gemfile.lock" }}
|
16
|
+
|
17
|
+
install_cmake: &install_cmake
|
18
|
+
run:
|
19
|
+
name: install cmake
|
20
|
+
command: sudo apt-get install cmake
|
21
|
+
|
22
|
+
jobs:
|
23
|
+
build:
|
24
|
+
docker:
|
25
|
+
- image: circleci/ruby
|
26
|
+
steps:
|
27
|
+
- checkout
|
28
|
+
- *install_cmake
|
29
|
+
- *restore_bundle_cache
|
30
|
+
- *update_bundler
|
31
|
+
- *bundle_install
|
32
|
+
- save_cache:
|
33
|
+
key: cache-bundler-{{ checksum "Gemfile.lock" }}
|
34
|
+
paths:
|
35
|
+
- vendor/bundle
|
36
|
+
rubocop:
|
37
|
+
docker:
|
38
|
+
- image: circleci/ruby
|
39
|
+
steps:
|
40
|
+
- checkout
|
41
|
+
- *install_cmake
|
42
|
+
- *restore_bundle_cache
|
43
|
+
- *update_bundler
|
44
|
+
- *bundle_install
|
45
|
+
- run: bundle exec rubocop
|
46
|
+
rspec:
|
47
|
+
docker:
|
48
|
+
- image: circleci/ruby
|
49
|
+
steps:
|
50
|
+
- checkout
|
51
|
+
- *install_cmake
|
52
|
+
- *restore_bundle_cache
|
53
|
+
- *update_bundler
|
54
|
+
- *bundle_install
|
55
|
+
- run:
|
56
|
+
environment:
|
57
|
+
COVERAGE: true
|
58
|
+
CODECOV_TOKEN: efe02ed0-e754-42a6-bb90-bbf345747bdc
|
59
|
+
command: bundle exec rspec
|
60
|
+
workflows:
|
61
|
+
version: 2.1
|
62
|
+
rspec:
|
63
|
+
jobs:
|
64
|
+
- build
|
65
|
+
- rubocop:
|
66
|
+
requires: [build]
|
67
|
+
- rspec:
|
68
|
+
requires: [build]
|
data/.rubocop.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at unhappychoice@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
circleci-cli (0.6.3)
|
5
|
+
circleci (~> 2.0.2)
|
6
|
+
colorize (~> 0.8.1)
|
7
|
+
faraday (>= 0.14, < 0.16)
|
8
|
+
highline (>= 1.7.8, < 2.1.0)
|
9
|
+
launchy (~> 2.4.3)
|
10
|
+
pusher-client (~> 0.6.2)
|
11
|
+
rugged (>= 0.26, < 0.29)
|
12
|
+
terminal-notifier (~> 2.0.0)
|
13
|
+
terminal-table (~> 1.8.0)
|
14
|
+
thor (~> 0.20.0)
|
15
|
+
|
16
|
+
GEM
|
17
|
+
remote: https://rubygems.org/
|
18
|
+
specs:
|
19
|
+
addressable (2.7.0)
|
20
|
+
public_suffix (>= 2.0.2, < 5.0)
|
21
|
+
ast (2.4.0)
|
22
|
+
circleci (2.0.2)
|
23
|
+
codecov (0.1.14)
|
24
|
+
json
|
25
|
+
simplecov
|
26
|
+
url
|
27
|
+
coderay (1.1.2)
|
28
|
+
colorize (0.8.1)
|
29
|
+
diff-lcs (1.3)
|
30
|
+
docile (1.3.2)
|
31
|
+
faraday (0.15.4)
|
32
|
+
multipart-post (>= 1.2, < 3)
|
33
|
+
ffi (1.11.1)
|
34
|
+
formatador (0.2.5)
|
35
|
+
guard (2.15.1)
|
36
|
+
formatador (>= 0.2.4)
|
37
|
+
listen (>= 2.7, < 4.0)
|
38
|
+
lumberjack (>= 1.0.12, < 2.0)
|
39
|
+
nenv (~> 0.1)
|
40
|
+
notiffany (~> 0.0)
|
41
|
+
pry (>= 0.9.12)
|
42
|
+
shellany (~> 0.0)
|
43
|
+
thor (>= 0.18.1)
|
44
|
+
guard-compat (1.2.1)
|
45
|
+
guard-rspec (4.7.3)
|
46
|
+
guard (~> 2.1)
|
47
|
+
guard-compat (~> 1.1)
|
48
|
+
rspec (>= 2.99.0, < 4.0)
|
49
|
+
guard-rubocop (1.3.0)
|
50
|
+
guard (~> 2.0)
|
51
|
+
rubocop (~> 0.20)
|
52
|
+
highline (2.0.2)
|
53
|
+
jaro_winkler (1.5.3)
|
54
|
+
json (2.2.0)
|
55
|
+
launchy (2.4.3)
|
56
|
+
addressable (~> 2.3)
|
57
|
+
listen (3.1.5)
|
58
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
59
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
60
|
+
ruby_dep (~> 1.2)
|
61
|
+
lumberjack (1.0.13)
|
62
|
+
method_source (0.9.2)
|
63
|
+
multipart-post (2.1.1)
|
64
|
+
nenv (0.3.0)
|
65
|
+
notiffany (0.1.3)
|
66
|
+
nenv (~> 0.1)
|
67
|
+
shellany (~> 0.0)
|
68
|
+
parallel (1.17.0)
|
69
|
+
parser (2.6.4.1)
|
70
|
+
ast (~> 2.4.0)
|
71
|
+
pry (0.12.2)
|
72
|
+
coderay (~> 1.1.0)
|
73
|
+
method_source (~> 0.9.0)
|
74
|
+
public_suffix (4.0.1)
|
75
|
+
pusher-client (0.6.2)
|
76
|
+
json
|
77
|
+
websocket (~> 1.0)
|
78
|
+
rainbow (3.0.0)
|
79
|
+
rake (12.3.3)
|
80
|
+
rb-fsevent (0.10.3)
|
81
|
+
rb-inotify (0.10.0)
|
82
|
+
ffi (~> 1.0)
|
83
|
+
rspec (3.8.0)
|
84
|
+
rspec-core (~> 3.8.0)
|
85
|
+
rspec-expectations (~> 3.8.0)
|
86
|
+
rspec-mocks (~> 3.8.0)
|
87
|
+
rspec-core (3.8.2)
|
88
|
+
rspec-support (~> 3.8.0)
|
89
|
+
rspec-expectations (3.8.4)
|
90
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
91
|
+
rspec-support (~> 3.8.0)
|
92
|
+
rspec-mocks (3.8.1)
|
93
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
94
|
+
rspec-support (~> 3.8.0)
|
95
|
+
rspec-support (3.8.2)
|
96
|
+
rubocop (0.74.0)
|
97
|
+
jaro_winkler (~> 1.5.1)
|
98
|
+
parallel (~> 1.10)
|
99
|
+
parser (>= 2.6)
|
100
|
+
rainbow (>= 2.2.2, < 4.0)
|
101
|
+
ruby-progressbar (~> 1.7)
|
102
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
103
|
+
ruby-progressbar (1.10.1)
|
104
|
+
ruby_dep (1.5.0)
|
105
|
+
rugged (0.28.3.1)
|
106
|
+
shellany (0.0.1)
|
107
|
+
simplecov (0.17.1)
|
108
|
+
docile (~> 1.1)
|
109
|
+
json (>= 1.8, < 3)
|
110
|
+
simplecov-html (~> 0.10.0)
|
111
|
+
simplecov-html (0.10.2)
|
112
|
+
terminal-notifier (2.0.0)
|
113
|
+
terminal-table (1.8.0)
|
114
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
115
|
+
thor (0.20.3)
|
116
|
+
unicode-display_width (1.6.0)
|
117
|
+
url (0.3.2)
|
118
|
+
websocket (1.2.8)
|
119
|
+
|
120
|
+
PLATFORMS
|
121
|
+
ruby
|
122
|
+
|
123
|
+
DEPENDENCIES
|
124
|
+
bundler
|
125
|
+
circleci-cli!
|
126
|
+
codecov
|
127
|
+
guard
|
128
|
+
guard-rspec
|
129
|
+
guard-rubocop
|
130
|
+
rake
|
131
|
+
rspec
|
132
|
+
rubocop
|
133
|
+
simplecov
|
134
|
+
|
135
|
+
BUNDLED WITH
|
136
|
+
1.17.2
|
data/Guardfile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sample Guardfile
|
4
|
+
# More info at https://github.com/guard/guard#readme
|
5
|
+
|
6
|
+
## Uncomment and set this to only include directories you want to watch
|
7
|
+
# directories %w(app lib config test spec features) \
|
8
|
+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
9
|
+
|
10
|
+
## Note: if you are using the `directories` clause above and you are not
|
11
|
+
## watching the project directory ('.'), then you will want to move
|
12
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
13
|
+
#
|
14
|
+
# $ mkdir config
|
15
|
+
# $ mv Guardfile config/
|
16
|
+
# $ ln -s config/Guardfile .
|
17
|
+
#
|
18
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
19
|
+
|
20
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
21
|
+
# rspec may be run, below are examples of the most common uses.
|
22
|
+
# * bundler: 'bundle exec rspec'
|
23
|
+
# * bundler binstubs: 'bin/rspec'
|
24
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
25
|
+
# installed the spring binstubs per the docs)
|
26
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
27
|
+
# * 'just' rspec: 'rspec'
|
28
|
+
|
29
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
30
|
+
require 'guard/rspec/dsl'
|
31
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
32
|
+
|
33
|
+
# Feel free to open issues for suggestions and improvements
|
34
|
+
|
35
|
+
# RSpec files
|
36
|
+
rspec = dsl.rspec
|
37
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
38
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
39
|
+
watch(rspec.spec_files)
|
40
|
+
|
41
|
+
# Ruby files
|
42
|
+
ruby = dsl.ruby
|
43
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
44
|
+
end
|
45
|
+
|
46
|
+
guard :rubocop do
|
47
|
+
watch(/.+\.rb$/)
|
48
|
+
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
|
49
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 unhappychoice
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Circler
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/circler.svg)](https://badge.fury.io/rb/circler)
|
4
|
+
[![Circle CI](https://circleci.com/gh/unhappychoice/Circler.svg?style=shield)](https://circleci.com/gh/unhappychoice/Circler)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/unhappychoice/Circler/badges/gpa.svg)](https://codeclimate.com/github/unhappychoice/Circler)
|
6
|
+
[![codecov](https://codecov.io/gh/unhappychoice/Circler/branch/master/graph/badge.svg)](https://codecov.io/gh/unhappychoice/Circler)
|
7
|
+
[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/unhappychoice/Circler.svg)](https://libraries.io/github/unhappychoice/Circler)
|
8
|
+
![](http://ruby-gem-downloads-badge.herokuapp.com/circler?type=total)
|
9
|
+
![GitHub](https://img.shields.io/github/license/unhappychoice/Circler.svg)
|
10
|
+
|
11
|
+
Circler is a CLI tool for [Circle CI](https://circleci.com).
|
12
|
+
|
13
|
+
![sample.gif](https://github.com/unhappychoice/circler/raw/master/movie/rec.gif)
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
```sh
|
18
|
+
$ gem install circler
|
19
|
+
```
|
20
|
+
|
21
|
+
set the `CIRCLE_CI_TOKEN` environment variable. (optional)
|
22
|
+
|
23
|
+
```sh
|
24
|
+
export CIRCLE_CI_TOKEN=your-circle-ci-token
|
25
|
+
```
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
```
|
29
|
+
Commands:
|
30
|
+
circle browse # open circle ci website
|
31
|
+
circle build # show build description
|
32
|
+
circle builds # list builds
|
33
|
+
circle help [COMMAND] # describe available commands or one specific command
|
34
|
+
circle projects # list projects
|
35
|
+
circle retry # retry a build
|
36
|
+
circle version # show gem version
|
37
|
+
circle watch # watch a build in real time
|
38
|
+
|
39
|
+
Options:
|
40
|
+
-p user_name/project # specify repository
|
41
|
+
-b branch # specify branch name
|
42
|
+
-n build_number # specify build number
|
43
|
+
```
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/unhappychoice/circler.
|
48
|
+
|
49
|
+
## License
|
50
|
+
|
51
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED