engineyard-serverside-adapter 1.3.1.pre → 1.3.1.pre1
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.
@@ -3,11 +3,12 @@ module EY
|
|
3
3
|
class Adapter
|
4
4
|
class Rollback < Action
|
5
5
|
|
6
|
-
option :app,
|
7
|
-
option :
|
8
|
-
option :
|
9
|
-
option :
|
10
|
-
option :
|
6
|
+
option :app, :string, :required => true
|
7
|
+
option :config, :json
|
8
|
+
option :framework_env, :string, :required => true
|
9
|
+
option :instances, :instances, :required => true
|
10
|
+
option :stack, :string, :required => true
|
11
|
+
option :verbose, :boolean
|
11
12
|
|
12
13
|
private
|
13
14
|
|
data/spec/rollback_spec.rb
CHANGED
@@ -4,21 +4,24 @@ describe EY::Serverside::Adapter::Rollback do
|
|
4
4
|
it_should_behave_like "it installs engineyard-serverside"
|
5
5
|
|
6
6
|
it_should_behave_like "it accepts app"
|
7
|
+
it_should_behave_like "it accepts framework_env"
|
7
8
|
it_should_behave_like "it accepts instances"
|
8
9
|
it_should_behave_like "it accepts stack"
|
9
10
|
it_should_behave_like "it accepts verbose"
|
10
11
|
|
11
12
|
it_should_require :app
|
12
|
-
it_should_require :
|
13
|
+
it_should_require :framework_env
|
13
14
|
it_should_require :instances
|
15
|
+
it_should_require :stack
|
14
16
|
|
15
17
|
context "with valid arguments" do
|
16
18
|
let(:command) do
|
17
19
|
adapter = described_class.new do |arguments|
|
18
|
-
arguments.app
|
19
|
-
arguments.
|
20
|
-
arguments.
|
21
|
-
arguments.
|
20
|
+
arguments.app = "rackapp"
|
21
|
+
arguments.framework_env = 'production'
|
22
|
+
arguments.instances = [{:hostname => 'localhost', :roles => %w[han solo], :name => 'chewie'}]
|
23
|
+
arguments.stack = "nginx_unicorn"
|
24
|
+
arguments.config = {'a' => 1}
|
22
25
|
end
|
23
26
|
last_command(adapter)
|
24
27
|
end
|
@@ -28,7 +31,7 @@ describe EY::Serverside::Adapter::Rollback do
|
|
28
31
|
end
|
29
32
|
|
30
33
|
it "invokes exactly the right command" do
|
31
|
-
command.should == "engineyard-serverside _#{EY::Serverside::Adapter::VERSION}_ deploy rollback --app rackapp --config '{\"a\":1}' --instance-names localhost:chewie --instance-roles localhost:han,solo --instances localhost --stack nginx_unicorn"
|
34
|
+
command.should == "engineyard-serverside _#{EY::Serverside::Adapter::VERSION}_ deploy rollback --app rackapp --config '{\"a\":1}' --framework-env production --instance-names localhost:chewie --instance-roles localhost:han,solo --instances localhost --stack nginx_unicorn"
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-serverside-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 270495468
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
9
|
- 1
|
10
|
-
-
|
11
|
-
version: 1.3.1.
|
10
|
+
- pre1
|
11
|
+
version: 1.3.1.pre1
|
12
12
|
platform: ruby
|
13
13
|
authors: []
|
14
14
|
|