circler 0.5.1 → 0.6.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/Gemfile.lock +1 -1
- data/lib/circler/cli.rb +3 -1
- data/lib/circler/command/builds_command.rb +1 -1
- data/lib/circler/command/projects_command.rb +1 -1
- data/lib/circler/printer/build_printer.rb +10 -0
- data/lib/circler/printer/project_printer.rb +2 -2
- data/lib/circler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 936602f560e2e91450584b8ab2c186a37f2d5739
|
4
|
+
data.tar.gz: 91e836604c0338e304a4084f70a4fb2d7f1f867f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e186b0c3a8e57895ba5be1f158afeebeb58a838f5c0f25bae3b40c746b1f07f15bbb57e064e222f7490832a8ab345ba96a74c14a7d44eeae2437300806023f76
|
7
|
+
data.tar.gz: 62d8a1f21cb6cb2e0db79479d767abf4959b088dfcbbec160af95918ad2606507b9fdce0d02075d3aac78193e87434c55b7dc8e9d7d2bedd638a2d9a9ab1a17a
|
data/Gemfile.lock
CHANGED
data/lib/circler/cli.rb
CHANGED
@@ -30,6 +30,7 @@ require 'circler/networking/pusher_client'
|
|
30
30
|
module Circler
|
31
31
|
class CLI < Thor
|
32
32
|
desc 'projects', 'list projects'
|
33
|
+
method_option :format, aliases: 'f', type: :string, banner: 'pretty/simple', default: 'pretty'
|
33
34
|
def projects
|
34
35
|
ProjectsCommand.run(options)
|
35
36
|
end
|
@@ -37,6 +38,7 @@ module Circler
|
|
37
38
|
desc 'builds', 'list builds'
|
38
39
|
method_option :project, aliases: 'p', type: :string, banner: 'user/project'
|
39
40
|
method_option :branch, aliases: 'b', type: :string, banner: 'some-branch'
|
41
|
+
method_option :format, aliases: 'f', type: :string, banner: 'pretty/simple', default: 'pretty'
|
40
42
|
def builds
|
41
43
|
BuildsCommand.run(options)
|
42
44
|
end
|
@@ -55,7 +57,7 @@ module Circler
|
|
55
57
|
BrowseCommand.run(options)
|
56
58
|
end
|
57
59
|
|
58
|
-
desc 'retry', '
|
60
|
+
desc 'retry', 'retry a build'
|
59
61
|
method_option :project, aliases: 'p', type: :string, banner: 'user/project'
|
60
62
|
method_option :build, aliases: 'n', type: :numeric, banner: 'build-number'
|
61
63
|
def retry
|
@@ -7,7 +7,10 @@ module Circler
|
|
7
7
|
|
8
8
|
def to_s
|
9
9
|
if @compact
|
10
|
+
max_row_widths = max_row_widths(@builds)
|
10
11
|
@builds.map(&:information)
|
12
|
+
.map { |array| array.map.with_index { |column, index| column.to_s + ' ' * (max_row_widths[index] - column.to_s.size) }.join(' ').to_s }
|
13
|
+
.join("\n")
|
11
14
|
else
|
12
15
|
Terminal::Table.new(title: title, headings: headings, rows: rows).to_s
|
13
16
|
end
|
@@ -26,5 +29,12 @@ module Circler
|
|
26
29
|
def rows
|
27
30
|
@builds.map(&:information)
|
28
31
|
end
|
32
|
+
|
33
|
+
def max_row_widths(builds)
|
34
|
+
builds.map(&:information)
|
35
|
+
.map { |array| array.map(&:to_s).map(&:size) }
|
36
|
+
.transpose
|
37
|
+
.map(&:max)
|
38
|
+
end
|
29
39
|
end
|
30
40
|
end
|
data/lib/circler/version.rb
CHANGED
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- unhappychoice
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pusher-client
|