simple_deploy 0.6.4 → 0.6.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.
Files changed (37) hide show
  1. data/CHANGELOG +13 -0
  2. data/lib/simple_deploy/cli/attributes.rb +13 -4
  3. data/lib/simple_deploy/cli/clone.rb +18 -7
  4. data/lib/simple_deploy/cli/create.rb +24 -12
  5. data/lib/simple_deploy/cli/deploy.rb +36 -14
  6. data/lib/simple_deploy/cli/destroy.rb +20 -13
  7. data/lib/simple_deploy/cli/environments.rb +32 -0
  8. data/lib/simple_deploy/cli/events.rb +23 -9
  9. data/lib/simple_deploy/cli/execute.rb +27 -11
  10. data/lib/simple_deploy/cli/instances.rb +22 -11
  11. data/lib/simple_deploy/cli/list.rb +17 -21
  12. data/lib/simple_deploy/cli/outputs.rb +26 -13
  13. data/lib/simple_deploy/cli/parameters.rb +22 -9
  14. data/lib/simple_deploy/cli/protect.rb +22 -9
  15. data/lib/simple_deploy/cli/resources.rb +24 -10
  16. data/lib/simple_deploy/cli/shared.rb +17 -7
  17. data/lib/simple_deploy/cli/status.rb +22 -9
  18. data/lib/simple_deploy/cli/template.rb +22 -9
  19. data/lib/simple_deploy/cli/update.rb +23 -11
  20. data/lib/simple_deploy/cli.rb +30 -6
  21. data/lib/simple_deploy/exceptions.rb +13 -0
  22. data/lib/simple_deploy/stack/ssh.rb +1 -3
  23. data/lib/simple_deploy/stack.rb +7 -4
  24. data/lib/simple_deploy/version.rb +1 -1
  25. data/lib/simple_deploy.rb +1 -0
  26. data/simple_deploy.gemspec +1 -1
  27. data/spec/cli/attributes_spec.rb +8 -8
  28. data/spec/cli/clone_spec.rb +6 -6
  29. data/spec/cli/deploy_spec.rb +20 -16
  30. data/spec/cli/destroy_spec.rb +6 -6
  31. data/spec/cli/protect_spec.rb +15 -15
  32. data/spec/cli/shared_spec.rb +76 -0
  33. data/spec/cli/update_spec.rb +8 -6
  34. data/spec/stack/ssh_spec.rb +2 -5
  35. data/spec/stack_spec.rb +26 -12
  36. metadata +21 -18
  37. data/lib/simple_deploy/cli/ssh.rb +0 -39
@@ -22,9 +22,9 @@ describe SimpleDeploy::CLI::Deploy do
22
22
  :internal => false,
23
23
  :attributes => [] }
24
24
 
25
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
26
- with(:provided => options,
27
- :required => [:environment, :name])
25
+ subject.should_receive(:valid_options?).
26
+ with(:provided => options,
27
+ :required => [:environment, :name])
28
28
  Trollop.stub(:options).and_return(options)
29
29
 
30
30
  SimpleDeploy::Notifier.should_receive(:new).
@@ -40,6 +40,7 @@ describe SimpleDeploy::CLI::Deploy do
40
40
  :internal => false).
41
41
  and_return(@stack)
42
42
 
43
+ @stack.should_receive(:wait_for_stable)
43
44
  @stack.should_receive(:deploy).with(true).and_return(true)
44
45
  @notifier.should_receive(:send_deployment_start_message)
45
46
  @notifier.should_receive(:send_deployment_complete_message)
@@ -47,7 +48,6 @@ describe SimpleDeploy::CLI::Deploy do
47
48
  subject.deploy
48
49
  end
49
50
 
50
-
51
51
  it "should exit on error with a status of 1" do
52
52
  options = { :environment => 'my_env',
53
53
  :log_level => 'debug',
@@ -56,9 +56,9 @@ describe SimpleDeploy::CLI::Deploy do
56
56
  :internal => false,
57
57
  :attributes => [] }
58
58
 
59
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
60
- with(:provided => options,
61
- :required => [:environment, :name])
59
+ subject.should_receive(:valid_options?).
60
+ with(:provided => options,
61
+ :required => [:environment, :name])
62
62
  Trollop.stub(:options).and_return(options)
63
63
 
64
64
  SimpleDeploy::Notifier.should_receive(:new).
@@ -74,6 +74,7 @@ describe SimpleDeploy::CLI::Deploy do
74
74
  :internal => false).
75
75
  and_return(@stack)
76
76
 
77
+ @stack.should_receive(:wait_for_stable)
77
78
  @stack.should_receive(:deploy).with(true).and_return(false)
78
79
  @notifier.should_receive(:send_deployment_start_message)
79
80
 
@@ -92,9 +93,9 @@ describe SimpleDeploy::CLI::Deploy do
92
93
  :internal => false,
93
94
  :attributes => ['foo=bah'] }
94
95
 
95
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
96
- with(:provided => options,
97
- :required => [:environment, :name])
96
+ subject.should_receive(:valid_options?).
97
+ with(:provided => options,
98
+ :required => [:environment, :name])
98
99
  Trollop.stub(:options).and_return(options)
99
100
 
100
101
  SimpleDeploy::Notifier.should_receive(:new).
@@ -111,6 +112,7 @@ describe SimpleDeploy::CLI::Deploy do
111
112
  and_return(@stack)
112
113
 
113
114
  @stack.should_receive(:update).with(hash_including(:force => true, :attributes => [{'foo' => 'bah'}])).and_return(true)
115
+ @stack.should_receive(:wait_for_stable)
114
116
  @stack.should_receive(:deploy).with(true).and_return(true)
115
117
  @notifier.should_receive(:send_deployment_start_message)
116
118
  @notifier.should_receive(:send_deployment_complete_message)
@@ -126,9 +128,9 @@ describe SimpleDeploy::CLI::Deploy do
126
128
  :internal => false,
127
129
  :attributes => ['foo=bah'] }
128
130
 
129
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
130
- with(:provided => options,
131
- :required => [:environment, :name])
131
+ subject.should_receive(:valid_options?).
132
+ with(:provided => options,
133
+ :required => [:environment, :name])
132
134
  Trollop.stub(:options).and_return(options)
133
135
 
134
136
  SimpleDeploy::Notifier.should_receive(:new).
@@ -146,6 +148,7 @@ describe SimpleDeploy::CLI::Deploy do
146
148
 
147
149
  @stack.should_receive(:update).with(hash_including(:force => true,
148
150
  :attributes => [{'foo' => 'bah'}])).and_return(false)
151
+ @stack.should_receive(:wait_for_stable)
149
152
 
150
153
  begin
151
154
  subject.deploy
@@ -162,9 +165,9 @@ describe SimpleDeploy::CLI::Deploy do
162
165
  :internal => false,
163
166
  :attributes => [] }
164
167
 
165
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
166
- with(:provided => options,
167
- :required => [:environment, :name])
168
+ subject.should_receive(:valid_options?).
169
+ with(:provided => options,
170
+ :required => [:environment, :name])
168
171
  Trollop.stub(:options).and_return(options)
169
172
 
170
173
  SimpleDeploy::Notifier.should_receive(:new).
@@ -181,6 +184,7 @@ describe SimpleDeploy::CLI::Deploy do
181
184
  and_return(@stack)
182
185
 
183
186
  @stack.should_not_receive(:update)
187
+ @stack.should_receive(:wait_for_stable)
184
188
  @stack.should_receive(:deploy).with(true).and_return(true)
185
189
  @notifier.should_receive(:send_deployment_start_message)
186
190
  @notifier.should_receive(:send_deployment_complete_message)
@@ -21,9 +21,9 @@ describe SimpleDeploy::CLI::Destroy do
21
21
  end
22
22
 
23
23
  it "should exit with 0" do
24
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
25
- with(:provided => @options,
26
- :required => [:environment, :name])
24
+ subject.should_receive(:valid_options?).
25
+ with(:provided => @options,
26
+ :required => [:environment, :name])
27
27
  Trollop.stub(:options).and_return(@options)
28
28
 
29
29
  @stack.should_receive(:destroy).and_return(true)
@@ -43,9 +43,9 @@ describe SimpleDeploy::CLI::Destroy do
43
43
  end
44
44
 
45
45
  it "should exit with 1" do
46
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
47
- with(:provided => @options,
48
- :required => [:environment, :name])
46
+ subject.should_receive(:valid_options?).
47
+ with(:provided => @options,
48
+ :required => [:environment, :name])
49
49
  Trollop.stub(:options).and_return(@options)
50
50
 
51
51
  @stack.should_receive(:destroy).and_return(false)
@@ -6,11 +6,11 @@ describe SimpleDeploy::CLI::Protect do
6
6
 
7
7
  describe 'protect' do
8
8
  before do
9
- @config = mock 'config'
9
+ @config_mock = mock 'config'
10
10
  @logger = stub 'logger', 'info' => 'true'
11
11
 
12
- SimpleDeploy::Config.stub(:new).and_return(@config)
13
- @config.should_receive(:environment).with('my_env').and_return(@config)
12
+ SimpleDeploy::Config.stub(:new).and_return(@config_mock)
13
+ @config_mock.should_receive(:environment).with('my_env').and_return(@config)
14
14
  SimpleDeploy::SimpleDeployLogger.should_receive(:new).
15
15
  with(:log_level => 'debug').
16
16
  and_return(@logger)
@@ -22,9 +22,9 @@ describe SimpleDeploy::CLI::Protect do
22
22
  :name => ['my_stack'],
23
23
  :protection => 'on' }
24
24
 
25
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
26
- with(:provided => options,
27
- :required => [:environment, :name])
25
+ subject.should_receive(:valid_options?).
26
+ with(:provided => options,
27
+ :required => [:environment, :name])
28
28
  Trollop.stub(:options).and_return(options)
29
29
 
30
30
  stack = stub :attributes => { 'protection' => 'on' }
@@ -46,9 +46,9 @@ describe SimpleDeploy::CLI::Protect do
46
46
  :name => ['my_stack1', 'my_stack2'],
47
47
  :protection => 'on' }
48
48
 
49
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
50
- with(:provided => options,
51
- :required => [:environment, :name])
49
+ subject.should_receive(:valid_options?).
50
+ with(:provided => options,
51
+ :required => [:environment, :name])
52
52
  Trollop.stub(:options).and_return(options)
53
53
 
54
54
  stack = stub :attributes => { 'protection' => 'on' }
@@ -77,9 +77,9 @@ describe SimpleDeploy::CLI::Protect do
77
77
  :name => ['my_stack'],
78
78
  :protection => 'off' }
79
79
 
80
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
81
- with(:provided => options,
82
- :required => [:environment, :name])
80
+ subject.should_receive(:valid_options?).
81
+ with(:provided => options,
82
+ :required => [:environment, :name])
83
83
  Trollop.stub(:options).and_return(options)
84
84
 
85
85
  stack = stub :attributes => { 'protection' => 'off' }
@@ -101,9 +101,9 @@ describe SimpleDeploy::CLI::Protect do
101
101
  :name => ['my_stack1', 'my_stack2'],
102
102
  :protection => 'off' }
103
103
 
104
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
105
- with(:provided => options,
106
- :required => [:environment, :name])
104
+ subject.should_receive(:valid_options?).
105
+ with(:provided => options,
106
+ :required => [:environment, :name])
107
107
  Trollop.stub(:options).and_return(options)
108
108
 
109
109
  stack = stub :attributes => { 'protection' => 'off' }
@@ -0,0 +1,76 @@
1
+ require 'spec_helper'
2
+
3
+ describe SimpleDeploy::CLI::Shared do
4
+ before do
5
+ @object = Object.new
6
+ @object.extend SimpleDeploy::CLI::Shared
7
+ end
8
+
9
+ it "should parse the given attributes" do
10
+ logger_stub = stub 'logger stub', :info => true
11
+ attributes = [ 'test1=value1', 'test2=value2==' ]
12
+
13
+ @object.stub :logger => logger_stub
14
+
15
+ @object.parse_attributes(:logger => logger_stub,
16
+ :attributes => attributes).
17
+ should == [ { "test1" => "value1" },
18
+ { "test2" => "value2==" } ]
19
+ end
20
+
21
+ context "validating options " do
22
+ it "should exit if provided options passed do not include all required" do
23
+ logger_stub = stub 'logger stub', :error => true
24
+
25
+ provided = { :test1 => 'test1', :test2 => 'test2' }
26
+ required = [:test1, :test2, :test3]
27
+ @object.stub :logger => logger_stub
28
+
29
+ lambda {
30
+ @object.valid_options? :provided => provided,
31
+ :required => required
32
+ }.should raise_error SystemExit
33
+ end
34
+
35
+ it "should exit if environment does not exist" do
36
+ config_stub = stub 'config stub', :environments => { 'preprod' => 'data' }
37
+ logger_stub = stub 'logger stub', :error => true
38
+
39
+ provided = { :environment => 'prod' }
40
+ required = [:environment]
41
+
42
+ SimpleDeploy::Config.stub :new => config_stub
43
+ @object.stub :logger => logger_stub
44
+
45
+ lambda {
46
+ @object.valid_options? :provided => provided,
47
+ :required => required
48
+ }.should raise_error SystemExit
49
+ end
50
+
51
+ it "should not exit if all options passed and environment exists" do
52
+ config_stub = stub 'config stub', :environments => { 'prod' => 'data' }
53
+ logger_stub = stub 'logger stub', :error => true
54
+
55
+ provided = { :environment => 'prod', :test1 => 'value1' }
56
+ required = [:environment, :test1]
57
+
58
+ SimpleDeploy::Config.stub :new => config_stub
59
+
60
+ @object.valid_options? :provided => provided,
61
+ :required => required,
62
+ :logger => logger_stub
63
+ end
64
+ end
65
+
66
+ it "should return the command name" do
67
+ @object.command_name.should == 'object'
68
+ end
69
+
70
+ it "should rescue stackster exceptions and exit 1" do
71
+ lambda { @object.rescue_stackster_exceptions_and_exit do
72
+ raise Stackster::Exceptions::Base
73
+ end
74
+ }.should raise_error SystemExit
75
+ end
76
+ end
@@ -23,9 +23,10 @@ describe SimpleDeploy::CLI::Update do
23
23
  :force => true,
24
24
  :attributes => ['chef_repo_bucket_prefix=intu-lc'] }
25
25
 
26
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
27
- with(:provided => options,
28
- :required => [:environment, :name])
26
+ subject.should_receive(:valid_options?).
27
+ with(:provided => options,
28
+ :required => [:environment, :name])
29
+
29
30
  Trollop.stub(:options).and_return(options)
30
31
 
31
32
  SimpleDeploy::Stack.should_receive(:new).
@@ -47,9 +48,10 @@ describe SimpleDeploy::CLI::Update do
47
48
  :force => false,
48
49
  :attributes => ['chef_repo_bucket_prefix=intu-lc'] }
49
50
 
50
- SimpleDeploy::CLI::Shared.should_receive(:valid_options?).
51
- with(:provided => options,
52
- :required => [:environment, :name])
51
+ subject.should_receive(:valid_options?).
52
+ with(:provided => options,
53
+ :required => [:environment, :name])
54
+
53
55
  Trollop.stub(:options).and_return(options)
54
56
 
55
57
  SimpleDeploy::Stack.should_receive(:new).
@@ -16,7 +16,7 @@ describe SimpleDeploy::Stack::SSH do
16
16
  end
17
17
 
18
18
  context "when unsuccessful" do
19
- it "should notify the user there are no running instances" do
19
+ it "should return false when no running instances running" do
20
20
  options = { :config => @config_mock,
21
21
  :instances => [],
22
22
  :environment => 'test-env',
@@ -25,10 +25,7 @@ describe SimpleDeploy::Stack::SSH do
25
25
  :stack => @stack_mock,
26
26
  :name => 'test-stack' }
27
27
  @ssh = SimpleDeploy::Stack::SSH.new options
28
- error = 'There are no running instances to execute this command.'
29
- expect { @ssh.execute(:sudo => true,
30
- :command => 'uname') }.to raise_error(RuntimeError, error)
31
-
28
+ @ssh.execute(:sudo => true, :command => 'uname').should be_false
32
29
  end
33
30
  end
34
31
 
data/spec/stack_spec.rb CHANGED
@@ -15,8 +15,7 @@ describe SimpleDeploy do
15
15
  at_least(:once).
16
16
  with(:logger => 'my-logger').
17
17
  and_return @config_stub
18
- @stack = SimpleDeploy::Stack.new :environment => 'test-env',
19
- :name => 'test-stack',
18
+ @stack = SimpleDeploy::Stack.new :name => 'test-stack',
20
19
  :logger => 'my-logger',
21
20
  :config => @config_stub
22
21
 
@@ -39,8 +38,7 @@ describe SimpleDeploy do
39
38
  end
40
39
 
41
40
  it "should set the attributes using what is passed to the create command" do
42
- Stackster::Stack.should_receive(:new).with(:environment => 'test-env',
43
- :name => 'test-stack',
41
+ Stackster::Stack.should_receive(:new).with(:name => 'test-stack',
44
42
  :config => @environment_config_mock,
45
43
  :logger => @logger_stub).
46
44
  and_return @stack_mock
@@ -73,8 +71,7 @@ describe SimpleDeploy do
73
71
  deployment_stub = stub 'deployment', :clear_for_deployment? => true
74
72
  @stack.stub(:deployment).and_return(deployment_stub)
75
73
 
76
- Stackster::Stack.should_receive(:new).with(:environment => 'test-env',
77
- :name => 'test-stack',
74
+ Stackster::Stack.should_receive(:new).with(:name => 'test-stack',
78
75
  :config => @environment_config_mock,
79
76
  :logger => @logger_stub).
80
77
  and_return @stack_mock
@@ -100,8 +97,7 @@ describe SimpleDeploy do
100
97
  @stack.stub(:deployment).and_return(deployment_mock)
101
98
  @stack.stub(:sleep).and_return(false)
102
99
 
103
- Stackster::Stack.should_receive(:new).with(:environment => 'test-env',
104
- :name => 'test-stack',
100
+ Stackster::Stack.should_receive(:new).with(:name => 'test-stack',
105
101
  :config => @environment_config_mock,
106
102
  :logger => @logger_stub).
107
103
  and_return @stack_mock
@@ -272,17 +268,35 @@ describe SimpleDeploy do
272
268
  end
273
269
  end
274
270
 
271
+ describe "wait_for_stable" do
272
+ before do
273
+ @stack = SimpleDeploy::Stack.new :name => 'test-stack',
274
+ :logger => 'my-logger',
275
+ :config => @config_stub,
276
+ :internal => false
277
+ @stack_mock.stub(:attributes).and_return({})
278
+ Stackster::Stack.should_receive(:new).
279
+ with(:name => 'test-stack',
280
+ :config => @environment_config_mock,
281
+ :logger => @logger_stub).
282
+ and_return @stack_mock
283
+ end
284
+
285
+ it "should call wait_for_stable on stackster stack" do
286
+ @stack_mock.should_receive(:wait_for_stable)
287
+ @stack.wait_for_stable
288
+ end
289
+ end
290
+
275
291
  describe "exists?" do
276
292
  before do
277
- @stack = SimpleDeploy::Stack.new :environment => 'test-env',
278
- :name => 'test-stack',
293
+ @stack = SimpleDeploy::Stack.new :name => 'test-stack',
279
294
  :logger => 'my-logger',
280
295
  :config => @config_stub,
281
296
  :internal => false
282
297
  @stack_mock.stub(:attributes).and_return({})
283
298
  Stackster::Stack.should_receive(:new).
284
- with(:environment => 'test-env',
285
- :name => 'test-stack',
299
+ with(:name => 'test-stack',
286
300
  :config => @environment_config_mock,
287
301
  :logger => @logger_stub).
288
302
  and_return @stack_mock
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.4
4
+ version: 0.6.5
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-18 00:00:00.000000000 Z
12
+ date: 2012-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70290261403920 !ruby/object:Gem::Requirement
16
+ requirement: &70114037824180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70290261403920
24
+ version_requirements: *70114037824180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70290261403200 !ruby/object:Gem::Requirement
27
+ requirement: &70114037823500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.11.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70290261403200
35
+ version_requirements: *70114037823500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: capistrano
38
- requirement: &70290261402600 !ruby/object:Gem::Requirement
38
+ requirement: &70114037822780 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,21 +43,21 @@ dependencies:
43
43
  version: 2.13.5
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70290261402600
46
+ version_requirements: *70114037822780
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: stackster
49
- requirement: &70290261402060 !ruby/object:Gem::Requirement
49
+ requirement: &70114037822200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - =
53
53
  - !ruby/object:Gem::Version
54
- version: 0.4.0
54
+ version: 0.4.1
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70290261402060
57
+ version_requirements: *70114037822200
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: tinder
60
- requirement: &70290261506180 !ruby/object:Gem::Requirement
60
+ requirement: &70114037821720 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - =
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.9.1
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70290261506180
68
+ version_requirements: *70114037821720
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: trollop
71
- requirement: &70290261505540 !ruby/object:Gem::Requirement
71
+ requirement: &70114037821120 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - =
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '2.0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70290261505540
79
+ version_requirements: *70114037821120
80
80
  description: I am designed to deploy artifacts uploaded by Heirloom
81
81
  email:
82
82
  - brett@weav.net
@@ -103,6 +103,7 @@ files:
103
103
  - lib/simple_deploy/cli/create.rb
104
104
  - lib/simple_deploy/cli/deploy.rb
105
105
  - lib/simple_deploy/cli/destroy.rb
106
+ - lib/simple_deploy/cli/environments.rb
106
107
  - lib/simple_deploy/cli/events.rb
107
108
  - lib/simple_deploy/cli/execute.rb
108
109
  - lib/simple_deploy/cli/instances.rb
@@ -112,12 +113,12 @@ files:
112
113
  - lib/simple_deploy/cli/protect.rb
113
114
  - lib/simple_deploy/cli/resources.rb
114
115
  - lib/simple_deploy/cli/shared.rb
115
- - lib/simple_deploy/cli/ssh.rb
116
116
  - lib/simple_deploy/cli/status.rb
117
117
  - lib/simple_deploy/cli/template.rb
118
118
  - lib/simple_deploy/cli/update.rb
119
119
  - lib/simple_deploy/config.rb
120
120
  - lib/simple_deploy/env.rb
121
+ - lib/simple_deploy/exceptions.rb
121
122
  - lib/simple_deploy/logger.rb
122
123
  - lib/simple_deploy/notifier.rb
123
124
  - lib/simple_deploy/notifier/campfire.rb
@@ -136,6 +137,7 @@ files:
136
137
  - spec/cli/deploy_spec.rb
137
138
  - spec/cli/destroy_spec.rb
138
139
  - spec/cli/protect_spec.rb
140
+ - spec/cli/shared_spec.rb
139
141
  - spec/cli/update_spec.rb
140
142
  - spec/cli_spec.rb
141
143
  - spec/config_spec.rb
@@ -163,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
165
  version: '0'
164
166
  segments:
165
167
  - 0
166
- hash: 826964826445741436
168
+ hash: -1684484936951909770
167
169
  required_rubygems_version: !ruby/object:Gem::Requirement
168
170
  none: false
169
171
  requirements:
@@ -172,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
174
  version: '0'
173
175
  segments:
174
176
  - 0
175
- hash: 826964826445741436
177
+ hash: -1684484936951909770
176
178
  requirements: []
177
179
  rubyforge_project: simple_deploy
178
180
  rubygems_version: 1.8.16
@@ -187,6 +189,7 @@ test_files:
187
189
  - spec/cli/deploy_spec.rb
188
190
  - spec/cli/destroy_spec.rb
189
191
  - spec/cli/protect_spec.rb
192
+ - spec/cli/shared_spec.rb
190
193
  - spec/cli/update_spec.rb
191
194
  - spec/cli_spec.rb
192
195
  - spec/config_spec.rb
@@ -1,39 +0,0 @@
1
- require 'trollop'
2
-
3
- module SimpleDeploy
4
- module CLI
5
- class SSH
6
- def show
7
- opts = Trollop::options do
8
- version SimpleDeploy::VERSION
9
- banner <<-EOS
10
-
11
- Show ssh connection string.
12
-
13
- simple_deploy ssh -n STACK_NAME -e ENVIRONMENT
14
-
15
- EOS
16
- opt :help, "Display Help"
17
- opt :environment, "Set the target environment", :type => :string
18
- opt :log_level, "Log level: debug, info, warn, error", :type => :string,
19
- :default => 'warn'
20
- opt :name, "Stack name to manage", :type => :string
21
- end
22
-
23
- CLI::Shared.valid_options? :provided => opts,
24
- :required => [:environment, :name]
25
-
26
- config = Config.new.environment opts[:environment]
27
-
28
- logger = SimpleDeployLogger.new :log_level => opts[:log_level]
29
-
30
- stack = Stack.new :environment => opts[:environment],
31
- :name => opts[:name],
32
- :config => config,
33
- :logger => logger
34
-
35
- puts stack.ssh
36
- end
37
- end
38
- end
39
- end