bundler 1.1.pre.1 → 1.1.pre.2
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/CHANGELOG.md +46 -0
- data/Rakefile +20 -3
- data/bin/bundle +5 -0
- data/bundler.gemspec +3 -4
- data/lib/bundler.rb +11 -8
- data/lib/bundler/capistrano.rb +1 -1
- data/lib/bundler/cli.rb +12 -7
- data/lib/bundler/definition.rb +19 -6
- data/lib/bundler/dependency.rb +2 -1
- data/lib/bundler/dsl.rb +14 -10
- data/lib/bundler/index.rb +23 -12
- data/lib/bundler/installer.rb +10 -9
- data/lib/bundler/lazy_specification.rb +1 -1
- data/lib/bundler/resolver.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +4 -17
- data/lib/bundler/rubygems_integration.rb +301 -0
- data/lib/bundler/runtime.rb +5 -5
- data/lib/bundler/settings.rb +3 -3
- data/lib/bundler/shared_helpers.rb +5 -99
- data/lib/bundler/source.rb +31 -27
- data/lib/bundler/version.rb +1 -1
- data/man/bundle-install.ronn +3 -0
- data/spec/install/deploy_spec.rb +7 -7
- data/spec/install/git_spec.rb +1 -1
- data/spec/install/invalid_spec.rb +18 -0
- data/spec/install/path_spec.rb +52 -0
- data/spec/lock/git_spec.rb +1 -1
- data/spec/lock/lockfile_spec.rb +23 -0
- data/spec/other/exec_spec.rb +2 -1
- data/spec/other/ext_spec.rb +21 -0
- data/spec/runtime/setup_spec.rb +2 -2
- data/spec/support/builders.rb +6 -0
- data/spec/support/matchers.rb +3 -15
- metadata +12 -13
data/spec/lock/git_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe "bundle lock with git gems" do
|
|
27
27
|
|
28
28
|
it "provides correct #full_gem_path" do
|
29
29
|
run <<-RUBY
|
30
|
-
puts
|
30
|
+
puts Bundler.rubygems.find_name('foo').first.full_gem_path
|
31
31
|
RUBY
|
32
32
|
out.should == bundle("show foo")
|
33
33
|
end
|
data/spec/lock/lockfile_spec.rb
CHANGED
@@ -329,6 +329,29 @@ describe "the lockfile format" do
|
|
329
329
|
G
|
330
330
|
end
|
331
331
|
|
332
|
+
it "orders dependencies according to version" do
|
333
|
+
install_gemfile <<-G
|
334
|
+
source "file://#{gem_repo1}"
|
335
|
+
gem 'double_deps'
|
336
|
+
G
|
337
|
+
|
338
|
+
lockfile_should_be <<-G
|
339
|
+
GEM
|
340
|
+
remote: file:#{gem_repo1}/
|
341
|
+
specs:
|
342
|
+
double_deps (1.0)
|
343
|
+
net-ssh
|
344
|
+
net-ssh (>= 1.0.0)
|
345
|
+
net-ssh (1.0)
|
346
|
+
|
347
|
+
PLATFORMS
|
348
|
+
#{generic(Gem::Platform.local)}
|
349
|
+
|
350
|
+
DEPENDENCIES
|
351
|
+
double_deps
|
352
|
+
G
|
353
|
+
end
|
354
|
+
|
332
355
|
it "does not add the :require option to the lockfile" do
|
333
356
|
install_gemfile <<-G
|
334
357
|
source "file://#{gem_repo1}"
|
data/spec/other/exec_spec.rb
CHANGED
data/spec/other/ext_spec.rb
CHANGED
@@ -14,3 +14,24 @@ describe "Bundler::GemHelpers#generic" do
|
|
14
14
|
generic(pl('x86-darwin-10')).should == pl('ruby')
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
describe "Gem::SourceIndex#refresh!" do
|
19
|
+
rubygems_1_7 = Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.7.0")
|
20
|
+
|
21
|
+
before do
|
22
|
+
install_gemfile <<-G
|
23
|
+
source "file://#{gem_repo1}"
|
24
|
+
gem "rack"
|
25
|
+
G
|
26
|
+
end
|
27
|
+
|
28
|
+
it "does not explode when called", :if => rubygems_1_7 do
|
29
|
+
run "Gem.source_index.refresh!"
|
30
|
+
run "Gem::SourceIndex.new([]).refresh!"
|
31
|
+
end
|
32
|
+
|
33
|
+
it "does not explode when called", :unless => rubygems_1_7 do
|
34
|
+
run "Gem.source_index.refresh!"
|
35
|
+
run "Gem::SourceIndex.from_gems_in([]).refresh!"
|
36
|
+
end
|
37
|
+
end
|
data/spec/runtime/setup_spec.rb
CHANGED
@@ -166,7 +166,7 @@ describe "Bundler.setup" do
|
|
166
166
|
should_be_installed "rack 1.0.0"
|
167
167
|
end
|
168
168
|
|
169
|
-
describe "
|
169
|
+
describe "integrate with rubygems" do
|
170
170
|
describe "by replacing #gem" do
|
171
171
|
before :each do
|
172
172
|
install_gemfile <<-G
|
@@ -522,7 +522,7 @@ describe "Bundler.setup" do
|
|
522
522
|
|
523
523
|
run <<-R
|
524
524
|
Gem.refresh
|
525
|
-
puts
|
525
|
+
puts Bundler.rubygems.find_name("rack").inspect
|
526
526
|
R
|
527
527
|
|
528
528
|
out.should == "[]"
|
data/spec/support/builders.rb
CHANGED
@@ -217,6 +217,12 @@ module Spec
|
|
217
217
|
s.add_dependency "net_d"
|
218
218
|
end
|
219
219
|
|
220
|
+
# Capistrano did this (at least until version 2.5.10)
|
221
|
+
build_gem "double_deps" do |s|
|
222
|
+
s.add_dependency "net-ssh", ">= 1.0.0"
|
223
|
+
s.add_dependency "net-ssh"
|
224
|
+
end
|
225
|
+
|
220
226
|
build_gem "foo"
|
221
227
|
end
|
222
228
|
end
|
data/spec/support/matchers.rb
CHANGED
@@ -67,23 +67,11 @@ module Spec
|
|
67
67
|
bundled_app("Gemfile.lock").should exist
|
68
68
|
end
|
69
69
|
|
70
|
-
|
70
|
+
def lockfile_should_be(expected)
|
71
|
+
should_be_locked
|
71
72
|
spaces = expected[/\A\s+/, 0] || ""
|
72
73
|
expected.gsub!(/^#{spaces}/, '')
|
73
|
-
|
74
|
-
failure_message_for_should do |actual|
|
75
|
-
"The lockfile did not match.\n=== Expected:\n" <<
|
76
|
-
expected << "\n=== Got:\n" << actual << "\n===========\n"
|
77
|
-
end
|
78
|
-
|
79
|
-
match do |actual|
|
80
|
-
expected == actual
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
def lockfile_should_be(expected)
|
85
|
-
lock = File.read(bundled_app("Gemfile.lock"))
|
86
|
-
lock.should be_with_diff(expected)
|
74
|
+
bundled_app("Gemfile.lock").read.should == expected
|
87
75
|
end
|
88
76
|
end
|
89
77
|
end
|
metadata
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1923831877
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
9
|
- pre
|
10
|
-
-
|
11
|
-
version: 1.1.pre.
|
10
|
+
- 2
|
11
|
+
version: 1.1.pre.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
|
-
- Carl Lerche
|
15
|
-
- Yehuda Katz
|
16
14
|
- "Andr\xC3\xA9 Arko"
|
17
15
|
- Terence Lee
|
16
|
+
- Carl Lerche
|
17
|
+
- Yehuda Katz
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2011-
|
23
|
-
default_executable:
|
22
|
+
date: 2011-04-28 00:00:00 -07:00
|
23
|
+
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: ronn
|
@@ -42,20 +42,18 @@ dependencies:
|
|
42
42
|
requirement: &id002 !ruby/object:Gem::Requirement
|
43
43
|
none: false
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
hash:
|
47
|
+
hash: 3
|
48
48
|
segments:
|
49
49
|
- 2
|
50
50
|
- 0
|
51
|
-
|
52
|
-
- rc
|
53
|
-
version: 2.0.0.rc
|
51
|
+
version: "2.0"
|
54
52
|
type: :development
|
55
53
|
version_requirements: *id002
|
56
54
|
description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
|
57
55
|
email:
|
58
|
-
-
|
56
|
+
- andre@arko.net
|
59
57
|
executables:
|
60
58
|
- bundle
|
61
59
|
extensions: []
|
@@ -90,6 +88,7 @@ files:
|
|
90
88
|
- lib/bundler/remote_specification.rb
|
91
89
|
- lib/bundler/resolver.rb
|
92
90
|
- lib/bundler/rubygems_ext.rb
|
91
|
+
- lib/bundler/rubygems_integration.rb
|
93
92
|
- lib/bundler/runtime.rb
|
94
93
|
- lib/bundler/settings.rb
|
95
94
|
- lib/bundler/setup.rb
|