bundler 1.14.0.pre.1 → 1.14.0.pre.2
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 +10 -1
- data/bundler.gemspec +7 -0
- data/lib/bundler/cli.rb +24 -2
- data/lib/bundler/cli/open.rb +2 -1
- data/lib/bundler/source/git/git_proxy.rb +2 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +3 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +9 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +2 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +5 -6
- data/lib/bundler/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e5d26c5df41944223ad6cde853186ec5265227b
|
4
|
+
data.tar.gz: 229f9861f18432b1c586790098e9d2ceea241d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a159c445236491e342e238ac657e7caeae5eb7c3ebe4ec3c73f205c8986f2170dd26572d31b8b40a32363df622df4d3876fe6027f5d1eae2389600c1dceb3faa
|
7
|
+
data.tar.gz: 1444c0b34ff18d8ca70d00e1488d1e782ea2322eaaa12c1b718913f03ff268b66cf3c28bd8eaa20d615b8cc0f4af0edd00589ab81ca4386b482d660b1fb6ec26
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,13 @@
|
|
1
|
-
## 1.14.0.pre.
|
1
|
+
## 1.14.0.pre.2 (2016-01-11)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- allow not selecting a gem when running `bundle open` (#5301, @segiddins)
|
6
|
+
- support installing gems from git branches that contain shell metacharacters (#5295, @segiddins)
|
7
|
+
- fix a resolver error that could leave dependencies unresolved (#5294, @segiddins)
|
8
|
+
- fix a stack overflow error when invoking commands (#5296, @segiddins)
|
9
|
+
|
10
|
+
## 1.14.0.pre.1 (2016-12-xx)
|
2
11
|
|
3
12
|
Features:
|
4
13
|
|
data/bundler.gemspec
CHANGED
@@ -32,4 +32,11 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.bindir = "exe"
|
33
33
|
s.executables = %w(bundle bundler)
|
34
34
|
s.require_paths = ["lib"]
|
35
|
+
|
36
|
+
s.post_install_message = <<-END.lines.map(&:strip).join(" ")
|
37
|
+
Bundler and RubyGems.org are free for anyone to use, but maintaining them
|
38
|
+
costs more than $25,000 USD every month. Help us cover those costs so that
|
39
|
+
we can keep the gem ecosystem free for everyone:
|
40
|
+
https://ruby.to/support-bundler
|
41
|
+
END
|
35
42
|
end
|
data/lib/bundler/cli.rb
CHANGED
@@ -401,6 +401,8 @@ module Bundler
|
|
401
401
|
Viz.new(options.dup).run
|
402
402
|
end
|
403
403
|
|
404
|
+
old_gem = instance_method(:gem)
|
405
|
+
|
404
406
|
desc "gem GEM [OPTIONS]", "Creates a skeleton for creating a rubygem"
|
405
407
|
method_option :exe, :type => :boolean, :default => false, :aliases => ["--bin", "-b"], :desc => "Generate a binary executable for your library."
|
406
408
|
method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config gem.coc true`."
|
@@ -412,10 +414,30 @@ module Bundler
|
|
412
414
|
method_option :test, :type => :string, :lazy_default => "rspec", :aliases => "-t", :banner => "rspec",
|
413
415
|
:desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config gem.test rspec`."
|
414
416
|
def gem(name)
|
415
|
-
require "bundler/cli/gem"
|
416
|
-
Gem.new(options, name, self).run
|
417
417
|
end
|
418
418
|
|
419
|
+
commands["gem"].tap do |gem_command|
|
420
|
+
def gem_command.run(instance, args = [])
|
421
|
+
arity = 1 # name
|
422
|
+
|
423
|
+
require "bundler/cli/gem"
|
424
|
+
cmd_args = args + [instance]
|
425
|
+
cmd_args.unshift(instance.options)
|
426
|
+
|
427
|
+
cmd = begin
|
428
|
+
Gem.new(*cmd_args)
|
429
|
+
rescue ArgumentError => e
|
430
|
+
instance.class.handle_argument_error(self, e, args, arity)
|
431
|
+
end
|
432
|
+
|
433
|
+
cmd.run
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
undef_method(:gem)
|
438
|
+
define_method(:gem, old_gem)
|
439
|
+
private :gem
|
440
|
+
|
419
441
|
def self.source_root
|
420
442
|
File.expand_path(File.join(File.dirname(__FILE__), "templates"))
|
421
443
|
end
|
data/lib/bundler/cli/open.rb
CHANGED
@@ -13,7 +13,8 @@ module Bundler
|
|
13
13
|
def run
|
14
14
|
editor = [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? }
|
15
15
|
return Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR") unless editor
|
16
|
-
|
16
|
+
return unless spec = Bundler::CLI::Common.select_spec(name, :regex_match)
|
17
|
+
path = spec.full_gem_path
|
17
18
|
Dir.chdir(path) do
|
18
19
|
command = Shellwords.split(editor) + [path]
|
19
20
|
Bundler.with_clean_env do
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require "shellwords"
|
2
3
|
require "tempfile"
|
3
4
|
module Bundler
|
4
5
|
class Source
|
@@ -180,7 +181,7 @@ module Bundler
|
|
180
181
|
|
181
182
|
def find_local_revision
|
182
183
|
allowed_in_path do
|
183
|
-
git("rev-parse --verify #{ref}", true).strip
|
184
|
+
git("rev-parse --verify #{Shellwords.shellescape(ref)}", true).strip
|
184
185
|
end
|
185
186
|
end
|
186
187
|
|
@@ -119,6 +119,7 @@ module Bundler::Molinillo
|
|
119
119
|
# {Vertex#successors}
|
120
120
|
def ==(other)
|
121
121
|
return false unless other
|
122
|
+
return true if equal?(other)
|
122
123
|
vertices.each do |name, vertex|
|
123
124
|
other_vertex = other.vertex_named(name)
|
124
125
|
return false unless other_vertex
|
@@ -134,6 +135,7 @@ module Bundler::Molinillo
|
|
134
135
|
def add_child_vertex(name, payload, parent_names, requirement)
|
135
136
|
root = !parent_names.delete(nil) { true }
|
136
137
|
vertex = add_vertex(name, payload, root)
|
138
|
+
vertex.explicit_requirements << requirement if root
|
137
139
|
parent_names.each do |parent_name|
|
138
140
|
parent_node = vertex_named(parent_name)
|
139
141
|
add_edge(parent_node, vertex, requirement)
|
@@ -152,7 +154,7 @@ module Bundler::Molinillo
|
|
152
154
|
# Detaches the {#vertex_named} `name` {Vertex} from the graph, recursively
|
153
155
|
# removing any non-root vertices that were orphaned in the process
|
154
156
|
# @param [String] name
|
155
|
-
# @return [
|
157
|
+
# @return [Array<Vertex>] the vertices which have been detached
|
156
158
|
def detach_vertex_named(name)
|
157
159
|
log.detach_vertex_named(self, name)
|
158
160
|
end
|
@@ -14,16 +14,23 @@ module Bundler::Molinillo
|
|
14
14
|
|
15
15
|
# (see Action#up)
|
16
16
|
def up(graph)
|
17
|
-
return unless @vertex = graph.vertices.delete(name)
|
17
|
+
return [] unless @vertex = graph.vertices.delete(name)
|
18
|
+
|
19
|
+
removed_vertices = [@vertex]
|
18
20
|
@vertex.outgoing_edges.each do |e|
|
19
21
|
v = e.destination
|
20
22
|
v.incoming_edges.delete(e)
|
21
|
-
|
23
|
+
if !v.root? && v.incoming_edges.empty?
|
24
|
+
removed_vertices.concat graph.detach_vertex_named(v.name)
|
25
|
+
end
|
22
26
|
end
|
27
|
+
|
23
28
|
@vertex.incoming_edges.each do |e|
|
24
29
|
v = e.origin
|
25
30
|
v.outgoing_edges.delete(e)
|
26
31
|
end
|
32
|
+
|
33
|
+
removed_vertices
|
27
34
|
end
|
28
35
|
|
29
36
|
# (see Action#down)
|
@@ -81,6 +81,7 @@ module Bundler::Molinillo
|
|
81
81
|
# @return [Boolean] whether the two vertices are equal, determined
|
82
82
|
# by a recursive traversal of each {Vertex#successors}
|
83
83
|
def ==(other)
|
84
|
+
return true if equal?(other)
|
84
85
|
shallow_eql?(other) &&
|
85
86
|
successors.to_set == other.successors.to_set
|
86
87
|
end
|
@@ -89,6 +90,7 @@ module Bundler::Molinillo
|
|
89
90
|
# @return [Boolean] whether the two vertices are equal, determined
|
90
91
|
# solely by {#name} and {#payload} equality
|
91
92
|
def shallow_eql?(other)
|
93
|
+
return true if equal?(other)
|
92
94
|
other &&
|
93
95
|
name == other.name &&
|
94
96
|
payload == other.payload
|
@@ -366,13 +366,12 @@ module Bundler::Molinillo
|
|
366
366
|
if matching_deps.empty? && !succ.root? && succ.predecessors.to_a == [vertex]
|
367
367
|
debug(depth) { "Removing orphaned spec #{succ.name} after swapping #{name}" }
|
368
368
|
succ.requirements.each { |r| @parent_of.delete(r) }
|
369
|
-
activated.detach_vertex_named(succ.name)
|
370
369
|
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
370
|
+
removed_names = activated.detach_vertex_named(succ.name).map(&:name)
|
371
|
+
requirements.delete_if do |r|
|
372
|
+
# the only removed vertices are those with no other requirements,
|
373
|
+
# so it's safe to delete only based upon name here
|
374
|
+
removed_names.include?(name_for(r))
|
376
375
|
end
|
377
376
|
elsif !matching_deps.include?(outgoing_edge.requirement)
|
378
377
|
activated.delete_edge(outgoing_edge)
|
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.0.pre.
|
10
|
+
VERSION = "1.14.0.pre.2" 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.0.pre.
|
4
|
+
version: 1.14.0.pre.2
|
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:
|
12
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: automatiek
|
@@ -371,7 +371,9 @@ homepage: http://bundler.io
|
|
371
371
|
licenses:
|
372
372
|
- MIT
|
373
373
|
metadata: {}
|
374
|
-
post_install_message:
|
374
|
+
post_install_message: 'Bundler and RubyGems.org are free for anyone to use, but maintaining
|
375
|
+
them costs more than $25,000 USD every month. Help us cover those costs so that
|
376
|
+
we can keep the gem ecosystem free for everyone: https://ruby.to/support-bundler'
|
375
377
|
rdoc_options: []
|
376
378
|
require_paths:
|
377
379
|
- lib
|