simple_deploy 0.7.6.beta.3 → 0.7.6.beta.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/simple_deploy/aws/cloud_formation/error.rb +10 -23
- data/lib/simple_deploy/cli.rb +1 -1
- data/lib/simple_deploy/version.rb +1 -1
- data/simple_deploy.gemspec +1 -2
- data/spec/aws/cloud_formation/error_spec.rb +12 -15
- data/spec/cli_spec.rb +22 -0
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba2b65db7a2e3c10886e4079dae54dc98257537b
|
4
|
+
data.tar.gz: b1c674667745e75a61c59765a5d163983fec3adc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45b4a8a843efb68c83e5a56f4e9ca13e61dcbf0c86ae003505d8ebb56efb8e60a96cde3e5a7d7dd4ffdb6c20acac72f589b9c2938cd35ac1b42b1183fd04bf9b
|
7
|
+
data.tar.gz: 62daf2d2f6161076b20b6729d087496213d64c1c75935cad62fb5540a78212d3c56c7568569b2d3211ec0a17f43686376340ef2a18276d65ec7e60de6c1d8147
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
## HEAD:
|
2
2
|
|
3
|
+
* Updated to latest fog 1.15
|
3
4
|
* Added feature for issue 169 to remove values which are set to nil
|
4
5
|
* Added feature for issue 191 to read in input stack for clone command
|
5
6
|
* Fixed issue 176 where multiple deploys did not exit if first deploy failed
|
6
7
|
* Fixed find_xml_file error when a blank exception is thrown from cloudformation.
|
8
|
+
* Add 'envs' command as a shortcut for 'environments'
|
7
9
|
|
8
10
|
## v0.7.5 (07/02/13):
|
9
11
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'xmlsimple'
|
2
|
-
|
3
1
|
module SimpleDeploy
|
4
2
|
class AWS
|
5
3
|
class CloudFormation
|
@@ -11,28 +9,17 @@ module SimpleDeploy
|
|
11
9
|
end
|
12
10
|
|
13
11
|
def process
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
when /Template requires parameter(.*)/
|
23
|
-
@logger.error msg
|
24
|
-
raise Exceptions::CloudFormationError.new msg
|
25
|
-
when /^Stack:(.*) does not exist$/
|
26
|
-
@logger.error msg
|
27
|
-
raise Exceptions::UnknownStack.new msg
|
28
|
-
else
|
29
|
-
@logger.error msg
|
30
|
-
raise Exceptions::CloudFormationError.new msg
|
31
|
-
end
|
32
|
-
end
|
12
|
+
message = @exception.message
|
13
|
+
unless message.empty?
|
14
|
+
case message
|
15
|
+
when 'No updates are to be performed.'
|
16
|
+
@logger.info message
|
17
|
+
when /^Stack:(.*) does not exist$/
|
18
|
+
@logger.error message
|
19
|
+
raise Exceptions::UnknownStack.new message
|
33
20
|
else
|
34
|
-
@logger.error
|
35
|
-
raise Exceptions::CloudFormationError.new
|
21
|
+
@logger.error message
|
22
|
+
raise Exceptions::CloudFormationError.new message
|
36
23
|
end
|
37
24
|
else
|
38
25
|
@logger.error "Unknown exception from cloudformation #{@exception.inspect}"
|
data/lib/simple_deploy/cli.rb
CHANGED
data/simple_deploy.gemspec
CHANGED
@@ -27,6 +27,5 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_runtime_dependency "capistrano", "= 2.13.5"
|
28
28
|
s.add_runtime_dependency "esbit", "~> 0.0.4"
|
29
29
|
s.add_runtime_dependency "trollop", "= 2.0"
|
30
|
-
s.add_runtime_dependency "fog", "= 1.
|
31
|
-
s.add_runtime_dependency "xml-simple", "= 1.1.2"
|
30
|
+
s.add_runtime_dependency "fog", "= 1.15.0"
|
32
31
|
end
|
@@ -7,20 +7,17 @@ describe SimpleDeploy::AWS::CloudFormation::Error do
|
|
7
7
|
include_context 'double stubbed logger'
|
8
8
|
|
9
9
|
before do
|
10
|
-
@exception_stub1 = stub '
|
11
|
-
@exception_stub1.stub(:
|
12
|
-
|
13
|
-
|
14
|
-
@exception_stub2
|
15
|
-
|
16
|
-
@
|
17
|
-
@exception_stub3
|
18
|
-
|
19
|
-
@
|
20
|
-
|
21
|
-
@exception_stub4 = stub 'Excon::Response'
|
22
|
-
@exception_stub4.stub(:response).and_return(@exception_stub4)
|
23
|
-
@exception_stub4.stub(:body).and_return('')
|
10
|
+
@exception_stub1 = stub 'Fog::AWS::CloudFormation'
|
11
|
+
@exception_stub1.stub(:message).and_return("No updates are to be performed.")
|
12
|
+
|
13
|
+
@exception_stub2 = stub 'Fog::AWS::CloudFormation'
|
14
|
+
@exception_stub2.stub(:message).and_return("Oops.")
|
15
|
+
|
16
|
+
@exception_stub3 = stub 'Fog::AWS::CloudFormation'
|
17
|
+
@exception_stub3.stub(:message).and_return("Stack:test does not exist")
|
18
|
+
|
19
|
+
@exception_stub4 = stub 'Fog::AWS::CloudFormation::'
|
20
|
+
@exception_stub4.stub(:message).and_return('')
|
24
21
|
end
|
25
22
|
|
26
23
|
describe 'process' do
|
@@ -34,7 +31,7 @@ describe SimpleDeploy::AWS::CloudFormation::Error do
|
|
34
31
|
expect { error.process }.to raise_error SimpleDeploy::Exceptions::CloudFormationError
|
35
32
|
end
|
36
33
|
|
37
|
-
it 'should re-raise
|
34
|
+
it 'should re-raise unknown errors as SimpleDeploy::CloudFormationError' do
|
38
35
|
error = SimpleDeploy::AWS::CloudFormation::Error.new :exception => @exception_stub2
|
39
36
|
|
40
37
|
lambda { error.process }.should raise_error SimpleDeploy::Exceptions::CloudFormationError
|
data/spec/cli_spec.rb
CHANGED
@@ -11,5 +11,27 @@ describe SimpleDeploy do
|
|
11
11
|
SimpleDeploy::CLI.start
|
12
12
|
end
|
13
13
|
|
14
|
+
describe 'environments' do
|
15
|
+
let(:env) { mock('env').tap { |m| m.should_receive(:environments) } }
|
16
|
+
|
17
|
+
before do
|
18
|
+
ARGV.stub :shift => 'environments'
|
19
|
+
SimpleDeploy::CLI::Environments.stub :new => env
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'calls the correct command' do
|
23
|
+
SimpleDeploy::CLI.start
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'envs' do
|
27
|
+
before { ARGV.stub :shift => 'envs'}
|
28
|
+
|
29
|
+
it 'calls the correct command' do
|
30
|
+
SimpleDeploy::CLI.start
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
14
36
|
end
|
15
37
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.6.beta.
|
4
|
+
version: 0.7.6.beta.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Weaver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakefs
|
@@ -128,28 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: 1.15.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: xml-simple
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - '='
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 1.1.2
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - '='
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 1.1.2
|
138
|
+
version: 1.15.0
|
153
139
|
description: Opinionated gem for Managing AWS Cloud Formation stacks and deploying
|
154
140
|
updates to Instances.
|
155
141
|
email:
|