Skip to content

Commit

Permalink
Merge tag 'v1.16.0'
Browse files Browse the repository at this point in the history
Version 1.16.0
  • Loading branch information
segiddins committed Oct 31, 2017
2 parents 1d0afca + 10f20fa commit d17f2e4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 1.16.0 (2017-10-31)

Bugfixes:

- avoid new RubyGems warning about unsafe YAML loading (to keep output consistent) (@segiddins)
- load digest subclasses in a thread-safe manner (@segiddins, @colby-swandale)
- avoid unusued variable warnings under ruby 2.5 (@amatsuda)
- fix printing the same message twice in verbose mode ([#6028](https://github.com/bundler/bundler/issues/6028), @akhramov)
- allow `SignalException`s to bubble up to the interpreter during `bundle exec` ([#6090](https://github.com/bundler/bundler/issues/6090), @dekellum)
- avoid activating stdlib digest under Ruby 2.5 (@segiddins)
- prioritise explicitly requested gems in dependency resolution sort order (@segiddins)
- reduce memory usage during dependency resolution ([#6114](https://github.com/bundler/bundler/issues/6114), @greysteil)
- ensure that the default bundler gem is not accidentally activated on ruby 2.5 when using local git overrides (@segiddins)

## 1.16.0.pre.3 (2017-10-04)

Features:
Expand Down
2 changes: 2 additions & 0 deletions lib/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ def reset_rubygems!
private

def eval_yaml_gemspec(path, contents)
Kernel.send(:require, "bundler/psyched_yaml")

# If the YAML is invalid, Syck raises an ArgumentError, and Psych
# raises a Psych::SyntaxError. See psyched_yaml.rb for more info.
Gem::Specification.from_yaml(contents)
Expand Down
12 changes: 10 additions & 2 deletions lib/bundler/deprecate.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# frozen_string_literal: true

begin
require "rubygems/deprecate"
rescue LoadError
# it's fine if it doesn't exist on the current RubyGems...
nil
end

module Bundler
if defined? Bundler::Deprecate
# nothing to do!
Expand All @@ -8,7 +15,8 @@ module Bundler
elsif defined? Gem::Deprecate
Deprecate = Gem::Deprecate
else
class Deprecate; end
class Deprecate
end
end

unless Deprecate.respond_to?(:skip_during)
Expand All @@ -23,7 +31,7 @@ def Deprecate.skip_during

unless Deprecate.respond_to?(:skip)
def Deprecate.skip
@skip
@skip ||= false
end
end

Expand Down
1 change: 1 addition & 0 deletions lib/bundler/rubygems_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ def gem_from_path(path, policy = nil)

def spec_from_gem(path, policy = nil)
require "rubygems/security"
require "bundler/psyched_yaml"
gem_from_path(path, security_policies[policy]).spec
rescue Gem::Package::FormatError
raise GemspecError, "Could not read gem at #{path}. It may be corrupted."
Expand Down
3 changes: 3 additions & 0 deletions spec/quality_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ def check_for_specific_pronouns(filename)
begin
gem_command! :build, "bundler.gemspec"
if Bundler.rubygems.provides?(">= 2.4")
# there's no way around this warning
last_command.stderr.sub!(/^YAML safe loading.*/, "")

# older rubygems have weird warnings, and we won't actually be using them
# to build the gem for releases anyways
expect(last_command.stderr).to be_empty, "bundler should build as a gem without warnings, but\n#{err}"
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
$:.unshift File.expand_path("..", __FILE__)
$:.unshift File.expand_path("../../lib", __FILE__)

require "rubygems"
require "bundler/psyched_yaml"
require "bundler/vendored_fileutils"
require "uri"
Expand Down

0 comments on commit d17f2e4

Please sign in to comment.