viaduct-toolkit 0.0.2 → 0.0.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c66db3a1f9b8d5e872b2f57ee3d9a35cc3245132
|
|
4
|
+
data.tar.gz: 1f04ed00771efe833b09995d41150d82e9d93b67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b08a5b7a585a79629031522a60a81c807c691ba6aaae34347b889c981a64244dc367f6d6940e9eb619e12af2ecf7eef5deae625ad3cbd2bdd960ac82fec15369
|
|
7
|
+
data.tar.gz: 23006e3fada77da25e3c9ea3c747b73bbd723412d92219f225bff2990122c2663d77edabcf7434040210d1ccd1d5a0c40727bdf57b56b6ed9bbd30513d6ca0eb
|
|
@@ -12,11 +12,28 @@ Viaduct::Toolkit.cli.command "app:deployments" do |c|
|
|
|
12
12
|
if response.success?
|
|
13
13
|
|
|
14
14
|
require 'terminal-table'
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
colourer = Proc.new do |d, field|
|
|
17
|
+
if d['status'] == 'deployed'
|
|
18
|
+
field.to_s.green
|
|
19
|
+
elsif d['status'] == 'failed'
|
|
20
|
+
field.to_s.red
|
|
21
|
+
else
|
|
22
|
+
field
|
|
23
|
+
end
|
|
17
24
|
end
|
|
18
|
-
puts Terminal::Table.new :rows => rows, :headings => ['#', 'Status', 'Description', 'User', 'Time']
|
|
19
25
|
|
|
26
|
+
rows = response.data.map do |d|
|
|
27
|
+
[
|
|
28
|
+
colourer.call(d, d['number']),
|
|
29
|
+
colourer.call(d, d['version']['description'].to_s[0,30]),
|
|
30
|
+
colourer.call(d, d['user'] ? d['user']['username'] : d['triggerer']),
|
|
31
|
+
colourer.call(d, d['timing']['created_at']),
|
|
32
|
+
colourer.call(d, d['triggered_from'])
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
puts Terminal::Table.new :rows => rows, :headings => ['#', 'Description', 'User', 'Time', 'Source']
|
|
36
|
+
puts "The active deployment shows in #{'green'.green} and failed show in #{'red'.red}."
|
|
20
37
|
else
|
|
21
38
|
error "Couldn't get application deployment list"
|
|
22
39
|
end
|
|
@@ -31,8 +31,11 @@ Viaduct::Toolkit.cli.command "app:info" do |c|
|
|
|
31
31
|
field 'Started at', application['deployment']['timing']['created_at']
|
|
32
32
|
field 'Time', application['deployment']['timing']['time'].round(1).to_s + "s"
|
|
33
33
|
field 'Description', application['deployment']['version']['description']
|
|
34
|
+
field 'Source', application['deployment']['triggered_from']
|
|
34
35
|
if application['deployment']['user']
|
|
35
36
|
field 'Deployer', "#{application['deployment']['user']['name']} (#{application['deployment']['user']['username']})"
|
|
37
|
+
elsif application['deployment']['triggerer']
|
|
38
|
+
field 'Deployer', application['deployment']['triggerer']
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
end
|
|
@@ -50,7 +50,8 @@ Viaduct::Toolkit.cli.command "app:status" do |c|
|
|
|
50
50
|
field "Number", response.data['deployment']['number']
|
|
51
51
|
field 'Version', response.data['deployment']['version']['id']
|
|
52
52
|
field "Description", response.data['deployment']['version']['description']
|
|
53
|
-
field "
|
|
53
|
+
field "Source", response.data['deployment']['triggered_from']
|
|
54
|
+
field "Deployer", response.data['deployment']['user'] ? response.data['deployment']['user']['full_name'] : response.data['deployment']['triggerer']
|
|
54
55
|
field "Started", time(response.data['deployment']['timing']['started_at'])
|
|
55
56
|
end
|
|
56
57
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: viaduct-toolkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Cooke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: commander
|