bundler 1.0.3 → 1.0.5
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/.gitignore +10 -3
- data/CHANGELOG.md +31 -0
- data/ISSUES.md +16 -1
- data/LICENSE +2 -1
- data/Rakefile +39 -13
- data/bin/bundle +1 -1
- data/lib/bundler.rb +7 -19
- data/lib/bundler/capistrano.rb +0 -1
- data/lib/bundler/cli.rb +10 -6
- data/lib/bundler/definition.rb +23 -9
- data/lib/bundler/dependency.rb +7 -2
- data/lib/bundler/deployment.rb +25 -9
- data/lib/bundler/dsl.rb +3 -2
- data/lib/bundler/gem_helper.rb +25 -26
- data/lib/bundler/installer.rb +1 -0
- data/lib/bundler/resolver.rb +27 -14
- data/lib/bundler/rubygems_ext.rb +9 -6
- data/lib/bundler/runtime.rb +1 -1
- data/lib/bundler/setup.rb +1 -0
- data/lib/bundler/shared_helpers.rb +11 -4
- data/lib/bundler/source.rb +24 -15
- data/lib/bundler/ui.rb +11 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -1
- data/man/bundle-exec.ronn +13 -0
- data/man/bundle-install.ronn +6 -3
- data/man/bundle.ronn +4 -1
- data/spec/cache/gems_spec.rb +14 -0
- data/spec/cache/git_spec.rb +1 -1
- data/spec/install/deploy_spec.rb +23 -4
- data/spec/install/gems/flex_spec.rb +41 -0
- data/spec/install/gems/groups_spec.rb +1 -1
- data/spec/install/gems/platform_spec.rb +4 -21
- data/spec/install/gems/simple_case_spec.rb +21 -14
- data/spec/install/gems/sudo_spec.rb +2 -2
- data/spec/install/gems/win32_spec.rb +1 -1
- data/spec/install/git_spec.rb +23 -5
- data/spec/install/path_spec.rb +31 -7
- data/spec/lock/{flex_spec.rb → lockfile_spec.rb} +33 -0
- data/spec/other/check_spec.rb +7 -7
- data/spec/other/config_spec.rb +2 -2
- data/spec/other/exec_spec.rb +6 -6
- data/spec/other/ext_spec.rb +2 -2
- data/spec/other/gem_helper_spec.rb +18 -6
- data/spec/other/help_spec.rb +1 -1
- data/spec/other/init_spec.rb +3 -3
- data/spec/quality_spec.rb +3 -0
- data/spec/resolver/platform_spec.rb +29 -4
- data/spec/runtime/load_spec.rb +47 -42
- data/spec/runtime/require_spec.rb +1 -1
- data/spec/runtime/setup_spec.rb +168 -2
- data/spec/spec_helper.rb +2 -1
- data/spec/support/builders.rb +18 -10
- data/spec/support/helpers.rb +7 -11
- data/spec/support/indexes.rb +3 -4
- data/spec/support/matchers.rb +1 -1
- data/spec/support/path.rb +1 -1
- data/spec/support/platforms.rb +5 -1
- data/spec/support/sudo.rb +1 -1
- data/spec/update/gems_spec.rb +26 -0
- data/spec/update/git_spec.rb +25 -2
- data/spec/update/source_spec.rb +2 -1
- metadata +6 -8
- data/spec/runtime/environment_rb_spec.rb +0 -162
data/spec/support/matchers.rb
CHANGED
@@ -35,7 +35,7 @@ module Spec
|
|
35
35
|
version_const = name == 'bundler' ? 'Bundler::VERSION' : Spec::Builders.constantize(name)
|
36
36
|
run "require '#{name}.rb'; puts #{version_const}", *groups
|
37
37
|
actual_version, actual_platform = out.split(/\s+/)
|
38
|
-
Gem::Version.new(actual_version).should == Gem::Version.new(version)
|
38
|
+
check Gem::Version.new(actual_version).should == Gem::Version.new(version)
|
39
39
|
actual_platform.should == platform
|
40
40
|
end
|
41
41
|
end
|
data/spec/support/path.rb
CHANGED
@@ -31,7 +31,7 @@ module Spec
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def vendored_gems(path = nil)
|
34
|
-
bundled_app("vendor/#{Gem.ruby_engine}/#{Gem::ConfigMap[:ruby_version]}/#{path}")
|
34
|
+
bundled_app("vendor/bundle/#{Gem.ruby_engine}/#{Gem::ConfigMap[:ruby_version]}/#{path}")
|
35
35
|
end
|
36
36
|
|
37
37
|
def cached_gem(path)
|
data/spec/support/platforms.rb
CHANGED
data/spec/support/sudo.rb
CHANGED
data/spec/update/gems_spec.rb
CHANGED
@@ -84,3 +84,29 @@ describe "bundle update without a Gemfile.lock" do
|
|
84
84
|
should_be_installed "rack 1.0.0"
|
85
85
|
end
|
86
86
|
end
|
87
|
+
|
88
|
+
describe "bundle update when a gem depends on a newer version of bundler" do
|
89
|
+
before(:each) do
|
90
|
+
build_repo2 do
|
91
|
+
build_gem "rails", "3.0.1" do |s|
|
92
|
+
s.add_dependency "bundler", Bundler::VERSION.succ
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
gemfile <<-G
|
97
|
+
source "file://#{gem_repo2}"
|
98
|
+
gem "rails", "3.0.1"
|
99
|
+
G
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should not explode" do
|
103
|
+
bundle "update"
|
104
|
+
err.should be_empty
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should explain that bundler conflicted" do
|
108
|
+
bundle "update"
|
109
|
+
out.should_not =~ /In snapshot/
|
110
|
+
out.should =~ /Current Bundler version/
|
111
|
+
end
|
112
|
+
end
|
data/spec/update/git_spec.rb
CHANGED
@@ -94,6 +94,29 @@ describe "bundle update" do
|
|
94
94
|
out.should include("Your bundle is complete!")
|
95
95
|
end
|
96
96
|
|
97
|
+
|
98
|
+
it "fetches tags from the remote" do
|
99
|
+
build_git "foo"
|
100
|
+
@remote = build_git("bar", :bare => true)
|
101
|
+
update_git "foo", :remote => @remote.path
|
102
|
+
update_git "foo", :push => "master"
|
103
|
+
|
104
|
+
install_gemfile <<-G
|
105
|
+
gem 'foo', :git => "#{@remote.path}"
|
106
|
+
G
|
107
|
+
|
108
|
+
# Create a new tag on the remote that needs fetching
|
109
|
+
update_git "foo", :tag => "fubar"
|
110
|
+
update_git "foo", :push => "fubar"
|
111
|
+
|
112
|
+
gemfile <<-G
|
113
|
+
gem 'foo', :git => "#{@remote.path}", :tag => "fubar"
|
114
|
+
G
|
115
|
+
|
116
|
+
bundle "update", :exitstatus => true
|
117
|
+
exitstatus.should == 0
|
118
|
+
end
|
119
|
+
|
97
120
|
describe "with submodules" do
|
98
121
|
before :each do
|
99
122
|
build_gem "submodule", :to_system => true do |s|
|
@@ -122,7 +145,7 @@ describe "bundle update" do
|
|
122
145
|
G
|
123
146
|
|
124
147
|
run "require 'submodule'"
|
125
|
-
out.should == 'GEM'
|
148
|
+
check out.should == 'GEM'
|
126
149
|
|
127
150
|
install_gemfile <<-G
|
128
151
|
git "#{lib_path('has_submodule-1.0')}", :submodules => true do
|
@@ -143,7 +166,7 @@ describe "bundle update" do
|
|
143
166
|
G
|
144
167
|
|
145
168
|
run "require 'submodule'"
|
146
|
-
out.should == 'GIT'
|
169
|
+
check out.should == 'GIT'
|
147
170
|
|
148
171
|
install_gemfile <<-G
|
149
172
|
git "#{lib_path('has_submodule-1.0')}" do
|
data/spec/update/source_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Carl Lerche
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-11-13 00:00:00 -06:00
|
21
21
|
default_executable: bundle
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -156,8 +156,8 @@ files:
|
|
156
156
|
- spec/install/invalid_spec.rb
|
157
157
|
- spec/install/path_spec.rb
|
158
158
|
- spec/install/upgrade_spec.rb
|
159
|
-
- spec/lock/flex_spec.rb
|
160
159
|
- spec/lock/git_spec.rb
|
160
|
+
- spec/lock/lockfile_spec.rb
|
161
161
|
- spec/other/check_spec.rb
|
162
162
|
- spec/other/config_spec.rb
|
163
163
|
- spec/other/console_spec.rb
|
@@ -173,7 +173,6 @@ files:
|
|
173
173
|
- spec/quality_spec.rb
|
174
174
|
- spec/resolver/basic_spec.rb
|
175
175
|
- spec/resolver/platform_spec.rb
|
176
|
-
- spec/runtime/environment_rb_spec.rb
|
177
176
|
- spec/runtime/executable_spec.rb
|
178
177
|
- spec/runtime/load_spec.rb
|
179
178
|
- spec/runtime/platform_spec.rb
|
@@ -266,8 +265,8 @@ test_files:
|
|
266
265
|
- spec/install/invalid_spec.rb
|
267
266
|
- spec/install/path_spec.rb
|
268
267
|
- spec/install/upgrade_spec.rb
|
269
|
-
- spec/lock/flex_spec.rb
|
270
268
|
- spec/lock/git_spec.rb
|
269
|
+
- spec/lock/lockfile_spec.rb
|
271
270
|
- spec/other/check_spec.rb
|
272
271
|
- spec/other/config_spec.rb
|
273
272
|
- spec/other/console_spec.rb
|
@@ -283,7 +282,6 @@ test_files:
|
|
283
282
|
- spec/quality_spec.rb
|
284
283
|
- spec/resolver/basic_spec.rb
|
285
284
|
- spec/resolver/platform_spec.rb
|
286
|
-
- spec/runtime/environment_rb_spec.rb
|
287
285
|
- spec/runtime/executable_spec.rb
|
288
286
|
- spec/runtime/load_spec.rb
|
289
287
|
- spec/runtime/platform_spec.rb
|
@@ -1,162 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "environment.rb file" do
|
4
|
-
|
5
|
-
describe "with git gems that don't have gemspecs" do
|
6
|
-
before :each do
|
7
|
-
build_git "no-gemspec", :gemspec => false
|
8
|
-
|
9
|
-
install_gemfile <<-G
|
10
|
-
gem "no-gemspec", "1.0", :git => "#{lib_path('no-gemspec-1.0')}"
|
11
|
-
G
|
12
|
-
end
|
13
|
-
|
14
|
-
it "loads the library via a virtual spec" do
|
15
|
-
run <<-R
|
16
|
-
require 'no-gemspec'
|
17
|
-
puts NOGEMSPEC
|
18
|
-
R
|
19
|
-
|
20
|
-
out.should == "1.0"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe "with bundled and system gems" do
|
25
|
-
before :each do
|
26
|
-
system_gems "rack-1.0.0"
|
27
|
-
|
28
|
-
install_gemfile <<-G
|
29
|
-
source "file://#{gem_repo1}"
|
30
|
-
|
31
|
-
gem "activesupport", "2.3.5"
|
32
|
-
G
|
33
|
-
end
|
34
|
-
|
35
|
-
it "does not pull in system gems" do
|
36
|
-
run <<-R
|
37
|
-
require 'rubygems'
|
38
|
-
|
39
|
-
begin;
|
40
|
-
require 'rack'
|
41
|
-
rescue LoadError
|
42
|
-
puts 'WIN'
|
43
|
-
end
|
44
|
-
R
|
45
|
-
|
46
|
-
out.should == "WIN"
|
47
|
-
end
|
48
|
-
|
49
|
-
it "provides a gem method" do
|
50
|
-
run <<-R
|
51
|
-
gem 'activesupport'
|
52
|
-
require 'activesupport'
|
53
|
-
puts ACTIVESUPPORT
|
54
|
-
R
|
55
|
-
|
56
|
-
out.should == "2.3.5"
|
57
|
-
end
|
58
|
-
|
59
|
-
it "raises an exception if gem is used to invoke a system gem not in the bundle" do
|
60
|
-
run <<-R
|
61
|
-
begin
|
62
|
-
gem 'rack'
|
63
|
-
rescue LoadError => e
|
64
|
-
puts e.message
|
65
|
-
end
|
66
|
-
R
|
67
|
-
|
68
|
-
out.should == "rack is not part of the bundle. Add it to Gemfile."
|
69
|
-
end
|
70
|
-
|
71
|
-
it "sets GEM_HOME appropriately" do
|
72
|
-
run "puts ENV['GEM_HOME']"
|
73
|
-
out.should == default_bundle_path.to_s
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
describe "with system gems in the bundle" do
|
78
|
-
before :each do
|
79
|
-
system_gems "rack-1.0.0"
|
80
|
-
|
81
|
-
install_gemfile <<-G
|
82
|
-
source "file://#{gem_repo1}"
|
83
|
-
gem "rack", "1.0.0"
|
84
|
-
gem "activesupport", "2.3.5"
|
85
|
-
G
|
86
|
-
end
|
87
|
-
|
88
|
-
it "sets GEM_PATH appropriately" do
|
89
|
-
run "puts Gem.path"
|
90
|
-
paths = out.split("\n")
|
91
|
-
paths.should include(system_gem_path.to_s)
|
92
|
-
paths.should include(default_bundle_path.to_s)
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe "with a gemspec that requires other files" do
|
97
|
-
before :each do
|
98
|
-
build_git "bar", :gemspec => false do |s|
|
99
|
-
s.write "lib/bar/version.rb", %{BAR_VERSION = '1.0'}
|
100
|
-
s.write "bar.gemspec", <<-G
|
101
|
-
lib = File.expand_path('../lib/', __FILE__)
|
102
|
-
$:.unshift lib unless $:.include?(lib)
|
103
|
-
require 'bar/version'
|
104
|
-
|
105
|
-
Gem::Specification.new do |s|
|
106
|
-
s.name = 'bar'
|
107
|
-
s.version = BAR_VERSION
|
108
|
-
s.summary = 'Bar'
|
109
|
-
s.files = Dir["lib/**/*.rb"]
|
110
|
-
end
|
111
|
-
G
|
112
|
-
end
|
113
|
-
|
114
|
-
gemfile <<-G
|
115
|
-
gem "bar", :git => "#{lib_path('bar-1.0')}"
|
116
|
-
G
|
117
|
-
end
|
118
|
-
|
119
|
-
it "evals each gemspec in the context of its parent directory" do
|
120
|
-
bundle :install
|
121
|
-
run "require 'bar'; puts BAR"
|
122
|
-
out.should == "1.0"
|
123
|
-
end
|
124
|
-
|
125
|
-
it "error intelligently if the gemspec has a LoadError" do
|
126
|
-
update_git "bar", :gemspec => false do |s|
|
127
|
-
s.write "bar.gemspec", "require 'foobarbaz'"
|
128
|
-
end
|
129
|
-
bundle :install
|
130
|
-
out.should include("was a LoadError while evaluating bar.gemspec")
|
131
|
-
out.should include("foobarbaz")
|
132
|
-
out.should include("bar.gemspec:1")
|
133
|
-
out.should include("try to require a relative path") if RUBY_VERSION >= "1.9.0"
|
134
|
-
end
|
135
|
-
|
136
|
-
it "evals each gemspec with a binding from the top level" do
|
137
|
-
bundle "install"
|
138
|
-
|
139
|
-
ruby <<-RUBY
|
140
|
-
require 'bundler'
|
141
|
-
def Bundler.require(path)
|
142
|
-
raise "LOSE"
|
143
|
-
end
|
144
|
-
Bundler.load
|
145
|
-
RUBY
|
146
|
-
|
147
|
-
err.should be_empty
|
148
|
-
out.should be_empty
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
describe "when Bundler is bundled" do
|
153
|
-
it "doesn't blow up" do
|
154
|
-
install_gemfile <<-G
|
155
|
-
gem "bundler", :path => "#{File.expand_path("..", lib)}"
|
156
|
-
G
|
157
|
-
|
158
|
-
bundle %|exec ruby -e "require 'bundler'; Bundler.setup"|
|
159
|
-
err.should be_empty
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|