bundler 1.0.21 → 1.0.22

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.

@@ -16,7 +16,6 @@ env:
16
16
  - RGV=v1.6.2
17
17
  - RGV=v1.7.2
18
18
  - RGV=v1.8.10
19
- - RGV=master
20
19
 
21
20
  matrix:
22
21
  exclude:
@@ -1,3 +1,10 @@
1
+ ## 1.0.22 (February 8, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - Tweaks to cache on Rubygems 1.3
6
+ - Fix for `gemspec` with development dependencies in deployment (@raggi)
7
+
1
8
  ## 1.0.21 (September 30, 2011)
2
9
 
3
10
  - No changes from RC
data/Rakefile CHANGED
@@ -2,6 +2,8 @@
2
2
  $:.unshift File.expand_path("../lib", __FILE__)
3
3
  require 'bundler/gem_tasks'
4
4
 
5
+ task :release => ["man:clean", "man:build"]
6
+
5
7
  def safe_task(&block)
6
8
  yield
7
9
  true
@@ -70,6 +70,23 @@ module Bundler
70
70
 
71
71
  converge_sources
72
72
  converge_dependencies
73
+
74
+ fixup_dependency_types!
75
+ end
76
+
77
+ def fixup_dependency_types!
78
+ # XXX This is a temporary workaround for a bug when using rubygems 1.8.15
79
+ # where Gem::Dependency#== matches Gem::Dependency#type. As the lockfile
80
+ # doesn't carry a notion of the dependency type, if you use
81
+ # add_development_dependency in a gemspec that's loaded with the gemspec
82
+ # directive, the lockfile dependencies and resolved dependencies end up
83
+ # with a mismatch on #type.
84
+ # Test coverage to catch a regression on this is in gemspec_spec.rb
85
+ @dependencies.each do |d|
86
+ if ld = @locked_deps.find { |l| l.name == d.name }
87
+ ld.instance_variable_set(:@type, d.type)
88
+ end
89
+ end
73
90
  end
74
91
 
75
92
  def resolve_with_cache!
@@ -255,14 +255,9 @@ module Bundler
255
255
  # by monkeypatching it into the method in Rubygems 1.3.6 and 1.3.7.
256
256
  def backport_segment_generation
257
257
  Gem::Version.send(:define_method, :segments) do
258
- @segments_generated ||= false
259
- unless @segments_generated
260
- @segments ||= @version.scan(/[0-9a-z]+/i).map do |s|
261
- /^\d+$/ =~ s ? s.to_i : s
262
- end
258
+ @segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s|
259
+ /^\d+$/ =~ s ? s.to_i : s
263
260
  end
264
- @segments_generated = true
265
- @segments
266
261
  end
267
262
  end
268
263
 
@@ -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.21" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.0.22" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -110,6 +110,27 @@ describe "bundle install from an existing gemspec" do
110
110
  should_be_installed "bar-dev 1.0.0", :groups => :dev
111
111
  end
112
112
 
113
+ it "should match a lockfile even if the gemspec defines development dependencies" do
114
+ build_lib("foo", :path => tmp.join("foo")) do |s|
115
+ s.write("Gemfile", "source 'file://#{gem_repo1}'\ngemspec")
116
+ s.add_dependency "actionpack", "=2.3.2"
117
+ s.add_development_dependency "rake", '=0.8.7'
118
+ end
119
+
120
+ Dir.chdir(tmp.join("foo")) do
121
+ bundle "install"
122
+ # This should really be able to rely on $stderr, but, it's not written
123
+ # right, so we can't. In fact, this is a bug negation test, and so it'll
124
+ # ghost pass in future, and will only catch a regression if the message
125
+ # doesn't change. Exit codes should be used correctly (they can be more
126
+ # than just 0 and 1).
127
+ output = bundle("install --deployment")
128
+ output.should_not match(/You have added to the Gemfile/)
129
+ output.should_not match(/You have deleted from the Gemfile/)
130
+ output.should_not match(/install in deployment mode after changing/)
131
+ end
132
+ end
133
+
113
134
  it "should evaluate the gemspec in its directory" do
114
135
  build_lib("foo", :path => tmp.join("foo"))
115
136
  File.open(tmp.join("foo/foo.gemspec"), "w") do |s|
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: 61
4
+ hash: 59
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 21
10
- version: 1.0.21
9
+ - 22
10
+ version: 1.0.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Andr\xC3\xA9 Arko"
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-09-30 00:00:00 -07:00
21
+ date: 2012-02-08 00:00:00 -08:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency