opsworks-cli 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opsworks/app.rb +2 -3
- data/lib/opsworks/cli/subcommands/status.rb +3 -1
- data/lib/opsworks/cli/version.rb +1 -1
- data/lib/opsworks/stack.rb +3 -3
- data/opsworks-cli.gemspec +2 -2
- 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: d80d65b9937273607a19fc3ea4eecd4f1b15311a
|
4
|
+
data.tar.gz: a0200344f6e62a71341c51584e5893d6e8b68de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8847f8697a405dd22a31a16751623a2b429788cdf0c9fd31ea51b2d6a1c4c9e885872fe7c6d0ddba84d4c3e3310e5cb11df3e42b72e1dffa21c055dfc42e911
|
7
|
+
data.tar.gz: f6b8a09606fda4acbfbc600562a60782a6afbfe29cc68fe0b787d144adff694aa2baa4d67dfed8cd0da4ed274896f1b4bf259532ac60e0e410493e846492a7d3
|
data/lib/opsworks/app.rb
CHANGED
@@ -3,11 +3,10 @@ require_relative 'deployment'
|
|
3
3
|
|
4
4
|
module OpsWorks
|
5
5
|
class App < Resource
|
6
|
-
attr_accessor :id, :name
|
6
|
+
attr_accessor :id, :name, :revision
|
7
7
|
|
8
8
|
def deployments
|
9
9
|
@deployments ||= initialize_deployments
|
10
|
-
@deployments || []
|
11
10
|
end
|
12
11
|
|
13
12
|
def last_deployment
|
@@ -17,7 +16,7 @@ module OpsWorks
|
|
17
16
|
private
|
18
17
|
|
19
18
|
def initialize_deployments
|
20
|
-
return
|
19
|
+
return [] unless id
|
21
20
|
response = self.class.client.describe_deployments(app_id: id)
|
22
21
|
response.data[:deployments].map do |hash|
|
23
22
|
Deployment.new(
|
@@ -22,8 +22,10 @@ module OpsWorks
|
|
22
22
|
else
|
23
23
|
deployed_at = '-'
|
24
24
|
end
|
25
|
-
[stack.name, name, deployed_at]
|
25
|
+
[stack.name, name, "(#{app.revision})", deployed_at]
|
26
26
|
end
|
27
|
+
# Sort output in descending date order
|
28
|
+
table.sort! { |x, y| y.last <=> x.last }
|
27
29
|
table.compact!
|
28
30
|
print_table table
|
29
31
|
end
|
data/lib/opsworks/cli/version.rb
CHANGED
data/lib/opsworks/stack.rb
CHANGED
@@ -17,7 +17,6 @@ module OpsWorks
|
|
17
17
|
|
18
18
|
def apps
|
19
19
|
@apps ||= initialize_apps
|
20
|
-
@apps || []
|
21
20
|
end
|
22
21
|
|
23
22
|
def find_app_by_name(name)
|
@@ -45,9 +44,10 @@ module OpsWorks
|
|
45
44
|
private
|
46
45
|
|
47
46
|
def initialize_apps
|
48
|
-
return
|
47
|
+
return [] unless id
|
49
48
|
self.class.client.describe_apps(stack_id: id).data[:apps].map do |hash|
|
50
|
-
|
49
|
+
revision = hash[:app_source][:revision] if hash[:app_source]
|
50
|
+
App.new(id: hash[:app_id], name: hash[:name], revision: revision)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
data/opsworks-cli.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.version = OpsWorks::CLI::VERSION
|
11
11
|
spec.authors = ['Frank Macreery']
|
12
12
|
spec.email = ['frank@macreery.com']
|
13
|
-
spec.description =
|
14
|
-
spec.summary =
|
13
|
+
spec.description = 'OpsWorks CLI'
|
14
|
+
spec.summary = 'Alternative CLI for Amazon OpsWorks'
|
15
15
|
spec.homepage = 'https://github.com/aptible/opsworks-cli'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsworks-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|