engineyard-serverside 1.4.16 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/engineyard-serverside/deploy.rb +74 -62
- data/lib/engineyard-serverside/deploy_hook.rb +8 -0
- data/lib/engineyard-serverside/lockfile_parser.rb +54 -97
- data/lib/engineyard-serverside/version.rb +1 -1
- data/spec/custom_deploy_spec.rb +1 -0
- data/spec/lockfile_parser_spec.rb +39 -20
- data/spec/support/integration.rb +1 -1
- data/spec/support/lockfiles/1.0.18-do_mysql +88 -0
- data/spec/support/lockfiles/1.0.18-do_postgres +79 -0
- data/spec/support/lockfiles/1.0.18-mysql +43 -0
- data/spec/support/lockfiles/1.0.18-mysql2 +43 -0
- data/spec/support/lockfiles/1.0.18-pg +43 -0
- data/spec/support/lockfiles/not-a-lockfile +1 -10
- metadata +18 -10
- data/spec/support/lockfiles/evil-yaml +0 -5
@@ -14,6 +14,7 @@ module EY
|
|
14
14
|
def deploy
|
15
15
|
debug "Starting deploy at #{Time.now.asctime}"
|
16
16
|
update_repository_cache
|
17
|
+
check_repository
|
17
18
|
cached_deploy
|
18
19
|
end
|
19
20
|
|
@@ -50,6 +51,16 @@ module EY
|
|
50
51
|
raise
|
51
52
|
end
|
52
53
|
|
54
|
+
def check_repository
|
55
|
+
if gemfile? && lockfile
|
56
|
+
unless lockfile.any_database_adapter?
|
57
|
+
info "!> WARNING: Gemfile.lock does not contain any recognized database adapter!"
|
58
|
+
info "!> We expected to find mysql2, mysql or other database adapter gem."
|
59
|
+
info "!> This could prevent booting of applications that use MySQL or Postgres."
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
53
64
|
def restart_with_maintenance_page
|
54
65
|
require_custom_tasks
|
55
66
|
conditionally_enable_maintenance_page
|
@@ -138,50 +149,8 @@ module EY
|
|
138
149
|
|
139
150
|
# task
|
140
151
|
def bundle
|
141
|
-
|
142
|
-
|
143
|
-
lockfile = File.join(c.release_path, "Gemfile.lock")
|
144
|
-
|
145
|
-
bundler_installer = if File.exist?(lockfile)
|
146
|
-
get_bundler_installer(lockfile)
|
147
|
-
else
|
148
|
-
warn_about_missing_lockfile
|
149
|
-
get_default_bundler_installer
|
150
|
-
end
|
151
|
-
|
152
|
-
sudo "#{clean_environment} #{serverside_bin} install_bundler #{bundler_installer.version}"
|
153
|
-
|
154
|
-
bundled_gems_path = File.join(c.shared_path, "bundled_gems")
|
155
|
-
ruby_version_file = File.join(bundled_gems_path, "RUBY_VERSION")
|
156
|
-
system_version_file = File.join(bundled_gems_path, "SYSTEM_VERSION")
|
157
|
-
ruby_version = `ruby -v`
|
158
|
-
system_version = `uname -m`
|
159
|
-
|
160
|
-
if File.directory?(bundled_gems_path)
|
161
|
-
rebundle = false
|
162
|
-
|
163
|
-
rebundle = true if File.exist?(ruby_version_file) && File.read(ruby_version_file) != ruby_version
|
164
|
-
rebundle = true if File.exist?(system_version_file) && File.read(system_version_file) != system_version
|
165
|
-
|
166
|
-
if rebundle
|
167
|
-
info "~> Ruby version change detected, cleaning bundled gems"
|
168
|
-
run "rm -Rf #{bundled_gems_path}"
|
169
|
-
end
|
170
|
-
end
|
171
|
-
|
172
|
-
run "cd #{c.release_path} && #{clean_environment} ruby -S bundle _#{bundler_installer.version}_ install #{bundler_installer.options}"
|
173
|
-
|
174
|
-
run "mkdir -p #{bundled_gems_path} && ruby -v > #{ruby_version_file} && uname -m > #{system_version_file}"
|
175
|
-
end
|
176
|
-
|
177
|
-
if File.exist?("#{c.release_path}/package.json")
|
178
|
-
unless run("which npm")
|
179
|
-
abort "*** [Error] package.json detected, but npm was not installed"
|
180
|
-
else
|
181
|
-
info "~> package.json detected, installing npm packages"
|
182
|
-
run "cd #{c.release_path} && npm install"
|
183
|
-
end
|
184
|
-
end
|
152
|
+
check_ruby_bundler
|
153
|
+
check_node_npm
|
185
154
|
end
|
186
155
|
|
187
156
|
# task
|
@@ -291,6 +260,10 @@ module EY
|
|
291
260
|
|
292
261
|
protected
|
293
262
|
|
263
|
+
def gemfile?
|
264
|
+
File.exist?("#{c.release_path}/Gemfile")
|
265
|
+
end
|
266
|
+
|
294
267
|
def base_callback_command_for(what)
|
295
268
|
[serverside_bin, 'hook', what.to_s,
|
296
269
|
'--app', config.app.to_s,
|
@@ -341,35 +314,31 @@ module EY
|
|
341
314
|
info "!> You can get different gems in production than what you tested with."
|
342
315
|
info "!> You can get different gems on every deployment even if your Gemfile hasn't changed."
|
343
316
|
info "!> Deploying may take a long time."
|
317
|
+
info "!> There is a slight, but very serious chance of a Zerg rush overtaking your base."
|
344
318
|
info "!>"
|
345
319
|
info "!> Fix this by running \"git add Gemfile.lock; git commit\" and deploying again."
|
346
|
-
info "!> If you don't have a Gemfile.lock, run \"bundle lock\" to create one."
|
347
320
|
info "!>"
|
348
321
|
info "!> This deployment will use bundler #{LockfileParser.default_version} to run 'bundle install'."
|
349
322
|
info "!>"
|
350
323
|
end
|
351
324
|
|
352
|
-
def get_bundler_installer
|
353
|
-
|
354
|
-
|
355
|
-
when :bundler09
|
356
|
-
bundler_09_installer(parser.bundler_version)
|
357
|
-
when :bundler10
|
358
|
-
bundler_10_installer(parser.bundler_version)
|
325
|
+
def get_bundler_installer
|
326
|
+
if lockfile
|
327
|
+
bundler_10_installer(lockfile.bundler_version)
|
359
328
|
else
|
360
|
-
|
329
|
+
warn_about_missing_lockfile
|
330
|
+
# deployment mode is not supported without a Gemfile.lock, so we turn that off.
|
331
|
+
bundler_10_installer(LockfileParser.default_version, deployment_mode = false)
|
361
332
|
end
|
362
333
|
end
|
363
|
-
public :get_bundler_installer
|
364
334
|
|
365
|
-
def
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
BundleInstaller.new(version, '--without=development --without=test')
|
335
|
+
def lockfile
|
336
|
+
lockfile_path = File.join(c.release_path, "Gemfile.lock")
|
337
|
+
if File.exist?(lockfile_path)
|
338
|
+
@lockfile_parser ||= LockfileParser.new(File.read(lockfile_path))
|
339
|
+
else
|
340
|
+
nil
|
341
|
+
end
|
373
342
|
end
|
374
343
|
|
375
344
|
# Set +deploymemt_mode+ to false to avoid passing the --deployment flag.
|
@@ -380,6 +349,49 @@ module EY
|
|
380
349
|
options.unshift('--deployment') if deployment_mode
|
381
350
|
BundleInstaller.new(version, options.join(' '))
|
382
351
|
end
|
352
|
+
|
353
|
+
def check_ruby_bundler
|
354
|
+
if gemfile?
|
355
|
+
info "~> Gemfile detected, bundling gems"
|
356
|
+
|
357
|
+
bundler_installer = get_bundler_installer
|
358
|
+
|
359
|
+
sudo "#{clean_environment} #{serverside_bin} install_bundler #{bundler_installer.version}"
|
360
|
+
|
361
|
+
bundled_gems_path = File.join(c.shared_path, "bundled_gems")
|
362
|
+
ruby_version_file = File.join(bundled_gems_path, "RUBY_VERSION")
|
363
|
+
system_version_file = File.join(bundled_gems_path, "SYSTEM_VERSION")
|
364
|
+
ruby_version = `ruby -v`
|
365
|
+
system_version = `uname -m`
|
366
|
+
|
367
|
+
if File.directory?(bundled_gems_path)
|
368
|
+
rebundle = false
|
369
|
+
|
370
|
+
rebundle = true if File.exist?(ruby_version_file) && File.read(ruby_version_file) != ruby_version
|
371
|
+
rebundle = true if File.exist?(system_version_file) && File.read(system_version_file) != system_version
|
372
|
+
|
373
|
+
if rebundle
|
374
|
+
info "~> Ruby version change detected, cleaning bundled gems"
|
375
|
+
run "rm -Rf #{bundled_gems_path}"
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
run "cd #{c.release_path} && #{clean_environment} ruby -S bundle _#{bundler_installer.version}_ install #{bundler_installer.options}"
|
380
|
+
|
381
|
+
run "mkdir -p #{bundled_gems_path} && ruby -v > #{ruby_version_file} && uname -m > #{system_version_file}"
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
def check_node_npm
|
386
|
+
if File.exist?("#{c.release_path}/package.json")
|
387
|
+
unless run("which npm")
|
388
|
+
abort "*** [Error] package.json detected, but npm was not installed"
|
389
|
+
else
|
390
|
+
info "~> package.json detected, installing npm packages"
|
391
|
+
run "cd #{c.release_path} && npm install"
|
392
|
+
end
|
393
|
+
end
|
394
|
+
end
|
383
395
|
end # DeployBase
|
384
396
|
|
385
397
|
class Deploy < DeployBase
|
@@ -55,6 +55,14 @@ module EY
|
|
55
55
|
system(Escape.shell_command(["sudo", "sh", "-l", "-c", cmd]))
|
56
56
|
end
|
57
57
|
|
58
|
+
def info(*args)
|
59
|
+
$stderr.puts *args
|
60
|
+
end
|
61
|
+
|
62
|
+
def debug(*args)
|
63
|
+
$stdout.puts *args
|
64
|
+
end
|
65
|
+
|
58
66
|
# convenience functions for running on certain instance types
|
59
67
|
def on_app_master(&blk) on_roles(%w[solo app_master], &blk) end
|
60
68
|
def on_app_servers(&blk) on_roles(%w[solo app_master app], &blk) end
|
@@ -2,129 +2,86 @@ require 'yaml'
|
|
2
2
|
module EY
|
3
3
|
module Serverside
|
4
4
|
class LockfileParser
|
5
|
+
DEFAULT = "1.0.10"
|
6
|
+
|
5
7
|
def self.default_version
|
6
|
-
|
8
|
+
DEFAULT
|
7
9
|
end
|
8
10
|
|
9
11
|
attr_reader :bundler_version, :lockfile_version
|
10
12
|
|
11
13
|
def initialize(lockfile_contents)
|
12
|
-
@
|
14
|
+
@contents = lockfile_contents
|
15
|
+
parse
|
13
16
|
end
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
@contents
|
18
|
-
end
|
19
|
-
def parse
|
20
|
-
raise "Unknown lockfile format #{@contents[0,50]}..."
|
18
|
+
def any_database_adapter?
|
19
|
+
%w[mysql2 mysql do_mysql pg do_postgres].any? do |gem|
|
20
|
+
@contents.index(/^\s+#{gem}\s\([^\)]+\)$/)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
def parse
|
25
|
+
parse_from_metadata ||
|
26
|
+
parse_from_dependencies ||
|
27
|
+
raise("Malformed or pre bundler-1.0.0 Gemfile.lock: #{@contents[0,50]}...")
|
28
|
+
end
|
26
29
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
# spec is a one-element hash: the key is the gem name, and
|
34
|
-
# the value is {"version" => the-version}.
|
35
|
-
if spec.keys.first == "bundler"
|
36
|
-
spec.values.first["version"]
|
37
|
-
end
|
38
|
-
end.compact.first
|
39
|
-
[:bundler09, bundler_version || DEFAULT]
|
40
|
-
end
|
41
|
-
def safe_yaml_load(loadable)
|
42
|
-
YAML.load(loadable) #won't always raise... soemtimes parses the contents as 1 big string
|
43
|
-
rescue ArgumentError, SyntaxError # not yaml
|
44
|
-
nil
|
30
|
+
def slice_section(header)
|
31
|
+
if start = @contents.index(/^#{header}/)
|
32
|
+
finish = @contents.index(/(^\S|\Z)/, start + header.length)
|
33
|
+
@contents.slice(start..finish)
|
34
|
+
else
|
35
|
+
""
|
45
36
|
end
|
46
37
|
end
|
47
38
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
def parse
|
52
|
-
unless @contents.index(/^DEPENDENCIES/)
|
53
|
-
return super
|
54
|
-
end
|
55
|
-
dep_section = ""
|
56
|
-
in_dependencies_section = false
|
57
|
-
@contents.each_line do |line|
|
58
|
-
if line =~ /^DEPENDENCIES/
|
59
|
-
in_dependencies_section = true
|
60
|
-
elsif line =~ /^\S/
|
61
|
-
in_dependencies_section = false
|
62
|
-
elsif in_dependencies_section
|
63
|
-
dep_section << line
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
unless dep_section.length > 0
|
68
|
-
raise "Couldn't parse #{@contents}; exiting"
|
69
|
-
exit(1)
|
70
|
-
end
|
39
|
+
def parse_from_metadata
|
40
|
+
section = slice_section('METADATA')
|
71
41
|
|
72
|
-
|
73
|
-
|
74
|
-
version_qualifier = result ? result.first : nil
|
75
|
-
[:bundler10, fetch_version(bundler_version, version_qualifier)]
|
42
|
+
if section.empty?
|
43
|
+
return nil
|
76
44
|
end
|
77
45
|
|
78
|
-
|
79
|
-
|
46
|
+
result = section.scan(/^\s*version:\s*(.*)$/).first
|
47
|
+
@lockfile_version = :bundler10
|
48
|
+
@bundler_version = result ? result.first : DEFAULT
|
49
|
+
end
|
80
50
|
|
81
|
-
|
82
|
-
|
83
|
-
bundler_version
|
84
|
-
when '>='
|
85
|
-
Gem::Version.new(bundler_version) > Gem::Version.new(DEFAULT) ? bundler_version : DEFAULT
|
86
|
-
when '~>'
|
87
|
-
bundler_gem_version = Gem::Version.new(bundler_version)
|
88
|
-
recommendation = bundler_gem_version.spermy_recommendation.gsub(/~>\s*(.+)$/, '\1.')
|
89
|
-
recommends_default = DEFAULT.index(recommendation) == 0
|
90
|
-
default_newer_than_requested = Gem::Version.new(DEFAULT) > bundler_gem_version
|
91
|
-
(recommends_default && default_newer_than_requested) ? DEFAULT : bundler_version
|
92
|
-
end
|
93
|
-
end
|
51
|
+
def parse_from_dependencies
|
52
|
+
section = slice_section('DEPENDENCIES')
|
94
53
|
|
95
|
-
|
96
|
-
|
54
|
+
if section.empty?
|
55
|
+
return nil
|
97
56
|
end
|
98
|
-
end
|
99
57
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
in_meta_section = false
|
107
|
-
@contents.each_line do |line|
|
108
|
-
if line =~ /^METADATA/
|
109
|
-
in_meta_section = true
|
110
|
-
elsif line =~ /^\S/
|
111
|
-
in_meta_section = false
|
112
|
-
elsif in_meta_section
|
113
|
-
meta_section << line
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
unless meta_section.length > 0
|
118
|
-
raise "Couldn't parse #{@contents}; exiting"
|
119
|
-
exit(1)
|
120
|
-
end
|
58
|
+
result = scan_bundler(section)
|
59
|
+
bundler_version = result ? result.last : nil
|
60
|
+
version_qualifier = result ? result.first : nil
|
61
|
+
@lockfile_version = :bundler10
|
62
|
+
@bundler_version = fetch_version(bundler_version, version_qualifier)
|
63
|
+
end
|
121
64
|
|
122
|
-
|
123
|
-
|
124
|
-
|
65
|
+
def fetch_version(bundler_version, version_qualifier)
|
66
|
+
return bundler_version || DEFAULT unless version_qualifier
|
67
|
+
|
68
|
+
case version_qualifier
|
69
|
+
when '='
|
70
|
+
bundler_version
|
71
|
+
when '>='
|
72
|
+
Gem::Version.new(bundler_version) > Gem::Version.new(DEFAULT) ? bundler_version : DEFAULT
|
73
|
+
when '~>'
|
74
|
+
bundler_gem_version = Gem::Version.new(bundler_version)
|
75
|
+
recommendation = bundler_gem_version.spermy_recommendation.gsub(/~>\s*(.+)$/, '\1.')
|
76
|
+
recommends_default = DEFAULT.index(recommendation) == 0
|
77
|
+
default_newer_than_requested = Gem::Version.new(DEFAULT) > bundler_gem_version
|
78
|
+
(recommends_default && default_newer_than_requested) ? DEFAULT : bundler_version
|
125
79
|
end
|
126
80
|
end
|
127
81
|
|
82
|
+
def scan_bundler(dep_section)
|
83
|
+
dep_section.scan(/^\s*bundler\s*\((>?=|~>)\s*([^,\)]+)/).first
|
84
|
+
end
|
128
85
|
end
|
129
86
|
end
|
130
87
|
end
|
data/spec/custom_deploy_spec.rb
CHANGED
@@ -6,6 +6,7 @@ describe "the EY::Serverside::Deploy API" do
|
|
6
6
|
# This happens before require_custom_tasks, so it's not
|
7
7
|
# overrideable. That's why it's not in @call_order.
|
8
8
|
def update_repository_cache() end
|
9
|
+
def check_repository() end
|
9
10
|
|
10
11
|
# cheat a bit; we don't actually want to do these things
|
11
12
|
def require_custom_tasks() end
|
@@ -1,59 +1,78 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "the bundler version retrieved from the lockfile" do
|
4
|
-
def
|
5
|
-
File.expand_path("../support/lockfiles/#{file}", __FILE__)
|
4
|
+
def load_lockfile(file)
|
5
|
+
File.read(File.expand_path("../support/lockfiles/#{file}", __FILE__))
|
6
6
|
end
|
7
|
-
|
8
|
-
|
9
|
-
EY::Serverside::
|
7
|
+
|
8
|
+
def get_parser(file)
|
9
|
+
EY::Serverside::LockfileParser.new(load_lockfile(file))
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
def get_version(file)
|
13
|
+
get_parser(file).bundler_version
|
14
14
|
end
|
15
15
|
|
16
|
-
it "
|
17
|
-
get_version('0.9-
|
16
|
+
it "raises an error with pre 0.9 bundler lockfiles" do
|
17
|
+
lambda { get_version('0.9-no-bundler') }.should raise_error(RuntimeError, /Malformed or pre bundler-1.0.0 Gemfile.lock/)
|
18
|
+
lambda { get_version('0.9-with-bundler') }.should raise_error(RuntimeError, /Malformed or pre bundler-1.0.0 Gemfile.lock/)
|
18
19
|
end
|
19
20
|
|
20
21
|
it "returns the default version for a 1.0 lockfile without a bundler dependency" do
|
21
|
-
get_version('1.0-no-bundler').should == EY::Serverside::LockfileParser::
|
22
|
+
get_version('1.0-no-bundler').should == EY::Serverside::LockfileParser::DEFAULT
|
22
23
|
end
|
23
24
|
|
24
25
|
it "gets the version from a 1.0.0.rc.1 lockfile w/dependency on 1.0.0.rc.1" do
|
25
|
-
# This is a real, customer-generated lockfile
|
26
26
|
get_version('1.0.0.rc.1-with-bundler').should == '1.0.0.rc.1'
|
27
27
|
end
|
28
28
|
|
29
29
|
it "gets the version from a 1.0.6 lockfile w/dependency on 1.0.6" do
|
30
|
-
# This is a real, customer-generated lockfile
|
31
30
|
get_version('1.0.6-with-bundler').should == '1.0.6'
|
32
31
|
end
|
33
32
|
|
34
33
|
it "gets the version from a 1.0.6 lockfile w/dependency on 1.0.6 (bundled ~> 1.0.0)" do
|
35
|
-
# This is a real, customer-generated lockfile
|
36
34
|
get_version('1.0.6-with-any-bundler').should == '1.0.6'
|
37
35
|
end
|
38
36
|
|
39
37
|
it "gets the version from a 1.0.6 lockfile w/o dependency" do
|
40
|
-
# This is a real, customer-generated lockfile
|
41
38
|
get_version('1.0.6-no-bundler').should == '1.0.6'
|
42
39
|
end
|
43
40
|
|
44
41
|
it "raises an error if it can't parse the file" do
|
45
|
-
lambda { get_version('not-a-lockfile') }.should raise_error(RuntimeError, /
|
42
|
+
lambda { get_version('not-a-lockfile') }.should raise_error(RuntimeError, /Malformed or pre bundler-1.0.0 Gemfile.lock/)
|
46
43
|
end
|
47
44
|
|
48
|
-
|
49
|
-
|
45
|
+
context "checking for gems in the dependencies" do
|
46
|
+
it "does not have any database adapters in a gemfile lock without them" do
|
47
|
+
get_parser('1.0.6-no-bundler').any_database_adapter?.should be_false
|
48
|
+
end
|
49
|
+
|
50
|
+
it "has a database adapter in a Gemfile.lock with do_mysql" do
|
51
|
+
get_parser('1.0.18-do_mysql').any_database_adapter?.should be_true
|
52
|
+
end
|
53
|
+
|
54
|
+
it "has a database adapter in a Gemfile.lock with mysql" do
|
55
|
+
get_parser('1.0.18-mysql').any_database_adapter?.should be_true
|
56
|
+
end
|
57
|
+
|
58
|
+
it "has a database adapter in a Gemfile.lock with mysql2" do
|
59
|
+
get_parser('1.0.18-mysql2').any_database_adapter?.should be_true
|
60
|
+
end
|
61
|
+
|
62
|
+
it "has a database adapter in a Gemfile.lock with pg" do
|
63
|
+
get_parser('1.0.18-pg').any_database_adapter?.should be_true
|
64
|
+
end
|
65
|
+
|
66
|
+
it "has a database adapter in a Gemfile.lock with do_postgres" do
|
67
|
+
get_parser('1.0.18-do_postgres').any_database_adapter?.should be_true
|
68
|
+
end
|
50
69
|
end
|
51
70
|
|
52
71
|
context "fetching the right version number" do
|
53
|
-
subject {
|
72
|
+
subject { get_parser('1.0.6-no-bundler') }
|
54
73
|
|
55
74
|
it "uses the default version when there is no bundler version" do
|
56
|
-
subject.fetch_version(nil, nil).should == EY::Serverside::LockfileParser::
|
75
|
+
subject.fetch_version(nil, nil).should == EY::Serverside::LockfileParser::DEFAULT
|
57
76
|
end
|
58
77
|
|
59
78
|
it "uses the given version when the qualifier is `='" do
|
@@ -73,7 +92,7 @@ describe "the bundler version retrieved from the lockfile" do
|
|
73
92
|
end
|
74
93
|
|
75
94
|
it "uses the default version when the given version is lower" do
|
76
|
-
subject.fetch_version('1.0.1', '>=').should == EY::Serverside::LockfileParser::
|
95
|
+
subject.fetch_version('1.0.1', '>=').should == EY::Serverside::LockfileParser::DEFAULT
|
77
96
|
end
|
78
97
|
|
79
98
|
it "selects only the first version expression" do
|
data/spec/support/integration.rb
CHANGED
@@ -0,0 +1,88 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.2.6)
|
5
|
+
bcrypt-ruby (2.1.4)
|
6
|
+
data_objects (0.10.6)
|
7
|
+
addressable (~> 2.1)
|
8
|
+
datamapper (1.1.0)
|
9
|
+
dm-aggregates (= 1.1.0)
|
10
|
+
dm-constraints (= 1.1.0)
|
11
|
+
dm-core (= 1.1.0)
|
12
|
+
dm-migrations (= 1.1.0)
|
13
|
+
dm-serializer (= 1.1.0)
|
14
|
+
dm-timestamps (= 1.1.0)
|
15
|
+
dm-transactions (= 1.1.0)
|
16
|
+
dm-types (= 1.1.0)
|
17
|
+
dm-validations (= 1.1.0)
|
18
|
+
diff-lcs (1.1.3)
|
19
|
+
dm-aggregates (1.1.0)
|
20
|
+
dm-core (~> 1.1.0)
|
21
|
+
dm-constraints (1.1.0)
|
22
|
+
dm-core (~> 1.1.0)
|
23
|
+
dm-core (1.1.0)
|
24
|
+
addressable (~> 2.2.4)
|
25
|
+
dm-do-adapter (1.1.0)
|
26
|
+
data_objects (~> 0.10.2)
|
27
|
+
dm-core (~> 1.1.0)
|
28
|
+
dm-migrations (1.1.0)
|
29
|
+
dm-core (~> 1.1.0)
|
30
|
+
dm-mysql-adapter (1.1.0)
|
31
|
+
dm-do-adapter (~> 1.1.0)
|
32
|
+
do_mysql (~> 0.10.2)
|
33
|
+
dm-serializer (1.1.0)
|
34
|
+
dm-core (~> 1.1.0)
|
35
|
+
fastercsv (~> 1.5.4)
|
36
|
+
json (~> 1.4.6)
|
37
|
+
dm-sqlite-adapter (1.1.0)
|
38
|
+
dm-do-adapter (~> 1.1.0)
|
39
|
+
do_sqlite3 (~> 0.10.2)
|
40
|
+
dm-timestamps (1.1.0)
|
41
|
+
dm-core (~> 1.1.0)
|
42
|
+
dm-transactions (1.1.0)
|
43
|
+
dm-core (~> 1.1.0)
|
44
|
+
dm-types (1.1.0)
|
45
|
+
bcrypt-ruby (~> 2.1.4)
|
46
|
+
dm-core (~> 1.1.0)
|
47
|
+
fastercsv (~> 1.5.4)
|
48
|
+
json (~> 1.4.6)
|
49
|
+
stringex (~> 1.2.0)
|
50
|
+
uuidtools (~> 2.1.2)
|
51
|
+
dm-validations (1.1.0)
|
52
|
+
dm-core (~> 1.1.0)
|
53
|
+
do_mysql (0.10.6)
|
54
|
+
data_objects (= 0.10.6)
|
55
|
+
do_sqlite3 (0.10.6)
|
56
|
+
data_objects (= 0.10.6)
|
57
|
+
fastercsv (1.5.4)
|
58
|
+
json (1.4.6)
|
59
|
+
rack (1.3.3)
|
60
|
+
rake (0.9.2)
|
61
|
+
rspec (2.6.0)
|
62
|
+
rspec-core (~> 2.6.0)
|
63
|
+
rspec-expectations (~> 2.6.0)
|
64
|
+
rspec-mocks (~> 2.6.0)
|
65
|
+
rspec-core (2.6.4)
|
66
|
+
rspec-expectations (2.6.0)
|
67
|
+
diff-lcs (~> 1.1.2)
|
68
|
+
rspec-mocks (2.6.0)
|
69
|
+
shotgun (0.9)
|
70
|
+
rack (>= 1.0)
|
71
|
+
sinatra (1.2.6)
|
72
|
+
rack (~> 1.1)
|
73
|
+
tilt (>= 1.2.2, < 2.0)
|
74
|
+
stringex (1.2.2)
|
75
|
+
tilt (1.3.3)
|
76
|
+
uuidtools (2.1.2)
|
77
|
+
|
78
|
+
PLATFORMS
|
79
|
+
ruby
|
80
|
+
|
81
|
+
DEPENDENCIES
|
82
|
+
datamapper (~> 1.1.0)
|
83
|
+
dm-mysql-adapter
|
84
|
+
dm-sqlite-adapter
|
85
|
+
rake
|
86
|
+
rspec (~> 2.0)
|
87
|
+
shotgun
|
88
|
+
sinatra
|
@@ -0,0 +1,79 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.2.6)
|
5
|
+
bcrypt-ruby (2.1.4)
|
6
|
+
data_objects (0.10.5)
|
7
|
+
addressable (~> 2.1)
|
8
|
+
datamapper (1.1.0)
|
9
|
+
dm-aggregates (= 1.1.0)
|
10
|
+
dm-constraints (= 1.1.0)
|
11
|
+
dm-core (= 1.1.0)
|
12
|
+
dm-migrations (= 1.1.0)
|
13
|
+
dm-serializer (= 1.1.0)
|
14
|
+
dm-timestamps (= 1.1.0)
|
15
|
+
dm-transactions (= 1.1.0)
|
16
|
+
dm-types (= 1.1.0)
|
17
|
+
dm-validations (= 1.1.0)
|
18
|
+
diff-lcs (1.1.3)
|
19
|
+
dm-aggregates (1.1.0)
|
20
|
+
dm-core (~> 1.1.0)
|
21
|
+
dm-constraints (1.1.0)
|
22
|
+
dm-core (~> 1.1.0)
|
23
|
+
dm-core (1.1.0)
|
24
|
+
addressable (~> 2.2.4)
|
25
|
+
dm-do-adapter (1.1.0)
|
26
|
+
data_objects (~> 0.10.2)
|
27
|
+
dm-core (~> 1.1.0)
|
28
|
+
dm-migrations (1.1.0)
|
29
|
+
dm-core (~> 1.1.0)
|
30
|
+
dm-postgres-adapter (1.1.0)
|
31
|
+
dm-do-adapter (~> 1.1.0)
|
32
|
+
do_postgres (~> 0.10.2)
|
33
|
+
dm-serializer (1.1.0)
|
34
|
+
dm-core (~> 1.1.0)
|
35
|
+
fastercsv (~> 1.5.4)
|
36
|
+
json (~> 1.4.6)
|
37
|
+
dm-timestamps (1.1.0)
|
38
|
+
dm-core (~> 1.1.0)
|
39
|
+
dm-transactions (1.1.0)
|
40
|
+
dm-core (~> 1.1.0)
|
41
|
+
dm-types (1.1.0)
|
42
|
+
bcrypt-ruby (~> 2.1.4)
|
43
|
+
dm-core (~> 1.1.0)
|
44
|
+
fastercsv (~> 1.5.4)
|
45
|
+
json (~> 1.4.6)
|
46
|
+
stringex (~> 1.2.0)
|
47
|
+
uuidtools (~> 2.1.2)
|
48
|
+
dm-validations (1.1.0)
|
49
|
+
dm-core (~> 1.1.0)
|
50
|
+
do_postgres (0.10.5)
|
51
|
+
data_objects (= 0.10.5)
|
52
|
+
fastercsv (1.5.4)
|
53
|
+
json (1.4.6)
|
54
|
+
rack (1.3.3)
|
55
|
+
rake (0.9.2)
|
56
|
+
rspec (2.6.0)
|
57
|
+
rspec-core (~> 2.6.0)
|
58
|
+
rspec-expectations (~> 2.6.0)
|
59
|
+
rspec-mocks (~> 2.6.0)
|
60
|
+
rspec-core (2.6.4)
|
61
|
+
rspec-expectations (2.6.0)
|
62
|
+
diff-lcs (~> 1.1.2)
|
63
|
+
rspec-mocks (2.6.0)
|
64
|
+
sinatra (1.2.6)
|
65
|
+
rack (~> 1.1)
|
66
|
+
tilt (>= 1.2.2, < 2.0)
|
67
|
+
stringex (1.2.2)
|
68
|
+
tilt (1.3.3)
|
69
|
+
uuidtools (2.1.2)
|
70
|
+
|
71
|
+
PLATFORMS
|
72
|
+
ruby
|
73
|
+
|
74
|
+
DEPENDENCIES
|
75
|
+
datamapper (>= 1.1)
|
76
|
+
dm-postgres-adapter
|
77
|
+
rake
|
78
|
+
rspec (~> 2.0)
|
79
|
+
sinatra
|
@@ -0,0 +1,43 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (3.0.7)
|
5
|
+
activesupport (= 3.0.7)
|
6
|
+
builder (~> 2.1.2)
|
7
|
+
i18n (~> 0.5.0)
|
8
|
+
activerecord (3.0.7)
|
9
|
+
activemodel (= 3.0.7)
|
10
|
+
activesupport (= 3.0.7)
|
11
|
+
arel (~> 2.0.2)
|
12
|
+
tzinfo (~> 0.3.23)
|
13
|
+
activesupport (3.0.7)
|
14
|
+
arel (2.0.9)
|
15
|
+
builder (2.1.2)
|
16
|
+
diff-lcs (1.1.3)
|
17
|
+
i18n (0.5.0)
|
18
|
+
mysql (2.8.1)
|
19
|
+
rack (1.3.3)
|
20
|
+
rake (0.9.2)
|
21
|
+
rspec (2.6.0)
|
22
|
+
rspec-core (~> 2.6.0)
|
23
|
+
rspec-expectations (~> 2.6.0)
|
24
|
+
rspec-mocks (~> 2.6.0)
|
25
|
+
rspec-core (2.6.4)
|
26
|
+
rspec-expectations (2.6.0)
|
27
|
+
diff-lcs (~> 1.1.2)
|
28
|
+
rspec-mocks (2.6.0)
|
29
|
+
sinatra (1.2.6)
|
30
|
+
rack (~> 1.1)
|
31
|
+
tilt (>= 1.2.2, < 2.0)
|
32
|
+
tilt (1.3.3)
|
33
|
+
tzinfo (0.3.28)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
activerecord (>= 3.0)
|
40
|
+
mysql
|
41
|
+
rake
|
42
|
+
rspec (~> 2.0)
|
43
|
+
sinatra
|
@@ -0,0 +1,43 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (3.0.7)
|
5
|
+
activesupport (= 3.0.7)
|
6
|
+
builder (~> 2.1.2)
|
7
|
+
i18n (~> 0.5.0)
|
8
|
+
activerecord (3.0.7)
|
9
|
+
activemodel (= 3.0.7)
|
10
|
+
activesupport (= 3.0.7)
|
11
|
+
arel (~> 2.0.2)
|
12
|
+
tzinfo (~> 0.3.23)
|
13
|
+
activesupport (3.0.7)
|
14
|
+
arel (2.0.9)
|
15
|
+
builder (2.1.2)
|
16
|
+
diff-lcs (1.1.3)
|
17
|
+
i18n (0.5.0)
|
18
|
+
mysql2 (0.2.7)
|
19
|
+
rack (1.3.3)
|
20
|
+
rake (0.9.2)
|
21
|
+
rspec (2.6.0)
|
22
|
+
rspec-core (~> 2.6.0)
|
23
|
+
rspec-expectations (~> 2.6.0)
|
24
|
+
rspec-mocks (~> 2.6.0)
|
25
|
+
rspec-core (2.6.4)
|
26
|
+
rspec-expectations (2.6.0)
|
27
|
+
diff-lcs (~> 1.1.2)
|
28
|
+
rspec-mocks (2.6.0)
|
29
|
+
sinatra (1.2.6)
|
30
|
+
rack (~> 1.1)
|
31
|
+
tilt (>= 1.2.2, < 2.0)
|
32
|
+
tilt (1.3.3)
|
33
|
+
tzinfo (0.3.28)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
activerecord (>= 3.0)
|
40
|
+
mysql2
|
41
|
+
rake
|
42
|
+
rspec (~> 2.0)
|
43
|
+
sinatra
|
@@ -0,0 +1,43 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (3.0.7)
|
5
|
+
activesupport (= 3.0.7)
|
6
|
+
builder (~> 2.1.2)
|
7
|
+
i18n (~> 0.5.0)
|
8
|
+
activerecord (3.0.7)
|
9
|
+
activemodel (= 3.0.7)
|
10
|
+
activesupport (= 3.0.7)
|
11
|
+
arel (~> 2.0.2)
|
12
|
+
tzinfo (~> 0.3.23)
|
13
|
+
activesupport (3.0.7)
|
14
|
+
arel (2.0.9)
|
15
|
+
builder (2.1.2)
|
16
|
+
diff-lcs (1.1.3)
|
17
|
+
i18n (0.5.0)
|
18
|
+
pg (0.11.0)
|
19
|
+
rack (1.3.3)
|
20
|
+
rake (0.9.2)
|
21
|
+
rspec (2.6.0)
|
22
|
+
rspec-core (~> 2.6.0)
|
23
|
+
rspec-expectations (~> 2.6.0)
|
24
|
+
rspec-mocks (~> 2.6.0)
|
25
|
+
rspec-core (2.6.4)
|
26
|
+
rspec-expectations (2.6.0)
|
27
|
+
diff-lcs (~> 1.1.2)
|
28
|
+
rspec-mocks (2.6.0)
|
29
|
+
sinatra (1.2.6)
|
30
|
+
rack (~> 1.1)
|
31
|
+
tilt (>= 1.2.2, < 2.0)
|
32
|
+
tilt (1.3.3)
|
33
|
+
tzinfo (0.3.28)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
activerecord (>= 3.0)
|
40
|
+
pg
|
41
|
+
rake
|
42
|
+
rspec (~> 2.0)
|
43
|
+
sinatra
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
Spec::Rake::SpecTask.new(:spec) do |spec|
|
3
|
-
spec.libs << 'lib' << 'spec'
|
4
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
5
|
-
end
|
6
|
-
task :default => :spec
|
7
|
-
|
8
|
-
require 'rake/rdoctask'
|
9
|
-
|
10
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
1
|
+
THIS IS NOT A LOCKFILE
|
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
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 1.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -15,13 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-06 00:00:00 -07:00
|
19
19
|
default_executable: engineyard-serverside
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
22
23
|
prerelease: false
|
23
24
|
type: :development
|
24
|
-
name: rspec
|
25
25
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
@@ -35,9 +35,9 @@ dependencies:
|
|
35
35
|
version: 1.3.2
|
36
36
|
requirement: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
+
name: rake
|
38
39
|
prerelease: false
|
39
40
|
type: :development
|
40
|
-
name: rake
|
41
41
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
@@ -285,10 +285,14 @@ files:
|
|
285
285
|
- spec/support/lockfiles/0.9-with-bundler
|
286
286
|
- spec/support/lockfiles/1.0-no-bundler
|
287
287
|
- spec/support/lockfiles/1.0.0.rc.1-with-bundler
|
288
|
+
- spec/support/lockfiles/1.0.18-do_mysql
|
289
|
+
- spec/support/lockfiles/1.0.18-do_postgres
|
290
|
+
- spec/support/lockfiles/1.0.18-mysql
|
291
|
+
- spec/support/lockfiles/1.0.18-mysql2
|
292
|
+
- spec/support/lockfiles/1.0.18-pg
|
288
293
|
- spec/support/lockfiles/1.0.6-no-bundler
|
289
294
|
- spec/support/lockfiles/1.0.6-with-any-bundler
|
290
295
|
- spec/support/lockfiles/1.0.6-with-bundler
|
291
|
-
- spec/support/lockfiles/evil-yaml
|
292
296
|
- spec/support/lockfiles/not-a-lockfile
|
293
297
|
has_rdoc: true
|
294
298
|
homepage: http://github.com/engineyard/engineyard-serverside
|
@@ -320,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
324
|
requirements: []
|
321
325
|
|
322
326
|
rubyforge_project:
|
323
|
-
rubygems_version: 1.5.
|
327
|
+
rubygems_version: 1.5.0
|
324
328
|
signing_key:
|
325
329
|
specification_version: 3
|
326
330
|
summary: A gem that deploys ruby applications on EY Cloud instances
|
@@ -346,8 +350,12 @@ test_files:
|
|
346
350
|
- spec/support/lockfiles/0.9-with-bundler
|
347
351
|
- spec/support/lockfiles/1.0-no-bundler
|
348
352
|
- spec/support/lockfiles/1.0.0.rc.1-with-bundler
|
353
|
+
- spec/support/lockfiles/1.0.18-do_mysql
|
354
|
+
- spec/support/lockfiles/1.0.18-do_postgres
|
355
|
+
- spec/support/lockfiles/1.0.18-mysql
|
356
|
+
- spec/support/lockfiles/1.0.18-mysql2
|
357
|
+
- spec/support/lockfiles/1.0.18-pg
|
349
358
|
- spec/support/lockfiles/1.0.6-no-bundler
|
350
359
|
- spec/support/lockfiles/1.0.6-with-any-bundler
|
351
360
|
- spec/support/lockfiles/1.0.6-with-bundler
|
352
|
-
- spec/support/lockfiles/evil-yaml
|
353
361
|
- spec/support/lockfiles/not-a-lockfile
|