bundler 1.12.0 → 1.12.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/bundler/fetcher/compact_index.rb +3 -0
- data/lib/bundler/runtime.rb +10 -12
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb +1 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/cache.rb +1 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +21 -6
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/version.rb +2 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +5 -5
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +11 -5
- data/lib/bundler/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b30d7f68ab57d609b0945f483f536cafac8d4757
|
4
|
+
data.tar.gz: 7a7c04740ead7985a85d89061738f7a654c95c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a04ea9994afc79eaa115ca259758e15fba0da19228f4210646c2451e0c3b11b0e39278fda7aa56f1c1202993b248a3b16227ceff5ab7d72ecaf4c31be2ccd73
|
7
|
+
data.tar.gz: f26a87583ff7b6cf97bb260874117d47cb9636a3051a59d1cb88e4551cae9bdb7ebc745f2e5aa07ec57a1ea96a698d82b2a9b4853947ca392f55b9cc4773162a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.12.1 (2016-04-30)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
- automatically fallback when the new index has a checksum mismatch instead of erroring (@segiddins)
|
5
|
+
- fix computation of new index file local checksums on Windows (#4472, @mwrock)
|
6
|
+
- properly handle certain resolver backtracking cases without erroring (@segiddins, #4484)
|
7
|
+
- ensure the `$LOAD_PATH` contains specs' load paths in the correct order (@segiddins, #4482)
|
8
|
+
|
1
9
|
## 1.12.0 (2016-04-28)
|
2
10
|
|
3
11
|
This space intentionally left blank.
|
@@ -61,6 +61,9 @@ module Bundler
|
|
61
61
|
def available?
|
62
62
|
# Read info file checksums out of /versions, so we can know if gems are up to date
|
63
63
|
fetch_uri.scheme != "file" && compact_index_client.update_and_parse_checksums!
|
64
|
+
rescue CompactIndexClient::Updater::MisMatchedChecksumError => e
|
65
|
+
Bundler.ui.warn(e.message)
|
66
|
+
nil
|
64
67
|
end
|
65
68
|
compact_index_request :available?
|
66
69
|
|
data/lib/bundler/runtime.rb
CHANGED
@@ -17,7 +17,7 @@ module Bundler
|
|
17
17
|
Bundler.rubygems.replace_entrypoints(specs)
|
18
18
|
|
19
19
|
# Activate the specs
|
20
|
-
specs.
|
20
|
+
load_paths = specs.map do |spec|
|
21
21
|
unless spec.loaded_from
|
22
22
|
raise GemNotFound, "#{spec.full_name} is missing. Run `bundle` to get it."
|
23
23
|
end
|
@@ -36,18 +36,16 @@ module Bundler
|
|
36
36
|
end
|
37
37
|
|
38
38
|
Bundler.rubygems.mark_loaded(spec)
|
39
|
-
|
40
|
-
|
41
|
-
# See Gem::Specification#add_self_to_load_path (since RubyGems 1.8)
|
42
|
-
insert_index = Bundler.rubygems.load_path_insert_index
|
39
|
+
spec.load_paths.reject {|path| $LOAD_PATH.include?(path) }
|
40
|
+
end.reverse.flatten
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
# See Gem::Specification#add_self_to_load_path (since RubyGems 1.8)
|
43
|
+
if insert_index = Bundler.rubygems.load_path_insert_index
|
44
|
+
# Gem directories must come after -I and ENV['RUBYLIB']
|
45
|
+
$LOAD_PATH.insert(insert_index, *load_paths)
|
46
|
+
else
|
47
|
+
# We are probably testing in core, -I and RUBYLIB don't apply
|
48
|
+
$LOAD_PATH.unshift(*load_paths)
|
51
49
|
end
|
52
50
|
|
53
51
|
setup_manpath
|
@@ -1,9 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "stringio"
|
2
3
|
require "zlib"
|
3
4
|
|
4
5
|
class Bundler::CompactIndexClient
|
5
6
|
class Updater
|
6
|
-
class MisMatchedChecksumError < Error
|
7
|
+
class MisMatchedChecksumError < Error
|
8
|
+
def initialize(path, server_checksum, local_checksum)
|
9
|
+
@path = path
|
10
|
+
@server_checksum = server_checksum
|
11
|
+
@local_checksum = local_checksum
|
12
|
+
end
|
13
|
+
|
14
|
+
def message
|
15
|
+
"The checksum of /#{@path} does not match the checksum provided by the server! Something is wrong " \
|
16
|
+
"(local checksum is #{@local_checksum.inspect}, was expecting #{@server_checksum.inspect})."
|
17
|
+
end
|
18
|
+
end
|
7
19
|
|
8
20
|
def initialize(fetcher)
|
9
21
|
@fetcher = fetcher
|
@@ -31,25 +43,28 @@ class Bundler::CompactIndexClient
|
|
31
43
|
mode = response.is_a?(Net::HTTPPartialContent) ? "a" : "w"
|
32
44
|
local_path.open(mode) {|f| f << content }
|
33
45
|
|
34
|
-
|
46
|
+
response_etag = response["ETag"]
|
47
|
+
return if etag_for(local_path) == response_etag
|
35
48
|
|
36
49
|
if retrying.nil?
|
37
50
|
local_path.delete
|
38
51
|
update(local_path, remote_path, :retrying)
|
39
52
|
else
|
40
|
-
raise MisMatchedChecksumError,
|
41
|
-
"does not match the checksum provided by server! Something is wrong."
|
53
|
+
raise MisMatchedChecksumError.new(remote_path, response_etag, etag_for(local_path))
|
42
54
|
end
|
43
55
|
end
|
44
56
|
|
45
57
|
def etag_for(path)
|
46
58
|
sum = checksum_for_file(path)
|
47
|
-
sum ?
|
59
|
+
sum ? %("#{sum}") : nil
|
48
60
|
end
|
49
61
|
|
50
62
|
def checksum_for_file(path)
|
51
63
|
return nil unless path.file?
|
52
|
-
Digest
|
64
|
+
# This must use IO.read instead of Digest.file().hexdigest
|
65
|
+
# because we need to preserve \n line endings on windows when calculating
|
66
|
+
# the checksum
|
67
|
+
Digest::MD5.hexdigest(IO.read(path))
|
53
68
|
end
|
54
69
|
end
|
55
70
|
end
|
@@ -16,7 +16,7 @@ module Bundler::Molinillo
|
|
16
16
|
include TSort
|
17
17
|
|
18
18
|
# @visibility private
|
19
|
-
|
19
|
+
alias tsort_each_node each
|
20
20
|
|
21
21
|
# @visibility private
|
22
22
|
def tsort_each_child(vertex, &block)
|
@@ -184,7 +184,7 @@ module Bundler::Molinillo
|
|
184
184
|
|
185
185
|
# @return [Boolean] whether the vertex is considered a root vertex
|
186
186
|
attr_accessor :root
|
187
|
-
|
187
|
+
alias root? root
|
188
188
|
|
189
189
|
# Initializes a vertex with the given name and payload.
|
190
190
|
# @param [String] name see {#name}
|
@@ -262,7 +262,7 @@ module Bundler::Molinillo
|
|
262
262
|
payload == other.payload
|
263
263
|
end
|
264
264
|
|
265
|
-
|
265
|
+
alias eql? ==
|
266
266
|
|
267
267
|
# @return [Fixnum] a hash for the vertex based upon its {#name}
|
268
268
|
def hash
|
@@ -276,7 +276,7 @@ module Bundler::Molinillo
|
|
276
276
|
equal?(other) || successors.any? { |v| v.path_to?(other) }
|
277
277
|
end
|
278
278
|
|
279
|
-
|
279
|
+
alias descendent? path_to?
|
280
280
|
|
281
281
|
# Is there a path from `other` to `self` following edges in the
|
282
282
|
# dependency graph?
|
@@ -285,7 +285,7 @@ module Bundler::Molinillo
|
|
285
285
|
other.path_to?(self)
|
286
286
|
end
|
287
287
|
|
288
|
-
|
288
|
+
alias is_reachable_from? ancestor?
|
289
289
|
end
|
290
290
|
end
|
291
291
|
end
|
@@ -26,7 +26,7 @@ module Bundler::Molinillo
|
|
26
26
|
def message
|
27
27
|
sources = required_by.map { |r| "`#{r}`" }.join(' and ')
|
28
28
|
message = "Unable to find a specification for `#{dependency}`"
|
29
|
-
message
|
29
|
+
message += " depended upon by #{sources}" unless sources.empty?
|
30
30
|
message
|
31
31
|
end
|
32
32
|
end
|
@@ -131,7 +131,7 @@ module Bundler::Molinillo
|
|
131
131
|
specification_provider.send(instance_method, *args, &block)
|
132
132
|
rescue NoSuchDependencyError => error
|
133
133
|
if state
|
134
|
-
vertex = activated.vertex_named(name_for
|
134
|
+
vertex = activated.vertex_named(name_for(error.dependency))
|
135
135
|
error.required_by += vertex.incoming_edges.map { |e| e.origin.name }
|
136
136
|
error.required_by << name_for_explicit_dependency_source unless vertex.explicit_requirements.empty?
|
137
137
|
end
|
@@ -345,7 +345,7 @@ module Bundler::Molinillo
|
|
345
345
|
vertex = swapped.vertex_named(name)
|
346
346
|
vertex.payload = possibility
|
347
347
|
return unless vertex.requirements.
|
348
|
-
|
348
|
+
all? { |r| requirement_satisfied_by?(r, swapped, possibility) }
|
349
349
|
return unless new_spec_satisfied?
|
350
350
|
actual_vertex = activated.vertex_named(name)
|
351
351
|
actual_vertex.payload = possibility
|
@@ -363,7 +363,13 @@ module Bundler::Molinillo
|
|
363
363
|
if !dep_names.include?(succ.name) && !succ.root? && succ.predecessors.to_a == [vertex]
|
364
364
|
debug(depth) { "Removing orphaned spec #{succ.name} after swapping #{name}" }
|
365
365
|
activated.detach_vertex_named(succ.name)
|
366
|
-
|
366
|
+
|
367
|
+
all_successor_names = succ.recursive_successors.map(&:name)
|
368
|
+
|
369
|
+
requirements.delete_if do |requirement|
|
370
|
+
requirement_name = name_for(requirement)
|
371
|
+
(requirement_name == succ.name) || all_successor_names.include?(requirement_name)
|
372
|
+
end
|
367
373
|
end
|
368
374
|
end
|
369
375
|
end
|
@@ -420,14 +426,14 @@ module Bundler::Molinillo
|
|
420
426
|
debug(depth) { "Requiring nested dependencies (#{nested_dependencies.join(', ')})" }
|
421
427
|
nested_dependencies.each { |d| activated.add_child_vertex(name_for(d), nil, [name_for(activated_spec)], d) }
|
422
428
|
|
423
|
-
push_state_for_requirements(requirements + nested_dependencies, nested_dependencies.
|
429
|
+
push_state_for_requirements(requirements + nested_dependencies, !nested_dependencies.empty?)
|
424
430
|
end
|
425
431
|
|
426
432
|
# Pushes a new {DependencyState} that encapsulates both existing and new
|
427
433
|
# requirements
|
428
434
|
# @param [Array] new_requirements
|
429
435
|
# @return [void]
|
430
|
-
def push_state_for_requirements(new_requirements, requires_sort = true, new_activated = activated
|
436
|
+
def push_state_for_requirements(new_requirements, requires_sort = true, new_activated = activated)
|
431
437
|
new_requirements = sort_dependencies(new_requirements.uniq, new_activated, conflicts) if requires_sort
|
432
438
|
new_requirement = new_requirements.shift
|
433
439
|
new_name = new_requirement ? name_for(new_requirement) : ''
|
data/lib/bundler/version.rb
CHANGED
@@ -7,5 +7,5 @@ module Bundler
|
|
7
7
|
# We're doing this because we might write tests that deal
|
8
8
|
# with other versions of bundler and we are unsure how to
|
9
9
|
# handle this better.
|
10
|
-
VERSION = "1.12.
|
10
|
+
VERSION = "1.12.1" unless defined?(::Bundler::VERSION)
|
11
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-04-
|
14
|
+
date: 2016-04-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: automatiek
|
@@ -353,8 +353,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
353
|
version: 1.3.6
|
354
354
|
requirements: []
|
355
355
|
rubyforge_project:
|
356
|
-
rubygems_version: 2.
|
356
|
+
rubygems_version: 2.6.3
|
357
357
|
signing_key:
|
358
358
|
specification_version: 4
|
359
359
|
summary: The best way to manage your application's dependencies
|
360
360
|
test_files: []
|
361
|
+
has_rdoc:
|