awful 0.0.105 → 0.0.106
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/changesets.rb +15 -4
- data/lib/awful/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f47d50305aa745ea1d3e1ebccf4019a5834aea45
|
4
|
+
data.tar.gz: 68a3a50fcabc0a9afd326836fdc70181f0938844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df09dbe48421998771f3aa5591430ebd2cccdf2a7a1bd9061e4d9515e01289ad4dce64c376a287c3a35727a629806f6695ab4839737335ab31a122365bc81cbd
|
7
|
+
data.tar.gz: fc42025f14e2f16a17a5cebbbb75c9091a059fccdcb37cb2fb398e002e39030afce635f230465b8ba51e0992cfef2d45b3269828a57018d58549558fe5e29295
|
data/lib/awful/changesets.rb
CHANGED
@@ -35,6 +35,18 @@ module Awful
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
## if no task given , run this
|
39
|
+
default_task :list
|
40
|
+
|
41
|
+
desc 'list STACK_NAME [CHANGE_SET_NAME]', 'meta task to call ls or changes'
|
42
|
+
def list(stack_name, change_set_name = nil)
|
43
|
+
if change_set_name
|
44
|
+
changes(stack_name, change_set_name)
|
45
|
+
else
|
46
|
+
ls(stack_name)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
38
50
|
desc 'ls STACK_NAME', 'list change sets for stack'
|
39
51
|
method_option :long, aliases: '-l', default: false, desc: 'Long listing'
|
40
52
|
def ls(stack_name)
|
@@ -48,15 +60,15 @@ module Awful
|
|
48
60
|
]
|
49
61
|
}
|
50
62
|
else
|
51
|
-
puts list.map(&:
|
63
|
+
puts list.map(&:change_set_name)
|
52
64
|
end
|
53
65
|
end
|
54
66
|
end
|
55
67
|
|
56
68
|
desc 'changes STACK_NAME CHANGE_SET_NAME', 'list changes for the change set'
|
57
69
|
def changes(stack_name, change_set_name)
|
58
|
-
cf.describe_change_set(stack_name: stack_name, change_set_name: change_set_name).
|
59
|
-
print_table changes.map { |change|
|
70
|
+
cf.describe_change_set(stack_name: stack_name, change_set_name: change_set_name).tap do |set|
|
71
|
+
print_table set.changes.map { |change|
|
60
72
|
rc = change.resource_change
|
61
73
|
[
|
62
74
|
color(rc.action),
|
@@ -67,7 +79,6 @@ module Awful
|
|
67
79
|
]
|
68
80
|
}
|
69
81
|
end
|
70
|
-
|
71
82
|
end
|
72
83
|
end
|
73
84
|
|
data/lib/awful/version.rb
CHANGED