bundler 2.3.10 → 2.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  # Specify which files should be added to the gem when it is released.
26
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ spec.files = Dir.chdir(__dir__) do
28
28
  `git ls-files -z`.split("\x0").reject do |f|
29
29
  (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
30
30
  end
@@ -32,7 +32,7 @@ module Bundler::Molinillo
32
32
  # all belong to the same graph.
33
33
  # @return [Array<Vertex>] The sorted vertices.
34
34
  def self.tsort(vertices)
35
- TSort.tsort(
35
+ Bundler::TSort.tsort(
36
36
  lambda { |b| vertices.each(&b) },
37
37
  lambda { |v, &b| (v.successors & vertices).each(&b) }
38
38
  )
@@ -107,36 +107,42 @@ module Bundler::Molinillo
107
107
  end
108
108
  end
109
109
 
110
- conflicts.sort.reduce(''.dup) do |o, (name, conflict)|
111
- o << "\n" << incompatible_version_message_for_conflict.call(name, conflict) << "\n"
112
- if conflict.locked_requirement
113
- o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
114
- o << %( #{printable_requirement.call(conflict.locked_requirement)}\n)
115
- o << %(\n)
116
- end
117
- o << %( In #{name_for_explicit_dependency_source}:\n)
118
- trees = reduce_trees.call(conflict.requirement_trees)
119
-
120
- o << trees.map do |tree|
121
- t = ''.dup
122
- depth = 2
123
- tree.each do |req|
124
- t << ' ' * depth << printable_requirement.call(req)
125
- unless tree.last == req
126
- if spec = conflict.activated_by_name[name_for(req)]
127
- t << %( was resolved to #{version_for_spec.call(spec)}, which)
110
+ full_message_for_conflict = opts.delete(:full_message_for_conflict) do
111
+ proc do |name, conflict|
112
+ o = "\n".dup << incompatible_version_message_for_conflict.call(name, conflict) << "\n"
113
+ if conflict.locked_requirement
114
+ o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
115
+ o << %( #{printable_requirement.call(conflict.locked_requirement)}\n)
116
+ o << %(\n)
117
+ end
118
+ o << %( In #{name_for_explicit_dependency_source}:\n)
119
+ trees = reduce_trees.call(conflict.requirement_trees)
120
+
121
+ o << trees.map do |tree|
122
+ t = ''.dup
123
+ depth = 2
124
+ tree.each do |req|
125
+ t << ' ' * depth << printable_requirement.call(req)
126
+ unless tree.last == req
127
+ if spec = conflict.activated_by_name[name_for(req)]
128
+ t << %( was resolved to #{version_for_spec.call(spec)}, which)
129
+ end
130
+ t << %( depends on)
128
131
  end
129
- t << %( depends on)
132
+ t << %(\n)
133
+ depth += 1
130
134
  end
131
- t << %(\n)
132
- depth += 1
133
- end
134
- t
135
- end.join("\n")
135
+ t
136
+ end.join("\n")
136
137
 
137
- additional_message_for_conflict.call(o, name, conflict)
138
+ additional_message_for_conflict.call(o, name, conflict)
138
139
 
139
- o
140
+ o
141
+ end
142
+ end
143
+
144
+ conflicts.sort.reduce(''.dup) do |o, (name, conflict)|
145
+ o << full_message_for_conflict.call(name, conflict)
140
146
  end.strip
141
147
  end
142
148
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bundler::Molinillo
4
4
  # The version of Bundler::Molinillo.
5
- VERSION = '0.7.0'.freeze
5
+ VERSION = '0.8.0'.freeze
6
6
  end