circler 0.3.2 → 0.4.0

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
  SHA1:
3
- metadata.gz: 96525a5fa10cd75f868e3fb645a5f7b7f3aaff67
4
- data.tar.gz: 51f058375938fbfb300534127a4af9c2ec7bc373
3
+ metadata.gz: 4a5dd67dd34e6e39fcb1874a7f4ae9ed08b379e9
4
+ data.tar.gz: f4f9cbc531ae9a6b841fb881535850f33ace222d
5
5
  SHA512:
6
- metadata.gz: b98a28fad3f15697956c5ff941c8e56bbbc88df00060c28e43d56828766c8b7e23a9bfa1d1c41d543fda7a438c5f8a0e616422c033625d8fae71d7cb76bd03e3
7
- data.tar.gz: 0b351d1d34843b87dad704a39d97fbec32414693944f1fd5978fd745ba396253698a933fb22746812ef9e7bb104ee14cb6c6064ede8f7f45973cf11af8274df5
6
+ metadata.gz: bd6a8a61803c7d20b87d9ab8440ea323bb884267c34299b9abf172f8ee65ce4ac29b47fd969b2f8ab5ff96494e6391b4d3a28e674af1effd228fffbf93adf18d
7
+ data.tar.gz: eeb74441ac6e45652d2d46ede335e2d5208267b7cb31e8ff6e6194fb1b7dbf0a67a2a782ca5e1332af1c5022ec2f8794cc2c2e9241d909fa529f217a85670fb9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- circler (0.3.2)
4
+ circler (0.4.0)
5
5
  circleci (~> 0.2.0)
6
6
  colorize (~> 0.7.7)
7
7
  faraday (~> 0.9.2)
@@ -74,4 +74,4 @@ DEPENDENCIES
74
74
  rspec
75
75
 
76
76
  BUNDLED WITH
77
- 1.10.6
77
+ 1.12.5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Circler
2
2
 
3
- [![Circle CI](https://circleci.com/gh/unhappychoice/circler.svg?style=svg)](https://circleci.com/gh/unhappychoice/circler)
3
+ [![Circle CI](https://circleci.com/gh/unhappychoice/Circler.svg?style=svg)](https://circleci.com/gh/unhappychoice/Circler)
4
4
 
5
5
  Circler is a CLI tool for [Circle CI](https://circleci.com).
6
6
 
data/lib/circler/cli.rb CHANGED
@@ -14,6 +14,7 @@ require 'circler/command/builds_command'
14
14
  require 'circler/command/build_command'
15
15
  require 'circler/command/browse_command'
16
16
  require 'circler/command/watch_command'
17
+ require 'circler/command/retry_command'
17
18
  require 'circler/response/account'
18
19
  require 'circler/response/project'
19
20
  require 'circler/response/build'
@@ -52,6 +53,13 @@ module Circler
52
53
  BrowseCommand.run(options)
53
54
  end
54
55
 
56
+ desc 'retry', 'show build description'
57
+ method_option :project, aliases: 'p', type: :string, banner: 'user/project'
58
+ method_option :build, aliases: 'n', type: :numeric, banner: 'build-number'
59
+ def retry
60
+ RetryCommand.run(options)
61
+ end
62
+
55
63
  desc 'watch', 'watch a build in real time'
56
64
  method_option :project, aliases: 'p', type: :string, banner: 'user/project'
57
65
  method_option :build, aliases: 'n', type: :numeric, banner: 'build-number'
@@ -0,0 +1,17 @@
1
+ module Circler
2
+ class RetryCommand < BaseCommand
3
+ class << self
4
+ def run(options)
5
+ setup_token
6
+ username, reponame = project_name(options).split('/')
7
+ number = options.build || ask('Input build number')
8
+ build = Build.retry(username, reponame, number)
9
+ if build.username
10
+ say "build #{build.username}/#{build.reponame} #{build.build_number} is triggered."
11
+ else
12
+ say "failed to trigger #{username}/#{reponame} #{number}."
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,4 @@
1
+ require 'pp'
1
2
  module Circler
2
3
  class Build
3
4
  class << self
@@ -16,6 +17,10 @@ module Circler
16
17
  def get(username, reponame, number)
17
18
  Build.new(CircleCi::Build.get(username, reponame, number).body)
18
19
  end
20
+
21
+ def retry(username, reponame, number)
22
+ Build.new(CircleCi::Build.retry(username, reponame, number).body)
23
+ end
19
24
  end
20
25
 
21
26
  def initialize(hash)
@@ -1,3 +1,3 @@
1
1
  module Circler
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - unhappychoice
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-25 00:00:00.000000000 Z
11
+ date: 2017-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pusher-client
@@ -218,6 +218,7 @@ files:
218
218
  - lib/circler/command/build_command.rb
219
219
  - lib/circler/command/builds_command.rb
220
220
  - lib/circler/command/projects_command.rb
221
+ - lib/circler/command/retry_command.rb
221
222
  - lib/circler/command/watch_command.rb
222
223
  - lib/circler/networking/pusher_client.rb
223
224
  - lib/circler/printer/build_printer.rb
@@ -250,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
251
  version: '0'
251
252
  requirements: []
252
253
  rubyforge_project:
253
- rubygems_version: 2.4.5
254
+ rubygems_version: 2.4.5.1
254
255
  signing_key:
255
256
  specification_version: 4
256
257
  summary: CLI tool for Circle CI