engineyard 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,8 +69,8 @@ module EY
69
69
  :desc => "Name of the account in which the environment can be found"
70
70
  method_option :verbose, :type => :boolean, :aliases => %w(-v),
71
71
  :desc => "Be verbose"
72
- method_option :extra_deploy_hook_options, :type => :hash, :default => {},
73
- :desc => "Additional options to be made available in deploy hooks (in the 'config' hash)"
72
+ method_option :config, :type => :hash, :default => {}, :aliases => %w(--extra-deploy-hook-options),
73
+ :desc => "Hash made available in deploy hooks (in the 'config' hash), can also override some ey.yml settings."
74
74
  def deploy
75
75
  app_env = fetch_app_environment(options[:app], options[:environment], options[:account])
76
76
 
@@ -258,8 +258,8 @@ module EY
258
258
  :desc => "Name of the account in which the environment can be found"
259
259
  method_option :verbose, :type => :boolean, :aliases => %w(-v),
260
260
  :desc => "Be verbose"
261
- method_option :extra_deploy_hook_options, :type => :hash, :default => {},
262
- :desc => "Additional options to be made available in deploy hooks (in the 'config' hash)"
261
+ method_option :config, :type => :hash, :default => {}, :aliases => %w(--extra-deploy-hook-options),
262
+ :desc => "Hash made available in deploy hooks (in the 'config' hash), can also override some ey.yml settings."
263
263
  def rollback
264
264
  app_env = fetch_app_environment(options[:app], options[:environment], options[:account])
265
265
  env_config = config.environment_config(app_env.environment_name)
@@ -26,7 +26,7 @@ module EY
26
26
  end
27
27
 
28
28
  def extra_config
29
- @cli_opts.fetch('extra_deploy_hook_options', {})
29
+ @cli_opts.fetch('config', {})
30
30
  end
31
31
 
32
32
  private
@@ -1,4 +1,4 @@
1
1
  module EY
2
- VERSION = '2.0.6'
3
- ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.0.2'
2
+ VERSION = '2.0.7'
3
+ ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.0.3'
4
4
  end
@@ -354,12 +354,12 @@ describe "ey deploy" do
354
354
  end
355
355
  end
356
356
 
357
- context "--extra-deploy-hook-options" do
357
+ context "--config (--extra-deploy-hook-options)" do
358
358
  before(:all) do
359
359
  login_scenario "one app, one environment"
360
360
  end
361
361
 
362
- def extra_deploy_hook_options
362
+ def config_options
363
363
  if @ssh_commands.last =~ /--config (.*?)(?: -|$)/
364
364
  # the echo strips off the layer of shell escaping, leaving us
365
365
  # with pristine JSON
@@ -367,11 +367,18 @@ describe "ey deploy" do
367
367
  end
368
368
  end
369
369
 
370
- it "passes the extra configuration to engineyard-serverside" do
370
+ it "passes --config to engineyard-serverside" do
371
+ ey %w[deploy --config some:stuff more:crap --no-migrate]
372
+ config_options.should_not be_nil
373
+ config_options['some'].should == 'stuff'
374
+ config_options['more'].should == 'crap'
375
+ end
376
+
377
+ it "supports legacy --extra-deploy-hook-options" do
371
378
  ey %w[deploy --extra-deploy-hook-options some:stuff more:crap --no-migrate]
372
- extra_deploy_hook_options.should_not be_nil
373
- extra_deploy_hook_options['some'].should == 'stuff'
374
- extra_deploy_hook_options['more'].should == 'crap'
379
+ config_options.should_not be_nil
380
+ config_options['some'].should == 'stuff'
381
+ config_options['more'].should == 'crap'
375
382
  end
376
383
 
377
384
  context "when ey.yml is present" do
@@ -382,8 +389,8 @@ describe "ey deploy" do
382
389
  after { File.unlink("ey.yml") }
383
390
 
384
391
  it "overrides what's in ey.yml" do
385
- fast_ey %w[deploy --extra-deploy-hook-options beer:esb]
386
- extra_deploy_hook_options['beer'].should == 'esb'
392
+ fast_ey %w[deploy --config beer:esb]
393
+ config_options['beer'].should == 'esb'
387
394
  end
388
395
  end
389
396
  end
@@ -27,12 +27,12 @@ describe "ey rollback" do
27
27
  @ssh_commands.last.should =~ /--stack nginx_mongrel/
28
28
  end
29
29
 
30
- context "--extra-deploy-hook-options" do
30
+ context "--config (--extra-deploy-hook-options)" do
31
31
  before(:all) do
32
32
  login_scenario "one app, one environment"
33
33
  end
34
34
 
35
- def extra_deploy_hook_options
35
+ def config_options
36
36
  if @ssh_commands.last =~ /--config (.*?)(?: -|$)/
37
37
  # the echo strips off the layer of shell escaping, leaving us
38
38
  # with pristine JSON
@@ -40,11 +40,18 @@ describe "ey rollback" do
40
40
  end
41
41
  end
42
42
 
43
- it "passes the extra configuration to engineyard-serverside" do
43
+ it "passes --config to engineyard-serverside" do
44
+ ey %w[rollback --config some:stuff more:crap]
45
+ config_options.should_not be_nil
46
+ config_options['some'].should == 'stuff'
47
+ config_options['more'].should == 'crap'
48
+ end
49
+
50
+ it "supports legacy --extra-deploy-hook-options" do
44
51
  ey %w[rollback --extra-deploy-hook-options some:stuff more:crap]
45
- extra_deploy_hook_options.should_not be_nil
46
- extra_deploy_hook_options['some'].should == 'stuff'
47
- extra_deploy_hook_options['more'].should == 'crap'
52
+ config_options.should_not be_nil
53
+ config_options['some'].should == 'stuff'
54
+ config_options['more'].should == 'crap'
48
55
  end
49
56
 
50
57
  context "when ey.yml is present" do
@@ -55,8 +62,8 @@ describe "ey rollback" do
55
62
  after { File.unlink("ey.yml") }
56
63
 
57
64
  it "overrides what's in ey.yml" do
58
- ey %w[rollback --extra-deploy-hook-options beer:esb]
59
- extra_deploy_hook_options['beer'].should == 'esb'
65
+ ey %w[rollback --config beer:esb]
66
+ config_options['beer'].should == 'esb'
60
67
  end
61
68
  end
62
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-20 00:00:00.000000000 Z
12
+ date: 2012-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -408,7 +408,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
408
408
  version: '0'
409
409
  segments:
410
410
  - 0
411
- hash: -4411040277516355898
411
+ hash: 442224955877158192
412
412
  required_rubygems_version: !ruby/object:Gem::Requirement
413
413
  none: false
414
414
  requirements:
@@ -417,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
417
  version: '0'
418
418
  segments:
419
419
  - 0
420
- hash: -4411040277516355898
420
+ hash: 442224955877158192
421
421
  requirements: []
422
422
  rubyforge_project:
423
423
  rubygems_version: 1.8.24