simple_deploy 0.7.6.beta.3 → 0.7.6.beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05edf27f77f29c8d99c992b7736ba3393543e8a2
4
- data.tar.gz: 51710aa5eac62c1943b959f4929962d53150c027
3
+ metadata.gz: ba2b65db7a2e3c10886e4079dae54dc98257537b
4
+ data.tar.gz: b1c674667745e75a61c59765a5d163983fec3adc
5
5
  SHA512:
6
- metadata.gz: 38ecf0947147ad91ef5ba62d1ed7c8c077b14a10395e82f902e5817b07b5cf8eeb1bea171a90b71268a45059f98445b3216758faf12a93810796640c70b4a448
7
- data.tar.gz: 21e5b0507a33b06b84d3a8ea21d50402c28d6f6c5ca8f062bd206b0c4a22b27e62c58433da27e579a1a0e5e0bbd29dd5d9e5009d2917787c5c184f6bc81cbd32
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
- @logger.debug "Object type = #{@exception.class}"
15
- if @exception.respond_to?(:response)
16
- unless @exception.response.body.empty?
17
- message = XmlSimple.xml_in @exception.response.body
18
- message['Error'].first['Message'].each do |msg|
19
- case msg
20
- when 'No updates are to be performed.'
21
- @logger.info msg
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 "CloudFormation returned blank xml EXCEPTION => #{@exception.response.body}"
35
- raise Exceptions::CloudFormationError.new "Cloudformation returned blank xml"
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}"
@@ -37,7 +37,7 @@ module SimpleDeploy
37
37
  CLI::Destroy.new.destroy
38
38
  when 'deploy'
39
39
  CLI::Deploy.new.deploy
40
- when 'environments'
40
+ when 'environments', 'envs'
41
41
  CLI::Environments.new.environments
42
42
  when 'events'
43
43
  CLI::Events.new.show
@@ -1,3 +1,3 @@
1
1
  module SimpleDeploy
2
- VERSION = "0.7.6.beta.3"
2
+ VERSION = "0.7.6.beta.5"
3
3
  end
@@ -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.10.0"
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 'Excon::Response'
11
- @exception_stub1.stub(:response).and_return(@exception_stub1)
12
- @exception_stub1.stub(:body).and_return('<opt><Error><Message>No updates are to be performed.</Message></Error></opt>')
13
-
14
- @exception_stub2 = stub 'Excon::Response'
15
- @exception_stub2.stub(:response).and_return(@exception_stub2)
16
- @exception_stub2.stub(:body).and_return('<opt><Error><Message>Oops.</Message></Error></opt>')
17
- @exception_stub3 = stub 'Excon::Response'
18
- @exception_stub3.stub(:response).and_return(@exception_stub3)
19
- @exception_stub3.stub(:body).and_return('<opt><Error><Message>Stack:test does not exist</Message></Error></opt>')
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 unkonwn errors as SimpleDeploy::CloudFormationError' do
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.3
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-09-10 00:00:00.000000000 Z
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.10.0
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.10.0
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: