This repository was archived by the owner on Apr 14, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +74
-45
lines changed
vendor/net-http-persistent/lib/net/http Expand file tree Collapse file tree 12 files changed +74
-45
lines changed Original file line number Diff line number Diff line change 1+ ## 2.1.4 (January 5, 2020)
2+
3+ Bugfixes:
4+
5+ - Fix ` net-http-pipeline ` no longer being allowed in Gemfiles if already installed in the system due to our vendored version of ` net-http-persistent ` optionally requiring it [ #7529 ] ( https://github.com/bundler/bundler/pull/7529 )
6+ - Fix inline gems no longer being requirable if no Gemfile is present in the directory hierarchy [ #7537 ] ( https://github.com/bundler/bundler/pull/7537 )
7+
18## 2.1.3 (January 2, 2020)
29
310Bugfixes:
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def definition.lock(*); end
7878 if old_gemfile
7979 ENV [ "BUNDLE_GEMFILE" ] = old_gemfile
8080 else
81- ENV . delete ( "BUNDLE_GEMFILE" )
81+ ENV [ "BUNDLE_GEMFILE" ] = ""
8282 end
8383 end
8484end
Original file line number Diff line number Diff line change 33require 'cgi' # for escaping
44require_relative '../../../../connection_pool/lib/connection_pool'
55
6- begin
7- require 'net/http/pipeline'
8- rescue LoadError
9- end
10-
116autoload :OpenSSL , 'openssl'
127
138##
@@ -773,23 +768,6 @@ def normalize_uri uri
773768 ( uri =~ /^https?:/ ) ? uri : "http://#{ uri } "
774769 end
775770
776- ##
777- # Pipelines +requests+ to the HTTP server at +uri+ yielding responses if a
778- # block is given. Returns all responses received.
779- #
780- # See
781- # Net::HTTP::Pipeline[http://docs.seattlerb.org/net-http-pipeline/Net/HTTP/Pipeline.html]
782- # for further details.
783- #
784- # Only if <tt>net-http-pipeline</tt> was required before
785- # <tt>net-http-persistent</tt> #pipeline will be present.
786-
787- def pipeline uri , requests , &block # :yields: responses
788- connection_for uri do |connection |
789- connection . http . pipeline requests , &block
790- end
791- end
792-
793771 ##
794772 # Sets this client's SSL private key
795773
Original file line number Diff line number Diff line change 11# frozen_string_literal: false
22
33module Bundler
4- VERSION = "2.1.3 " . freeze
4+ VERSION = "2.1.4 " . freeze
55
66 def self . bundler_major_version
77 @bundler_major_version ||= VERSION . split ( "." ) . first . to_i
Original file line number Diff line number Diff line change 9999
100100 it "reinstall gemspec dependency" do
101101 spec = Bundler . definition . specs [ "baz-dev" ] . first
102- changed_file = Pathname . new ( spec . full_gem_path ) . join ( "lib/baz- dev.rb" )
102+ changed_file = Pathname . new ( spec . full_gem_path ) . join ( "lib/baz/ dev.rb" )
103103 diff = "#Pristine spec changes"
104104
105105 File . open ( changed_file , "a" ) { |f | f . puts "#Pristine spec changes" }
Original file line number Diff line number Diff line change 210210 build_lib ( "foo" , :path => bundled_app )
211211 gemspec = bundled_app ( "foo.gemspec" ) . read
212212 bundled_app ( "foo.gemspec" ) . open ( "w" ) do |f |
213- f . write "#{ gemspec . strip } .tap { gem 'rack-obama'; require 'rack- obama' }"
213+ f . write "#{ gemspec . strip } .tap { gem 'rack-obama'; require 'rack/ obama' }"
214214 end
215215
216216 install_gemfile! <<-G
Original file line number Diff line number Diff line change @@ -125,14 +125,14 @@ def install(spec, opts)
125125 end
126126
127127 it "installs the gem executables" do
128- build_lib "gem-with-bin " do |s |
128+ build_lib "gem_with_bin " do |s |
129129 s . executables = [ "foo" ]
130130 end
131131
132132 install_gemfile <<-G
133133 source "#{ file_uri_for ( gem_repo2 ) } " # plugin source
134- source "#{ lib_path ( "gem-with-bin -1.0" ) } ", :type => :mpath do
135- gem "gem-with-bin "
134+ source "#{ lib_path ( "gem_with_bin -1.0" ) } ", :type => :mpath do
135+ gem "gem_with_bin "
136136 end
137137 G
138138
@@ -451,7 +451,7 @@ def installed?
451451 bundle "install"
452452
453453 run <<-RUBY
454- require 'ma- gitp- gem'
454+ require 'ma/ gitp/ gem'
455455 puts "WIN" unless defined?(MAGITPGEM_PREV_REF)
456456 RUBY
457457 expect ( out ) . to eq ( "WIN" )
@@ -462,7 +462,7 @@ def installed?
462462 bundle "update ma-gitp-gem"
463463
464464 run <<-RUBY
465- require 'ma- gitp- gem'
465+ require 'ma/ gitp/ gem'
466466 puts "WIN" if defined?(MAGITPGEM_PREV_REF)
467467 RUBY
468468 expect ( out ) . to eq ( "WIN" )
Original file line number Diff line number Diff line change @@ -333,4 +333,21 @@ def confirm(msg, newline = nil)
333333 expect ( last_command ) . to be_success
334334 expect ( out ) . to include ( "BUNDLE_GEMFILE is empty" )
335335 end
336+
337+ it "resets BUNDLE_GEMFILE to the empty string if it wasn't set previously" do
338+ ENV [ "BUNDLE_GEMFILE" ] = nil
339+ script <<-RUBY
340+ gemfile do
341+ source "#{ file_uri_for ( gem_repo1 ) } "
342+ gem "rack"
343+ end
344+
345+ puts "BUNDLE_GEMFILE is empty" if ENV["BUNDLE_GEMFILE"].empty?
346+ system("#{ Gem . ruby } -w -e '42'") # this should see original value of BUNDLE_GEMFILE
347+ exit $?.exitstatus
348+ RUBY
349+
350+ expect ( last_command ) . to be_success
351+ expect ( out ) . to include ( "BUNDLE_GEMFILE is empty" )
352+ end
336353end
Original file line number Diff line number Diff line change 168168 build_lib "jquery-rails" , "1.0.0" do |s |
169169 s . write "lib/jquery/rails.rb" , "puts 'jquery/rails'"
170170 end
171- lib_path ( "jquery-rails-1.0.0/lib/jquery-rails.rb" ) . rmtree
172171 end
173172
174173 it "requires gem names that are namespaced" do
241240 build_lib "load-fuuu" , "1.0.0" do |s |
242241 s . write "lib/load/fuuu.rb" , "raise LoadError.new(\" cannot load such file -- load-bar\" )"
243242 end
244- lib_path ( "load-fuuu-1.0.0/lib/load-fuuu.rb" ) . rmtree
245243
246244 gemfile <<-G
247245 path "#{ lib_path } " do
Original file line number Diff line number Diff line change @@ -899,17 +899,17 @@ def clean_load_path(lp)
899899
900900 describe "with git gems that don't have gemspecs" do
901901 before :each do
902- build_git "no-gemspec " , :gemspec => false
902+ build_git "no_gemspec " , :gemspec => false
903903
904904 install_gemfile <<-G
905- gem "no-gemspec ", "1.0", :git => "#{ lib_path ( "no-gemspec -1.0" ) } "
905+ gem "no_gemspec ", "1.0", :git => "#{ lib_path ( "no_gemspec -1.0" ) } "
906906 G
907907 end
908908
909909 it "loads the library via a virtual spec" do
910910 run <<-R
911- require 'no-gemspec '
912- puts NOGEMSPEC
911+ require 'no_gemspec '
912+ puts NO_GEMSPEC
913913 R
914914
915915 expect ( out ) . to eq ( "1.0" )
@@ -1263,6 +1263,27 @@ def lock_with(ruby_version = nil)
12631263 expect ( out ) . to eq ( "{}" )
12641264 end
12651265
1266+ it "does not load net-http-pipeline too early" do
1267+ build_repo4 do
1268+ build_gem "net-http-pipeline" , "1.0.1"
1269+ end
1270+
1271+ system_gems "net-http-pipeline-1.0.1" , :gem_repo => gem_repo4 do
1272+ gemfile <<-G
1273+ source "#{ file_uri_for ( gem_repo4 ) } "
1274+ gem "net-http-pipeline", "1.0.1"
1275+ G
1276+
1277+ bundle "config set --local path vendor/bundle"
1278+
1279+ bundle! :install
1280+
1281+ bundle! :check
1282+
1283+ expect ( out ) . to eq ( "The Gemfile's dependencies are satisfied" )
1284+ end
1285+ end
1286+
12661287 Gem ::Specification . select ( &:default_gem? ) . map ( &:name ) . each do |g |
12671288 it "activates newer versions of #{ g } " do
12681289 skip if exemptions . include? ( g )
You can’t perform that action at this time.
0 commit comments