ey-deploy 1.0.2 → 1.1.0
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/ey-deploy.rb +1 -0
- data/lib/ey-deploy/bundle_installer.rb +4 -0
- data/lib/ey-deploy/deploy.rb +18 -14
- data/lib/ey-deploy/version.rb +1 -1
- data/spec/lockfile_parser_spec.rb +2 -1
- metadata +4 -5
- data/spec/fixtures/gitrepo/bar +0 -0
data/lib/ey-deploy.rb
CHANGED
data/lib/ey-deploy/deploy.rb
CHANGED
@@ -122,16 +122,16 @@ module EY
|
|
122
122
|
info "~> Gemfile detected, bundling gems"
|
123
123
|
lockfile = File.join(c.release_path, "Gemfile.lock")
|
124
124
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
125
|
+
bundler_installer = if File.exist?(lockfile)
|
126
|
+
get_bundler_installer(lockfile)
|
127
|
+
else
|
128
|
+
warn_about_missing_lockfile
|
129
|
+
DEFAULT_09_BUNDLER
|
130
|
+
end
|
131
131
|
|
132
|
-
sudo "#{$0} _#{VERSION}_ install_bundler #{
|
132
|
+
sudo "#{$0} _#{VERSION}_ install_bundler #{bundler_installer.version}"
|
133
133
|
|
134
|
-
run "cd #{c.release_path} && bundle _#{
|
134
|
+
run "cd #{c.release_path} && bundle _#{bundler_installer.version}_ install #{bundler_installer.options}"
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
@@ -269,7 +269,7 @@ module EY
|
|
269
269
|
end
|
270
270
|
|
271
271
|
DEFAULT_09_BUNDLER = '0.9.26'
|
272
|
-
DEFAULT_10_BUNDLER = '1.0.0.rc.
|
272
|
+
DEFAULT_10_BUNDLER = '1.0.0.rc.3'
|
273
273
|
|
274
274
|
def warn_about_missing_lockfile
|
275
275
|
info "!>"
|
@@ -285,19 +285,23 @@ module EY
|
|
285
285
|
info "!>"
|
286
286
|
end
|
287
287
|
|
288
|
-
def
|
288
|
+
def get_bundler_installer(lockfile)
|
289
289
|
parser = LockfileParser.new(File.read(lockfile))
|
290
|
-
return parser.bundler_version if parser.bundler_version
|
291
290
|
case parser.lockfile_version
|
292
291
|
when :bundler09
|
293
|
-
|
292
|
+
BundleInstaller.new(
|
293
|
+
parser.bundler_version || DEFAULT_09_BUNDLER,
|
294
|
+
"--without=development --without=test")
|
294
295
|
when :bundler10
|
295
|
-
|
296
|
+
BundleInstaller.new(
|
297
|
+
parser.bundler_version || DEFAULT_10_BUNDLER,
|
298
|
+
"--deployment --path #{c.shared_path}/bundled_gems"
|
299
|
+
)
|
296
300
|
else
|
297
301
|
raise "Unknown lockfile version #{parser.lockfile_version}"
|
298
302
|
end
|
299
303
|
end
|
300
|
-
public :
|
304
|
+
public :get_bundler_installer
|
301
305
|
|
302
306
|
end # DeployBase
|
303
307
|
|
data/lib/ey-deploy/version.rb
CHANGED
@@ -3,7 +3,8 @@ require File.dirname(__FILE__) + '/spec_helper'
|
|
3
3
|
describe "the bundler version retrieved from the lockfile" do
|
4
4
|
def get_version(file)
|
5
5
|
full_path = File.expand_path("../support/lockfiles/#{file}", __FILE__)
|
6
|
-
EY::
|
6
|
+
config = EY::Deploy::Configuration.new('deploy_to' => 'dontcare')
|
7
|
+
EY::DeployBase.new(config).get_bundler_installer(full_path).version
|
7
8
|
end
|
8
9
|
|
9
10
|
it "returns the default version for an 0.9 lockfile without a bundler dependency" do
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.2
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-08-04 00:00:00 -07:00
|
19
19
|
default_executable: ey-deploy
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -29,6 +29,7 @@ extra_rdoc_files: []
|
|
29
29
|
|
30
30
|
files:
|
31
31
|
- bin/ey-deploy
|
32
|
+
- lib/ey-deploy/bundle_installer.rb
|
32
33
|
- lib/ey-deploy/cli.rb
|
33
34
|
- lib/ey-deploy/configuration.rb
|
34
35
|
- lib/ey-deploy/default_maintenance_page.html
|
@@ -234,7 +235,6 @@ files:
|
|
234
235
|
- LICENSE
|
235
236
|
- spec/custom_deploy_spec.rb
|
236
237
|
- spec/deploy_hook_spec.rb
|
237
|
-
- spec/fixtures/gitrepo/bar
|
238
238
|
- spec/fixtures/gitrepo/foo
|
239
239
|
- spec/fixtures/gitrepo.tar.gz
|
240
240
|
- spec/fixtures/invalid_hook.rb
|
@@ -284,7 +284,6 @@ summary: A gem that deploys ruby applications on EY Cloud instances
|
|
284
284
|
test_files:
|
285
285
|
- spec/custom_deploy_spec.rb
|
286
286
|
- spec/deploy_hook_spec.rb
|
287
|
-
- spec/fixtures/gitrepo/bar
|
288
287
|
- spec/fixtures/gitrepo/foo
|
289
288
|
- spec/fixtures/gitrepo.tar.gz
|
290
289
|
- spec/fixtures/invalid_hook.rb
|
data/spec/fixtures/gitrepo/bar
DELETED
File without changes
|