rubygems-update 3.7.1 → 4.0.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1434 -1317
  3. data/CODE_OF_CONDUCT.md +7 -129
  4. data/Manifest.txt +5 -11
  5. data/README.md +2 -2
  6. data/bundler/CHANGELOG.md +1001 -902
  7. data/bundler/README.md +4 -4
  8. data/bundler/bundler.gemspec +3 -3
  9. data/bundler/lib/bundler/build_metadata.rb +2 -2
  10. data/bundler/lib/bundler/capistrano.rb +1 -19
  11. data/bundler/lib/bundler/checksum.rb +6 -0
  12. data/bundler/lib/bundler/cli/cache.rb +1 -12
  13. data/bundler/lib/bundler/cli/common.rb +21 -4
  14. data/bundler/lib/bundler/cli/config.rb +1 -2
  15. data/bundler/lib/bundler/cli/console.rb +5 -0
  16. data/bundler/lib/bundler/cli/exec.rb +29 -4
  17. data/bundler/lib/bundler/cli/gem.rb +19 -33
  18. data/bundler/lib/bundler/cli/install.rb +7 -84
  19. data/bundler/lib/bundler/cli/issue.rb +2 -2
  20. data/bundler/lib/bundler/cli/list.rb +33 -2
  21. data/bundler/lib/bundler/cli/lock.rb +5 -5
  22. data/bundler/lib/bundler/cli/plugin.rb +5 -1
  23. data/bundler/lib/bundler/cli/show.rb +3 -7
  24. data/bundler/lib/bundler/cli/update.rb +3 -3
  25. data/bundler/lib/bundler/cli.rb +97 -95
  26. data/bundler/lib/bundler/compact_index_client.rb +0 -1
  27. data/bundler/lib/bundler/current_ruby.rb +3 -15
  28. data/bundler/lib/bundler/definition.rb +122 -95
  29. data/bundler/lib/bundler/deployment.rb +1 -64
  30. data/bundler/lib/bundler/digest.rb +1 -1
  31. data/bundler/lib/bundler/dsl.rb +14 -36
  32. data/bundler/lib/bundler/endpoint_specification.rb +0 -22
  33. data/bundler/lib/bundler/errors.rb +1 -5
  34. data/bundler/lib/bundler/feature_flag.rb +0 -33
  35. data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
  36. data/bundler/lib/bundler/friendly_errors.rb +2 -2
  37. data/bundler/lib/bundler/index.rb +0 -7
  38. data/bundler/lib/bundler/inline.rb +1 -1
  39. data/bundler/lib/bundler/installer/gem_installer.rb +0 -11
  40. data/bundler/lib/bundler/installer.rb +0 -6
  41. data/bundler/lib/bundler/lockfile_generator.rb +1 -1
  42. data/bundler/lib/bundler/lockfile_parser.rb +2 -12
  43. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-binstubs.1 +3 -6
  45. data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
  46. data/bundler/lib/bundler/man/bundle-cache.1 +2 -14
  47. data/bundler/lib/bundler/man/bundle-cache.1.ronn +1 -14
  48. data/bundler/lib/bundler/man/bundle-check.1 +2 -5
  49. data/bundler/lib/bundler/man/bundle-check.1.ronn +0 -5
  50. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  51. data/bundler/lib/bundler/man/bundle-config.1 +36 -46
  52. data/bundler/lib/bundler/man/bundle-config.1.ronn +69 -75
  53. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  54. data/bundler/lib/bundler/man/bundle-doctor.1 +4 -4
  55. data/bundler/lib/bundler/man/bundle-doctor.1.ronn +4 -4
  56. data/bundler/lib/bundler/man/bundle-env.1 +1 -1
  57. data/bundler/lib/bundler/man/bundle-exec.1 +2 -5
  58. data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -5
  59. data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
  60. data/bundler/lib/bundler/man/bundle-gem.1 +3 -6
  61. data/bundler/lib/bundler/man/bundle-gem.1.ronn +2 -5
  62. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  63. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  64. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-install.1 +8 -59
  66. data/bundler/lib/bundler/man/bundle-install.1.ronn +12 -107
  67. data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
  68. data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
  69. data/bundler/lib/bundler/man/bundle-list.1 +6 -1
  70. data/bundler/lib/bundler/man/bundle-list.1.ronn +5 -0
  71. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  72. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  73. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  74. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  75. data/bundler/lib/bundler/man/bundle-plugin.1 +33 -15
  76. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +36 -15
  77. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  78. data/bundler/lib/bundler/man/bundle-remove.1 +2 -8
  79. data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -8
  80. data/bundler/lib/bundler/man/bundle-show.1 +2 -5
  81. data/bundler/lib/bundler/man/bundle-show.1.ronn +0 -4
  82. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  83. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  84. data/bundler/lib/bundler/man/bundle.1 +1 -10
  85. data/bundler/lib/bundler/man/bundle.1.ronn +0 -9
  86. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  87. data/bundler/lib/bundler/man/index.txt +0 -2
  88. data/bundler/lib/bundler/materialization.rb +1 -1
  89. data/bundler/lib/bundler/plugin/installer.rb +0 -10
  90. data/bundler/lib/bundler/plugin/source_list.rb +1 -1
  91. data/bundler/lib/bundler/plugin.rb +1 -1
  92. data/bundler/lib/bundler/resolver/package.rb +1 -0
  93. data/bundler/lib/bundler/resolver.rb +1 -1
  94. data/bundler/lib/bundler/ruby_dsl.rb +2 -0
  95. data/bundler/lib/bundler/ruby_version.rb +1 -3
  96. data/bundler/lib/bundler/rubygems_ext.rb +1 -1
  97. data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -1
  98. data/bundler/lib/bundler/rubygems_integration.rb +1 -5
  99. data/bundler/lib/bundler/self_manager.rb +1 -1
  100. data/bundler/lib/bundler/settings.rb +8 -27
  101. data/bundler/lib/bundler/shared_helpers.rb +8 -20
  102. data/bundler/lib/bundler/source/gemspec.rb +4 -0
  103. data/bundler/lib/bundler/source/git/git_proxy.rb +3 -11
  104. data/bundler/lib/bundler/source/git.rb +2 -3
  105. data/bundler/lib/bundler/source/path.rb +5 -7
  106. data/bundler/lib/bundler/source/rubygems.rb +11 -17
  107. data/bundler/lib/bundler/source.rb +1 -1
  108. data/bundler/lib/bundler/source_list.rb +4 -45
  109. data/bundler/lib/bundler/source_map.rb +2 -5
  110. data/bundler/lib/bundler/spec_set.rb +6 -15
  111. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
  112. data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  113. data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
  114. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
  115. data/bundler/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
  116. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
  117. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
  118. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +6 -0
  119. data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
  120. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +7 -4
  121. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
  122. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  123. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
  124. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
  125. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +5 -2
  126. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +42 -6
  127. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +1 -1
  128. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +2 -2
  129. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +3 -7
  130. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  131. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
  132. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
  133. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
  134. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
  135. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  136. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
  137. data/bundler/lib/bundler/version.rb +1 -1
  138. data/bundler/lib/bundler/vlad.rb +1 -14
  139. data/bundler/lib/bundler.rb +6 -28
  140. data/doc/MAINTAINERS.txt +0 -7
  141. data/doc/bundler/UPGRADING.md +11 -27
  142. data/doc/rubygems/CONTRIBUTING.md +1 -1
  143. data/lib/rubygems/basic_specification.rb +3 -9
  144. data/lib/rubygems/bundler_version_finder.rb +1 -0
  145. data/lib/rubygems/command.rb +1 -1
  146. data/lib/rubygems/command_manager.rb +3 -4
  147. data/lib/rubygems/commands/build_command.rb +0 -7
  148. data/lib/rubygems/commands/cert_command.rb +1 -1
  149. data/lib/rubygems/commands/install_command.rb +1 -5
  150. data/lib/rubygems/commands/setup_command.rb +5 -3
  151. data/lib/rubygems/commands/sources_command.rb +122 -18
  152. data/lib/rubygems/config_file.rb +1 -1
  153. data/lib/rubygems/defaults.rb +1 -1
  154. data/lib/rubygems/dependency.rb +1 -1
  155. data/lib/rubygems/dependency_installer.rb +0 -77
  156. data/lib/rubygems/dependency_list.rb +1 -2
  157. data/lib/rubygems/deprecate.rb +74 -72
  158. data/lib/rubygems/doctor.rb +1 -1
  159. data/lib/rubygems/errors.rb +1 -1
  160. data/lib/rubygems/exceptions.rb +5 -15
  161. data/lib/rubygems/ext/builder.rb +6 -2
  162. data/lib/rubygems/ext/cargo_builder.rb +2 -2
  163. data/lib/rubygems/ext/cmake_builder.rb +97 -8
  164. data/lib/rubygems/ext/configure_builder.rb +2 -2
  165. data/lib/rubygems/ext/ext_conf_builder.rb +6 -2
  166. data/lib/rubygems/ext/rake_builder.rb +2 -2
  167. data/lib/rubygems/gem_runner.rb +0 -1
  168. data/lib/rubygems/install_update_options.rb +1 -2
  169. data/lib/rubygems/installer.rb +16 -54
  170. data/lib/rubygems/name_tuple.rb +7 -1
  171. data/lib/rubygems/package/tar_header.rb +4 -4
  172. data/lib/rubygems/package/tar_reader.rb +2 -0
  173. data/lib/rubygems/package/tar_writer.rb +1 -1
  174. data/lib/rubygems/package.rb +21 -12
  175. data/lib/rubygems/platform.rb +31 -11
  176. data/lib/rubygems/remote_fetcher.rb +8 -5
  177. data/lib/rubygems/resolver/conflict.rb +1 -1
  178. data/lib/rubygems/resolver.rb +1 -1
  179. data/lib/rubygems/s3_uri_signer.rb +54 -7
  180. data/lib/rubygems/security/signer.rb +1 -1
  181. data/lib/rubygems/source.rb +2 -2
  182. data/lib/rubygems/source_list.rb +36 -0
  183. data/lib/rubygems/spec_fetcher.rb +4 -4
  184. data/lib/rubygems/specification.rb +5 -96
  185. data/lib/rubygems/specification_policy.rb +0 -36
  186. data/lib/rubygems/specification_record.rb +1 -1
  187. data/lib/rubygems/text.rb +1 -1
  188. data/lib/rubygems/uninstaller.rb +17 -6
  189. data/lib/rubygems/user_interaction.rb +6 -9
  190. data/lib/rubygems/util.rb +0 -22
  191. data/lib/rubygems/validator.rb +1 -1
  192. data/lib/rubygems/vendor/net-http/lib/net/http/generic_request.rb +25 -9
  193. data/lib/rubygems/vendor/net-http/lib/net/http/responses.rb +2 -2
  194. data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -14
  195. data/lib/rubygems/vendor/optparse/lib/optparse.rb +82 -41
  196. data/lib/rubygems/vendor/resolv/lib/resolv.rb +1 -1
  197. data/lib/rubygems/vendor/timeout/lib/timeout.rb +4 -1
  198. data/lib/rubygems/vendor/uri/lib/uri/common.rb +57 -15
  199. data/lib/rubygems/vendor/uri/lib/uri/file.rb +1 -1
  200. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +34 -21
  201. data/lib/rubygems/vendor/uri/lib/uri/http.rb +12 -0
  202. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  203. data/lib/rubygems/vendor/uri/lib/uri/version.rb +2 -2
  204. data/lib/rubygems/version.rb +2 -17
  205. data/lib/rubygems/win_platform.rb +31 -0
  206. data/lib/rubygems.rb +10 -38
  207. data/rubygems-update.gemspec +4 -4
  208. metadata +10 -18
  209. data/bundler/lib/bundler/cli/inject.rb +0 -60
  210. data/bundler/lib/bundler/cli/viz.rb +0 -31
  211. data/bundler/lib/bundler/graph.rb +0 -152
  212. data/bundler/lib/bundler/man/bundle-inject.1 +0 -31
  213. data/bundler/lib/bundler/man/bundle-inject.1.ronn +0 -32
  214. data/bundler/lib/bundler/man/bundle-viz.1 +0 -30
  215. data/bundler/lib/bundler/man/bundle-viz.1.ronn +0 -36
  216. data/bundler/lib/bundler/similarity_detector.rb +0 -63
  217. data/lib/rubygems/commands/query_command.rb +0 -43
  218. data/lib/rubygems/compatibility.rb +0 -41
  219. data/lib/rubygems/install_default_message.rb +0 -13
@@ -73,7 +73,7 @@ module Bundler::URI
73
73
  #
74
74
  # At first, tries to create a new Bundler::URI::Generic instance using
75
75
  # Bundler::URI::Generic::build. But, if exception Bundler::URI::InvalidComponentError is raised,
76
- # then it does Bundler::URI::Escape.escape all Bundler::URI components and tries again.
76
+ # then it does Bundler::URI::RFC2396_PARSER.escape all Bundler::URI components and tries again.
77
77
  #
78
78
  def self.build2(args)
79
79
  begin
@@ -126,9 +126,9 @@ module Bundler::URI
126
126
  end
127
127
  end
128
128
  else
129
- component = self.class.component rescue ::Bundler::URI::Generic::COMPONENT
129
+ component = self.component rescue ::Bundler::URI::Generic::COMPONENT
130
130
  raise ArgumentError,
131
- "expected Array of or Hash of components of #{self.class} (#{component.join(', ')})"
131
+ "expected Array of or Hash of components of #{self} (#{component.join(', ')})"
132
132
  end
133
133
 
134
134
  tmp << nil
@@ -186,18 +186,18 @@ module Bundler::URI
186
186
 
187
187
  if arg_check
188
188
  self.scheme = scheme
189
- self.userinfo = userinfo
190
189
  self.hostname = host
191
190
  self.port = port
191
+ self.userinfo = userinfo
192
192
  self.path = path
193
193
  self.query = query
194
194
  self.opaque = opaque
195
195
  self.fragment = fragment
196
196
  else
197
197
  self.set_scheme(scheme)
198
- self.set_userinfo(userinfo)
199
198
  self.set_host(host)
200
199
  self.set_port(port)
200
+ self.set_userinfo(userinfo)
201
201
  self.set_path(path)
202
202
  self.query = query
203
203
  self.set_opaque(opaque)
@@ -284,7 +284,7 @@ module Bundler::URI
284
284
 
285
285
  # Returns the parser to be used.
286
286
  #
287
- # Unless a Bundler::URI::Parser is defined, DEFAULT_PARSER is used.
287
+ # Unless the +parser+ is defined, DEFAULT_PARSER is used.
288
288
  #
289
289
  def parser
290
290
  if !defined?(@parser) || !@parser
@@ -315,7 +315,7 @@ module Bundler::URI
315
315
  end
316
316
 
317
317
  #
318
- # Checks the scheme +v+ component against the Bundler::URI::Parser Regexp for :SCHEME.
318
+ # Checks the scheme +v+ component against the +parser+ Regexp for :SCHEME.
319
319
  #
320
320
  def check_scheme(v)
321
321
  if v && parser.regexp[:SCHEME] !~ v
@@ -385,7 +385,7 @@ module Bundler::URI
385
385
 
386
386
  #
387
387
  # Checks the user +v+ component for RFC2396 compliance
388
- # and against the Bundler::URI::Parser Regexp for :USERINFO.
388
+ # and against the +parser+ Regexp for :USERINFO.
389
389
  #
390
390
  # Can not have a registry or opaque component defined,
391
391
  # with a user component defined.
@@ -409,7 +409,7 @@ module Bundler::URI
409
409
 
410
410
  #
411
411
  # Checks the password +v+ component for RFC2396 compliance
412
- # and against the Bundler::URI::Parser Regexp for :USERINFO.
412
+ # and against the +parser+ Regexp for :USERINFO.
413
413
  #
414
414
  # Can not have a registry or opaque component defined,
415
415
  # with a user component defined.
@@ -511,7 +511,7 @@ module Bundler::URI
511
511
  user, password = split_userinfo(user)
512
512
  end
513
513
  @user = user
514
- @password = password if password
514
+ @password = password
515
515
 
516
516
  [@user, @password]
517
517
  end
@@ -522,7 +522,7 @@ module Bundler::URI
522
522
  # See also Bundler::URI::Generic.user=.
523
523
  #
524
524
  def set_user(v)
525
- set_userinfo(v, @password)
525
+ set_userinfo(v, nil)
526
526
  v
527
527
  end
528
528
  protected :set_user
@@ -574,6 +574,12 @@ module Bundler::URI
574
574
  @password
575
575
  end
576
576
 
577
+ # Returns the authority info (array of user, password, host and
578
+ # port), if any is set. Or returns +nil+.
579
+ def authority
580
+ return @user, @password, @host, @port if @user || @password || @host || @port
581
+ end
582
+
577
583
  # Returns the user component after Bundler::URI decoding.
578
584
  def decoded_user
579
585
  Bundler::URI.decode_uri_component(@user) if @user
@@ -586,7 +592,7 @@ module Bundler::URI
586
592
 
587
593
  #
588
594
  # Checks the host +v+ component for RFC2396 compliance
589
- # and against the Bundler::URI::Parser Regexp for :HOST.
595
+ # and against the +parser+ Regexp for :HOST.
590
596
  #
591
597
  # Can not have a registry or opaque component defined,
592
598
  # with a host component defined.
@@ -615,6 +621,13 @@ module Bundler::URI
615
621
  end
616
622
  protected :set_host
617
623
 
624
+ # Protected setter for the authority info (+user+, +password+, +host+
625
+ # and +port+). If +port+ is +nil+, +default_port+ will be set.
626
+ #
627
+ protected def set_authority(user, password, host, port = nil)
628
+ @user, @password, @host, @port = user, password, host, port || self.default_port
629
+ end
630
+
618
631
  #
619
632
  # == Args
620
633
  #
@@ -639,6 +652,7 @@ module Bundler::URI
639
652
  def host=(v)
640
653
  check_host(v)
641
654
  set_host(v)
655
+ set_userinfo(nil)
642
656
  v
643
657
  end
644
658
 
@@ -675,7 +689,7 @@ module Bundler::URI
675
689
 
676
690
  #
677
691
  # Checks the port +v+ component for RFC2396 compliance
678
- # and against the Bundler::URI::Parser Regexp for :PORT.
692
+ # and against the +parser+ Regexp for :PORT.
679
693
  #
680
694
  # Can not have a registry or opaque component defined,
681
695
  # with a port component defined.
@@ -729,6 +743,7 @@ module Bundler::URI
729
743
  def port=(v)
730
744
  check_port(v)
731
745
  set_port(v)
746
+ set_userinfo(nil)
732
747
  port
733
748
  end
734
749
 
@@ -748,7 +763,7 @@ module Bundler::URI
748
763
 
749
764
  #
750
765
  # Checks the path +v+ component for RFC2396 compliance
751
- # and against the Bundler::URI::Parser Regexp
766
+ # and against the +parser+ Regexp
752
767
  # for :ABS_PATH and :REL_PATH.
753
768
  #
754
769
  # Can not have a opaque component defined,
@@ -853,7 +868,7 @@ module Bundler::URI
853
868
 
854
869
  #
855
870
  # Checks the opaque +v+ component for RFC2396 compliance and
856
- # against the Bundler::URI::Parser Regexp for :OPAQUE.
871
+ # against the +parser+ Regexp for :OPAQUE.
857
872
  #
858
873
  # Can not have a host, port, user, or path component defined,
859
874
  # with an opaque component defined.
@@ -905,7 +920,7 @@ module Bundler::URI
905
920
  end
906
921
 
907
922
  #
908
- # Checks the fragment +v+ component against the Bundler::URI::Parser Regexp for :FRAGMENT.
923
+ # Checks the fragment +v+ component against the +parser+ Regexp for :FRAGMENT.
909
924
  #
910
925
  #
911
926
  # == Args
@@ -1121,7 +1136,7 @@ module Bundler::URI
1121
1136
 
1122
1137
  base = self.dup
1123
1138
 
1124
- authority = rel.userinfo || rel.host || rel.port
1139
+ authority = rel.authority
1125
1140
 
1126
1141
  # RFC2396, Section 5.2, 2)
1127
1142
  if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query
@@ -1134,9 +1149,7 @@ module Bundler::URI
1134
1149
 
1135
1150
  # RFC2396, Section 5.2, 4)
1136
1151
  if authority
1137
- base.set_userinfo(rel.userinfo)
1138
- base.set_host(rel.host)
1139
- base.set_port(rel.port || base.default_port)
1152
+ base.set_authority(*authority)
1140
1153
  base.set_path(rel.path)
1141
1154
  elsif base.path && rel.path
1142
1155
  base.set_path(merge_path(base.path, rel.path))
@@ -1527,7 +1540,7 @@ module Bundler::URI
1527
1540
  else
1528
1541
  unless proxy_uri = env[name]
1529
1542
  if proxy_uri = env[name.upcase]
1530
- warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.', uplevel: 1
1543
+ warn 'The environment variable HTTP_PROXY is discouraged. Please use http_proxy instead.', uplevel: 1
1531
1544
  end
1532
1545
  end
1533
1546
  end
@@ -61,6 +61,18 @@ module Bundler::URI
61
61
  super(tmp)
62
62
  end
63
63
 
64
+ # Do not allow empty host names, as they are not allowed by RFC 3986.
65
+ def check_host(v)
66
+ ret = super
67
+
68
+ if ret && v.empty?
69
+ raise InvalidComponentError,
70
+ "bad component(expected host component): #{v}"
71
+ end
72
+
73
+ ret
74
+ end
75
+
64
76
  #
65
77
  # == Description
66
78
  #
@@ -67,7 +67,7 @@ module Bundler::URI
67
67
  #
68
68
  # == Synopsis
69
69
  #
70
- # Bundler::URI::Parser.new([opts])
70
+ # Bundler::URI::RFC2396_Parser.new([opts])
71
71
  #
72
72
  # == Args
73
73
  #
@@ -86,7 +86,7 @@ module Bundler::URI
86
86
  #
87
87
  # == Examples
88
88
  #
89
- # p = Bundler::URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})")
89
+ # p = Bundler::URI::RFC2396_Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})")
90
90
  # u = p.parse("http://example.jp/%uABCD") #=> #<Bundler::URI::HTTP http://example.jp/%uABCD>
91
91
  # Bundler::URI.parse(u.to_s) #=> raises Bundler::URI::InvalidURIError
92
92
  #
@@ -108,12 +108,12 @@ module Bundler::URI
108
108
 
109
109
  # The Hash of patterns.
110
110
  #
111
- # See also Bundler::URI::Parser.initialize_pattern.
111
+ # See also #initialize_pattern.
112
112
  attr_reader :pattern
113
113
 
114
114
  # The Hash of Regexp.
115
115
  #
116
- # See also Bundler::URI::Parser.initialize_regexp.
116
+ # See also #initialize_regexp.
117
117
  attr_reader :regexp
118
118
 
119
119
  # Returns a split Bundler::URI against +regexp[:ABS_URI]+.
@@ -202,8 +202,7 @@ module Bundler::URI
202
202
  #
203
203
  # == Usage
204
204
  #
205
- # p = Bundler::URI::Parser.new
206
- # p.parse("ldap://ldap.example.com/dc=example?user=john")
205
+ # Bundler::URI::RFC2396_PARSER.parse("ldap://ldap.example.com/dc=example?user=john")
207
206
  # #=> #<Bundler::URI::LDAP ldap://ldap.example.com/dc=example?user=john>
208
207
  #
209
208
  def parse(uri)
@@ -244,7 +243,7 @@ module Bundler::URI
244
243
  # If no +block+ given, then returns the result,
245
244
  # else it calls +block+ for each element in result.
246
245
  #
247
- # See also Bundler::URI::Parser.make_regexp.
246
+ # See also #make_regexp.
248
247
  #
249
248
  def extract(str, schemes = nil)
250
249
  if block_given?
@@ -263,7 +262,7 @@ module Bundler::URI
263
262
  unless schemes
264
263
  @regexp[:ABS_URI_REF]
265
264
  else
266
- /(?=#{Regexp.union(*schemes)}:)#{@pattern[:X_ABS_URI]}/x
265
+ /(?=(?i:#{Regexp.union(*schemes).source}):)#{@pattern[:X_ABS_URI]}/x
267
266
  end
268
267
  end
269
268
 
@@ -524,6 +523,8 @@ module Bundler::URI
524
523
  ret
525
524
  end
526
525
 
526
+ # Returns +uri+ as-is if it is Bundler::URI, or convert it to Bundler::URI if it is
527
+ # a String.
527
528
  def convert_to_uri(uri)
528
529
  if uri.is_a?(Bundler::URI::Generic)
529
530
  uri
@@ -1,6 +1,6 @@
1
1
  module Bundler::URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '010003'.freeze
4
- VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
3
+ VERSION = '1.1.1'.freeze
4
+ VERSION_CODE = VERSION.split('.').map{|s| s.rjust(2, '0')}.join.freeze
5
5
  # :startdoc:
6
6
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.7.1".freeze
4
+ VERSION = "4.0.0.beta1".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= gem_version.segments.first
@@ -1,17 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "shared_helpers"
4
- Bundler::SharedHelpers.major_deprecation 2,
5
- "The Bundler task for Vlad"
6
-
7
- # Vlad task for Bundler.
8
- #
9
- # Add "require 'bundler/vlad'" in your Vlad deploy.rb, and
10
- # include the vlad:bundle:install task in your vlad:deploy task.
11
- require_relative "deployment"
12
-
13
- include Rake::DSL if defined? Rake::DSL
14
-
15
- namespace :vlad do
16
- Bundler::Deployment.define_task(Rake::RemoteTask, :remote_task, roles: :app)
17
- end
4
+ Bundler::SharedHelpers.feature_removed! "The Bundler task for Vlad"
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "bundler/rubygems_ext"
4
4
  require_relative "bundler/vendored_fileutils"
5
- require "pathname"
5
+ autoload :Pathname, "pathname" unless defined?(Pathname)
6
6
  require "rbconfig"
7
7
 
8
8
  require_relative "bundler/errors"
@@ -54,7 +54,6 @@ module Bundler
54
54
  autoload :FREEBSD, File.expand_path("bundler/constants", __dir__)
55
55
  autoload :GemHelper, File.expand_path("bundler/gem_helper", __dir__)
56
56
  autoload :GemVersionPromoter, File.expand_path("bundler/gem_version_promoter", __dir__)
57
- autoload :Graph, File.expand_path("bundler/graph", __dir__)
58
57
  autoload :Index, File.expand_path("bundler/index", __dir__)
59
58
  autoload :Injector, File.expand_path("bundler/injector", __dir__)
60
59
  autoload :Installer, File.expand_path("bundler/installer", __dir__)
@@ -219,8 +218,7 @@ module Bundler
219
218
  end
220
219
 
221
220
  def environment
222
- SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load", print_caller_location: true
223
- load
221
+ SharedHelpers.feature_removed! "Bundler.environment has been removed in favor of Bundler.load"
224
222
  end
225
223
 
226
224
  # Returns an instance of Bundler::Definition for given Gemfile and lockfile
@@ -365,16 +363,11 @@ module Bundler
365
363
  ORIGINAL_ENV.clone
366
364
  end
367
365
 
368
- # @deprecated Use `unbundled_env` instead
369
366
  def clean_env
370
- message =
371
- "`Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \
372
- "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
373
367
  removed_message =
374
368
  "`Bundler.clean_env` has been removed in favor of `Bundler.unbundled_env`. " \
375
369
  "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
376
- Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
377
- unbundled_env
370
+ Bundler::SharedHelpers.feature_removed!(removed_message)
378
371
  end
379
372
 
380
373
  # @return [Hash] Environment with all bundler-related variables removed
@@ -392,16 +385,11 @@ module Bundler
392
385
  with_env(original_env) { yield }
393
386
  end
394
387
 
395
- # @deprecated Use `with_unbundled_env` instead
396
388
  def with_clean_env
397
- message =
398
- "`Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \
399
- "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
400
389
  removed_message =
401
390
  "`Bundler.with_clean_env` has been removed in favor of `Bundler.with_unbundled_env`. " \
402
391
  "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
403
- Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
404
- with_env(unbundled_env) { yield }
392
+ Bundler::SharedHelpers.feature_removed!(removed_message)
405
393
  end
406
394
 
407
395
  # Run block with all bundler-related variables removed
@@ -414,16 +402,11 @@ module Bundler
414
402
  with_original_env { Kernel.system(*args) }
415
403
  end
416
404
 
417
- # @deprecated Use `unbundled_system` instead
418
405
  def clean_system(*args)
419
- message =
420
- "`Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. " \
421
- "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
422
406
  removed_message =
423
407
  "`Bundler.clean_system` has been removed in favor of `Bundler.unbundled_system`. " \
424
408
  "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
425
- Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
426
- with_env(unbundled_env) { Kernel.system(*args) }
409
+ Bundler::SharedHelpers.feature_removed!(removed_message)
427
410
  end
428
411
 
429
412
  # Run subcommand in an environment with all bundler related variables removed
@@ -436,16 +419,11 @@ module Bundler
436
419
  with_original_env { Kernel.exec(*args) }
437
420
  end
438
421
 
439
- # @deprecated Use `unbundled_exec` instead
440
422
  def clean_exec(*args)
441
- message =
442
- "`Bundler.clean_exec` has been deprecated in favor of `Bundler.unbundled_exec`. " \
443
- "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
444
423
  removed_message =
445
424
  "`Bundler.clean_exec` has been removed in favor of `Bundler.unbundled_exec`. " \
446
425
  "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
447
- Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
448
- with_env(unbundled_env) { Kernel.exec(*args) }
426
+ Bundler::SharedHelpers.feature_removed!(removed_message)
449
427
  end
450
428
 
451
429
  # Run a `Kernel.exec` to a subcommand in an environment with all bundler related variables removed
data/doc/MAINTAINERS.txt CHANGED
@@ -1,8 +1 @@
1
- Luis Sagastume <lsagastume1990@gmail.com> (@bronzdoc)
2
- Daniel Berger <djberg96@gmail.com> (@djberg96)
3
- Ellen Marie Dash <me@duckie.co> (@duckinator)
4
- Evan Phoenix <evan@phx.io> (@evanphx)
5
1
  SHIBATA Hiroshi <hsbt@ruby-lang.org> (@hsbt)
6
- André Arko <andre@arko.net> (@indirect)
7
- Samuel Giddins <segiddins@segiddins.me> (@segiddins)
8
- David Rodríguez <deivid.rodriguez@riseup.net> (@deivid-rodriguez)
@@ -28,28 +28,6 @@ existing default by configuring
28
28
  bundle config default_cli_command install
29
29
  ```
30
30
 
31
- ### Bundler will install to a `.bundle` folder relative to the Gemfile location by default
32
-
33
- We're making this change to improve isolation. It will install gems to a
34
- `.bundle` folder relative to the Gemfile location, instead of a global system folder.
35
-
36
- The previous default of installing to system changes can be kept with `bundle
37
- config path.system true`.
38
-
39
- Related to this change, and to alleviate potential bad consequences from it,
40
- we're also shipping some related changes:
41
-
42
- * To keep disk usage under control, Bundler will cleanup unused gems when
43
- installing gems per application using the new default. This new behavior can
44
- be disabled by toggling back installing to system gems as explained before, or
45
- by configuring `bundle config clean false`.
46
-
47
- * To avoid duplicate downloads of `.gem` packages and recompilation of
48
- extensions, Bundler will keep a global cache of gem packages and compiled
49
- extensions. This new behaviour can be disabled with `bundle config
50
- global_gem_cache false`, or by toggling back installing to system gems as
51
- explained before.
52
-
53
31
  ### Flags passed to `bundle install` that relied on being remembered across invocations will be removed
54
32
 
55
33
  In particular, the `--clean`, `--deployment`, `--frozen`, `--no-prune`,
@@ -72,10 +50,14 @@ will explicitly need to configure it, either through environment variables,
72
50
  application configuration, or machine configuration. For example, with `bundle
73
51
  config set --local without development test`.
74
52
 
75
- ### Bundler will include checksums in the lockfile by default
53
+ ### Bundler will include checksums in new lockfiles by default
76
54
 
77
55
  We shipped this security feature recently and we believe it's time to turn it on
78
- by default, so that everyone benefits from the extra security assurances by default.
56
+ by default, so that everyone benefits from the extra security assurances. So
57
+ whenever you create a new lockfile, Bundler will include a CHECKSUMS section.
58
+ Bundler will not automatically add a CHECKSUMS section to existing
59
+ lockfiles, though, unless explicitly requested through `bundle lock
60
+ --add-checksums`.
79
61
 
80
62
  ### Strict source pinning in Gemfile is enforced by default
81
63
 
@@ -155,7 +137,7 @@ Bundler will refuse to run otherwise.
155
137
  reference to develop their own plugins. The plugin will contain the same code
156
138
  as the old core command, the only difference being that the command is now
157
139
  implemented as `bundle graph` which is much easier to understand. However, the
158
- details of the plugin are under discussion. See [#3333](https://github.com/rubygems/rubygems/issues/3333).
140
+ details of the plugin are under discussion. See [#3333](https://github.com/ruby/rubygems/issues/3333).
159
141
 
160
142
  * The `bundle install` command will no longer accept a `--binstubs` flag.
161
143
 
@@ -178,8 +160,10 @@ Bundler will refuse to run otherwise.
178
160
 
179
161
  * Git and Path gems will be included in `vendor/cache` by default
180
162
 
181
- We're unsure why these gems were treated specially so we'll start caching them
182
- normally.
163
+ If you have a `vendor/cache` directory (to support offline scenarios, for
164
+ example), Bundler will start including gems from `path` and `git` sources in
165
+ there. We're unsure why these gems were treated specially so we'll start
166
+ caching them normally.
183
167
 
184
168
  * Bundler will use cached local data if available when network issues are found
185
169
  during resolution.
@@ -21,7 +21,7 @@ contributors to follow to reduce the time it takes to get changes merged in.
21
21
 
22
22
  5. If you have any questions, Feel free to join us on Slack, you can register
23
23
  by signing up at http://slack.bundler.io or file an issue here:
24
- http://github.com/rubygems/rubygems/issues
24
+ http://github.com/ruby/rubygems/issues
25
25
 
26
26
 
27
27
  For more information and ideas on how to contribute to RubyGems ecosystem, see
@@ -34,15 +34,6 @@ class Gem::BasicSpecification
34
34
  internal_init
35
35
  end
36
36
 
37
- def self.default_specifications_dir
38
- Gem.default_specifications_dir
39
- end
40
-
41
- class << self
42
- extend Gem::Deprecate
43
- rubygems_deprecate :default_specifications_dir, "Gem.default_specifications_dir"
44
- end
45
-
46
37
  ##
47
38
  # The path to the gem.build_complete file within the extension install
48
39
  # directory.
@@ -199,6 +190,9 @@ class Gem::BasicSpecification
199
190
  File.expand_path(File.join(gems_dir, full_name, "data", name))
200
191
  end
201
192
 
193
+ extend Gem::Deprecate
194
+ rubygems_deprecate :datadir, :none, "4.1"
195
+
202
196
  ##
203
197
  # Full path of the target library file.
204
198
  # If the file is not in this gem, return nil.
@@ -3,6 +3,7 @@
3
3
  module Gem::BundlerVersionFinder
4
4
  def self.bundler_version
5
5
  v = ENV["BUNDLER_VERSION"]
6
+ v = nil if v&.empty?
6
7
 
7
8
  v ||= bundle_update_bundler_version
8
9
  return if v == true
@@ -117,7 +117,7 @@ class Gem::Command
117
117
  # Unhandled arguments (gem names, files, etc.) are left in
118
118
  # <tt>options[:args]</tt>.
119
119
 
120
- def initialize(command, summary=nil, defaults={})
120
+ def initialize(command, summary = nil, defaults = {})
121
121
  @command = command
122
122
  @summary = summary
123
123
  @program_name = "gem #{command}"
@@ -58,7 +58,6 @@ class Gem::CommandManager
58
58
  :owner,
59
59
  :pristine,
60
60
  :push,
61
- :query,
62
61
  :rdoc,
63
62
  :rebuild,
64
63
  :search,
@@ -118,7 +117,7 @@ class Gem::CommandManager
118
117
  ##
119
118
  # Register the Symbol +command+ as a gem command.
120
119
 
121
- def register_command(command, obj=false)
120
+ def register_command(command, obj = false)
122
121
  @commands[command] = obj
123
122
  end
124
123
 
@@ -148,7 +147,7 @@ class Gem::CommandManager
148
147
  ##
149
148
  # Run the command specified by +args+.
150
149
 
151
- def run(args, build_args=nil)
150
+ def run(args, build_args = nil)
152
151
  process_args(args, build_args)
153
152
  rescue StandardError, Gem::Timeout::Error => ex
154
153
  if ex.respond_to?(:detailed_message)
@@ -165,7 +164,7 @@ class Gem::CommandManager
165
164
  terminate_interaction(1)
166
165
  end
167
166
 
168
- def process_args(args, build_args=nil)
167
+ def process_args(args, build_args = nil)
169
168
  if args.empty?
170
169
  say Gem::Command::HELP
171
170
  terminate_interaction 1
@@ -25,13 +25,6 @@ class Gem::Commands::BuildCommand < Gem::Command
25
25
  add_option "-o", "--output FILE", "output gem with the given filename" do |value, options|
26
26
  options[:output] = value
27
27
  end
28
-
29
- add_option "-C PATH", "Run as if gem build was started in <PATH> instead of the current working directory." do |value, options|
30
- options[:build_path] = value
31
- end
32
- deprecate_option "-C",
33
- version: "4.0",
34
- extra_msg: "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead"
35
28
  end
36
29
 
37
30
  def arguments # :nodoc:
@@ -158,7 +158,7 @@ class Gem::Commands::CertCommand < Gem::Command
158
158
  cert = Gem::Security.create_cert_email(
159
159
  email,
160
160
  key,
161
- (Gem::Security::ONE_DAY * expiration_length_days)
161
+ Gem::Security::ONE_DAY * expiration_length_days
162
162
  )
163
163
 
164
164
  Gem::Security.write cert, "gem-public_cert.pem"
@@ -239,11 +239,7 @@ You can use `i` command instead of `install`.
239
239
  # Loads post-install hooks
240
240
 
241
241
  def load_hooks # :nodoc:
242
- if options[:install_as_default]
243
- require_relative "../install_default_message"
244
- else
245
- require_relative "../install_message"
246
- end
242
+ require_relative "../install_message"
247
243
  require_relative "../rdoc"
248
244
  end
249
245
 
@@ -393,16 +393,18 @@ By default, this RubyGems will install gem as:
393
393
  Dir.chdir("bundler") do
394
394
  built_gem = Gem::Package.build(new_bundler_spec)
395
395
  begin
396
- Gem::Installer.at(
396
+ installer = Gem::Installer.at(
397
397
  built_gem,
398
398
  env_shebang: options[:env_shebang],
399
399
  format_executable: options[:format_executable],
400
400
  force: options[:force],
401
- install_as_default: true,
402
401
  bin_dir: bin_dir,
403
402
  install_dir: default_dir,
404
403
  wrappers: true
405
- ).install
404
+ )
405
+ installer.install
406
+ File.delete installer.spec_file
407
+ installer.write_default_spec
406
408
  ensure
407
409
  FileUtils.rm_f built_gem
408
410
  end