pryaws 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pryaws/cloud-formation.rb +17 -9
- metadata +3 -2
@@ -3,21 +3,29 @@ require 'aws-sdk'
|
|
3
3
|
|
4
4
|
module AWS
|
5
5
|
|
6
|
-
|
6
|
+
# http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/CloudFormation.html
|
7
|
+
class CloudFormation
|
7
8
|
|
8
|
-
def
|
9
|
-
|
9
|
+
def find_by_name(name)
|
10
|
+
stacks[name]
|
10
11
|
end
|
11
12
|
|
12
|
-
|
13
|
-
class Group
|
13
|
+
class Stack
|
14
14
|
|
15
|
-
def info
|
16
|
-
|
15
|
+
def info
|
16
|
+
sr = status_reason()
|
17
|
+
"#{name()} (#{status()}#{sr.nil? ? '' : ' :' + sr})"
|
17
18
|
end
|
18
19
|
|
19
|
-
def
|
20
|
-
|
20
|
+
def save_template(path)
|
21
|
+
File.open(path, 'w'){|f| f.write JSON.pretty_generate(JSON.parse(template()))}
|
22
|
+
end
|
23
|
+
|
24
|
+
def set_param(key, value)
|
25
|
+
p = parameters()
|
26
|
+
raise "Invalid param '#{key}'." if p[key].nil?
|
27
|
+
p[key] = value
|
28
|
+
update :template => template, :parameters => p, :capabilities => ['CAPABILITY_IAM']
|
21
29
|
end
|
22
30
|
|
23
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pryaws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -58,7 +58,8 @@ files:
|
|
58
58
|
- lib/pryaws/sns.rb
|
59
59
|
- bin/pryaws
|
60
60
|
homepage: https://github.com/haku/pryaws
|
61
|
-
licenses:
|
61
|
+
licenses:
|
62
|
+
- Apache 2
|
62
63
|
post_install_message:
|
63
64
|
rdoc_options: []
|
64
65
|
require_paths:
|