engineyard-serverside-adapter 2.2.2 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/ChangeLog.md +4 -0
- data/Rakefile +1 -1
- data/lib/engineyard-serverside-adapter.rb +9 -6
- data/lib/engineyard-serverside-adapter/action.rb +18 -18
- data/lib/engineyard-serverside-adapter/{deploy.rb → action/deploy.rb} +9 -4
- data/lib/engineyard-serverside-adapter/{disable_maintenance.rb → action/disable_maintenance.rb} +9 -4
- data/lib/engineyard-serverside-adapter/{enable_maintenance.rb → action/enable_maintenance.rb} +9 -4
- data/lib/engineyard-serverside-adapter/{integrate.rb → action/integrate.rb} +10 -4
- data/lib/engineyard-serverside-adapter/{restart.rb → action/restart.rb} +9 -4
- data/lib/engineyard-serverside-adapter/{rollback.rb → action/rollback.rb} +9 -4
- data/lib/engineyard-serverside-adapter/arguments.rb +23 -8
- data/lib/engineyard-serverside-adapter/command.rb +4 -14
- data/lib/engineyard-serverside-adapter/command_options.rb +36 -0
- data/lib/engineyard-serverside-adapter/option.rb +6 -0
- data/lib/engineyard-serverside-adapter/version.rb +1 -1
- data/spec/integrate_spec.rb +4 -0
- data/spec/spec_helper.rb +20 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjhmY2NmYmNiNTJkYzEzYmQwODEzOGMwNjM4Y2U4MTliNmFkYjY3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
NDJhNGEwYzM1YmIyN2M0NGNhMTI5MmQ3MTFmNDg1ZjQxODdmNjg5NQ==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjA5MWI4Njc5NTUyNzY2Y2VjOWRlNTU5YzhkYzAzMTQ0YzJlMWVjZmIxMWYz
|
10
|
+
MWFkZjVmNmZlMmY5ZDkzOTdhN2VmZWQwNDI4NzcxMTc2OWUyODMyNTlkNmI3
|
11
|
+
MTVhMWU1ZDA2ZGQ2NzA4MjVjZmM5OThhNmRmNGExZjljZGQxMGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTZkZjIwOWQ0NjEwYzM4NjUxNTYwYTc5YWNmODc1OTZhNDIyMGM0YjYyZWJm
|
14
|
+
MDQxODQxMzc4NzNmMDRiNmEzM2ZjMzY5YjUwOWM3YzUzOGM1MzgzMzBjMmNj
|
15
|
+
YmI2YjFmZjUzM2RlZTFhODMwN2E1YjgyZmQyZTZmY2I3YzI4YjE=
|
data/ChangeLog.md
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
|
5
5
|
*
|
6
6
|
|
7
|
+
## v2.3.0 (2014-06-02)
|
8
|
+
|
9
|
+
* Support new --ignore-existing option for integrate, which tells rsync not to overwrite existing files on the destination server when syncing existing app files before deploy.
|
10
|
+
|
7
11
|
## v2.2.2 (2013-10-10)
|
8
12
|
|
9
13
|
* Remove --clean option form Integrate command. We've decided that integrate should just always run clean.
|
data/Rakefile
CHANGED
@@ -7,12 +7,15 @@ module EY
|
|
7
7
|
autoload :Action, 'engineyard-serverside-adapter/action'
|
8
8
|
autoload :Arguments, 'engineyard-serverside-adapter/arguments'
|
9
9
|
autoload :Command, 'engineyard-serverside-adapter/command'
|
10
|
-
autoload :
|
11
|
-
|
12
|
-
|
13
|
-
autoload :
|
14
|
-
autoload :
|
15
|
-
autoload :
|
10
|
+
autoload :CommandOptions, 'engineyard-serverside-adapter/command_options'
|
11
|
+
|
12
|
+
# Backwards compatibility
|
13
|
+
autoload :Deploy, 'engineyard-serverside-adapter/action/deploy'
|
14
|
+
autoload :DisableMaintenance, 'engineyard-serverside-adapter/action/disable_maintenance'
|
15
|
+
autoload :EnableMaintenance, 'engineyard-serverside-adapter/action/enable_maintenance'
|
16
|
+
autoload :Integrate, 'engineyard-serverside-adapter/action/integrate'
|
17
|
+
autoload :Restart, 'engineyard-serverside-adapter/action/restart'
|
18
|
+
autoload :Rollback, 'engineyard-serverside-adapter/action/rollback'
|
16
19
|
|
17
20
|
def initialize(gem_bin_path = "", &block)
|
18
21
|
@gem_bin_path = Pathname.new(gem_bin_path)
|
@@ -7,14 +7,17 @@ module EY
|
|
7
7
|
module Serverside
|
8
8
|
class Adapter
|
9
9
|
class Action
|
10
|
+
autoload :Deploy, 'engineyard-serverside-adapter/action/deploy'
|
11
|
+
autoload :DisableMaintenance, 'engineyard-serverside-adapter/action/disable_maintenance'
|
12
|
+
autoload :EnableMaintenance, 'engineyard-serverside-adapter/action/enable_maintenance'
|
13
|
+
autoload :Integrate, 'engineyard-serverside-adapter/action/integrate'
|
14
|
+
autoload :Restart, 'engineyard-serverside-adapter/action/restart'
|
15
|
+
autoload :Rollback, 'engineyard-serverside-adapter/action/rollback'
|
10
16
|
|
11
|
-
|
12
|
-
attr_accessor :options
|
17
|
+
extend CommandOptions::ClassMethods
|
13
18
|
|
14
|
-
|
15
|
-
|
16
|
-
options << Option.new(*args)
|
17
|
-
end
|
19
|
+
def command_options
|
20
|
+
self.class.command_options
|
18
21
|
end
|
19
22
|
|
20
23
|
GEM_NAME = 'engineyard-serverside'
|
@@ -29,8 +32,6 @@ module EY
|
|
29
32
|
|
30
33
|
block.call @arguments if block
|
31
34
|
|
32
|
-
@serverside_version = @arguments.serverside_version
|
33
|
-
|
34
35
|
validate!
|
35
36
|
end
|
36
37
|
|
@@ -48,10 +49,6 @@ module EY
|
|
48
49
|
|
49
50
|
private
|
50
51
|
|
51
|
-
def applicable_options
|
52
|
-
@applicable_options ||= self.class.options.select { |option| option.on_version?(@serverside_version) }
|
53
|
-
end
|
54
|
-
|
55
52
|
def check_and_install_command
|
56
53
|
"(#{check_command}) || (#{install_command})"
|
57
54
|
end
|
@@ -92,7 +89,7 @@ module EY
|
|
92
89
|
Command.new(serverside_command_path, @serverside_version, *task) do |cmd|
|
93
90
|
given_applicable_options = given_options & applicable_options
|
94
91
|
given_applicable_options.each do |option|
|
95
|
-
cmd.
|
92
|
+
cmd.argument(option.type, option.to_switch, @arguments[option.name])
|
96
93
|
end
|
97
94
|
end
|
98
95
|
end
|
@@ -108,18 +105,21 @@ module EY
|
|
108
105
|
# to exclude archive from a older version and then perform a git
|
109
106
|
# deploy, which really we should have errored for receiving both.
|
110
107
|
def given_options
|
111
|
-
@given_options ||=
|
112
|
-
@arguments
|
108
|
+
@given_options ||= command_options.select do |option|
|
109
|
+
@arguments[option.name] || option.include?
|
113
110
|
end
|
114
111
|
end
|
115
112
|
|
113
|
+
def applicable_options
|
114
|
+
command_options.applicable(@serverside_version)
|
115
|
+
end
|
116
|
+
|
116
117
|
def required_options
|
117
|
-
|
118
|
-
option.required_on_version?(@serverside_version)
|
119
|
-
end
|
118
|
+
command_options.required(@serverside_version)
|
120
119
|
end
|
121
120
|
|
122
121
|
def validate!
|
122
|
+
@serverside_version = @arguments.serverside_version
|
123
123
|
unless @serverside_version
|
124
124
|
raise ArgumentError, "Required field [serverside_version] not provided."
|
125
125
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module EY
|
2
|
-
|
3
|
-
class
|
1
|
+
module EY::Serverside
|
2
|
+
class Adapter
|
3
|
+
class Action
|
4
4
|
class Deploy < Action
|
5
5
|
|
6
6
|
option :app, :string, :required => true
|
@@ -11,7 +11,9 @@ module EY
|
|
11
11
|
option :environment_name, :string, :required => true, :version => '>= 2.0.0'
|
12
12
|
option :git, :string, :version => '>= 2.3.0'
|
13
13
|
option :framework_env, :string, :required => true
|
14
|
-
option :
|
14
|
+
option :instance_names, :hash, :required => true
|
15
|
+
option :instance_roles, :hash, :required => true
|
16
|
+
option :instances, :array, :required => true
|
15
17
|
option :migrate, :string, :include => true
|
16
18
|
option :ref, :string, :required => '< 2.3.0'
|
17
19
|
option :repo, :string, :required => '< 2.3.0', :version => '< 2.3.0'
|
@@ -36,6 +38,9 @@ module EY
|
|
36
38
|
end
|
37
39
|
end
|
38
40
|
end
|
41
|
+
|
42
|
+
# backwards compatibility
|
43
|
+
EY::Serverside::Adapter::Deploy = Deploy
|
39
44
|
end
|
40
45
|
end
|
41
46
|
end
|
data/lib/engineyard-serverside-adapter/{disable_maintenance.rb → action/disable_maintenance.rb}
RENAMED
@@ -1,12 +1,14 @@
|
|
1
|
-
module EY
|
2
|
-
|
3
|
-
class
|
1
|
+
module EY::Serverside
|
2
|
+
class Adapter
|
3
|
+
class Action
|
4
4
|
class DisableMaintenance < Action
|
5
5
|
|
6
6
|
option :app, :string, :required => true
|
7
7
|
option :account_name, :string, :required => true, :version => '>=2.0.0'
|
8
8
|
option :environment_name, :string, :required => true, :version => '>=2.0.0'
|
9
|
-
option :
|
9
|
+
option :instance_names, :hash, :required => true
|
10
|
+
option :instance_roles, :hash, :required => true
|
11
|
+
option :instances, :array, :required => true
|
10
12
|
option :verbose, :boolean
|
11
13
|
|
12
14
|
private
|
@@ -16,6 +18,9 @@ module EY
|
|
16
18
|
end
|
17
19
|
|
18
20
|
end
|
21
|
+
|
22
|
+
# backwards compatibility
|
23
|
+
EY::Serverside::Adapter::DisableMaintenance = DisableMaintenance
|
19
24
|
end
|
20
25
|
end
|
21
26
|
end
|
data/lib/engineyard-serverside-adapter/{enable_maintenance.rb → action/enable_maintenance.rb}
RENAMED
@@ -1,12 +1,14 @@
|
|
1
|
-
module EY
|
2
|
-
|
3
|
-
class
|
1
|
+
module EY::Serverside
|
2
|
+
class Adapter
|
3
|
+
class Action
|
4
4
|
class EnableMaintenance < Action
|
5
5
|
|
6
6
|
option :app, :string, :required => true
|
7
7
|
option :account_name, :string, :required => true, :version => '>=2.0.0'
|
8
8
|
option :environment_name, :string, :required => true, :version => '>=2.0.0'
|
9
|
-
option :
|
9
|
+
option :instance_names, :hash, :required => true
|
10
|
+
option :instance_roles, :hash, :required => true
|
11
|
+
option :instances, :array, :required => true
|
10
12
|
option :verbose, :boolean
|
11
13
|
|
12
14
|
private
|
@@ -16,6 +18,9 @@ module EY
|
|
16
18
|
end
|
17
19
|
|
18
20
|
end
|
21
|
+
|
22
|
+
# backwards compatibility
|
23
|
+
EY::Serverside::Adapter::EnableMaintenance = EnableMaintenance
|
19
24
|
end
|
20
25
|
end
|
21
26
|
end
|
@@ -1,14 +1,17 @@
|
|
1
|
-
module EY
|
2
|
-
|
3
|
-
class
|
1
|
+
module EY::Serverside
|
2
|
+
class Adapter
|
3
|
+
class Action
|
4
4
|
class Integrate < Action
|
5
5
|
|
6
6
|
option :app, :string, :required => true
|
7
7
|
option :account_name, :string, :required => true, :version => '>=2.0.0'
|
8
8
|
option :environment_name, :string, :required => true, :version => '>=2.0.0'
|
9
9
|
option :stack, :string, :required => true
|
10
|
-
option :
|
10
|
+
option :instance_names, :hash, :required => true
|
11
|
+
option :instance_roles, :hash, :required => true
|
12
|
+
option :instances, :array, :required => true
|
11
13
|
option :framework_env, :string, :required => true
|
14
|
+
option :ignore_existing, :boolean, :version => '>=2.4.0'
|
12
15
|
option :verbose, :boolean
|
13
16
|
|
14
17
|
private
|
@@ -18,6 +21,9 @@ module EY
|
|
18
21
|
end
|
19
22
|
|
20
23
|
end
|
24
|
+
|
25
|
+
# backwards compatibility
|
26
|
+
EY::Serverside::Adapter::Integrate = Integrate
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end
|
@@ -1,12 +1,14 @@
|
|
1
|
-
module EY
|
2
|
-
|
3
|
-
class
|
1
|
+
module EY::Serverside
|
2
|
+
class Adapter
|
3
|
+
class Action
|
4
4
|
class Restart < Action
|
5
5
|
|
6
6
|
option :app, :string, :required => true
|
7
7
|
option :account_name, :string, :required => true, :version => '>=2.0.0'
|
8
8
|
option :environment_name, :string, :required => true, :version => '>=2.0.0'
|
9
|
-
option :
|
9
|
+
option :instance_names, :hash, :required => true
|
10
|
+
option :instance_roles, :hash, :required => true
|
11
|
+
option :instances, :array, :required => true
|
10
12
|
option :stack, :string, :required => true
|
11
13
|
option :verbose, :boolean
|
12
14
|
|
@@ -17,6 +19,9 @@ module EY
|
|
17
19
|
end
|
18
20
|
|
19
21
|
end
|
22
|
+
|
23
|
+
# backwards compatibility
|
24
|
+
EY::Serverside::Adapter::Restart = Restart
|
20
25
|
end
|
21
26
|
end
|
22
27
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module EY
|
2
|
-
|
3
|
-
class
|
1
|
+
module EY::Serverside
|
2
|
+
class Adapter
|
3
|
+
class Action
|
4
4
|
class Rollback < Action
|
5
5
|
|
6
6
|
option :app, :string, :required => true
|
@@ -8,7 +8,9 @@ module EY
|
|
8
8
|
option :environment_name, :string, :required => true, :version => '>=2.0.0'
|
9
9
|
option :config, :json
|
10
10
|
option :framework_env, :string, :required => true
|
11
|
-
option :
|
11
|
+
option :instance_names, :hash, :required => true
|
12
|
+
option :instance_roles, :hash, :required => true
|
13
|
+
option :instances, :array, :required => true
|
12
14
|
option :stack, :string, :required => true
|
13
15
|
option :verbose, :boolean
|
14
16
|
|
@@ -19,6 +21,9 @@ module EY
|
|
19
21
|
end
|
20
22
|
|
21
23
|
end
|
24
|
+
|
25
|
+
# backwards compatibility
|
26
|
+
EY::Serverside::Adapter::Rollback = Rollback
|
22
27
|
end
|
23
28
|
end
|
24
29
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module EY
|
2
2
|
module Serverside
|
3
3
|
class Adapter
|
4
|
+
|
5
|
+
# A mutable arguments receiver that fails fast when bad values are given.
|
4
6
|
class Arguments
|
5
7
|
|
6
8
|
def self.nonempty_attr_accessor(*names)
|
7
|
-
names
|
8
|
-
define_method(name) do
|
9
|
-
instance_variable_get("@#{name}")
|
10
|
-
end
|
9
|
+
attr_reader *names
|
11
10
|
|
11
|
+
names.each do |name|
|
12
12
|
define_method(:"#{name}=") do |value|
|
13
13
|
if value.nil? || value.to_s.empty?
|
14
14
|
raise ArgumentError, "Value for '#{name}' must be non-empty."
|
@@ -20,10 +20,18 @@ module EY
|
|
20
20
|
|
21
21
|
nonempty_attr_accessor :app, :account_name, :archive, :environment_name
|
22
22
|
nonempty_attr_accessor :framework_env, :git, :ref, :stack
|
23
|
-
|
24
|
-
|
23
|
+
|
24
|
+
attr_accessor :clean, :config, :migrate, :serverside_version, :verbose, :ignore_existing
|
25
|
+
|
26
|
+
attr_reader :instance_names, :instance_roles, :instances
|
25
27
|
alias repo git # for versions where --repo is required, it is accessed via this alias
|
26
28
|
|
29
|
+
def [](key)
|
30
|
+
send(key)
|
31
|
+
end
|
32
|
+
|
33
|
+
# This is a special setter for setting all instance information at the same time.
|
34
|
+
# It sets @instance_roles, @instance_names and @instances.
|
27
35
|
def instances=(instances)
|
28
36
|
unless instances.respond_to?(:each)
|
29
37
|
raise ArgumentError, "Value for 'instances' must look like an enumerable."
|
@@ -33,15 +41,22 @@ module EY
|
|
33
41
|
raise ArgumentError, "Value for 'instances' must not be empty."
|
34
42
|
end
|
35
43
|
|
36
|
-
instances.
|
44
|
+
@instance_roles = instances.inject({}) do |roles, instance|
|
37
45
|
unless instance.respond_to?(:[]) && instance[:hostname] && instance[:roles]
|
38
46
|
raise ArgumentError, "Malformed instance #{instance.inspect}; it must have both [:hostname] and [:roles]"
|
39
47
|
end
|
48
|
+
|
49
|
+
roles.merge(instance[:hostname] => instance[:roles].join(','))
|
50
|
+
end
|
51
|
+
|
52
|
+
@instance_names = instances.inject({}) do |names, instance|
|
53
|
+
names.merge(instance[:hostname] => instance[:name])
|
40
54
|
end
|
41
55
|
|
42
|
-
@instances = instances
|
56
|
+
@instances = instances.map{|i| i[:hostname]}
|
43
57
|
end
|
44
58
|
|
59
|
+
# Uses Gem::Version to validate the version arg.
|
45
60
|
def serverside_version=(value)
|
46
61
|
if value.nil? || value.to_s.empty?
|
47
62
|
raise ArgumentError, "Value for 'serverside_version' must be non-empty."
|
@@ -22,6 +22,10 @@ module EY
|
|
22
22
|
Escape.shell_command to_argv
|
23
23
|
end
|
24
24
|
|
25
|
+
def argument(type, switch, value)
|
26
|
+
send(:"#{type}_argument", switch, value)
|
27
|
+
end
|
28
|
+
|
25
29
|
def array_argument(switch, values)
|
26
30
|
compacted = values.compact.sort
|
27
31
|
if compacted.any?
|
@@ -41,20 +45,6 @@ module EY
|
|
41
45
|
end
|
42
46
|
end
|
43
47
|
|
44
|
-
def instances_argument(_, instances)
|
45
|
-
role_pairs = instances.inject({}) do |roles, instance|
|
46
|
-
roles.merge(instance[:hostname] => instance[:roles].join(','))
|
47
|
-
end
|
48
|
-
hash_argument('--instance-roles', role_pairs)
|
49
|
-
|
50
|
-
role_pairs = instances.inject({}) do |roles, instance|
|
51
|
-
roles.merge(instance[:hostname] => instance[:name])
|
52
|
-
end
|
53
|
-
hash_argument('--instance-names', role_pairs)
|
54
|
-
|
55
|
-
array_argument('--instances', instances.map{|i| i[:hostname]})
|
56
|
-
end
|
57
|
-
|
58
48
|
def json_argument(switch, value)
|
59
49
|
if value
|
60
50
|
string_argument(switch, MultiJson.dump(value))
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class EY::Serverside::Adapter::CommandOptions
|
2
|
+
module ClassMethods
|
3
|
+
def command_options
|
4
|
+
@options ||= EY::Serverside::Adapter::CommandOptions.new
|
5
|
+
end
|
6
|
+
|
7
|
+
def option(*args)
|
8
|
+
command_options.add(*args)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_accessor :options
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
self.options = []
|
16
|
+
end
|
17
|
+
|
18
|
+
def add(*args)
|
19
|
+
option = EY::Serverside::Adapter::Option.new(*args)
|
20
|
+
self.options << option
|
21
|
+
option
|
22
|
+
end
|
23
|
+
|
24
|
+
def applicable(version)
|
25
|
+
select { |option| option.on_version?(version) }
|
26
|
+
end
|
27
|
+
|
28
|
+
def required(version)
|
29
|
+
select { |option| option.required_on_version?(version) }
|
30
|
+
end
|
31
|
+
|
32
|
+
def select(&block)
|
33
|
+
self.options.select(&block)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -26,12 +26,18 @@ module EY
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def required_on_version?(serverside_version)
|
29
|
+
unless on_version?(serverside_version)
|
30
|
+
return false
|
31
|
+
end
|
32
|
+
|
29
33
|
case @options[:required]
|
30
34
|
when true
|
31
35
|
true
|
32
36
|
when String
|
33
37
|
requirement = Gem::Requirement.create(@options[:required])
|
34
38
|
requirement.satisfied_by?(serverside_version)
|
39
|
+
else
|
40
|
+
false
|
35
41
|
end
|
36
42
|
end
|
37
43
|
|
data/spec/integrate_spec.rb
CHANGED
@@ -8,6 +8,7 @@ describe EY::Serverside::Adapter::Integrate do
|
|
8
8
|
it_should_behave_like "it accepts account_name"
|
9
9
|
it_should_behave_like "it accepts framework_env"
|
10
10
|
it_should_behave_like "it accepts instances"
|
11
|
+
it_should_behave_like "it accepts ignore_existing"
|
11
12
|
it_should_behave_like "it accepts stack"
|
12
13
|
it_should_behave_like "it accepts verbose"
|
13
14
|
it_should_behave_like "it accepts serverside_version"
|
@@ -25,6 +26,7 @@ describe EY::Serverside::Adapter::Integrate do
|
|
25
26
|
|
26
27
|
it_should_exclude_from_command :environment_name, %w[1.6.4]
|
27
28
|
it_should_exclude_from_command :account_name, %w[1.6.4]
|
29
|
+
it_should_exclude_from_command :ignore_existing, %w[2.3.8]
|
28
30
|
|
29
31
|
context "with valid arguments" do
|
30
32
|
let(:command) do
|
@@ -35,6 +37,7 @@ describe EY::Serverside::Adapter::Integrate do
|
|
35
37
|
arguments.instances = [{:hostname => 'localhost', :roles => %w[han solo], :name => 'chewie'}]
|
36
38
|
arguments.stack = "nginx_unicorn"
|
37
39
|
arguments.framework_env = "production"
|
40
|
+
arguments.ignore_existing = true
|
38
41
|
arguments.serverside_version = serverside_version
|
39
42
|
end
|
40
43
|
last_command(adapter)
|
@@ -49,6 +52,7 @@ describe EY::Serverside::Adapter::Integrate do
|
|
49
52
|
"--app rackapp",
|
50
53
|
"--environment-name rackapp_production",
|
51
54
|
"--framework-env production",
|
55
|
+
"--ignore-existing",
|
52
56
|
"--instance-names localhost:chewie",
|
53
57
|
"--instance-roles localhost:han,solo",
|
54
58
|
"--instances localhost",
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,7 @@ require 'engineyard-serverside-adapter'
|
|
5
5
|
require 'pp'
|
6
6
|
|
7
7
|
# Default version to use in tests when one is not specified
|
8
|
-
ENGINEYARD_SERVERSIDE_VERSION = '2.
|
8
|
+
ENGINEYARD_SERVERSIDE_VERSION = '2.4.0'
|
9
9
|
|
10
10
|
module ArgumentsHelpers
|
11
11
|
def serverside_version
|
@@ -167,6 +167,25 @@ RSpec.configure do |config|
|
|
167
167
|
end
|
168
168
|
end
|
169
169
|
|
170
|
+
shared_examples_for "it accepts ignore_existing" do
|
171
|
+
context "the --ignore-existing arg" do
|
172
|
+
it "is present when you set ignore_existing to true" do
|
173
|
+
adapter = described_class.new(:arguments => arguments_with(:ignore_existing => true))
|
174
|
+
last_command(adapter).should =~ /--ignore-existing/
|
175
|
+
end
|
176
|
+
|
177
|
+
it "is absent when you set ignore_existing to false" do
|
178
|
+
adapter = described_class.new(:arguments => arguments_with(:ignore_existing => false))
|
179
|
+
last_command(adapter).should_not =~ /--ignore-existing/
|
180
|
+
end
|
181
|
+
|
182
|
+
it "is absent when you omit ignore_existing" do
|
183
|
+
adapter = described_class.new(:arguments => valid_arguments)
|
184
|
+
last_command(adapter).should_not =~ /--ignore-existing/
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
170
189
|
{
|
171
190
|
:app => '--app',
|
172
191
|
:environment_name => '--environment-name',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-serverside-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Emde
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: escape
|
@@ -87,15 +87,16 @@ files:
|
|
87
87
|
- engineyard-serverside-adapter.gemspec
|
88
88
|
- lib/engineyard-serverside-adapter.rb
|
89
89
|
- lib/engineyard-serverside-adapter/action.rb
|
90
|
+
- lib/engineyard-serverside-adapter/action/deploy.rb
|
91
|
+
- lib/engineyard-serverside-adapter/action/disable_maintenance.rb
|
92
|
+
- lib/engineyard-serverside-adapter/action/enable_maintenance.rb
|
93
|
+
- lib/engineyard-serverside-adapter/action/integrate.rb
|
94
|
+
- lib/engineyard-serverside-adapter/action/restart.rb
|
95
|
+
- lib/engineyard-serverside-adapter/action/rollback.rb
|
90
96
|
- lib/engineyard-serverside-adapter/arguments.rb
|
91
97
|
- lib/engineyard-serverside-adapter/command.rb
|
92
|
-
- lib/engineyard-serverside-adapter/
|
93
|
-
- lib/engineyard-serverside-adapter/disable_maintenance.rb
|
94
|
-
- lib/engineyard-serverside-adapter/enable_maintenance.rb
|
95
|
-
- lib/engineyard-serverside-adapter/integrate.rb
|
98
|
+
- lib/engineyard-serverside-adapter/command_options.rb
|
96
99
|
- lib/engineyard-serverside-adapter/option.rb
|
97
|
-
- lib/engineyard-serverside-adapter/restart.rb
|
98
|
-
- lib/engineyard-serverside-adapter/rollback.rb
|
99
100
|
- lib/engineyard-serverside-adapter/version.rb
|
100
101
|
- spec/adapter_spec.rb
|
101
102
|
- spec/arguments_spec.rb
|
@@ -126,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
127
|
version: 1.3.6
|
127
128
|
requirements: []
|
128
129
|
rubyforge_project: engineyard-serverside-adapter
|
129
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.1.10
|
130
131
|
signing_key:
|
131
132
|
specification_version: 4
|
132
133
|
summary: Adapter for speaking to engineyard-serverside
|