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.
- data/lib/engineyard-serverside/deploy.rb +9 -3
- data/lib/engineyard-serverside/server.rb +10 -0
- data/lib/engineyard-serverside/version.rb +1 -1
- data/spec/deploy_hook_spec.rb +4 -4
- data/spec/ey_yml_customized_deploy_spec.rb +11 -0
- data/spec/fixtures/repos/assets_enabled_in_ey_yml/Gemfile +3 -0
- data/spec/fixtures/repos/assets_enabled_in_ey_yml/Gemfile.lock +10 -0
- data/spec/fixtures/repos/ey_yml/config/ey.yml +1 -0
- metadata +11 -7
@@ -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
|
-
|
154
|
-
|
155
|
-
|
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
|
data/spec/deploy_hook_spec.rb
CHANGED
@@ -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
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
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
|
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:
|
4
|
+
hash: 635318697
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
|
-
-
|
8
|
-
-
|
7
|
+
- 2
|
8
|
+
- 0
|
9
9
|
- 0
|
10
10
|
- pre
|
11
|
-
-
|
12
|
-
version:
|
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-
|
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.
|
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
|