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.
- data/.travis.yml +0 -1
- data/CHANGELOG.md +7 -0
- data/Rakefile +2 -0
- data/lib/bundler/definition.rb +17 -0
- data/lib/bundler/rubygems_integration.rb +2 -7
- data/lib/bundler/version.rb +1 -1
- data/spec/install/gemspec_spec.rb +21 -0
- metadata +4 -4
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
data/lib/bundler/definition.rb
CHANGED
@@ -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
|
-
@
|
259
|
-
|
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
|
|
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.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:
|
4
|
+
hash: 59
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
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:
|
21
|
+
date: 2012-02-08 00:00:00 -08:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|