simple_deploy 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use ruby-1.9.3-p194@simple_deploy --create
1
+ rvm use ruby-1.9.3-p327@simple_deploy --create
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.6.3:
2
+
3
+ * Instances return different message when no instances vs non existent stack
4
+ * Updating rvm to ruby 1.9.3-p327
5
+ * Updated to stackster version 0.4.0
6
+
1
7
  ## v0.6.2
2
8
 
3
9
  * Corrected the deploy command so it exits if a stack update fails
data/README.md CHANGED
@@ -27,36 +27,7 @@ environments:
27
27
  region: us-west-1
28
28
  ```
29
29
 
30
- Notifications
30
+ Documentation
31
31
  -------------
32
32
 
33
- Currently Simple Deploy only supports Campfire for notifications. To enable them, add your token, which can be obtained on the 'My Info' screen of Campfire in the notifications yaml above. If you don't want notificaitons, omit this section.
34
-
35
- To enable notifications on deployment to a Campfire room. Append the below to the **~/.simple_deploy.yml**.
36
-
37
- ```
38
- notifications:
39
- campfire:
40
- token: XXX
41
- ```
42
-
43
- Commands
44
- --------
45
-
46
- For a list of commands, run **simple_deploy -h**. To get more information about each subcommand, append a -h after the subcomand. For example: **simple_deploy deploy -h**.
47
-
48
- Deploying
49
- ---------
50
-
51
- By default simple deploy will use your user name and id_rsa key for deployments. To override either these, set the **SIMPLE_DEPLOY_SSH_USER** & **SIMPLE_DEPLOY_SSH_KEY** respectively.
52
-
53
- ```
54
- export SIMPLE_DEPLOY_SSH_USER=user
55
- export SIMPLE_DEPLOY_SSH_KEY=path_to_ssh_key
56
- ```
57
-
58
- An alternate config file can be supplied by setting the **SIMPLE_DEPLOY_CONFIG_FILE** variable.
59
-
60
- ```
61
- export SIMPLE_DEPLOY_CONFIG_FILE=/secret/my-config.yml
62
- ```
33
+ For more information, please view the [Simple Deploy Wiki](https://github.com/intuit/simple_deploy/wiki).
@@ -32,9 +32,12 @@ EOS
32
32
  :logger => logger,
33
33
  :internal => opts[:internal]
34
34
 
35
+ exit 1 unless stack.exists?
36
+
35
37
  instances = stack.instances
38
+
36
39
  if instances.nil? || instances.empty?
37
- puts "stack '#{opts[:name]}' does not exist"
40
+ logger.info "Stack '#{opts[:name]}' does not have any instances."
38
41
  else
39
42
  jj stack.instances
40
43
  end
@@ -94,6 +94,13 @@ module SimpleDeploy
94
94
  stack.status
95
95
  end
96
96
 
97
+ def exists?
98
+ stack.status
99
+ true
100
+ rescue Stackster::Exceptions::UnknownStack
101
+ false
102
+ end
103
+
97
104
  def attributes
98
105
  stack.attributes
99
106
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleDeploy
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "rspec", "~> 2.11.0"
23
23
 
24
24
  s.add_runtime_dependency "capistrano", "= 2.13.5"
25
- s.add_runtime_dependency "stackster", '= 0.3.2'
25
+ s.add_runtime_dependency "stackster", '= 0.4.0'
26
26
  s.add_runtime_dependency "tinder", "= 1.9.1"
27
27
  s.add_runtime_dependency "trollop", "= 2.0"
28
28
  end
data/spec/cli_spec.rb CHANGED
@@ -5,9 +5,9 @@ describe SimpleDeploy do
5
5
 
6
6
  it "should call the given sub command" do
7
7
  status_mock = mock 'status mock'
8
- ARGV = ['status', '-h']
8
+ ARGV.stub :shift => 'status'
9
9
  status_mock.should_receive(:show)
10
- SimpleDeploy::CLI::Status.should_receive(:new).and_return status_mock
10
+ SimpleDeploy::CLI::Status.stub :new => status_mock
11
11
  SimpleDeploy::CLI.start
12
12
  end
13
13
 
data/spec/stack_spec.rb CHANGED
@@ -271,4 +271,32 @@ describe SimpleDeploy do
271
271
  @stack.execute(:arg => 'val').should be_false
272
272
  end
273
273
  end
274
+
275
+ describe "exists?" do
276
+ before do
277
+ @stack = SimpleDeploy::Stack.new :environment => 'test-env',
278
+ :name => 'test-stack',
279
+ :logger => 'my-logger',
280
+ :config => @config_stub,
281
+ :internal => false
282
+ @stack_mock.stub(:attributes).and_return({})
283
+ Stackster::Stack.should_receive(:new).
284
+ with(:environment => 'test-env',
285
+ :name => 'test-stack',
286
+ :config => @environment_config_mock,
287
+ :logger => @logger_stub).
288
+ and_return @stack_mock
289
+ end
290
+
291
+ it "should return true if stack exists" do
292
+ @stack_mock.stub :status => 'CREATE_COMPLTE'
293
+ @stack.exists?.should be_true
294
+ end
295
+
296
+ it "should return false if the stack does not exist" do
297
+ @stack_mock.should_receive(:status).
298
+ and_raise Stackster::Exceptions::UnknownStack.new 'Stack:test-stack does not exist'
299
+ @stack.exists?.should be_false
300
+ end
301
+ end
274
302
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-01 00:00:00.000000000 Z
12
+ date: 2012-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70276931560440 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *70276931560440
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: rspec
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70276931559900 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,76 +32,51 @@ dependencies:
37
32
  version: 2.11.0
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 2.11.0
35
+ version_requirements: *70276931559900
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: capistrano
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70276931559100 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
- - - '='
41
+ - - =
52
42
  - !ruby/object:Gem::Version
53
43
  version: 2.13.5
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 2.13.5
46
+ version_requirements: *70276931559100
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: stackster
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70276931558560 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
- - - '='
52
+ - - =
68
53
  - !ruby/object:Gem::Version
69
- version: 0.3.2
54
+ version: 0.4.0
70
55
  type: :runtime
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - '='
76
- - !ruby/object:Gem::Version
77
- version: 0.3.2
57
+ version_requirements: *70276931558560
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: tinder
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70276931558020 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
- - - '='
63
+ - - =
84
64
  - !ruby/object:Gem::Version
85
65
  version: 1.9.1
86
66
  type: :runtime
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - '='
92
- - !ruby/object:Gem::Version
93
- version: 1.9.1
68
+ version_requirements: *70276931558020
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: trollop
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70276931557360 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
- - - '='
74
+ - - =
100
75
  - !ruby/object:Gem::Version
101
76
  version: '2.0'
102
77
  type: :runtime
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - '='
108
- - !ruby/object:Gem::Version
109
- version: '2.0'
79
+ version_requirements: *70276931557360
110
80
  description: I am designed to deploy artifacts uploaded by Heirloom
111
81
  email:
112
82
  - brett@weav.net
@@ -193,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
163
  version: '0'
194
164
  segments:
195
165
  - 0
196
- hash: 1066179767380513857
166
+ hash: 1556323809252766114
197
167
  required_rubygems_version: !ruby/object:Gem::Requirement
198
168
  none: false
199
169
  requirements:
@@ -202,10 +172,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
172
  version: '0'
203
173
  segments:
204
174
  - 0
205
- hash: 1066179767380513857
175
+ hash: 1556323809252766114
206
176
  requirements: []
207
177
  rubyforge_project: simple_deploy
208
- rubygems_version: 1.8.24
178
+ rubygems_version: 1.8.16
209
179
  signing_key:
210
180
  specification_version: 3
211
181
  summary: I help with deployments