engineyard-serverside 1.7.0.pre2 → 2.0.0.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.
@@ -150,9 +150,15 @@ To fix this problem, commit your Gemfile.lock to your repository and redeploy.
150
150
  end
151
151
 
152
152
  def disable_maintenance_page
153
- @maintenance_up = false
154
- roles :app_master, :app, :solo do
155
- run "rm -f #{c.maintenance_page_enabled_path}"
153
+ if c.enable_maintenance_page?
154
+ @maintenance_up = false
155
+ roles :app_master, :app, :solo do
156
+ run "rm -f #{c.maintenance_page_enabled_path}"
157
+ end
158
+ else
159
+ if File.exists?(c.maintenance_page_enabled_path)
160
+ shell.notice "[Attention] Maintenance page is still up. You must remove it manually."
161
+ end
156
162
  end
157
163
  end
158
164
 
@@ -102,6 +102,16 @@ module EY
102
102
  @known_hosts_file ||= Tempfile.new('ey-ss-known-hosts')
103
103
  end
104
104
 
105
+ # Make a known hosts tempfile to absorb host fingerprints so we don't show
106
+ #
107
+ # Warning: Permanently added 'xxx' (RSA) to the list of known hosts.
108
+ #
109
+ # for every ssh command.
110
+ # (even with StrictHostKeyChecking=no, the warning output is annoying)
111
+ def self.known_hosts_file
112
+ @known_hosts_file ||= Tempfile.new('ey-ss-known-hosts')
113
+ end
114
+
105
115
  def ssh_command
106
116
  "ssh -i #{ENV['HOME']}/.ssh/internal -o StrictHostKeyChecking=no -o UserKnownHostsFile=#{self.class.known_hosts_file.path} -o PasswordAuthentication=no "
107
117
  end
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module Serverside
3
- VERSION = '1.7.0.pre2'
3
+ VERSION = '2.0.0.pre1'
4
4
  end
5
5
  end
@@ -166,10 +166,10 @@ describe "deploy hooks" do
166
166
 
167
167
  context "environment variables" do
168
168
  it "sets the framework env variables" do
169
- run_hook('framework_env' => 'production') { ENV['RAILS_ENV'] }.should == 'production'
170
- run_hook('framework_env' => 'production') { ENV['RACK_ENV'] }.should == 'production'
171
- run_hook('framework_env' => 'production') { ENV['MERB_ENV'] }.should == 'production'
172
- run_hook('framework_env' => 'production') { ENV['NODE_ENV'] }.should == 'production'
169
+ deploy_hook('framework_env' => 'production').eval_hook("ENV['RAILS_ENV']").should == 'production'
170
+ deploy_hook('framework_env' => 'production').eval_hook("ENV['RACK_ENV'] ").should == 'production'
171
+ deploy_hook('framework_env' => 'production').eval_hook("ENV['MERB_ENV'] ").should == 'production'
172
+ deploy_hook('framework_env' => 'production').eval_hook("ENV['NODE_ENV'] ").should == 'production'
173
173
  end
174
174
  end
175
175
 
@@ -42,6 +42,17 @@ describe "Deploying an app with ey.yml" do
42
42
  @deploy_dir.join('current','maintenance_enabled').should_not exist
43
43
  end
44
44
 
45
+ it "does not remove an existing maintenance page" do
46
+ @deploy_dir.join('current','maintenance_disabled').delete
47
+ @deployer.enable_maintenance_page
48
+ @deploy_dir.join('shared','system','maintenance.html').should exist
49
+ redeploy_test_application
50
+ read_output.should =~ /Maintenance page is still up. You must remove it manually./
51
+ @deploy_dir.join('shared','system','maintenance.html').should exist
52
+ @deploy_dir.join('current','maintenance_disabled').should_not exist
53
+ @deploy_dir.join('current','maintenance_enabled').should exist
54
+ end
55
+
45
56
  it "makes custom variables available to hooks" do
46
57
  @deploy_dir.join('current', 'custom_hook').read.should include("custom_from_ey_yml")
47
58
  end
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gem 'rake'
@@ -0,0 +1,10 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ rake (0.9.2.2)
5
+
6
+ PLATFORMS
7
+ ruby
8
+
9
+ DEPENDENCIES
10
+ rake
@@ -9,4 +9,5 @@ environments:
9
9
  custom: custom_from_ey_yml
10
10
  bundle_without: only test
11
11
  maintenance_on_migrate: false
12
+ maintenance_on_restart: false
12
13
  ignore_database_adapter_warning: true
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard-serverside
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3325805217
4
+ hash: 635318697
5
5
  prerelease: 6
6
6
  segments:
7
- - 1
8
- - 7
7
+ - 2
8
+ - 0
9
9
  - 0
10
10
  - pre
11
- - 2
12
- version: 1.7.0.pre2
11
+ - 1
12
+ version: 2.0.0.pre1
13
13
  platform: ruby
14
14
  authors:
15
15
  - EY Cloud Team
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-05-18 00:00:00 Z
20
+ date: 2012-05-22 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rspec
@@ -381,6 +381,8 @@ files:
381
381
  - spec/fixtures/repos/assets_enabled/Rakefile
382
382
  - spec/fixtures/repos/assets_enabled/README
383
383
  - spec/fixtures/repos/assets_enabled_in_ey_yml/config/ey.yml
384
+ - spec/fixtures/repos/assets_enabled_in_ey_yml/Gemfile
385
+ - spec/fixtures/repos/assets_enabled_in_ey_yml/Gemfile.lock
384
386
  - spec/fixtures/repos/assets_enabled_in_ey_yml/Rakefile
385
387
  - spec/fixtures/repos/assets_enabled_in_ey_yml/README
386
388
  - spec/fixtures/repos/assets_in_hook/config/application.rb
@@ -469,7 +471,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
471
  requirements: []
470
472
 
471
473
  rubyforge_project:
472
- rubygems_version: 1.8.19
474
+ rubygems_version: 1.8.24
473
475
  signing_key:
474
476
  specification_version: 3
475
477
  summary: A gem that deploys ruby applications on EY Cloud instances
@@ -515,6 +517,8 @@ test_files:
515
517
  - spec/fixtures/repos/assets_enabled/Rakefile
516
518
  - spec/fixtures/repos/assets_enabled/README
517
519
  - spec/fixtures/repos/assets_enabled_in_ey_yml/config/ey.yml
520
+ - spec/fixtures/repos/assets_enabled_in_ey_yml/Gemfile
521
+ - spec/fixtures/repos/assets_enabled_in_ey_yml/Gemfile.lock
518
522
  - spec/fixtures/repos/assets_enabled_in_ey_yml/Rakefile
519
523
  - spec/fixtures/repos/assets_enabled_in_ey_yml/README
520
524
  - spec/fixtures/repos/assets_in_hook/config/application.rb