engineyard 2.1.3 → 2.2.0.rc1

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.
@@ -324,7 +324,7 @@ WARNING: Interrupting again may prevent Engine Yard Cloud from recording this
324
324
 
325
325
  runner = serverside_runner(app_env, deploy_config.verbose)
326
326
  runner.rollback do |args|
327
- args.config = deploy_config.extra_config if deploy_config.extra_config
327
+ args.config = {'deployed_by' => api.current_user.name, 'input_ref' => 'N/A'}.merge(deploy_config.extra_config || {})
328
328
  end
329
329
 
330
330
  if runner.call(ui.out, ui.err)
@@ -11,7 +11,13 @@ module EY
11
11
 
12
12
  def initialize(file = nil)
13
13
  @path = file ? Pathname.new(file) : CONFIG_FILES.find{|pathname| pathname.exist? }
14
- @config = (@path ? YAML.load_file(@path.to_s) : {}) || {} # load_file returns `false' when the file is empty
14
+ @config = @path ? YAML.load_file(@path.to_s) : {}
15
+ @config ||= {} # load_file returns `false' when the file is empty
16
+
17
+ unless Hash === @config
18
+ raise "ey.yml load error: Expected a Hash but a #{@config.class.name} was returned."
19
+ end
20
+
15
21
  @config["environments"] ||= {}
16
22
  end
17
23
 
@@ -1,4 +1,4 @@
1
1
  module EY
2
- VERSION = '2.1.3'
3
- ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.1.4'
2
+ VERSION = '2.2.0.rc1'
3
+ ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.2.0.rc2'
4
4
  end
@@ -14,6 +14,11 @@ describe EY::Config do
14
14
  write_yaml({}, 'ey.yml')
15
15
  EY::Config.new.environments.should == {}
16
16
  end
17
+
18
+ it "rases an error when yaml produces an unexpected result" do
19
+ File.open('ey.yml', "w") {|f| f << "this isn't a hash" }
20
+ expect { EY::Config.new }.to raise_error(RuntimeError, "ey.yml load error: Expected a Hash but a String was returned.")
21
+ end
17
22
  end
18
23
 
19
24
  describe "endpoint" do
@@ -45,6 +45,8 @@ describe "ey rollback" do
45
45
  config_options.should_not be_nil
46
46
  config_options['some'].should == 'stuff'
47
47
  config_options['more'].should == 'crap'
48
+ config_options['input_ref'].should_not be_nil
49
+ config_options['deployed_by'].should_not be_nil
48
50
  end
49
51
 
50
52
  it "supports legacy --extra-deploy-hook-options" do
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
5
- prerelease:
4
+ version: 2.2.0.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Engine Yard Cloud Team
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-17 00:00:00.000000000 Z
12
+ date: 2013-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -424,18 +424,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
424
424
  - - ! '>='
425
425
  - !ruby/object:Gem::Version
426
426
  version: '0'
427
- segments:
428
- - 0
429
- hash: -4308353544926307178
430
427
  required_rubygems_version: !ruby/object:Gem::Requirement
431
428
  none: false
432
429
  requirements:
433
- - - ! '>='
430
+ - - ! '>'
434
431
  - !ruby/object:Gem::Version
435
- version: '0'
436
- segments:
437
- - 0
438
- hash: -4308353544926307178
432
+ version: 1.3.1
439
433
  requirements: []
440
434
  rubyforge_project:
441
435
  rubygems_version: 1.8.25