engineyard-serverside 1.5.13 → 1.5.15
Sign up to get free protection for your applications and to get access to all the features.
@@ -147,10 +147,18 @@ module EY
|
|
147
147
|
File.join(bundled_gems_path, "RUBY_VERSION")
|
148
148
|
end
|
149
149
|
|
150
|
+
def ruby_version_command
|
151
|
+
"ruby -v"
|
152
|
+
end
|
153
|
+
|
150
154
|
def system_version_file
|
151
155
|
File.join(bundled_gems_path, "SYSTEM_VERSION")
|
152
156
|
end
|
153
157
|
|
158
|
+
def system_version_command
|
159
|
+
"uname -m"
|
160
|
+
end
|
161
|
+
|
154
162
|
def release_dir
|
155
163
|
File.join(deploy_to, "releases")
|
156
164
|
end
|
@@ -419,29 +419,31 @@ Deploy again if your services configuration appears incomplete or out of date.
|
|
419
419
|
if gemfile?
|
420
420
|
info "~> Bundling gems..."
|
421
421
|
|
422
|
-
|
422
|
+
clean_bundle_on_system_version_change
|
423
423
|
|
424
|
+
bundler_version, install_switches = bundler_config
|
424
425
|
sudo "#{clean_environment} && #{serverside_bin} install_bundler #{bundler_version}"
|
426
|
+
run "#{clean_environment} && cd #{c.release_path} && ruby -S bundle _#{bundler_version}_ install #{install_switches}"
|
425
427
|
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
if File.directory?(c.bundled_gems_path)
|
430
|
-
rebundle = false
|
428
|
+
write_system_version
|
429
|
+
end
|
430
|
+
end
|
431
431
|
|
432
|
-
|
433
|
-
|
432
|
+
def clean_bundle_on_system_version_change
|
433
|
+
# diff exits with 0 for same and 1/2 for different/file not found.
|
434
|
+
check_ruby = "#{c.ruby_version_command} | diff - #{c.ruby_version_file} >/dev/null 2>&1"
|
435
|
+
check_system = "#{c.system_version_command} | diff - #{c.system_version_file} >/dev/null 2>&1"
|
436
|
+
say_cleaning = "echo 'System version change detected, cleaning bundled gems.'"
|
437
|
+
clean_bundle = "rm -Rf #{c.bundled_gems_path}"
|
434
438
|
|
435
|
-
|
436
|
-
|
437
|
-
run "rm -Rf #{c.bundled_gems_path}"
|
438
|
-
end
|
439
|
-
end
|
439
|
+
run "#{check_ruby} && #{check_system} || #{say_cleaning} && #{clean_bundle}"
|
440
|
+
end
|
440
441
|
|
441
|
-
|
442
|
+
def write_system_version
|
443
|
+
store_ruby_version = "#{c.ruby_version_command} > #{c.ruby_version_file}"
|
444
|
+
store_system_version = "#{c.system_version_command} > #{c.system_version_file}"
|
442
445
|
|
443
|
-
|
444
|
-
end
|
446
|
+
run "mkdir -p #{c.bundled_gems_path} && #{store_ruby_version} && #{store_system_version}"
|
445
447
|
end
|
446
448
|
|
447
449
|
def check_node_npm
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-serverside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 5
|
9
|
-
-
|
10
|
-
|
8
|
+
- 15
|
9
|
+
segments_generated: true
|
10
|
+
version: 1.5.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -15,38 +15,37 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-11-
|
18
|
+
date: 2011-11-10 00:00:00 -08:00
|
19
|
+
default_executable: engineyard-serverside
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
-
none: false
|
23
23
|
requirements:
|
24
24
|
- - "="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
hash: 31
|
27
26
|
segments:
|
28
27
|
- 1
|
29
28
|
- 3
|
30
29
|
- 2
|
30
|
+
segments_generated: true
|
31
31
|
version: 1.3.2
|
32
32
|
requirement: *id001
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
33
|
name: rspec
|
34
|
+
prerelease: false
|
35
|
+
type: :development
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
|
-
none: false
|
39
38
|
requirements:
|
40
39
|
- - ">="
|
41
40
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 3
|
43
41
|
segments:
|
44
42
|
- 0
|
43
|
+
segments_generated: true
|
45
44
|
version: "0"
|
46
45
|
requirement: *id002
|
47
|
-
type: :development
|
48
|
-
prerelease: false
|
49
46
|
name: rake
|
47
|
+
prerelease: false
|
48
|
+
type: :development
|
50
49
|
description:
|
51
50
|
email: cloud@engineyard.com
|
52
51
|
executables:
|
@@ -262,38 +261,7 @@ files:
|
|
262
261
|
- lib/vendor/thor/thor.gemspec
|
263
262
|
- lib/vendor/thor/Thorfile
|
264
263
|
- LICENSE
|
265
|
-
|
266
|
-
- spec/bundler_deploy_spec.rb
|
267
|
-
- spec/custom_deploy_spec.rb
|
268
|
-
- spec/deploy_hook_spec.rb
|
269
|
-
- spec/deprecation_spec.rb
|
270
|
-
- spec/fixtures/gitrepo/bar
|
271
|
-
- spec/fixtures/gitrepo/foo
|
272
|
-
- spec/fixtures/gitrepo.tar.gz
|
273
|
-
- spec/fixtures/invalid_hook.rb
|
274
|
-
- spec/fixtures/lockfiles/0.9-no-bundler
|
275
|
-
- spec/fixtures/lockfiles/0.9-with-bundler
|
276
|
-
- spec/fixtures/lockfiles/1.0-no-bundler
|
277
|
-
- spec/fixtures/lockfiles/1.0.0.rc.1-with-bundler
|
278
|
-
- spec/fixtures/lockfiles/1.0.18-do_mysql
|
279
|
-
- spec/fixtures/lockfiles/1.0.18-do_postgres
|
280
|
-
- spec/fixtures/lockfiles/1.0.18-mysql
|
281
|
-
- spec/fixtures/lockfiles/1.0.18-mysql2
|
282
|
-
- spec/fixtures/lockfiles/1.0.18-pg
|
283
|
-
- spec/fixtures/lockfiles/1.0.6-no-bundler
|
284
|
-
- spec/fixtures/lockfiles/1.0.6-with-any-bundler
|
285
|
-
- spec/fixtures/lockfiles/1.0.6-with-bundler
|
286
|
-
- spec/fixtures/lockfiles/not-a-lockfile
|
287
|
-
- spec/fixtures/valid_hook.rb
|
288
|
-
- spec/git_strategy_spec.rb
|
289
|
-
- spec/lockfile_parser_spec.rb
|
290
|
-
- spec/nodejs_deploy_spec.rb
|
291
|
-
- spec/rails31_deploy_spec.rb
|
292
|
-
- spec/restart_spec.rb
|
293
|
-
- spec/server_spec.rb
|
294
|
-
- spec/services_deploy_spec.rb
|
295
|
-
- spec/spec_helper.rb
|
296
|
-
- spec/support/integration.rb
|
264
|
+
has_rdoc: true
|
297
265
|
homepage: http://github.com/engineyard/engineyard-serverside
|
298
266
|
licenses: []
|
299
267
|
|
@@ -303,27 +271,25 @@ rdoc_options: []
|
|
303
271
|
require_paths:
|
304
272
|
- lib
|
305
273
|
required_ruby_version: !ruby/object:Gem::Requirement
|
306
|
-
none: false
|
307
274
|
requirements:
|
308
275
|
- - ">="
|
309
276
|
- !ruby/object:Gem::Version
|
310
|
-
hash: 3
|
311
277
|
segments:
|
312
278
|
- 0
|
279
|
+
segments_generated: true
|
313
280
|
version: "0"
|
314
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
315
|
-
none: false
|
316
282
|
requirements:
|
317
283
|
- - ">="
|
318
284
|
- !ruby/object:Gem::Version
|
319
|
-
hash: 3
|
320
285
|
segments:
|
321
286
|
- 0
|
287
|
+
segments_generated: true
|
322
288
|
version: "0"
|
323
289
|
requirements: []
|
324
290
|
|
325
291
|
rubyforge_project:
|
326
|
-
rubygems_version: 1.
|
292
|
+
rubygems_version: 1.3.6
|
327
293
|
signing_key:
|
328
294
|
specification_version: 3
|
329
295
|
summary: A gem that deploys ruby applications on EY Cloud instances
|
@@ -333,7 +299,6 @@ test_files:
|
|
333
299
|
- spec/custom_deploy_spec.rb
|
334
300
|
- spec/deploy_hook_spec.rb
|
335
301
|
- spec/deprecation_spec.rb
|
336
|
-
- spec/fixtures/gitrepo/bar
|
337
302
|
- spec/fixtures/gitrepo/foo
|
338
303
|
- spec/fixtures/gitrepo.tar.gz
|
339
304
|
- spec/fixtures/invalid_hook.rb
|
data/spec/fixtures/gitrepo/bar
DELETED
File without changes
|