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.

@@ -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 Gem.source_index.find_name('foo').first.full_gem_path
30
+ puts Bundler.rubygems.find_name('foo').first.full_gem_path
31
31
  RUBY
32
32
  out.should == bundle("show foo")
33
33
  end
@@ -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}"
@@ -83,7 +83,8 @@ describe "bundle exec" do
83
83
  gem "rack"
84
84
  G
85
85
 
86
- rubyopt = "-I#{bundler_path} -rbundler/setup"
86
+ rubyopt = ENV['RUBYOPT']
87
+ rubyopt = "-I#{bundler_path} -rbundler/setup #{rubyopt}"
87
88
 
88
89
  bundle "exec 'echo $RUBYOPT'"
89
90
  out.should have_rubyopts(rubyopt)
@@ -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
@@ -166,7 +166,7 @@ describe "Bundler.setup" do
166
166
  should_be_installed "rack 1.0.0"
167
167
  end
168
168
 
169
- describe "crippling rubygems" do
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 Gem.source_index.find_name("rack").inspect
525
+ puts Bundler.rubygems.find_name("rack").inspect
526
526
  R
527
527
 
528
528
  out.should == "[]"
@@ -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
@@ -67,23 +67,11 @@ module Spec
67
67
  bundled_app("Gemfile.lock").should exist
68
68
  end
69
69
 
70
- RSpec::Matchers.define :be_with_diff do |expected|
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: 1923831875
4
+ hash: 1923831877
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
9
  - pre
10
- - 1
11
- version: 1.1.pre.1
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-02-02 00:00:00 -08:00
23
- default_executable: bundle
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: 7712058
47
+ hash: 3
48
48
  segments:
49
49
  - 2
50
50
  - 0
51
- - 0
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
- - carlhuda@engineyard.com
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