Skip to content

Commit

Permalink
Update to latest Bundler pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
greysteil committed Sep 7, 2017
1 parent a3aa422 commit 2bc70ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ machine:

dependencies:
pre:
- gem install bundler -v 1.16.0.pre.1
- gem install bundler -v 1.16.0.pre.2
post:
- cd helpers/javascript && yarn install
- cd helpers/php && composer install
Expand Down
34 changes: 1 addition & 33 deletions lib/bundler_definition_version_patch.rb
Original file line number Diff line number Diff line change
@@ -1,39 +1,7 @@
# frozen_string_literal: true
require "bundler/vendored_persistent"

# rubocop:disable all
# TODO: Remove when 1.16.0.pre.2
module Bundler
class PersistentHTTP < Persistent::Net::HTTP::Persistent
def warn_old_tls_version_rubygems_connection(uri, connection)
return unless connection.use_ssl?
return unless (uri.host || "").end_with?("rubygems.org")

socket = connection.instance_variable_get(:@socket)
socket_io = socket&.io
return unless socket_io.respond_to?(:ssl_version)
ssl_version = socket_io.ssl_version

case ssl_version
when /TLSv([\d\.]+)/
version = Gem::Version.new($1)
if version < Gem::Version.new("1.2")
Bundler.ui.warn \
"Warning: Your Ruby version is compiled against a copy of OpenSSL that is very old. " \
"Starting in January 2018, RubyGems.org will refuse connection requests from these " \
"very old versions of OpenSSL. If you will need to continue installing gems after " \
"January 2018, please follow this guide to upgrade: http://ruby.to/tls-outdated.",
:wrap => true
end
end
end
end
end
# rubocop:enable

module BundlerDefinitionVersionPatch
def index
@index ||= super.tap do |index|
@index ||= super.tap do
if ruby_version
requested_version = ruby_version.to_gem_version_with_patchlevel
sources.metadata_source.specs <<
Expand Down

0 comments on commit 2bc70ba

Please sign in to comment.