From 2bc70ba83696576fa2d023ef8b3b8641966f8810 Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Thu, 7 Sep 2017 07:05:42 +0100 Subject: [PATCH] Update to latest Bundler pre-release --- circle.yml | 2 +- lib/bundler_definition_version_patch.rb | 34 +------------------------ 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/circle.yml b/circle.yml index e80547f905..dbc76499ff 100644 --- a/circle.yml +++ b/circle.yml @@ -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 diff --git a/lib/bundler_definition_version_patch.rb b/lib/bundler_definition_version_patch.rb index 9e139c8f9c..35c1ce264d 100644 --- a/lib/bundler_definition_version_patch.rb +++ b/lib/bundler_definition_version_patch.rb @@ -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 <<