stackup 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -12
- data/README.md +38 -15
- data/bin/stackup +76 -34
- data/doc/Stackup/ErrorMappingProxy.html +378 -0
- data/doc/Stackup/InvalidStateError.html +142 -0
- data/doc/Stackup/NoSuchStack.html +142 -0
- data/doc/Stackup/NoUpdateRequired.html +134 -0
- data/doc/Stackup/Service.html +399 -0
- data/doc/Stackup/ServiceError.html +138 -0
- data/doc/Stackup/Stack.html +1269 -0
- data/doc/Stackup/StackUpdateError.html +142 -0
- data/doc/Stackup/StackWatcher.html +455 -0
- data/doc/Stackup.html +202 -0
- data/doc/_index.html +199 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +143 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +143 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +195 -0
- data/doc/top-level-namespace.html +194 -0
- data/lib/stackup/error_mapping_proxy.rb +37 -0
- data/lib/stackup/errors.rb +9 -6
- data/lib/stackup/service.rb +39 -0
- data/lib/stackup/stack.rb +52 -59
- data/lib/stackup/stack_watcher.rb +16 -10
- data/lib/stackup.rb +26 -0
- data/spec/spec_helper.rb +15 -1
- data/spec/stackup/stack_spec.rb +114 -48
- data/spec/stackup/stack_watcher_spec.rb +20 -15
- data/stackup.gemspec +1 -1
- data/woollyams/template.json +44 -0
- metadata +29 -6
- data/pkg/stackup-0.0.1.gem +0 -0
- data/pkg/stackup-0.0.8.gem +0 -0
- data/pkg/stackup-0.0.9.gem +0 -0
- data/woollyams/sample-template.json +0 -79
@@ -1,5 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
+
require "aws-sdk-resources"
|
3
4
|
require "stackup/stack_watcher"
|
4
5
|
|
5
6
|
describe Stackup::StackWatcher do
|
@@ -19,12 +20,20 @@ describe Stackup::StackWatcher do
|
|
19
20
|
@event_id += 1
|
20
21
|
end
|
21
22
|
|
23
|
+
def new_event_reasons
|
24
|
+
[].tap do |result|
|
25
|
+
subject.each_new_event do |event|
|
26
|
+
result << event.resource_status_reason
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
22
31
|
context "with a empty set of events" do
|
23
32
|
|
24
|
-
describe "#
|
33
|
+
describe "#each_new_event" do
|
25
34
|
|
26
|
-
it "
|
27
|
-
expect(
|
35
|
+
it "yields nothing" do
|
36
|
+
expect(new_event_reasons).to be_empty
|
28
37
|
end
|
29
38
|
|
30
39
|
end
|
@@ -39,20 +48,16 @@ describe Stackup::StackWatcher do
|
|
39
48
|
end
|
40
49
|
end
|
41
50
|
|
42
|
-
describe "#
|
51
|
+
describe "#each_new_event" do
|
43
52
|
|
44
|
-
it "
|
45
|
-
expect(
|
53
|
+
it "yields nothing" do
|
54
|
+
expect(new_event_reasons).to be_empty
|
46
55
|
end
|
47
56
|
|
48
57
|
end
|
49
58
|
|
50
59
|
end
|
51
60
|
|
52
|
-
def new_event_reasons
|
53
|
-
subject.new_events.map(&:resource_status_reason)
|
54
|
-
end
|
55
|
-
|
56
61
|
context "when the stack has existing events" do
|
57
62
|
|
58
63
|
before do
|
@@ -60,9 +65,9 @@ describe Stackup::StackWatcher do
|
|
60
65
|
add_event("later")
|
61
66
|
end
|
62
67
|
|
63
|
-
describe "#
|
68
|
+
describe "#each_new_event" do
|
64
69
|
|
65
|
-
it "
|
70
|
+
it "yields the events in the order they occurred" do
|
66
71
|
expect(new_event_reasons).to eq(["earlier", "later"])
|
67
72
|
end
|
68
73
|
|
@@ -71,14 +76,14 @@ describe Stackup::StackWatcher do
|
|
71
76
|
context "and more events occur" do
|
72
77
|
|
73
78
|
before do
|
74
|
-
|
79
|
+
new_event_reasons
|
75
80
|
add_event("even")
|
76
81
|
add_event("more")
|
77
82
|
end
|
78
83
|
|
79
|
-
describe "#
|
84
|
+
describe "#each_new_event" do
|
80
85
|
|
81
|
-
it "
|
86
|
+
it "yields only the new events" do
|
82
87
|
expect(new_event_reasons).to eq(["even", "more"])
|
83
88
|
end
|
84
89
|
|
data/stackup.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
|
6
6
|
spec.name = "stackup"
|
7
|
-
spec.version = "0.
|
7
|
+
spec.version = "0.2.0"
|
8
8
|
spec.authors = ["Arvind Kunday", "Mike Williams"]
|
9
9
|
spec.email = ["arvind.kunday@rea-group.com", "mike.williams@rea-group.com"]
|
10
10
|
spec.summary = "Manage CloudFormation stacks"
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
3
|
+
"Description": "AWS CloudFormation Sample Template S3_Website_Bucket_With_Retain_On_Delete: Sample template showing how to create a publicly accessible S3 bucket configured for website access with a deletion policy of retail on delete. **WARNING** This template creates an S3 bucket that will NOT be deleted when the stack is deleted. You will be billed for the AWS resources used if you create a stack from this template.",
|
4
|
+
"Resources": {
|
5
|
+
"S3Bucket": {
|
6
|
+
"Type": "AWS::S3::Bucket",
|
7
|
+
"Properties": {
|
8
|
+
"AccessControl": "PublicRead",
|
9
|
+
"WebsiteConfiguration": {
|
10
|
+
"IndexDocument": "index.html",
|
11
|
+
"ErrorDocument": "error.html"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"Outputs": {
|
17
|
+
"WebsiteURL": {
|
18
|
+
"Value": {
|
19
|
+
"Fn::GetAtt": [
|
20
|
+
"S3Bucket",
|
21
|
+
"WebsiteURL"
|
22
|
+
]
|
23
|
+
},
|
24
|
+
"Description": "URL for website hosted on S3"
|
25
|
+
},
|
26
|
+
"S3BucketSecureURL": {
|
27
|
+
"Value": {
|
28
|
+
"Fn::Join": [
|
29
|
+
"",
|
30
|
+
[
|
31
|
+
"https://",
|
32
|
+
{
|
33
|
+
"Fn::GetAtt": [
|
34
|
+
"S3Bucket",
|
35
|
+
"DomainName"
|
36
|
+
]
|
37
|
+
}
|
38
|
+
]
|
39
|
+
]
|
40
|
+
},
|
41
|
+
"Description": "Name of S3 bucket to hold website content"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvind Kunday
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -81,18 +81,41 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
83
|
- bin/stackup
|
84
|
+
- doc/Stackup.html
|
85
|
+
- doc/Stackup/ErrorMappingProxy.html
|
86
|
+
- doc/Stackup/InvalidStateError.html
|
87
|
+
- doc/Stackup/NoSuchStack.html
|
88
|
+
- doc/Stackup/NoUpdateRequired.html
|
89
|
+
- doc/Stackup/Service.html
|
90
|
+
- doc/Stackup/ServiceError.html
|
91
|
+
- doc/Stackup/Stack.html
|
92
|
+
- doc/Stackup/StackUpdateError.html
|
93
|
+
- doc/Stackup/StackWatcher.html
|
94
|
+
- doc/_index.html
|
95
|
+
- doc/class_list.html
|
96
|
+
- doc/css/common.css
|
97
|
+
- doc/css/full_list.css
|
98
|
+
- doc/css/style.css
|
99
|
+
- doc/file.README.html
|
100
|
+
- doc/file_list.html
|
101
|
+
- doc/frames.html
|
102
|
+
- doc/index.html
|
103
|
+
- doc/js/app.js
|
104
|
+
- doc/js/full_list.js
|
105
|
+
- doc/js/jquery.js
|
106
|
+
- doc/method_list.html
|
107
|
+
- doc/top-level-namespace.html
|
84
108
|
- lib/stackup.rb
|
109
|
+
- lib/stackup/error_mapping_proxy.rb
|
85
110
|
- lib/stackup/errors.rb
|
111
|
+
- lib/stackup/service.rb
|
86
112
|
- lib/stackup/stack.rb
|
87
113
|
- lib/stackup/stack_watcher.rb
|
88
|
-
- pkg/stackup-0.0.1.gem
|
89
|
-
- pkg/stackup-0.0.8.gem
|
90
|
-
- pkg/stackup-0.0.9.gem
|
91
114
|
- spec/spec_helper.rb
|
92
115
|
- spec/stackup/stack_spec.rb
|
93
116
|
- spec/stackup/stack_watcher_spec.rb
|
94
117
|
- stackup.gemspec
|
95
|
-
- woollyams/
|
118
|
+
- woollyams/template.json
|
96
119
|
homepage: https://github.com/realestate-com-au/stackup
|
97
120
|
licenses:
|
98
121
|
- MIT
|
data/pkg/stackup-0.0.1.gem
DELETED
Binary file
|
data/pkg/stackup-0.0.8.gem
DELETED
Binary file
|
data/pkg/stackup-0.0.9.gem
DELETED
Binary file
|
@@ -1,79 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"AWSTemplateFormatVersion": "2010-09-09",
|
3
|
-
"Description": "A sample template",
|
4
|
-
"Resources": {
|
5
|
-
"role": {
|
6
|
-
"Type": "AWS::IAM::Role",
|
7
|
-
"Properties": {
|
8
|
-
"AssumeRolePolicyDocument": {
|
9
|
-
"Version" : "2012-10-17",
|
10
|
-
"Statement": [
|
11
|
-
{
|
12
|
-
"Effect": "Allow",
|
13
|
-
"Principal": {
|
14
|
-
"Service": [ "ec2.amazonaws.com" ]
|
15
|
-
},
|
16
|
-
"Action": [ "sts:AssumeRole" ]
|
17
|
-
}
|
18
|
-
]
|
19
|
-
},
|
20
|
-
"Path": "/",
|
21
|
-
"Policies": [
|
22
|
-
{
|
23
|
-
"PolicyName": "rooty",
|
24
|
-
"PolicyDocument": {
|
25
|
-
"Version" : "2012-10-17",
|
26
|
-
"Statement": [
|
27
|
-
{
|
28
|
-
"Effect": "Allow",
|
29
|
-
"Action": "*",
|
30
|
-
"Resource": "*"
|
31
|
-
}
|
32
|
-
]
|
33
|
-
}
|
34
|
-
}
|
35
|
-
]
|
36
|
-
}
|
37
|
-
},
|
38
|
-
"role2": {
|
39
|
-
"Type": "AWS::IAM::Role",
|
40
|
-
"Properties": {
|
41
|
-
"AssumeRolePolicyDocument": {
|
42
|
-
"Version" : "2012-10-17",
|
43
|
-
"Statement": [
|
44
|
-
{
|
45
|
-
"Effect": "Allow",
|
46
|
-
"Principal": {
|
47
|
-
"Service": [ "ec2.amazonaws.com" ]
|
48
|
-
},
|
49
|
-
"Action": [ "sts:AssumeRole" ]
|
50
|
-
}
|
51
|
-
]
|
52
|
-
},
|
53
|
-
"Path": "/blah/",
|
54
|
-
"Policies": [
|
55
|
-
{
|
56
|
-
"PolicyName": "rooty",
|
57
|
-
"PolicyDocument": {
|
58
|
-
"Version" : "2012-10-17",
|
59
|
-
"Statement": [
|
60
|
-
{
|
61
|
-
"Effect": "Allow",
|
62
|
-
"Action": "*",
|
63
|
-
"Resource": "*"
|
64
|
-
}
|
65
|
-
]
|
66
|
-
}
|
67
|
-
}
|
68
|
-
]
|
69
|
-
}
|
70
|
-
}
|
71
|
-
},
|
72
|
-
"Outputs": {
|
73
|
-
"role": {
|
74
|
-
"Value": {
|
75
|
-
"Ref": "role"
|
76
|
-
}
|
77
|
-
}
|
78
|
-
}
|
79
|
-
}
|