bundler 1.14.3 → 1.14.4
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 +5 -5
- data/CHANGELOG.md +13 -0
- data/bundler.gemspec +4 -4
- data/lib/bundler.rb +24 -21
- data/lib/bundler/cli.rb +3 -3
- data/lib/bundler/cli/gem.rb +6 -1
- data/lib/bundler/cli/inject.rb +4 -2
- data/lib/bundler/cli/show.rb +1 -0
- data/lib/bundler/definition.rb +4 -2
- data/lib/bundler/friendly_errors.rb +1 -1
- data/lib/bundler/ruby_version.rb +5 -1
- data/lib/bundler/source/git.rb +5 -2
- data/lib/bundler/source/path.rb +9 -4
- data/lib/bundler/ui/silent.rb +11 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +11 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +9 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +15 -4
- data/lib/bundler/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2e0f2e439c63ecff52ba92e4ad2909db13bb291c705609e245105a04a0ae89ac
|
4
|
+
data.tar.gz: 79b7f7de1d3cacf9ca9552fb0981bfbfb886c38d5667e2f12db52b429ba908a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31397cf61f59e568acfce1d5646303f18107679f3a3e0d9e87d360d95108eedab6ad303548863bf77329a6129fbeccf3958f4939676017f548067100efbecc10
|
7
|
+
data.tar.gz: 6f1ed7f36b19027ec440a8659a492dddd72e289c6855ec3ed288ef31f07e9724d5a2a416db9a4e5d36c3c0889212aa4b1ba5c5b4568952166a147d07829f6bea
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 1.14.4 (2017-02-12)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- fail gracefully when attempting to overwrite an existing directory with `bundle gem` (#5358, @nodo)
|
6
|
+
- fix a resolver bug that would cause bundler to report conflicts that it could resolve (#5359, #5362, @segiddins)
|
7
|
+
- set native extension build arguments for git gems (#5401, @segiddins)
|
8
|
+
- fix the suggested `bundle lock` command printed when a dependency is unused on any platform (@5t111111)
|
9
|
+
- ensure the version passed to `ruby` in the Gemfile is valid during Gemfile parsing (#5380, @segiddins)
|
10
|
+
- show `bundle inject` usage when too many arguments are passed (#5384, @Shekharrajak)
|
11
|
+
- stop `bundle show --outdated` from implicitly running `bundle update` (#5375, @colby-swandale)
|
12
|
+
- allow the temporary home directory fallback to work for multiple users (@svoop)
|
13
|
+
|
1
14
|
## 1.14.3 (2017-01-24)
|
2
15
|
|
3
16
|
Bugfixes:
|
data/bundler.gemspec
CHANGED
@@ -34,9 +34,9 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.require_paths = ["lib"]
|
35
35
|
|
36
36
|
s.post_install_message = <<-END.lines.map(&:strip).join(" ")
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
https://ruby.to/support-bundler
|
37
|
+
Did you know that maintaining and improving Bundler and RubyGems.org costs
|
38
|
+
more than $25,000 USD every month? Help us keep the gem ecosystem free for
|
39
|
+
everyone by joining the hundreds of companies and individuals who help
|
40
|
+
cover these costs: https://ruby.to/support-bundler
|
41
41
|
END
|
42
42
|
end
|
data/lib/bundler.rb
CHANGED
@@ -146,34 +146,37 @@ module Bundler
|
|
146
146
|
def user_home
|
147
147
|
@user_home ||= begin
|
148
148
|
home = Bundler.rubygems.user_home
|
149
|
-
|
150
|
-
if home.nil?
|
151
|
-
|
149
|
+
|
150
|
+
warning = if home.nil?
|
151
|
+
"Your home directory is not set."
|
152
152
|
elsif !File.directory?(home)
|
153
|
-
|
153
|
+
"`#{home}` is not a directory."
|
154
154
|
elsif !File.writable?(home)
|
155
|
-
|
156
|
-
else
|
157
|
-
return @user_home = Pathname.new(home)
|
155
|
+
"`#{home}` is not writable."
|
158
156
|
end
|
159
157
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
end
|
167
|
-
rescue => e
|
168
|
-
warning += "\n\nBundler also failed to create a temporary home directory at `#{tmp_home}`:\n#{e}"
|
169
|
-
raise warning
|
158
|
+
if warning
|
159
|
+
user_home = tmp_home_path(Etc.getlogin, warning)
|
160
|
+
Bundler.ui.warn "#{warning}\nBundler will use `#{user_home}' as your home directory temporarily.\n"
|
161
|
+
user_home
|
162
|
+
else
|
163
|
+
Pathname.new(home)
|
170
164
|
end
|
165
|
+
end
|
166
|
+
end
|
171
167
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
168
|
+
def tmp_home_path(login, warning)
|
169
|
+
login ||= "unknown"
|
170
|
+
path = Pathname.new(Dir.tmpdir).join("bundler", "home")
|
171
|
+
SharedHelpers.filesystem_access(path) do |tmp_home_path|
|
172
|
+
unless tmp_home_path.exist?
|
173
|
+
tmp_home_path.mkpath
|
174
|
+
tmp_home_path.chmod(0o777)
|
175
|
+
end
|
176
|
+
tmp_home_path.join(login).tap(&:mkpath)
|
176
177
|
end
|
178
|
+
rescue => e
|
179
|
+
raise "#{warning}\nBundler also failed to create a temporary home directory at `#{path}':\n#{e}"
|
177
180
|
end
|
178
181
|
|
179
182
|
def user_bundle_path
|
data/lib/bundler/cli.rb
CHANGED
@@ -460,11 +460,11 @@ module Bundler
|
|
460
460
|
Platform.new(options).run
|
461
461
|
end
|
462
462
|
|
463
|
-
desc "inject GEM VERSION
|
464
|
-
def inject(name, version
|
463
|
+
desc "inject GEM VERSION", "Add the named gem, with version requirements, to the resolved Gemfile"
|
464
|
+
def inject(name, version)
|
465
465
|
SharedHelpers.major_deprecation "The `inject` command has been replaced by the `add` command"
|
466
466
|
require "bundler/cli/inject"
|
467
|
-
Inject.new(options, name, version
|
467
|
+
Inject.new(options, name, version).run
|
468
468
|
end
|
469
469
|
|
470
470
|
desc "lock", "Creates a lockfile without installing"
|
data/lib/bundler/cli/gem.rb
CHANGED
@@ -122,7 +122,10 @@ module Bundler
|
|
122
122
|
end
|
123
123
|
|
124
124
|
templates.each do |src, dst|
|
125
|
-
|
125
|
+
destination = target.join(dst)
|
126
|
+
SharedHelpers.filesystem_access(destination) do
|
127
|
+
thor.template("newgem/#{src}", destination, config)
|
128
|
+
end
|
126
129
|
end
|
127
130
|
|
128
131
|
executables.each do |file|
|
@@ -139,6 +142,8 @@ module Bundler
|
|
139
142
|
|
140
143
|
# Open gemspec in editor
|
141
144
|
open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit]
|
145
|
+
rescue Errno::EEXIST => e
|
146
|
+
raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.")
|
142
147
|
end
|
143
148
|
|
144
149
|
private
|
data/lib/bundler/cli/inject.rb
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
module Bundler
|
3
3
|
class CLI::Inject
|
4
4
|
attr_reader :options, :name, :version, :group, :source, :gems
|
5
|
-
def initialize(options, name, version
|
5
|
+
def initialize(options, name, version)
|
6
6
|
@options = options
|
7
7
|
@name = name
|
8
8
|
@version = version || last_version_number
|
9
9
|
@group = options[:group]
|
10
10
|
@source = options[:source]
|
11
|
-
@gems =
|
11
|
+
@gems = []
|
12
12
|
end
|
13
13
|
|
14
14
|
def run
|
@@ -18,6 +18,8 @@ module Bundler
|
|
18
18
|
|
19
19
|
# Build an array of Dependency objects out of the arguments
|
20
20
|
deps = []
|
21
|
+
# when `inject` support addition of more than one gem, then this loop will
|
22
|
+
# help. Currently this loop is running once.
|
21
23
|
gems.each_slice(4) do |gem_name, gem_version, gem_group, gem_source|
|
22
24
|
ops = Gem::Requirement::OPS.map {|key, _val| key }
|
23
25
|
has_op = ops.any? {|op| gem_version.start_with? op }
|
data/lib/bundler/cli/show.rb
CHANGED
data/lib/bundler/definition.rb
CHANGED
@@ -825,11 +825,13 @@ module Bundler
|
|
825
825
|
next if !remote && !dep.current_platform?
|
826
826
|
platforms = dep.gem_platforms(@platforms)
|
827
827
|
if platforms.empty?
|
828
|
+
mapped_platforms = dep.platforms.map {|p| Dependency::PLATFORM_MAP[p] }
|
828
829
|
Bundler.ui.warn \
|
829
830
|
"The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
|
830
831
|
"Bundler is installing for #{@platforms.join ", "} but the dependency " \
|
831
|
-
"is only for #{
|
832
|
-
"To add those platforms to the bundle,
|
832
|
+
"is only for #{mapped_platforms.join ", "}. " \
|
833
|
+
"To add those platforms to the bundle, " \
|
834
|
+
"run `bundle lock --add-platform #{mapped_platforms.join " "}`."
|
833
835
|
end
|
834
836
|
platforms.each do |p|
|
835
837
|
deps << DepProxy.new(dep, p) if remote || p == generic_local_platform
|
@@ -81,7 +81,7 @@ module Bundler
|
|
81
81
|
|
82
82
|
I tried...
|
83
83
|
|
84
|
-
- **Have you read our issues document, https://github.com/bundler/bundler/blob/master/ISSUES.md?**
|
84
|
+
- **Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?**
|
85
85
|
|
86
86
|
...
|
87
87
|
|
data/lib/bundler/ruby_version.rb
CHANGED
@@ -21,7 +21,11 @@ module Bundler
|
|
21
21
|
# must not be specified, or the engine version
|
22
22
|
# specified must match the version.
|
23
23
|
|
24
|
-
@versions
|
24
|
+
@versions = Array(versions).map do |v|
|
25
|
+
op, v = Gem::Requirement.parse(v)
|
26
|
+
op == "=" ? v.to_s : "#{op} #{v}"
|
27
|
+
end
|
28
|
+
|
25
29
|
@gem_version = Gem::Requirement.create(@versions.first).requirements.first.last
|
26
30
|
@input_engine = engine && engine.to_s
|
27
31
|
@engine = engine && engine.to_s || "ruby"
|
data/lib/bundler/source/git.rb
CHANGED
@@ -161,7 +161,9 @@ module Bundler
|
|
161
161
|
local_specs
|
162
162
|
end
|
163
163
|
|
164
|
-
def install(spec,
|
164
|
+
def install(spec, options = {})
|
165
|
+
force = options[:force]
|
166
|
+
|
165
167
|
Bundler.ui.info "Using #{version_message(spec)} from #{self}"
|
166
168
|
|
167
169
|
if requires_checkout? && !@copied && !force
|
@@ -170,7 +172,8 @@ module Bundler
|
|
170
172
|
serialize_gemspecs_in(install_path)
|
171
173
|
@copied = true
|
172
174
|
end
|
173
|
-
|
175
|
+
generate_bin_options = { :disable_extensions => !Bundler.rubygems.spec_missing_extensions?(spec), :build_args => options[:build_args] }
|
176
|
+
generate_bin(spec, generate_bin_options)
|
174
177
|
|
175
178
|
requires_checkout? ? spec.post_install_message : nil
|
176
179
|
end
|
data/lib/bundler/source/path.rb
CHANGED
@@ -71,9 +71,9 @@ module Bundler
|
|
71
71
|
File.basename(expanded_path.to_s)
|
72
72
|
end
|
73
73
|
|
74
|
-
def install(spec,
|
74
|
+
def install(spec, options = {})
|
75
75
|
Bundler.ui.info "Using #{version_message(spec)} from #{self}"
|
76
|
-
generate_bin(spec, :disable_extensions)
|
76
|
+
generate_bin(spec, :disable_extensions => true)
|
77
77
|
nil # no post-install message
|
78
78
|
end
|
79
79
|
|
@@ -193,7 +193,7 @@ module Bundler
|
|
193
193
|
path
|
194
194
|
end
|
195
195
|
|
196
|
-
def generate_bin(spec,
|
196
|
+
def generate_bin(spec, options = {})
|
197
197
|
gem_dir = Pathname.new(spec.full_gem_path)
|
198
198
|
|
199
199
|
# Some gem authors put absolute paths in their gemspec
|
@@ -208,7 +208,12 @@ module Bundler
|
|
208
208
|
end
|
209
209
|
end.compact
|
210
210
|
|
211
|
-
installer = Path::Installer.new(
|
211
|
+
installer = Path::Installer.new(
|
212
|
+
spec,
|
213
|
+
:env_shebang => false,
|
214
|
+
:disable_extensions => options[:disable_extensions],
|
215
|
+
:build_args => options[:build_args]
|
216
|
+
)
|
212
217
|
installer.post_install
|
213
218
|
rescue Gem::InvalidSpecificationException => e
|
214
219
|
Bundler.ui.warn "\n#{spec.name} at #{spec.full_gem_path} did not have a valid gemspec.\n" \
|
data/lib/bundler/ui/silent.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
module Bundler
|
3
3
|
module UI
|
4
4
|
class Silent
|
5
|
+
attr_writer :shell
|
6
|
+
|
5
7
|
def initialize
|
6
8
|
@warnings = []
|
7
9
|
end
|
@@ -37,13 +39,21 @@ module Bundler
|
|
37
39
|
def ask(message)
|
38
40
|
end
|
39
41
|
|
42
|
+
def yes?(msg)
|
43
|
+
raise "Cannot ask yes? with a silent shell"
|
44
|
+
end
|
45
|
+
|
46
|
+
def no?
|
47
|
+
raise "Cannot ask no? with a silent shell"
|
48
|
+
end
|
49
|
+
|
40
50
|
def level=(name)
|
41
51
|
end
|
42
52
|
|
43
53
|
def level(name = nil)
|
44
54
|
end
|
45
55
|
|
46
|
-
def trace(message, newline = nil)
|
56
|
+
def trace(message, newline = nil, force = false)
|
47
57
|
end
|
48
58
|
|
49
59
|
def silence
|
@@ -98,18 +98,27 @@ module Bundler::Molinillo
|
|
98
98
|
"#{self.class}:#{vertices.values.inspect}"
|
99
99
|
end
|
100
100
|
|
101
|
+
# @param [Hash] options options for dot output.
|
101
102
|
# @return [String] Returns a dot format representation of the graph
|
102
|
-
def to_dot
|
103
|
+
def to_dot(options = {})
|
104
|
+
edge_label = options.delete(:edge_label)
|
105
|
+
raise ArgumentError, "Unknown options: #{options.keys}" unless options.empty?
|
106
|
+
|
103
107
|
dot_vertices = []
|
104
108
|
dot_edges = []
|
105
109
|
vertices.each do |n, v|
|
106
110
|
dot_vertices << " #{n} [label=\"{#{n}|#{v.payload}}\"]"
|
107
111
|
v.outgoing_edges.each do |e|
|
108
|
-
|
112
|
+
label = edge_label ? edge_label.call(e) : e.requirement
|
113
|
+
dot_edges << " #{e.origin.name} -> #{e.destination.name} [label=#{label.to_s.dump}]"
|
109
114
|
end
|
110
115
|
end
|
116
|
+
|
117
|
+
dot_vertices.uniq!
|
111
118
|
dot_vertices.sort!
|
119
|
+
dot_edges.uniq!
|
112
120
|
dot_edges.sort!
|
121
|
+
|
113
122
|
dot = dot_vertices.unshift('digraph G {').push('') + dot_edges.push('}')
|
114
123
|
dot.join("\n")
|
115
124
|
end
|
@@ -23,8 +23,8 @@ module Bundler::Molinillo
|
|
23
23
|
# (see Action#down)
|
24
24
|
def down(graph)
|
25
25
|
edge = make_edge(graph)
|
26
|
-
edge.origin.outgoing_edges
|
27
|
-
edge.destination.incoming_edges
|
26
|
+
delete_first(edge.origin.outgoing_edges, edge)
|
27
|
+
delete_first(edge.destination.incoming_edges, edge)
|
28
28
|
end
|
29
29
|
|
30
30
|
# @!group AddEdgeNoCircular
|
@@ -53,6 +53,13 @@ module Bundler::Molinillo
|
|
53
53
|
@destination = destination
|
54
54
|
@requirement = requirement
|
55
55
|
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def delete_first(array, item)
|
60
|
+
return unless index = array.index(item)
|
61
|
+
array.delete_at(index)
|
62
|
+
end
|
56
63
|
end
|
57
64
|
end
|
58
65
|
end
|
@@ -48,7 +48,7 @@ module Bundler::Molinillo
|
|
48
48
|
if debug?
|
49
49
|
debug_info = yield
|
50
50
|
debug_info = debug_info.inspect unless debug_info.is_a?(String)
|
51
|
-
output.puts debug_info.split("\n").map { |s| '
|
51
|
+
output.puts debug_info.split("\n").map { |s| ' ' * depth + s }
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -356,13 +356,20 @@ module Bundler::Molinillo
|
|
356
356
|
# Ensures there are no orphaned successors to the given {vertex}.
|
357
357
|
# @param [DependencyGraph::Vertex] vertex the vertex to fix up.
|
358
358
|
# @return [void]
|
359
|
-
def fixup_swapped_children(vertex)
|
359
|
+
def fixup_swapped_children(vertex) # rubocop:disable Metrics/CyclomaticComplexity
|
360
360
|
payload = vertex.payload
|
361
361
|
deps = dependencies_for(payload).group_by(&method(:name_for))
|
362
362
|
vertex.outgoing_edges.each do |outgoing_edge|
|
363
|
-
|
363
|
+
requirement = outgoing_edge.requirement
|
364
|
+
parent_index = @parent_of[requirement]
|
364
365
|
succ = outgoing_edge.destination
|
365
366
|
matching_deps = Array(deps[succ.name])
|
367
|
+
dep_matched = matching_deps.include?(requirement)
|
368
|
+
|
369
|
+
# only reset the parent index when it was originally required by the
|
370
|
+
# same named spec
|
371
|
+
@parent_of[requirement] = states.size - 1 if parent_index && states[parent_index].name == name
|
372
|
+
|
366
373
|
if matching_deps.empty? && !succ.root? && succ.predecessors.to_a == [vertex]
|
367
374
|
debug(depth) { "Removing orphaned spec #{succ.name} after swapping #{name}" }
|
368
375
|
succ.requirements.each { |r| @parent_of.delete(r) }
|
@@ -373,9 +380,13 @@ module Bundler::Molinillo
|
|
373
380
|
# so it's safe to delete only based upon name here
|
374
381
|
removed_names.include?(name_for(r))
|
375
382
|
end
|
376
|
-
elsif !
|
383
|
+
elsif !dep_matched
|
384
|
+
# also reset if we're removing the edge, but only if its parent has
|
385
|
+
# already been fixed up
|
386
|
+
@parent_of[requirement] = states.size - 1 if @parent_of[requirement].nil?
|
387
|
+
|
377
388
|
activated.delete_edge(outgoing_edge)
|
378
|
-
requirements.delete(
|
389
|
+
requirements.delete(requirement)
|
379
390
|
end
|
380
391
|
end
|
381
392
|
end
|
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.14.
|
10
|
+
VERSION = "1.14.4" 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.14.
|
4
|
+
version: 1.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: automatiek
|
@@ -371,9 +371,10 @@ homepage: http://bundler.io
|
|
371
371
|
licenses:
|
372
372
|
- MIT
|
373
373
|
metadata: {}
|
374
|
-
post_install_message: '
|
375
|
-
|
376
|
-
|
374
|
+
post_install_message: 'Did you know that maintaining and improving Bundler and RubyGems.org
|
375
|
+
costs more than $25,000 USD every month? Help us keep the gem ecosystem free for
|
376
|
+
everyone by joining the hundreds of companies and individuals who help cover these
|
377
|
+
costs: https://ruby.to/support-bundler'
|
377
378
|
rdoc_options: []
|
378
379
|
require_paths:
|
379
380
|
- lib
|
@@ -389,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
389
390
|
version: 1.3.6
|
390
391
|
requirements: []
|
391
392
|
rubyforge_project:
|
392
|
-
rubygems_version: 2.6.
|
393
|
+
rubygems_version: 2.6.10
|
393
394
|
signing_key:
|
394
395
|
specification_version: 4
|
395
396
|
summary: The best way to manage your application's dependencies
|