bundler 1.0.18 → 1.0.19.rc
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- data/.travis.yml +32 -0
- data/CHANGELOG.md +18 -3
- data/Rakefile +25 -2
- data/UPGRADING.md +2 -2
- data/lib/bundler.rb +4 -3
- data/lib/bundler/cli.rb +1 -1
- data/lib/bundler/definition.rb +4 -4
- data/lib/bundler/deployment.rb +8 -3
- data/lib/bundler/gem_installer.rb +9 -0
- data/lib/bundler/installer.rb +25 -15
- data/lib/bundler/resolver.rb +4 -4
- data/lib/bundler/rubygems_integration.rb +8 -3
- data/lib/bundler/source.rb +2 -2
- data/lib/bundler/version.rb +1 -1
- data/spec/install/gems/simple_case_spec.rb +1 -1
- data/spec/lock/lockfile_spec.rb +47 -13
- data/spec/other/exec_spec.rb +6 -0
- data/spec/other/newgem_spec.rb +18 -0
- data/spec/runtime/setup_spec.rb +19 -0
- data/spec/update/gems_spec.rb +3 -2
- metadata +17 -5
data/.travis.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
before_script:
|
2
|
+
- sudo apt-get install groff -y
|
3
|
+
- rake spec:deps
|
4
|
+
|
5
|
+
script: rake spec:travis
|
6
|
+
|
7
|
+
rvm:
|
8
|
+
- 1.8.7
|
9
|
+
- 1.9.2
|
10
|
+
|
11
|
+
env:
|
12
|
+
- RGV=v1.3.6
|
13
|
+
- RGV=v1.3.7
|
14
|
+
- RGV=v1.4.2
|
15
|
+
- RGV=v1.5.3
|
16
|
+
- RGV=v1.6.2
|
17
|
+
- RGV=v1.7.2
|
18
|
+
- RGV=v1.8.10
|
19
|
+
- RGV=master
|
20
|
+
|
21
|
+
matrix:
|
22
|
+
exclude:
|
23
|
+
- rvm: 1.9.2
|
24
|
+
env: RGV=v1.3.6
|
25
|
+
- rvm: 1.9.2
|
26
|
+
env: RGV=v1.3.7
|
27
|
+
- rvm: 1.9.2
|
28
|
+
env: RGV=v1.4.2
|
29
|
+
|
30
|
+
notifications:
|
31
|
+
email:
|
32
|
+
- travis-ci@andrearko.com
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,24 @@
|
|
1
|
-
## 1.0.
|
1
|
+
## 1.0.19.rc (September 13, 2011)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Compatability with Rubygems 1.8.10 installer changes
|
6
|
+
- Report gem installation failures clearly (@rwilcox, #1380)
|
7
|
+
- Useful error for cap and vlad on first deploy (@nexmat, @kirs)
|
8
|
+
|
9
|
+
Bugfixes:
|
10
|
+
|
11
|
+
- `exec` now works when the command contains 'exec'
|
12
|
+
- Only touch lock after changes on Windows (@robertwahler, #1358)
|
13
|
+
- Keep load paths when #setup is called multiple times (@radsaq, #1379)
|
14
|
+
|
15
|
+
## 1.0.18 (August 16, 2011)
|
2
16
|
|
3
17
|
Bugfixes:
|
4
18
|
|
5
19
|
- Fix typo in DEBUG_RESOLVER (@geemus)
|
6
20
|
- Fixes rake 0.9.x warning (@mtylty, #1333)
|
21
|
+
- Fix `bundle cache` again for rubygems 1.3.x
|
7
22
|
|
8
23
|
Features:
|
9
24
|
|
@@ -12,14 +27,14 @@ Features:
|
|
12
27
|
- Make fetch_specs faster (@zeha, #1294)
|
13
28
|
- Allow overriding development deps loaded by #gemspec (@lgierth, #1245)
|
14
29
|
|
15
|
-
## 1.0.17 (
|
30
|
+
## 1.0.17 (August 8, 2011)
|
16
31
|
|
17
32
|
Bugfixes:
|
18
33
|
|
19
34
|
- Fix rake issues with rubygems 1.3.x (#1342)
|
20
35
|
- Fixed invalid byte sequence error while installing gem on Ruby 1.9 (#1341)
|
21
36
|
|
22
|
-
## 1.0.16 (
|
37
|
+
## 1.0.16 (August 8, 2011)
|
23
38
|
|
24
39
|
Features:
|
25
40
|
|
data/Rakefile
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
$:.unshift File.expand_path("../lib", __FILE__)
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
|
5
|
+
def safe_task(&block)
|
6
|
+
yield
|
7
|
+
true
|
8
|
+
rescue
|
9
|
+
false
|
10
|
+
end
|
11
|
+
|
5
12
|
namespace :spec do
|
6
13
|
desc "Ensure spec dependencies are installed"
|
7
14
|
task :deps do
|
@@ -42,7 +49,7 @@ begin
|
|
42
49
|
namespace :rubygems do
|
43
50
|
# Rubygems specs by version
|
44
51
|
rubyopt = ENV["RUBYOPT"]
|
45
|
-
%w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.
|
52
|
+
%w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.10).each do |rg|
|
46
53
|
desc "Run specs with Rubygems #{rg}"
|
47
54
|
RSpec::Core::RakeTask.new(rg) do |t|
|
48
55
|
t.rspec_opts = %w(-fs --color)
|
@@ -71,7 +78,7 @@ begin
|
|
71
78
|
ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
|
72
79
|
end
|
73
80
|
|
74
|
-
task rg => "clone_rubygems_#{rg}"
|
81
|
+
task rg => ["clone_rubygems_#{rg}", "man:build"]
|
75
82
|
task "rubygems:all" => rg
|
76
83
|
end
|
77
84
|
|
@@ -114,6 +121,22 @@ begin
|
|
114
121
|
end
|
115
122
|
end
|
116
123
|
|
124
|
+
desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
|
125
|
+
task "travis" do
|
126
|
+
rg = ENV['RGV'] || 'master'
|
127
|
+
|
128
|
+
puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
|
129
|
+
specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
|
130
|
+
|
131
|
+
Rake::Task["spec:rubygems:#{rg}"].reenable
|
132
|
+
|
133
|
+
puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
|
134
|
+
sudos = safe_task { Rake::Task["spec:rubygems:#{rg}:sudo"].invoke }
|
135
|
+
|
136
|
+
unless specs && sudos
|
137
|
+
fail "Bundler tests failed, please review the log for more information"
|
138
|
+
end
|
139
|
+
end
|
117
140
|
end
|
118
141
|
|
119
142
|
namespace :man do
|
data/UPGRADING.md
CHANGED
@@ -33,7 +33,7 @@ your deploy.rb file to run Bundler automatically as part of deploying:
|
|
33
33
|
require 'bundler/capistrano'
|
34
34
|
|
35
35
|
For more details on deploying using bundler, see the documentation
|
36
|
-
for the bundler cap task, and the [documentation on deploying](http://gembundler.com/
|
36
|
+
for the bundler cap task, and the [documentation on deploying](http://gembundler.com/deploying.html).
|
37
37
|
|
38
38
|
|
39
39
|
## Bundler 0.8 to 0.9 and above
|
@@ -100,4 +100,4 @@ Bundler 0.9 changes the following Bundler 0.8 Gemfile APIs:
|
|
100
100
|
mode, where using system gems, this becomes
|
101
101
|
`Bundler.setup(:multiple, :groups)`. If you don't
|
102
102
|
specify any groups, this puts all groups on the load
|
103
|
-
path. In locked
|
103
|
+
path. In locked mode, it becomes `require '.bundle/environment'`
|
data/lib/bundler.rb
CHANGED
@@ -20,6 +20,7 @@ module Bundler
|
|
20
20
|
autoload :Dsl, 'bundler/dsl'
|
21
21
|
autoload :Environment, 'bundler/environment'
|
22
22
|
autoload :GemHelper, 'bundler/gem_helper'
|
23
|
+
autoload :GemInstaller, 'bundler/gem_installer'
|
23
24
|
autoload :Graph, 'bundler/graph'
|
24
25
|
autoload :Index, 'bundler/index'
|
25
26
|
autoload :Installer, 'bundler/installer'
|
@@ -36,7 +37,7 @@ module Bundler
|
|
36
37
|
autoload :UI, 'bundler/ui'
|
37
38
|
|
38
39
|
class BundlerError < StandardError
|
39
|
-
def self.status_code(code
|
40
|
+
def self.status_code(code)
|
40
41
|
define_method(:status_code) { code }
|
41
42
|
end
|
42
43
|
end
|
@@ -44,6 +45,7 @@ module Bundler
|
|
44
45
|
class GemfileNotFound < BundlerError; status_code(10) ; end
|
45
46
|
class GemNotFound < BundlerError; status_code(7) ; end
|
46
47
|
class GemfileError < BundlerError; status_code(4) ; end
|
48
|
+
class InstallError < BundlerError; status_code(5) ; end
|
47
49
|
class PathError < BundlerError; status_code(13) ; end
|
48
50
|
class GitError < BundlerError; status_code(11) ; end
|
49
51
|
class DeprecatedError < BundlerError; status_code(12) ; end
|
@@ -111,8 +113,7 @@ module Bundler
|
|
111
113
|
unloaded = groups - @completed_groups
|
112
114
|
# Record groups that are now loaded
|
113
115
|
@completed_groups = groups
|
114
|
-
|
115
|
-
unloaded.any? ? load.setup(*unloaded) : load
|
116
|
+
unloaded.any? ? load.setup(*groups) : load
|
116
117
|
end
|
117
118
|
end
|
118
119
|
|
data/lib/bundler/cli.rb
CHANGED
data/lib/bundler/definition.rb
CHANGED
@@ -180,6 +180,10 @@ module Bundler
|
|
180
180
|
def lock(file)
|
181
181
|
contents = to_lock
|
182
182
|
|
183
|
+
# Convert to \r\n if the existing lock has them
|
184
|
+
# i.e., Windows with `git config core.autocrlf=true`
|
185
|
+
contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match("\r\n")
|
186
|
+
|
183
187
|
return if @lockfile_contents == contents
|
184
188
|
|
185
189
|
if Bundler.settings[:frozen]
|
@@ -187,10 +191,6 @@ module Bundler
|
|
187
191
|
return
|
188
192
|
end
|
189
193
|
|
190
|
-
# Convert to \r\n if the existing lock has them
|
191
|
-
# i.e., Windows with `git config core.autocrlf=true`
|
192
|
-
contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match("\r\n")
|
193
|
-
|
194
194
|
File.open(file, 'wb'){|f| f.puts(contents) }
|
195
195
|
end
|
196
196
|
|
data/lib/bundler/deployment.rb
CHANGED
@@ -4,9 +4,11 @@ module Bundler
|
|
4
4
|
if defined?(Capistrano) && context.is_a?(Capistrano::Configuration)
|
5
5
|
context_name = "capistrano"
|
6
6
|
role_default = "{:except => {:no_release => true}}"
|
7
|
+
error_type = ::Capistrano::CommandError
|
7
8
|
else
|
8
9
|
context_name = "vlad"
|
9
10
|
role_default = "[:app]"
|
11
|
+
error_type = ::Rake::CommandFailedError
|
10
12
|
end
|
11
13
|
|
12
14
|
roles = context.fetch(:bundle_roles, false)
|
@@ -39,13 +41,16 @@ module Bundler
|
|
39
41
|
bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), 'bundle'))
|
40
42
|
bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
|
41
43
|
bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
|
42
|
-
|
43
|
-
|
44
|
+
current_release = context.fetch(:current_release)
|
45
|
+
if current_release.to_s.empty?
|
46
|
+
raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
|
47
|
+
end
|
48
|
+
args = ["--gemfile #{File.join(current_release, bundle_gemfile)}"]
|
44
49
|
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
|
45
50
|
args << bundle_flags.to_s
|
46
51
|
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
|
47
52
|
|
48
|
-
run "cd #{
|
53
|
+
run "cd #{current_release} && #{bundle_cmd} install #{args.join(' ')}"
|
49
54
|
end
|
50
55
|
end
|
51
56
|
end
|
data/lib/bundler/installer.rb
CHANGED
@@ -47,21 +47,7 @@ module Bundler
|
|
47
47
|
# as dependencies might actually affect the installation of
|
48
48
|
# the gem.
|
49
49
|
specs.each do |spec|
|
50
|
-
|
51
|
-
|
52
|
-
# unless requested_specs.include?(spec)
|
53
|
-
# Bundler.ui.debug " * Not in requested group; skipping."
|
54
|
-
# next
|
55
|
-
# end
|
56
|
-
|
57
|
-
Bundler.rubygems.with_build_args [Bundler.settings["build.#{spec.name}"]] do
|
58
|
-
spec.source.install(spec)
|
59
|
-
Bundler.ui.debug "from #{spec.loaded_from} "
|
60
|
-
end
|
61
|
-
|
62
|
-
Bundler.ui.info ""
|
63
|
-
generate_bundler_executable_stubs(spec) if Bundler.settings[:bin]
|
64
|
-
FileUtils.rm_rf(Bundler.tmp)
|
50
|
+
install_gem_from_spec(spec)
|
65
51
|
end
|
66
52
|
|
67
53
|
lock
|
@@ -69,6 +55,30 @@ module Bundler
|
|
69
55
|
|
70
56
|
private
|
71
57
|
|
58
|
+
def install_gem_from_spec(spec)
|
59
|
+
# Download the gem to get the spec, because some specs that are returned
|
60
|
+
# by rubygems.org are broken and wrong.
|
61
|
+
spec.source.fetch(spec) if spec.source.respond_to?(:fetch)
|
62
|
+
|
63
|
+
# Fetch the build settings, if there are any
|
64
|
+
settings = Bundler.settings["build.#{spec.name}"]
|
65
|
+
Bundler.rubygems.with_build_args [settings] do
|
66
|
+
spec.source.install(spec)
|
67
|
+
Bundler.ui.debug "from #{spec.loaded_from} "
|
68
|
+
end
|
69
|
+
|
70
|
+
# newline after installing, some gems say "with native extensions"
|
71
|
+
Bundler.ui.info ""
|
72
|
+
generate_bundler_executable_stubs(spec) if Bundler.settings[:bin]
|
73
|
+
FileUtils.rm_rf(Bundler.tmp)
|
74
|
+
rescue Exception => e
|
75
|
+
Bundler.ui.warn "#{e.class}: #{e.message}"
|
76
|
+
msg = "An error occured while installing #{spec.name} (#{spec.version}),"
|
77
|
+
msg << " and Bundler cannot continue.\nMake sure that `gem install"
|
78
|
+
msg << " #{spec.name} -v '#{spec.version}'` succeeds before bundling."
|
79
|
+
raise Bundler::InstallError, msg
|
80
|
+
end
|
81
|
+
|
72
82
|
def generate_bundler_executable_stubs(spec)
|
73
83
|
bin_path = Bundler.bin_path
|
74
84
|
template = File.read(File.expand_path('../templates/Executable', __FILE__))
|
data/lib/bundler/resolver.rb
CHANGED
@@ -413,7 +413,7 @@ module Bundler
|
|
413
413
|
# If the origin is "bundler", the conflict is us
|
414
414
|
if origin.name == "bundler"
|
415
415
|
o << " Current Bundler version:\n"
|
416
|
-
|
416
|
+
other_bundler_required = !requirement.requirement.satisfied_by?(origin.version)
|
417
417
|
# If the origin is a LockfileParser, it does not respond_to :required_by
|
418
418
|
elsif !origin.respond_to?(:required_by) || !(origin.required_by.first)
|
419
419
|
o << " In snapshot (Gemfile.lock):\n"
|
@@ -422,9 +422,9 @@ module Bundler
|
|
422
422
|
o << gem_message(origin)
|
423
423
|
|
424
424
|
# If the bundle wants a newer bundler than the running bundler, explain
|
425
|
-
if origin.name == "bundler" &&
|
426
|
-
o << "
|
427
|
-
o << "Perhaps you need to update Bundler by running `gem install bundler
|
425
|
+
if origin.name == "bundler" && other_bundler_required
|
426
|
+
o << "This Gemfile requires a different version of Bundler.\n"
|
427
|
+
o << "Perhaps you need to update Bundler by running `gem install bundler`?"
|
428
428
|
end
|
429
429
|
|
430
430
|
# origin is nil if the required gem and version cannot be found in any of
|
@@ -205,7 +205,7 @@ module Bundler
|
|
205
205
|
gem_class = (class << Gem ; self ; end)
|
206
206
|
gem_class.send(:remove_method, :bin_path)
|
207
207
|
gem_class.send(:define_method, :bin_path) do |name, *args|
|
208
|
-
exec_name
|
208
|
+
exec_name = args.first
|
209
209
|
|
210
210
|
if exec_name == 'bundle'
|
211
211
|
return ENV['BUNDLE_BIN_PATH']
|
@@ -254,9 +254,14 @@ module Bundler
|
|
254
254
|
# by monkeypatching it into the method in Rubygems 1.3.6 and 1.3.7.
|
255
255
|
def backport_segment_generation
|
256
256
|
Gem::Version.send(:define_method, :segments) do
|
257
|
-
@
|
258
|
-
|
257
|
+
@segments_generated ||= false
|
258
|
+
unless @segments_generated
|
259
|
+
@segments ||= @version.scan(/[0-9a-z]+/i).map do |s|
|
260
|
+
/^\d+$/ =~ s ? s.to_i : s
|
261
|
+
end
|
259
262
|
end
|
263
|
+
@segments_generated = true
|
264
|
+
@segments
|
260
265
|
end
|
261
266
|
end
|
262
267
|
|
data/lib/bundler/source.rb
CHANGED
@@ -97,7 +97,7 @@ module Bundler
|
|
97
97
|
:env_shebang => true }
|
98
98
|
options.merge!(:bin_dir => "#{install_path}/bin") unless spec.executables.nil? || spec.executables.empty?
|
99
99
|
|
100
|
-
installer =
|
100
|
+
installer = Bundler::GemInstaller.new path, options
|
101
101
|
installer.install
|
102
102
|
end
|
103
103
|
|
@@ -385,7 +385,7 @@ module Bundler
|
|
385
385
|
@local_specs ||= load_spec_files
|
386
386
|
end
|
387
387
|
|
388
|
-
class Installer <
|
388
|
+
class Installer < Bundler::GemInstaller
|
389
389
|
def initialize(spec, options = {})
|
390
390
|
@spec = spec
|
391
391
|
@bin_dir = Bundler.requires_sudo? ? "#{Bundler.tmp}/bin" : "#{Bundler.rubygems.gem_dir}/bin"
|
data/lib/bundler/version.rb
CHANGED
@@ -2,5 +2,5 @@ module Bundler
|
|
2
2
|
# We're doing this because we might write tests that deal
|
3
3
|
# with other versions of bundler and we are unsure how to
|
4
4
|
# handle this better.
|
5
|
-
VERSION = "1.0.
|
5
|
+
VERSION = "1.0.19.rc" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
@@ -629,7 +629,7 @@ describe "bundle install with gem sources" do
|
|
629
629
|
Current Bundler version:
|
630
630
|
bundler (#{Bundler::VERSION})
|
631
631
|
E
|
632
|
-
out.should
|
632
|
+
out.should include(nice_error)
|
633
633
|
end
|
634
634
|
|
635
635
|
it "works for gems with multiple versions in its dependencies" do
|
data/spec/lock/lockfile_spec.rb
CHANGED
@@ -671,13 +671,18 @@ describe "the lockfile format" do
|
|
671
671
|
|
672
672
|
end
|
673
673
|
|
674
|
-
|
674
|
+
describe "line endings" do
|
675
|
+
def set_lockfile_mtime_to_known_value
|
676
|
+
time = Time.local(2000, 1, 1, 0, 0, 0)
|
677
|
+
File.utime(time, time, bundled_app('Gemfile.lock'))
|
678
|
+
end
|
675
679
|
before(:each) do
|
676
680
|
build_repo2
|
677
681
|
install_gemfile <<-G
|
678
682
|
source "file://#{gem_repo2}"
|
679
683
|
gem "rack"
|
680
684
|
G
|
685
|
+
set_lockfile_mtime_to_known_value
|
681
686
|
end
|
682
687
|
|
683
688
|
it "generates Gemfile.lock with \\n line endings" do
|
@@ -685,22 +690,51 @@ describe "the lockfile format" do
|
|
685
690
|
should_be_installed "rack 1.0"
|
686
691
|
end
|
687
692
|
|
688
|
-
|
689
|
-
update_repo2
|
693
|
+
context "during updates" do
|
690
694
|
|
691
|
-
|
692
|
-
|
693
|
-
|
695
|
+
it "preserves Gemfile.lock \\n line endings" do
|
696
|
+
update_repo2
|
697
|
+
|
698
|
+
lambda { bundle "update" }.should change { File.mtime(bundled_app('Gemfile.lock')) }
|
699
|
+
File.read(bundled_app("Gemfile.lock")).should_not match("\r\n")
|
700
|
+
should_be_installed "rack 1.2"
|
701
|
+
end
|
702
|
+
|
703
|
+
it "preserves Gemfile.lock \\n\\r line endings" do
|
704
|
+
update_repo2
|
705
|
+
win_lock = File.read(bundled_app("Gemfile.lock")).gsub(/\n/, "\r\n")
|
706
|
+
File.open(bundled_app("Gemfile.lock"), "wb"){|f| f.puts(win_lock) }
|
707
|
+
set_lockfile_mtime_to_known_value
|
708
|
+
|
709
|
+
lambda { bundle "update" }.should change { File.mtime(bundled_app('Gemfile.lock')) }
|
710
|
+
File.read(bundled_app("Gemfile.lock")).should match("\r\n")
|
711
|
+
should_be_installed "rack 1.2"
|
712
|
+
end
|
694
713
|
end
|
695
714
|
|
696
|
-
|
697
|
-
update_repo2
|
698
|
-
win_lock = File.read(bundled_app("Gemfile.lock")).gsub(/\n/, "\r\n")
|
699
|
-
File.open(bundled_app("Gemfile.lock"), "wb"){|f| f.puts(win_lock) }
|
715
|
+
context "when nothing changes" do
|
700
716
|
|
701
|
-
|
702
|
-
|
703
|
-
|
717
|
+
it "preserves Gemfile.lock \\n line endings" do
|
718
|
+
lambda { ruby <<-RUBY
|
719
|
+
require 'rubygems'
|
720
|
+
require 'bundler'
|
721
|
+
Bundler.setup
|
722
|
+
RUBY
|
723
|
+
}.should_not change { File.mtime(bundled_app('Gemfile.lock')) }
|
724
|
+
end
|
725
|
+
|
726
|
+
it "preserves Gemfile.lock \\n\\r line endings" do
|
727
|
+
win_lock = File.read(bundled_app("Gemfile.lock")).gsub(/\n/, "\r\n")
|
728
|
+
File.open(bundled_app("Gemfile.lock"), "wb"){|f| f.puts(win_lock) }
|
729
|
+
set_lockfile_mtime_to_known_value
|
730
|
+
|
731
|
+
lambda { ruby <<-RUBY
|
732
|
+
require 'rubygems'
|
733
|
+
require 'bundler'
|
734
|
+
Bundler.setup
|
735
|
+
RUBY
|
736
|
+
}.should_not change { File.mtime(bundled_app('Gemfile.lock')) }
|
737
|
+
end
|
704
738
|
end
|
705
739
|
end
|
706
740
|
end
|
data/spec/other/exec_spec.rb
CHANGED
@@ -33,6 +33,12 @@ describe "bundle exec" do
|
|
33
33
|
out.should == "1.0.0"
|
34
34
|
end
|
35
35
|
|
36
|
+
it "works when exec'ing something else" do
|
37
|
+
install_gemfile 'gem "rack"'
|
38
|
+
bundle "exec echo exec"
|
39
|
+
out.should == "exec"
|
40
|
+
end
|
41
|
+
|
36
42
|
it "handles different versions in different bundles" do
|
37
43
|
build_repo2 do
|
38
44
|
build_gem "rack_two", "1.0.0" do |s|
|
data/spec/other/newgem_spec.rb
CHANGED
@@ -25,4 +25,22 @@ describe "bundle gem" do
|
|
25
25
|
it "requires the version file" do
|
26
26
|
bundled_app("test-gem/lib/test-gem.rb").read.should =~ /require "test-gem\/version"/
|
27
27
|
end
|
28
|
+
|
29
|
+
it "runs rake without problems" do
|
30
|
+
system_gems ["rake-0.8.7"]
|
31
|
+
|
32
|
+
rakefile = <<-RAKEFILE
|
33
|
+
task :default do
|
34
|
+
puts 'SUCCESS'
|
35
|
+
end
|
36
|
+
RAKEFILE
|
37
|
+
File.open(bundled_app("test-gem/Rakefile"), 'w') do |file|
|
38
|
+
file.puts rakefile
|
39
|
+
end
|
40
|
+
|
41
|
+
Dir.chdir(bundled_app("test-gem")) do
|
42
|
+
sys_exec("rake")
|
43
|
+
out.should include("SUCCESS")
|
44
|
+
end
|
45
|
+
end
|
28
46
|
end
|
data/spec/runtime/setup_spec.rb
CHANGED
@@ -25,6 +25,7 @@ describe "Bundler.setup" do
|
|
25
25
|
before(:each) do
|
26
26
|
install_gemfile <<-G
|
27
27
|
source "file://#{gem_repo1}"
|
28
|
+
gem "yard"
|
28
29
|
gem "rack", :group => :test
|
29
30
|
G
|
30
31
|
end
|
@@ -58,6 +59,24 @@ describe "Bundler.setup" do
|
|
58
59
|
err.should eq("")
|
59
60
|
out.should eq("1.0.0")
|
60
61
|
end
|
62
|
+
|
63
|
+
it "leaves :default available if setup is called twice" do
|
64
|
+
ruby <<-RUBY
|
65
|
+
require 'rubygems'
|
66
|
+
require 'bundler'
|
67
|
+
Bundler.setup(:default)
|
68
|
+
Bundler.setup(:default, :test)
|
69
|
+
|
70
|
+
begin
|
71
|
+
require 'yard'
|
72
|
+
puts "WIN"
|
73
|
+
rescue LoadError
|
74
|
+
puts "FAIL"
|
75
|
+
end
|
76
|
+
RUBY
|
77
|
+
err.should eq("")
|
78
|
+
out.should match("WIN")
|
79
|
+
end
|
61
80
|
end
|
62
81
|
|
63
82
|
it "raises if the Gemfile was not yet installed" do
|
data/spec/update/gems_spec.rb
CHANGED
@@ -115,7 +115,8 @@ describe "bundle update when a gem depends on a newer version of bundler" do
|
|
115
115
|
|
116
116
|
it "should explain that bundler conflicted" do
|
117
117
|
bundle "update"
|
118
|
-
out.should_not =~ /
|
119
|
-
out.should =~ /
|
118
|
+
out.should_not =~ /in snapshot/i
|
119
|
+
out.should =~ /current Bundler version/i
|
120
|
+
out.should =~ /perhaps you need to update bundler/i
|
120
121
|
end
|
121
122
|
end
|
metadata
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 7712070
|
5
|
+
prerelease: true
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
|
9
|
+
- 19
|
10
|
+
- rc
|
11
|
+
version: 1.0.19.rc
|
10
12
|
platform: ruby
|
11
13
|
authors:
|
12
14
|
- "Andr\xC3\xA9 Arko"
|
@@ -17,16 +19,18 @@ autorequire:
|
|
17
19
|
bindir: bin
|
18
20
|
cert_chain: []
|
19
21
|
|
20
|
-
date: 2011-
|
22
|
+
date: 2011-09-13 00:00:00 -07:00
|
21
23
|
default_executable:
|
22
24
|
dependencies:
|
23
25
|
- !ruby/object:Gem::Dependency
|
24
26
|
name: ronn
|
25
27
|
prerelease: false
|
26
28
|
requirement: &id001 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
27
30
|
requirements:
|
28
31
|
- - ">="
|
29
32
|
- !ruby/object:Gem::Version
|
33
|
+
hash: 3
|
30
34
|
segments:
|
31
35
|
- 0
|
32
36
|
version: "0"
|
@@ -36,9 +40,11 @@ dependencies:
|
|
36
40
|
name: rspec
|
37
41
|
prerelease: false
|
38
42
|
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
39
44
|
requirements:
|
40
45
|
- - ">="
|
41
46
|
- !ruby/object:Gem::Version
|
47
|
+
hash: 3
|
42
48
|
segments:
|
43
49
|
- 0
|
44
50
|
version: "0"
|
@@ -55,6 +61,7 @@ extra_rdoc_files: []
|
|
55
61
|
|
56
62
|
files:
|
57
63
|
- .gitignore
|
64
|
+
- .travis.yml
|
58
65
|
- CHANGELOG.md
|
59
66
|
- ISSUES.md
|
60
67
|
- LICENSE
|
@@ -72,6 +79,7 @@ files:
|
|
72
79
|
- lib/bundler/dsl.rb
|
73
80
|
- lib/bundler/environment.rb
|
74
81
|
- lib/bundler/gem_helper.rb
|
82
|
+
- lib/bundler/gem_installer.rb
|
75
83
|
- lib/bundler/gem_tasks.rb
|
76
84
|
- lib/bundler/graph.rb
|
77
85
|
- lib/bundler/index.rb
|
@@ -219,16 +227,20 @@ rdoc_options: []
|
|
219
227
|
require_paths:
|
220
228
|
- lib
|
221
229
|
required_ruby_version: !ruby/object:Gem::Requirement
|
230
|
+
none: false
|
222
231
|
requirements:
|
223
232
|
- - ">="
|
224
233
|
- !ruby/object:Gem::Version
|
234
|
+
hash: 3
|
225
235
|
segments:
|
226
236
|
- 0
|
227
237
|
version: "0"
|
228
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
|
+
none: false
|
229
240
|
requirements:
|
230
241
|
- - ">="
|
231
242
|
- !ruby/object:Gem::Version
|
243
|
+
hash: 23
|
232
244
|
segments:
|
233
245
|
- 1
|
234
246
|
- 3
|
@@ -237,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
249
|
requirements: []
|
238
250
|
|
239
251
|
rubyforge_project: bundler
|
240
|
-
rubygems_version: 1.3.
|
252
|
+
rubygems_version: 1.3.7
|
241
253
|
signing_key:
|
242
254
|
specification_version: 3
|
243
255
|
summary: The best way to manage your application's dependencies
|