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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1cf0223b3b4769f8f08fb90e944721f19911105
|
4
|
+
data.tar.gz: 809c9e18e59c5a0f92b37cd43c33dd30bbda1a1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38f0de16a9a86c5f037dae464562c27c246556e9db6bad43a0494b8c305ef159117bac4c275627dfac0284fd0666e1dbe688500829f84836f0c5bc66076ff6a
|
7
|
+
data.tar.gz: 2a933cc8523a7e410e14b43345993157e070f0690286f9498bbe855201c17cd803ee7c98cd5169f2e6a1d8670f31d0a7dd39629f667c0ef5e3c848598fd01988
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stackup (0.
|
4
|
+
stackup (0.2.0)
|
5
5
|
aws-sdk (~> 2.0)
|
6
6
|
clamp (~> 1.0)
|
7
7
|
console_logger
|
@@ -10,22 +10,22 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
ast (2.
|
14
|
-
astrolabe (1.3.
|
15
|
-
parser (
|
16
|
-
aws-sdk (2.1.
|
17
|
-
aws-sdk-resources (= 2.1.
|
18
|
-
aws-sdk-core (2.1.
|
13
|
+
ast (2.1.0)
|
14
|
+
astrolabe (1.3.1)
|
15
|
+
parser (~> 2.2)
|
16
|
+
aws-sdk (2.1.27)
|
17
|
+
aws-sdk-resources (= 2.1.27)
|
18
|
+
aws-sdk-core (2.1.27)
|
19
19
|
jmespath (~> 1.0)
|
20
|
-
aws-sdk-resources (2.1.
|
21
|
-
aws-sdk-core (= 2.1.
|
20
|
+
aws-sdk-resources (2.1.27)
|
21
|
+
aws-sdk-core (= 2.1.27)
|
22
22
|
byebug (6.0.2)
|
23
23
|
clamp (1.0.0)
|
24
24
|
console_logger (1.0.0)
|
25
25
|
diff-lcs (1.2.5)
|
26
26
|
jmespath (1.1.3)
|
27
27
|
multi_json (1.11.2)
|
28
|
-
parser (2.2.2.
|
28
|
+
parser (2.2.2.6)
|
29
29
|
ast (>= 1.1, < 3.0)
|
30
30
|
powerpack (0.1.1)
|
31
31
|
rainbow (2.0.0)
|
@@ -43,7 +43,7 @@ GEM
|
|
43
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
44
|
rspec-support (~> 3.3.0)
|
45
45
|
rspec-support (3.3.0)
|
46
|
-
rubocop (0.
|
46
|
+
rubocop (0.34.2)
|
47
47
|
astrolabe (~> 1.3)
|
48
48
|
parser (>= 2.2.2.5, < 3.0)
|
49
49
|
powerpack (~> 0.1)
|
@@ -62,4 +62,4 @@ DEPENDENCIES
|
|
62
62
|
stackup!
|
63
63
|
|
64
64
|
BUNDLED WITH
|
65
|
-
1.10.
|
65
|
+
1.10.5
|
data/README.md
CHANGED
@@ -1,40 +1,63 @@
|
|
1
1
|
# stackup
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/realestate-com-au/stackup.svg?branch=master)](https://travis-ci.org/realestate-com-au/stackup)
|
4
|
+
|
3
5
|
Stackup attempts to simplify AWS Cloudformation stack creation process in
|
4
6
|
ruby projects by providing executable to perform common operations such
|
5
7
|
as apply(create/update), delete, recreate on stack along with validations on
|
6
|
-
templates.
|
7
|
-
|
8
|
-
deployment environments to wait until deployment is successful).
|
8
|
+
templates. Operations which enforce a stack change will wait until
|
9
|
+
the change is complete.
|
9
10
|
|
10
11
|
## Installation
|
11
12
|
|
12
13
|
$ gem install stackup
|
13
14
|
|
14
|
-
##
|
15
|
+
## Command-line usage
|
15
16
|
|
16
17
|
The entry-point is the "stackup" command.
|
17
18
|
|
18
|
-
|
19
|
+
Most commands operate in the context of a named stack:
|
20
|
+
|
21
|
+
$ stackup STACK-NAME ...
|
19
22
|
|
20
|
-
|
23
|
+
Called without stack-name, it will list stacks:
|
21
24
|
|
22
|
-
|
25
|
+
$ stackup
|
26
|
+
foo-bar-test
|
27
|
+
zzz-production
|
23
28
|
|
24
|
-
|
29
|
+
### Stack create/update
|
25
30
|
|
26
|
-
|
31
|
+
Use sub-command "up" to create or update a stack, as appropriate:
|
27
32
|
|
28
|
-
$ stackup
|
33
|
+
$ stackup myapp-test up template.json
|
29
34
|
|
30
35
|
This will:
|
31
36
|
|
32
37
|
* update (or create) the named CloudFormation stack, using the specified template
|
33
38
|
* monitor events until the stack update is complete
|
34
|
-
* print any stack "outputs"
|
35
39
|
|
36
|
-
|
40
|
+
### Stack deletion
|
41
|
+
|
42
|
+
Sub-command "delete" deletes the stack.
|
43
|
+
|
44
|
+
### Stack inspection
|
45
|
+
|
46
|
+
Inspect details of a stack with:
|
47
|
+
|
48
|
+
$ stackup myapp-test status
|
49
|
+
$ stackup myapp-test resources
|
50
|
+
$ stackup myapp-test outputs
|
51
|
+
|
52
|
+
## Programmatic usage
|
53
|
+
|
54
|
+
Get a handle to a `Stack` object as follows:
|
55
|
+
|
56
|
+
stack = Stackup.stack("my-stack")
|
57
|
+
|
58
|
+
You can pass an `Aws::CloudFormation::Client`, or client config,
|
59
|
+
to `Stackup`, e.g.
|
60
|
+
|
61
|
+
stack = Stackup(credentials).stack("my-stack")
|
37
62
|
|
38
|
-
|
39
|
-
$ stackup stack myapp-test resources
|
40
|
-
$ stackup stack myapp-test delete
|
63
|
+
See {Stackup::Stack} for more details.
|
data/bin/stackup
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH << File.expand_path("../../lib", __FILE__)
|
|
4
4
|
|
5
5
|
require "clamp"
|
6
6
|
require "console_logger"
|
7
|
-
require "stackup
|
7
|
+
require "stackup"
|
8
8
|
require "multi_json"
|
9
9
|
require "yaml"
|
10
10
|
|
@@ -14,7 +14,24 @@ Clamp do
|
|
14
14
|
|
15
15
|
option ["-f", "--format"], "FORMAT", "output format", :default => "yaml"
|
16
16
|
|
17
|
-
|
17
|
+
option ["-L", "--list"], :flag, "list stacks" do
|
18
|
+
list_stacks
|
19
|
+
exit 0
|
20
|
+
end
|
21
|
+
|
22
|
+
parameter "NAME", "Name of stack", :attribute_name => :stack_name
|
23
|
+
|
24
|
+
def run(arguments)
|
25
|
+
super(arguments)
|
26
|
+
rescue Stackup::ServiceError => e
|
27
|
+
signal_error e.message
|
28
|
+
rescue Aws::Errors::MissingCredentialsError
|
29
|
+
signal_error "no credentials provided"
|
30
|
+
rescue Aws::CloudFormation::Errors::ExpiredToken => e
|
31
|
+
signal_error e.message
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
18
35
|
|
19
36
|
def logger
|
20
37
|
@logger ||= ConsoleLogger.new($stdout, debug?)
|
@@ -33,62 +50,87 @@ Clamp do
|
|
33
50
|
puts format_data(data)
|
34
51
|
end
|
35
52
|
|
36
|
-
|
53
|
+
def stackup
|
54
|
+
Stackup(:logger => logger, :log_level => :debug)
|
55
|
+
end
|
37
56
|
|
38
|
-
|
57
|
+
def stack
|
58
|
+
stackup.stack(stack_name)
|
59
|
+
end
|
39
60
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
signal_error "stack '#{stack_name}' does not exist"
|
44
|
-
rescue Stackup::StackUpdateError => e
|
45
|
-
signal_error e.message
|
61
|
+
def list_stacks
|
62
|
+
stackup.stack_names.each do |name|
|
63
|
+
puts name
|
46
64
|
end
|
65
|
+
end
|
47
66
|
|
48
|
-
|
67
|
+
def report_change
|
68
|
+
change = yield
|
69
|
+
puts "Stack #{change}" unless change.nil?
|
70
|
+
end
|
49
71
|
|
50
|
-
|
51
|
-
Stackup::Stack.new(stack_name, :logger => logger, :log_level => :debug)
|
52
|
-
end
|
72
|
+
subcommand "status", "Print stack status." do
|
53
73
|
|
54
|
-
def
|
55
|
-
|
56
|
-
puts "Stack #{change}" unless change.nil?
|
74
|
+
def execute
|
75
|
+
puts stack.status
|
57
76
|
end
|
58
77
|
|
59
|
-
|
78
|
+
end
|
60
79
|
|
61
|
-
|
62
|
-
puts stack.status
|
63
|
-
end
|
80
|
+
subcommand "up", "Create/update the stack" do
|
64
81
|
|
65
|
-
|
82
|
+
option "--disable-rollback", :flag, "disable stack rollback"
|
66
83
|
|
67
|
-
|
84
|
+
parameter "TEMPLATE", "CloudFormation template file",
|
85
|
+
:attribute_name => :template_file
|
68
86
|
|
69
|
-
|
87
|
+
parameter "[PARAMETERS]", "CloudFormation parameters file",
|
88
|
+
:attribute_name => :parameters_file
|
70
89
|
|
71
|
-
|
72
|
-
|
73
|
-
|
90
|
+
def execute
|
91
|
+
options = {}
|
92
|
+
options[:template_body] = load_file(template_file)
|
93
|
+
options[:parameters_file] = load_file(parameters_file) if parameters_file
|
94
|
+
options[:disable_rollback] = disable_rollback?
|
95
|
+
report_change do
|
96
|
+
stack.create_or_update(options)
|
74
97
|
end
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
75
101
|
|
102
|
+
def load_file(file)
|
103
|
+
File.read(file)
|
104
|
+
rescue Errno::ENOENT
|
105
|
+
signal_error "no such file: #{file.inspect}"
|
76
106
|
end
|
77
107
|
|
78
|
-
|
108
|
+
end
|
79
109
|
|
80
|
-
|
81
|
-
report_change { stack.delete }
|
82
|
-
end
|
110
|
+
subcommand ["down", "delete"], "Remove the stack." do
|
83
111
|
|
112
|
+
def execute
|
113
|
+
report_change do
|
114
|
+
stack.delete
|
115
|
+
end
|
84
116
|
end
|
85
117
|
|
86
|
-
|
118
|
+
end
|
119
|
+
|
120
|
+
subcommand "cancel-update", "Cancel the update in-progress" do
|
87
121
|
|
88
|
-
|
89
|
-
|
122
|
+
def execute
|
123
|
+
report_change do
|
124
|
+
stack.cancel_update
|
90
125
|
end
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
subcommand "outputs", "Stack outputs." do
|
91
131
|
|
132
|
+
def execute
|
133
|
+
display_data(stack.outputs)
|
92
134
|
end
|
93
135
|
|
94
136
|
end
|
@@ -0,0 +1,378 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Stackup::ErrorMappingProxy
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Stackup/ErrorMappingProxy.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (E)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Stackup.html" title="Stackup (module)">Stackup</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">ErrorMappingProxy</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Stackup::ErrorMappingProxy
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Stackup::ErrorMappingProxy</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/stackup/error_mapping_proxy.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>An error-mapping proxy for Aws::CloudFormation models.</p>
|
106
|
+
|
107
|
+
<p>It exists to convert certain types of `ValidationError`, where useful
|
108
|
+
information is hidden inside the “message”, to Stackup exceptions.</p>
|
109
|
+
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
<div class="tags">
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>
|
125
|
+
Instance Method Summary
|
126
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
127
|
+
</h2>
|
128
|
+
|
129
|
+
<ul class="summary">
|
130
|
+
|
131
|
+
<li class="public ">
|
132
|
+
<span class="summary_signature">
|
133
|
+
|
134
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (ErrorMappingProxy) <strong>initialize</strong>(delegate) </a>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
</span>
|
139
|
+
|
140
|
+
|
141
|
+
<span class="note title constructor">constructor</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<span class="summary_desc"><div class='inline'>
|
151
|
+
<p>A new instance of ErrorMappingProxy.</p>
|
152
|
+
</div></span>
|
153
|
+
|
154
|
+
</li>
|
155
|
+
|
156
|
+
|
157
|
+
<li class="public ">
|
158
|
+
<span class="summary_signature">
|
159
|
+
|
160
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(*args) </a>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
</span>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
175
|
+
|
176
|
+
</li>
|
177
|
+
|
178
|
+
|
179
|
+
<li class="public ">
|
180
|
+
<span class="summary_signature">
|
181
|
+
|
182
|
+
<a href="#respond_to%3F-instance_method" title="#respond_to? (instance method)">- (Boolean) <strong>respond_to?</strong>(method) </a>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
</span>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
197
|
+
|
198
|
+
</li>
|
199
|
+
|
200
|
+
|
201
|
+
</ul>
|
202
|
+
|
203
|
+
|
204
|
+
<div id="constructor_details" class="method_details_list">
|
205
|
+
<h2>Constructor Details</h2>
|
206
|
+
|
207
|
+
<div class="method_details first">
|
208
|
+
<h3 class="signature first" id="initialize-instance_method">
|
209
|
+
|
210
|
+
- (<tt><span class='object_link'><a href="" title="Stackup::ErrorMappingProxy (class)">ErrorMappingProxy</a></span></tt>) <strong>initialize</strong>(delegate)
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
</h3><div class="docstring">
|
217
|
+
<div class="discussion">
|
218
|
+
|
219
|
+
<p>Returns a new instance of ErrorMappingProxy</p>
|
220
|
+
|
221
|
+
|
222
|
+
</div>
|
223
|
+
</div>
|
224
|
+
<div class="tags">
|
225
|
+
|
226
|
+
|
227
|
+
</div><table class="source_code">
|
228
|
+
<tr>
|
229
|
+
<td>
|
230
|
+
<pre class="lines">
|
231
|
+
|
232
|
+
|
233
|
+
12
|
234
|
+
13
|
235
|
+
14</pre>
|
236
|
+
</td>
|
237
|
+
<td>
|
238
|
+
<pre class="code"><span class="info file"># File 'lib/stackup/error_mapping_proxy.rb', line 12</span>
|
239
|
+
|
240
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_delegate'>delegate</span><span class='rparen'>)</span>
|
241
|
+
<span class='ivar'>@delegate</span> <span class='op'>=</span> <span class='id identifier rubyid_delegate'>delegate</span>
|
242
|
+
<span class='kw'>end</span></pre>
|
243
|
+
</td>
|
244
|
+
</tr>
|
245
|
+
</table>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
</div>
|
249
|
+
<div id="method_missing_details" class="method_details_list">
|
250
|
+
<h2>Dynamic Method Handling</h2>
|
251
|
+
<p class="notice this">
|
252
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
253
|
+
|
254
|
+
</p>
|
255
|
+
|
256
|
+
<div class="method_details first">
|
257
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
258
|
+
|
259
|
+
- (<tt>Object</tt>) <strong>method_missing</strong>(*args)
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</h3><table class="source_code">
|
266
|
+
<tr>
|
267
|
+
<td>
|
268
|
+
<pre class="lines">
|
269
|
+
|
270
|
+
|
271
|
+
16
|
272
|
+
17
|
273
|
+
18
|
274
|
+
19
|
275
|
+
20
|
276
|
+
21
|
277
|
+
22
|
278
|
+
23
|
279
|
+
24
|
280
|
+
25
|
281
|
+
26
|
282
|
+
27
|
283
|
+
28
|
284
|
+
29</pre>
|
285
|
+
</td>
|
286
|
+
<td>
|
287
|
+
<pre class="code"><span class="info file"># File 'lib/stackup/error_mapping_proxy.rb', line 16</span>
|
288
|
+
|
289
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
290
|
+
<span class='ivar'>@delegate</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
291
|
+
<span class='kw'>rescue</span> <span class='const'>Aws</span><span class='op'>::</span><span class='const'>CloudFormation</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>ValidationError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
292
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
293
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>No updates are to be performed.</span><span class='tstring_end'>"</span></span>
|
294
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NoUpdateRequired</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>no updates are required</span><span class='tstring_end'>"</span></span>
|
295
|
+
<span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>Stack .* does not exist$</span><span class='regexp_end'>/</span></span>
|
296
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NoSuchStack</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>no such stack</span><span class='tstring_end'>"</span></span>
|
297
|
+
<span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'> can ?not be </span><span class='regexp_end'>/</span></span>
|
298
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>InvalidStateError</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
299
|
+
<span class='kw'>else</span>
|
300
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
|
301
|
+
<span class='kw'>end</span>
|
302
|
+
<span class='kw'>end</span></pre>
|
303
|
+
</td>
|
304
|
+
</tr>
|
305
|
+
</table>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
</div>
|
309
|
+
|
310
|
+
|
311
|
+
<div id="instance_method_details" class="method_details_list">
|
312
|
+
<h2>Instance Method Details</h2>
|
313
|
+
|
314
|
+
|
315
|
+
<div class="method_details first">
|
316
|
+
<h3 class="signature first" id="respond_to?-instance_method">
|
317
|
+
|
318
|
+
- (<tt>Boolean</tt>) <strong>respond_to?</strong>(method)
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
</h3><div class="docstring">
|
325
|
+
<div class="discussion">
|
326
|
+
|
327
|
+
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
<div class="tags">
|
331
|
+
|
332
|
+
<p class="tag_title">Returns:</p>
|
333
|
+
<ul class="return">
|
334
|
+
|
335
|
+
<li>
|
336
|
+
|
337
|
+
|
338
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</li>
|
343
|
+
|
344
|
+
</ul>
|
345
|
+
|
346
|
+
</div><table class="source_code">
|
347
|
+
<tr>
|
348
|
+
<td>
|
349
|
+
<pre class="lines">
|
350
|
+
|
351
|
+
|
352
|
+
31
|
353
|
+
32
|
354
|
+
33</pre>
|
355
|
+
</td>
|
356
|
+
<td>
|
357
|
+
<pre class="code"><span class="info file"># File 'lib/stackup/error_mapping_proxy.rb', line 31</span>
|
358
|
+
|
359
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
360
|
+
<span class='ivar'>@delegate</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
361
|
+
<span class='kw'>end</span></pre>
|
362
|
+
</td>
|
363
|
+
</tr>
|
364
|
+
</table>
|
365
|
+
</div>
|
366
|
+
|
367
|
+
</div>
|
368
|
+
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<div id="footer">
|
372
|
+
Generated on Fri Oct 9 11:23:11 2015 by
|
373
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
374
|
+
0.8.7.6 (ruby-2.2.2).
|
375
|
+
</div>
|
376
|
+
|
377
|
+
</body>
|
378
|
+
</html>
|