bundler 1.13.1 → 1.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22596756e05afe393c806e7be6f01eecb6481455
4
- data.tar.gz: 182b0814c59dfb8bf1552bcccabaecb33fc5437d
3
+ metadata.gz: 6367d93989655c65cfd42ea41f443b378433adeb
4
+ data.tar.gz: 02e6fb7dba19f7d3239bb3dd924f2e13e8b1d717
5
5
  SHA512:
6
- metadata.gz: a40c512a0b0c523b141906b1b27577345e6b774a0d8b64f5d5a21c574de0e30a6d27ab1f493b0881898a0232ec330c02615550ca7ed6992e5f23f327338127bd
7
- data.tar.gz: 6003c4ed54dac0f68cccbd61305c7f2b4fc05a73bd694b57cf6a4b58923186469390b02da27105fb9156bfa0e3863dfa87d3abba0e47324f46dcc01498ce2402
6
+ metadata.gz: 8d2bb44155f319905ab606dbe26e4ac65832c3bba3944e66273db3733cb0353812363bb5474c34a9333812674e0a9d3cd7b3c1925ba011aee02e1a5e93a291a7
7
+ data.tar.gz: aecf45ed1368af04b9a3ce4648b759affc9cd18b4478fb361435cb427148c349b8ab02a5f74035b0dceddb678b6079cc6d4488b65828d3f761874f8930f97008
@@ -1,3 +1,19 @@
1
+ ## 1.13.2 (2016-09-30)
2
+
3
+ Bugfixes:
4
+
5
+ - allow `Settings` to be initialized without a root directory (@m1k3)
6
+ - allow specifying ruby engines in the gemfile as a symbol (#4919, @JuanitoFatas)
7
+ - avoid an execption when using `bundler/deployment` with Vlad (@srbaker)
8
+ - ensure redefined methods have the same visibility as the one they're replacing, fixing `Kernel.require` failing on JRuby (#4975, @segiddins)
9
+ - ensure that Bundler won't complain about a corrupt lockfile when no lockfile exists when using `gemspec` in the Gemfile (#5006, @segiddins)
10
+ - fail gracefully when parsing the metadata for a gemspec from the compact index fails (@segiddins)
11
+ - fix invoking bundler with binstubs generated by RubyGems 2.6.2+ (#4974, @chrismo)
12
+
13
+ Performance:
14
+
15
+ - avoid parsing the lockfile twice when evaluating gemfiles (@segiddins)
16
+
1
17
  ## 1.13.1 (2016-09-13)
2
18
 
3
19
  Bugfixes:
@@ -438,7 +438,10 @@ EOF
438
438
  def configure_gem_path(env = ENV, settings = self.settings)
439
439
  blank_home = env["GEM_HOME"].nil? || env["GEM_HOME"].empty?
440
440
  if settings[:disable_shared_gems]
441
- env["GEM_PATH"] = nil
441
+ # this needs to be empty string to cause
442
+ # PathSupport.split_gem_path to only load up the
443
+ # Bundler --path setting as the GEM_PATH.
444
+ env["GEM_PATH"] = ""
442
445
  elsif blank_home || Bundler.rubygems.gem_dir != bundle_path.to_s
443
446
  possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
444
447
  paths = possibles.flatten.compact.uniq.reject(&:empty?)
@@ -137,17 +137,15 @@ module Bundler
137
137
  end
138
138
 
139
139
  def create_gem_version_promoter
140
- locked_specs = begin
140
+ locked_specs =
141
141
  if @unlocking && @locked_specs.empty? && !@lockfile_contents.empty?
142
142
  # Definition uses an empty set of locked_specs to indicate all gems
143
143
  # are unlocked, but GemVersionPromoter needs the locked_specs
144
144
  # for conservative comparison.
145
- locked = Bundler::LockfileParser.new(@lockfile_contents)
146
- Bundler::SpecSet.new(locked.specs)
145
+ Bundler::SpecSet.new(@locked_gems.specs)
147
146
  else
148
147
  @locked_specs
149
148
  end
150
- end
151
149
  GemVersionPromoter.new(locked_specs, @unlock[:gems])
152
150
  end
153
151
 
@@ -15,7 +15,7 @@ module Bundler
15
15
  else
16
16
  context_name = "vlad"
17
17
  role_default = "[:app]"
18
- error_type = ::Rake::CommandFailedError
18
+ error_type = ::Vlad::CommandFailedError
19
19
  end
20
20
 
21
21
  roles = context.fetch(:bundle_roles, false)
@@ -113,6 +113,8 @@ module Bundler
113
113
  @required_ruby_version = Gem::Requirement.new(v)
114
114
  end
115
115
  end
116
+ rescue => e
117
+ raise GemspecError, "There was an error parsing the metadata for the gem #{name} (#{version}): #{e.class}\n#{e}\nThe metadata was #{data.inspect}"
116
118
  end
117
119
 
118
120
  def build_dependency(name, requirements)
@@ -55,7 +55,11 @@ module Bundler
55
55
  end
56
56
 
57
57
  def __materialize__
58
- @specification = source.specs.search(Gem::Dependency.new(name, version)).last
58
+ @specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name
59
+ source.gemspec.tap {|s| s.source = source }
60
+ else
61
+ source.specs.search(Gem::Dependency.new(name, version)).last
62
+ end
59
63
  end
60
64
 
61
65
  def respond_to?(*args)
@@ -23,8 +23,8 @@ module Bundler
23
23
 
24
24
  @versions = Array(versions)
25
25
  @gem_version = Gem::Requirement.create(@versions.first).requirements.first.last
26
- @input_engine = engine
27
- @engine = engine || "ruby"
26
+ @input_engine = engine && engine.to_s
27
+ @engine = engine && engine.to_s || "ruby"
28
28
  @engine_versions = (engine_version && Array(engine_version)) || @versions
29
29
  @engine_gem_version = Gem::Requirement.create(@engine_versions.first).requirements.first.last
30
30
  @patchlevel = patchlevel
@@ -397,6 +397,17 @@ module Bundler
397
397
  spec
398
398
  end
399
399
 
400
+ redefine_method(gem_class, :activate_bin_path) do |name, *args|
401
+ exec_name = args.first
402
+ return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
403
+
404
+ # Copy of Rubygems activate_bin_path impl
405
+ requirement = args.last
406
+ spec = find_spec_for_exe name, exec_name, [requirement]
407
+ Gem::LOADED_SPECS_MUTEX.synchronize { spec.activate }
408
+ spec.bin_file exec_name
409
+ end
410
+
400
411
  redefine_method(gem_class, :bin_path) do |name, *args|
401
412
  exec_name = args.first
402
413
  return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
@@ -489,6 +500,7 @@ module Bundler
489
500
  end
490
501
 
491
502
  def redefine_method(klass, method, unbound_method = nil, &block)
503
+ visibility = method_visibility(klass, method)
492
504
  begin
493
505
  if (instance_method = klass.instance_method(method)) && method != :initialize
494
506
  # doing this to ensure we also get private methods
@@ -501,8 +513,20 @@ module Bundler
501
513
  @replaced_methods[[method, klass]] = instance_method
502
514
  if unbound_method
503
515
  klass.send(:define_method, method, unbound_method)
516
+ klass.send(visibility, method)
504
517
  elsif block
505
518
  klass.send(:define_method, method, &block)
519
+ klass.send(visibility, method)
520
+ end
521
+ end
522
+
523
+ def method_visibility(klass, method)
524
+ if klass.private_method_defined?(method)
525
+ :private
526
+ elsif klass.protected_method_defined?(method)
527
+ :protected
528
+ else
529
+ :public
506
530
  end
507
531
  end
508
532
 
@@ -5,6 +5,7 @@ module Bundler
5
5
  class Settings
6
6
  BOOL_KEYS = %w(
7
7
  allow_offline_install
8
+ auto_install
8
9
  cache_all
9
10
  disable_exec_load
10
11
  disable_local_branch_check
@@ -278,7 +279,7 @@ module Bundler
278
279
  }xo
279
280
 
280
281
  def load_config(config_file)
281
- return unless config_file
282
+ return {} unless config_file
282
283
  SharedHelpers.filesystem_access(config_file, :read) do |file|
283
284
  valid_file = file.exist? && !file.size.zero?
284
285
  return {} if ignore_config? || !valid_file
@@ -19,7 +19,7 @@ module Bundler
19
19
  locked_spec = Bundler.locked_gems.specs.find {|s| s.name == spec.name }
20
20
  locked_spec_version = locked_spec.version if locked_spec
21
21
  if locked_spec_version && spec.version != locked_spec_version
22
- message += " (#{Bundler.ui.add_color("was #{locked_spec_version}", :green)})"
22
+ message += Bundler.ui.add_color(" (was #{locked_spec_version})", :green)
23
23
  end
24
24
  end
25
25
 
@@ -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.13.1" unless defined?(::Bundler::VERSION)
10
+ VERSION = "1.13.2" unless defined?(::Bundler::VERSION)
11
11
  end
@@ -63,6 +63,15 @@ It also modifies Rubygems:
63
63
  making system executables work
64
64
  * Add all gems in the bundle into Gem.loaded_specs
65
65
 
66
+ ### Loading
67
+
68
+ By default, when attempting to `bundle exec` to a file with a ruby shebang,
69
+ Bundler will `Kernel.load` that file instead of using `Kernel.exec`. For the
70
+ vast majority of cases, this is a performance improvement. In a rare few cases,
71
+ this could cause some subtle side-effects (such as dependence on the exact
72
+ contents of `$0` or `__FILE__`) and the optimization can be disabled by enabling
73
+ the `disable_exec_load` setting.
74
+
66
75
  ### Shelling out
67
76
 
68
77
  Any Ruby code that opens a subshell (like `system`, backticks, or `%x{}`) will
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.13.1
4
+ version: 1.13.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: 2016-09-13 00:00:00.000000000 Z
12
+ date: 2016-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: automatiek
@@ -382,7 +382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
382
382
  version: 1.3.6
383
383
  requirements: []
384
384
  rubyforge_project:
385
- rubygems_version: 2.6.6
385
+ rubygems_version: 2.6.7
386
386
  signing_key:
387
387
  specification_version: 4
388
388
  summary: The best way to manage your application's dependencies