rubygems-update 3.2.4 → 3.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -0
  3. data/Manifest.txt +2 -0
  4. data/Rakefile +17 -25
  5. data/bundler/CHANGELOG.md +76 -2
  6. data/bundler/lib/bundler.rb +1 -2
  7. data/bundler/lib/bundler/build_metadata.rb +2 -2
  8. data/bundler/lib/bundler/cli.rb +1 -0
  9. data/bundler/lib/bundler/cli/cache.rb +1 -0
  10. data/bundler/lib/bundler/cli/gem.rb +14 -0
  11. data/bundler/lib/bundler/compact_index_client/updater.rb +0 -8
  12. data/bundler/lib/bundler/definition.rb +18 -32
  13. data/bundler/lib/bundler/dep_proxy.rb +15 -8
  14. data/bundler/lib/bundler/feature_flag.rb +0 -1
  15. data/bundler/lib/bundler/fetcher.rb +0 -1
  16. data/bundler/lib/bundler/gem_helper.rb +9 -7
  17. data/bundler/lib/bundler/gem_version_promoter.rb +2 -2
  18. data/bundler/lib/bundler/index.rb +6 -5
  19. data/bundler/lib/bundler/installer.rb +0 -17
  20. data/bundler/lib/bundler/installer/standalone.rb +15 -0
  21. data/bundler/lib/bundler/lazy_specification.rb +9 -18
  22. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-config.1 +4 -4
  28. data/bundler/lib/bundler/man/bundle-config.1.ronn +3 -3
  29. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  46. data/bundler/lib/bundler/man/bundle.1 +1 -1
  47. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  48. data/bundler/lib/bundler/resolver.rb +82 -43
  49. data/bundler/lib/bundler/resolver/spec_group.rb +56 -44
  50. data/bundler/lib/bundler/rubygems_ext.rb +16 -0
  51. data/bundler/lib/bundler/settings.rb +1 -1
  52. data/bundler/lib/bundler/shared_helpers.rb +2 -2
  53. data/bundler/lib/bundler/source/git.rb +19 -17
  54. data/bundler/lib/bundler/source/git/git_proxy.rb +35 -17
  55. data/bundler/lib/bundler/source/path/installer.rb +2 -0
  56. data/bundler/lib/bundler/source/rubygems.rb +10 -2
  57. data/bundler/lib/bundler/source_list.rb +2 -4
  58. data/bundler/lib/bundler/spec_set.rb +5 -4
  59. data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
  60. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +1 -1
  61. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  62. data/bundler/lib/bundler/templates/newgem/rubocop.yml.tt +3 -0
  63. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
  64. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -1
  65. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
  66. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +2 -2
  67. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
  68. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +11 -7
  69. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +5 -6
  70. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
  71. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
  72. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
  73. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
  74. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
  75. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
  76. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
  77. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  78. data/bundler/lib/bundler/version.rb +1 -1
  79. data/lib/rubygems.rb +3 -3
  80. data/lib/rubygems/commands/setup_command.rb +1 -3
  81. data/lib/rubygems/dependency.rb +5 -1
  82. data/lib/rubygems/ext/builder.rb +2 -1
  83. data/lib/rubygems/installer_uninstaller_utils.rb +6 -1
  84. data/lib/rubygems/platform.rb +0 -4
  85. data/lib/rubygems/requirement.rb +1 -1
  86. data/lib/rubygems/resolver/index_specification.rb +4 -1
  87. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
  88. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +0 -1
  89. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
  90. data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +2 -2
  91. data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
  92. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +11 -7
  93. data/lib/rubygems/specification.rb +27 -24
  94. data/lib/rubygems/test_case.rb +19 -7
  95. data/rubygems-update.gemspec +1 -1
  96. data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
  97. data/test/rubygems/test_gem.rb +83 -0
  98. data/test/rubygems/test_gem_commands_outdated_command.rb +18 -0
  99. data/test/rubygems/test_gem_commands_setup_command.rb +8 -1
  100. data/test/rubygems/test_gem_dependency_installer.rb +27 -18
  101. data/test/rubygems/test_gem_ext_builder.rb +24 -0
  102. data/test/rubygems/test_gem_installer.rb +2 -0
  103. data/test/rubygems/test_gem_platform.rb +8 -0
  104. data/test/rubygems/test_gem_requirement.rb +35 -1
  105. data/test/rubygems/test_gem_specification.rb +18 -15
  106. data/test/rubygems/test_gem_stream_ui.rb +1 -1
  107. data/test/rubygems/test_gem_util.rb +4 -4
  108. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d93499fede75e4516b9007d926ad52f4428cc1361dfc8720635ce85daef669e5
4
- data.tar.gz: ca5b261892f92350f5e9a922757780c9718751d11d21251c6f4f189cb8f27bf7
3
+ metadata.gz: 6f97da94a4361531119587adbe81df2cb025b7cd46e64ac4344897e403eba853
4
+ data.tar.gz: 3539b4322d457c4b4f3fb387880aac7ba86f8c72f34ea66b2b4e749411dff5f7
5
5
  SHA512:
6
- metadata.gz: 61ed9d7bdad4ae0d6f49980503fe583c71870d86695a1e050ad9bab5549538b13cdb87fbc9859ed89e902a6e580137dedc053bf59191553173101d862bd7b0f1
7
- data.tar.gz: 54ffb6db2ff4a6ae6772ca38a4ad26a5458b6783c21a10f2c932ff0408191cd52fae270b7936eb3f183a2d61a8cfd7e05dfd4d01a0064124e9013ecd61a7abc1
6
+ metadata.gz: 9b4a518220115bc1e638e0ef3a69cbacf49a21940666b9fc9310426cc077fc3ba73c1ffbd9860ecd6dd8210c1c80853ed916298e610c3e508679c0d853f471ad
7
+ data.tar.gz: 28dcf6a59842e3838ccb94fe5ad35a947fb4f1e532eff8edb2a0b49d00741853b8a56ee595233bd6d0768cc0c4c33c49bf965900ad315f88936dec90e0abd5a8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,53 @@
1
+ # 3.2.9 / 2021-02-08
2
+
3
+ ## Bug fixes:
4
+
5
+ * Fix error message when underscore selection can't find bundler. Pull
6
+ request #4363 by deivid-rodriguez
7
+ * Fix `Gem::Specification.stubs_for` returning wrong named specs. Pull
8
+ request #4356 by tompng
9
+ * Don't error out when activating a binstub unless necessary. Pull request
10
+ #4351 by deivid-rodriguez
11
+ * Fix `gem outdated` incorrectly handling platform specific gems. Pull
12
+ request #4248 by deivid-rodriguez
13
+
14
+ # 3.2.8 / 2021-02-02
15
+
16
+ ## Bug fixes:
17
+
18
+ * Fix `gem install` crashing on gemspec with nil required_ruby_version.
19
+ Pull request #4334 by pbernays
20
+
21
+ # 3.2.7 / 2021-01-26
22
+
23
+ ## Bug fixes:
24
+
25
+ * Generate plugin wrappers with relative requires. Pull request #4317 by
26
+ deivid-rodriguez
27
+
28
+ # 3.2.6 / 2021-01-18
29
+
30
+ ## Enhancements:
31
+
32
+ * Fix `Gem::Platform#inspect` showing duplicate information. Pull request
33
+ #4276 by deivid-rodriguez
34
+
35
+ ## Bug fixes:
36
+
37
+ * Swallow any system call error in `ensure_gem_subdirs` to support jruby
38
+ embedded paths. Pull request #4291 by kares
39
+ * Restore accepting custom make command with extra options as the `make`
40
+ env variable. Pull request #4271 by terceiro
41
+
42
+ # 3.2.5 / 2021-01-11
43
+
44
+ ## Bug fixes:
45
+
46
+ * Don't load more specs after the whole set of specs has been setup. Pull
47
+ request #4262 by deivid-rodriguez
48
+ * Fix broken `bundler` executable after `gem update --system`. Pull
49
+ request #4221 by deivid-rodriguez
50
+
1
51
  # 3.2.4 / 2020-12-31
2
52
 
3
53
  ## Enhancements:
data/Manifest.txt CHANGED
@@ -189,6 +189,7 @@ bundler/lib/bundler/templates/Executable.bundler
189
189
  bundler/lib/bundler/templates/Executable.standalone
190
190
  bundler/lib/bundler/templates/Gemfile
191
191
  bundler/lib/bundler/templates/gems.rb
192
+ bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
192
193
  bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
193
194
  bundler/lib/bundler/templates/newgem/Gemfile.tt
194
195
  bundler/lib/bundler/templates/newgem/LICENSE.txt.tt
@@ -511,6 +512,7 @@ test/rubygems/child_key.pem
511
512
  test/rubygems/client.pem
512
513
  test/rubygems/data/gem-private_key.pem
513
514
  test/rubygems/data/gem-public_cert.pem
515
+ test/rubygems/data/null-required-ruby-version.gemspec.rz
514
516
  test/rubygems/data/null-required-rubygems-version.gemspec.rz
515
517
  test/rubygems/data/null-type.gemspec.rz
516
518
  test/rubygems/encrypted_private_key.pem
data/Rakefile CHANGED
@@ -7,9 +7,12 @@ require 'psych'
7
7
 
8
8
  desc "Setup Rubygems dev environment"
9
9
  task :setup do
10
- version = File.read("dev_gems.rb.lock").split(/BUNDLED WITH\n /).last
11
- sh "gem install bundler:#{version}"
12
- sh "bundle install --gemfile=dev_gems.rb"
10
+ sh "ruby", "bundler/bin/bundle", "install", "--gemfile=dev_gems.rb"
11
+ end
12
+
13
+ desc "Update Rubygems dev environment"
14
+ task :update do |_, args|
15
+ sh "ruby", "bundler/bin/bundle", "update", *args, "--gemfile=dev_gems.rb"
13
16
  end
14
17
 
15
18
  desc "Setup git hooks"
@@ -49,20 +52,16 @@ RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
49
52
  doc.rdoc_dir = 'doc'
50
53
  end
51
54
 
52
- begin
53
- require "automatiek"
55
+ load "util/automatiek.rake"
54
56
 
55
- Automatiek::RakeTask.new("molinillo") do |lib|
56
- lib.version = "0.7.0"
57
- lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
58
- lib.namespace = "Molinillo"
59
- lib.prefix = "Gem::Resolver"
60
- lib.vendor_lib = "lib/rubygems/resolver/molinillo"
61
- end
62
- rescue LoadError
63
- namespace :vendor do
64
- task(:molinillo) { abort "Install the automatiek gem to be able to vendor gems." }
65
- end
57
+ # We currently ship Molinillo master branch as of
58
+ # https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303
59
+ Automatiek::RakeTask.new("molinillo") do |lib|
60
+ lib.version = "master"
61
+ lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
62
+ lib.namespace = "Molinillo"
63
+ lib.prefix = "Gem::Resolver"
64
+ lib.vendor_lib = "lib/rubygems/resolver/molinillo"
66
65
  end
67
66
 
68
67
  namespace :rubocop do
@@ -183,11 +182,7 @@ end
183
182
 
184
183
  desc "Upload release to S3"
185
184
  task :upload_to_s3 do
186
- begin
187
- require "aws-sdk-s3"
188
- rescue LoadError
189
- abort "Install the aws-sdk-s3 gem to be able to upload gems to rubygems.org."
190
- end
185
+ require "aws-sdk-s3"
191
186
 
192
187
  s3 = Aws::S3::Resource.new(region:'us-west-2')
193
188
  %w[zip tgz].each do |ext|
@@ -313,9 +308,7 @@ To update to the latest RubyGems you can run:
313
308
 
314
309
  gem update --system
315
310
 
316
- If you need to upgrade or downgrade please follow the [how to upgrade/downgrade
317
- RubyGems][upgrading] instructions. To install RubyGems by hand see the
318
- [Download RubyGems][download] page.
311
+ To install RubyGems by hand see the [Download RubyGems][download] page.
319
312
 
320
313
  #{history.release_notes_for_blog.join("\n")}
321
314
 
@@ -324,7 +317,6 @@ SHA256 Checksums:
324
317
  #{checksums}
325
318
 
326
319
  [download]: https://rubygems.org/pages/download
327
- [upgrading]: http://docs.seattlerb.org/rubygems/UPGRADING_rdoc.html
328
320
 
329
321
  ANNOUNCEMENT
330
322
 
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,77 @@
1
+ # 2.2.9 (February 8, 2021)
2
+
3
+ ## Enhancements:
4
+
5
+ - Stop removing existing platforms when force_ruby_platform is true [#4336](https://github.com/rubygems/rubygems/pull/4336)
6
+
7
+ ## Bug fixes:
8
+
9
+ - Don't install platform specific gems on truffleruby [#4333](https://github.com/rubygems/rubygems/pull/4333)
10
+
11
+ # 2.2.8 (February 2, 2021)
12
+
13
+ ## Enhancements:
14
+
15
+ - Add a CHANGELOG.md file to gems generated by `bundle gem` [#4093](https://github.com/rubygems/rubygems/pull/4093)
16
+ - Support gemified `set` [#4297](https://github.com/rubygems/rubygems/pull/4297)
17
+
18
+ ## Bug fixes:
19
+
20
+ - Fix standalone Kernel.require visibility [#4337](https://github.com/rubygems/rubygems/pull/4337)
21
+
22
+ ## Performance:
23
+
24
+ - Fix resolver edge cases and speed up bundler [#4277](https://github.com/rubygems/rubygems/pull/4277)
25
+
26
+ # 2.2.7 (January 26, 2021)
27
+
28
+ ## Enhancements:
29
+
30
+ - Improve error messages when dependency on bundler conflicts with running version [#4308](https://github.com/rubygems/rubygems/pull/4308)
31
+ - Avoid showing platforms with requirements in error messages [#4310](https://github.com/rubygems/rubygems/pull/4310)
32
+ - Introduce disable_local_revision_check config [#4237](https://github.com/rubygems/rubygems/pull/4237)
33
+ - Reverse rubygems require mixin with bundler standalone [#4299](https://github.com/rubygems/rubygems/pull/4299)
34
+
35
+ ## Bug fixes:
36
+
37
+ - Fix releasing from a not yet pushed branch [#4309](https://github.com/rubygems/rubygems/pull/4309)
38
+ - Install cache only once if it already exists [#4304](https://github.com/rubygems/rubygems/pull/4304)
39
+ - Fix `force_ruby_platform` no longer being respected [#4302](https://github.com/rubygems/rubygems/pull/4302)
40
+
41
+ ## Performance:
42
+
43
+ - Fix resolver dependency comparison [#4289](https://github.com/rubygems/rubygems/pull/4289)
44
+
45
+ # 2.2.6 (January 18, 2021)
46
+
47
+ ## Enhancements:
48
+
49
+ - Improve resolver debugging [#4288](https://github.com/rubygems/rubygems/pull/4288)
50
+
51
+ ## Bug fixes:
52
+
53
+ - Fix dependency locking for path source [#4293](https://github.com/rubygems/rubygems/pull/4293)
54
+
55
+ ## Performance:
56
+
57
+ - Speed up complex dependency resolves by creating DepProxy factory and cache [#4216](https://github.com/rubygems/rubygems/pull/4216)
58
+
59
+ # 2.2.5 (January 11, 2021)
60
+
61
+ ## Enhancements:
62
+
63
+ - Improve rubocop setup in the new gem template [#4220](https://github.com/rubygems/rubygems/pull/4220)
64
+ - Support repositories with default branch not named master [#4224](https://github.com/rubygems/rubygems/pull/4224)
65
+
66
+ ## Bug fixes:
67
+
68
+ - Let Net::HTTP decompress the index instead of doing it manually [#4081](https://github.com/rubygems/rubygems/pull/4081)
69
+ - Workaround for another jruby crash when autoloading a constant [#4252](https://github.com/rubygems/rubygems/pull/4252)
70
+ - Fix another performance regression in the resolver [#4243](https://github.com/rubygems/rubygems/pull/4243)
71
+ - Restore support for old git versions [#4233](https://github.com/rubygems/rubygems/pull/4233)
72
+ - Give a proper error if cache path does not have write access [#4215](https://github.com/rubygems/rubygems/pull/4215)
73
+ - Fix running `rake release` from an ambiguous ref [#4219](https://github.com/rubygems/rubygems/pull/4219)
74
+
1
75
  # 2.2.4 (December 31, 2020)
2
76
 
3
77
  ## Bug fixes:
@@ -327,7 +401,7 @@
327
401
  - Fix `bundle update` message about exclude groups saying "installed" instead of "updated" ([#7150](https://github.com/rubygems/bundler/pull/7150))
328
402
  - Fix `bundle licenses` not showing correct information about bundler itself ([#7147](https://github.com/rubygems/bundler/pull/7147))
329
403
  - Fix installation path not including ruby scope when `BUNDLE_PATH` was set ([#7163](https://github.com/rubygems/bundler/pull/7163))
330
- - Fix `bundle clean` incorrectly removing git depedencies present in the Gemfile when rubygems 3.0+ was used and path involved a symlink ([#7211](https://github.com/rubygems/bundler/pull/7211))
404
+ - Fix `bundle clean` incorrectly removing git dependencies present in the Gemfile when rubygems 3.0+ was used and path involved a symlink ([#7211](https://github.com/rubygems/bundler/pull/7211))
331
405
  - Fix platform specific gems always being re-resolved when bundler was not running under that platform ([#7212](https://github.com/rubygems/bundler/pull/7212))
332
406
  - Fix `bundle package --all-platforms` causing `bundle install` to ignore `--with` and `--without` ([#6113](https://github.com/rubygems/bundler/pull/6113))
333
407
  - Fix `MissingRevision` git errors to include the specific `git` command that failed under the hood ([#7225](https://github.com/rubygems/bundler/pull/7225))
@@ -499,7 +573,7 @@ Changes
499
573
  ## Bug fixes:
500
574
 
501
575
  - Fix issue where updating a gem resulted in the gem's version being downgraded when `BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS` was set ([#6529](https://github.com/rubygems/bundler/issues/6529), @theflow)
502
- - Fix some rescue calls that don't specifiy error type (@utilum)
576
+ - Fix some rescue calls that don't specify error type (@utilum)
503
577
  - Fix an issue when the Lockfile would contain platform-specific gems that it didn't need ([#6491](https://github.com/rubygems/bundler/issues/6491), @segiddins)
504
578
  - Improve handling of adding new gems with only a single group to the Gemfile in `bundle add` (@agrim123)
505
579
  - Refactor check for OpenSSL in `bundle env` (@voxik)
@@ -63,7 +63,6 @@ module Bundler
63
63
  autoload :Resolver, File.expand_path("bundler/resolver", __dir__)
64
64
  autoload :Retry, File.expand_path("bundler/retry", __dir__)
65
65
  autoload :RubyDsl, File.expand_path("bundler/ruby_dsl", __dir__)
66
- autoload :RubyGemsGemInstaller, File.expand_path("bundler/rubygems_gem_installer", __dir__)
67
66
  autoload :RubyVersion, File.expand_path("bundler/ruby_version", __dir__)
68
67
  autoload :Runtime, File.expand_path("bundler/runtime", __dir__)
69
68
  autoload :Settings, File.expand_path("bundler/settings", __dir__)
@@ -441,7 +440,7 @@ EOF
441
440
  end
442
441
 
443
442
  def local_platform
444
- return Gem::Platform::RUBY if settings[:force_ruby_platform]
443
+ return Gem::Platform::RUBY if settings[:force_ruby_platform] || Gem.platforms == [Gem::Platform::RUBY]
445
444
  Gem::Platform.local
446
445
  end
447
446
 
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2020-12-31".freeze
8
- @git_commit_sha = "529e536f28".freeze
7
+ @built_at = "2021-02-08".freeze
8
+ @git_commit_sha = "30e740c073".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -586,6 +586,7 @@ module Bundler
586
586
  method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
587
587
  method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
588
588
  method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
589
+ method_option :changelog, :type => :boolean, :desc => "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
589
590
  method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
590
591
  :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
591
592
  method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
@@ -30,6 +30,7 @@ module Bundler
30
30
  require_relative "install"
31
31
  options = self.options.dup
32
32
  options["local"] = false if Bundler.settings[:cache_all_platforms]
33
+ options["no-cache"] = true
33
34
  Bundler::CLI::Install.new(options).run
34
35
  end
35
36
 
@@ -59,6 +59,7 @@ module Bundler
59
59
  :exe => options[:exe],
60
60
  :bundler_version => bundler_dependency_version,
61
61
  :github_username => github_username.empty? ? "[USERNAME]" : github_username,
62
+ :required_ruby_version => Gem.ruby_version < Gem::Version.new("2.4.a") ? "2.3.0" : "2.4.0",
62
63
  }
63
64
  ensure_safe_gem_name(name, constant_array)
64
65
 
@@ -141,12 +142,25 @@ module Bundler
141
142
  templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
142
143
  end
143
144
 
145
+ if ask_and_set(:changelog, "Do you want to include a changelog?",
146
+ "A changelog is a file which contains a curated, chronologically ordered list of notable " \
147
+ "changes for each version of a project. To make it easier for users and contributors to" \
148
+ " see precisely what notable changes have been made between each release (or version) of" \
149
+ " the project. Whether consumers or developers, the end users of software are" \
150
+ " human beings who care about what's in the software. When the software changes, people " \
151
+ "want to know why and how. see https://keepachangelog.com")
152
+ config[:changelog] = true
153
+ Bundler.ui.info "Changelog enabled in config"
154
+ templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
155
+ end
156
+
144
157
  if ask_and_set(:rubocop, "Do you want to add rubocop as a dependency for gems you generate?",
145
158
  "RuboCop is a static code analyzer that has out-of-the-box rules for many " \
146
159
  "of the guidelines in the community style guide. " \
147
160
  "For more information, see the RuboCop docs (https://docs.rubocop.org/en/stable/) " \
148
161
  "and the Ruby Style Guides (https://github.com/rubocop-hq/ruby-style-guide).")
149
162
  config[:rubocop] = true
163
+ config[:rubocop_version] = Gem.ruby_version < Gem::Version.new("2.4.a") ? "0.81.0" : "1.7"
150
164
  Bundler.ui.info "RuboCop enabled in config"
151
165
  templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
152
166
  end
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../vendored_fileutils"
4
- require "stringio"
5
- require "zlib"
6
4
 
7
5
  module Bundler
8
6
  class CompactIndexClient
@@ -45,18 +43,12 @@ module Bundler
45
43
  else
46
44
  "bytes=#{local_temp_path.size}-"
47
45
  end
48
- else
49
- # Fastly ignores Range when Accept-Encoding: gzip is set
50
- headers["Accept-Encoding"] = "gzip"
51
46
  end
52
47
 
53
48
  response = @fetcher.call(remote_path, headers)
54
49
  return nil if response.is_a?(Net::HTTPNotModified)
55
50
 
56
51
  content = response.body
57
- if response["Content-Encoding"] == "gzip"
58
- content = Zlib::GzipReader.new(StringIO.new(content)).read
59
- end
60
52
 
61
53
  SharedHelpers.filesystem_access(local_temp_path) do
62
54
  if response.is_a?(Net::HTTPPartialContent) && local_temp_path.size.nonzero?
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "lockfile_parser"
4
- require "set"
5
4
 
6
5
  module Bundler
7
6
  class Definition
@@ -83,11 +82,7 @@ module Bundler
83
82
  @lockfile_contents = Bundler.read_file(lockfile)
84
83
  @locked_gems = LockfileParser.new(@lockfile_contents)
85
84
  @locked_platforms = @locked_gems.platforms
86
- if Bundler.settings[:force_ruby_platform]
87
- @platforms = [Gem::Platform::RUBY]
88
- else
89
- @platforms = @locked_platforms.dup
90
- end
85
+ @platforms = @locked_platforms.dup
91
86
  @locked_bundler_version = @locked_gems.bundler_version
92
87
  @locked_ruby_version = @locked_gems.ruby_version
93
88
 
@@ -259,23 +254,18 @@ module Bundler
259
254
  def resolve
260
255
  @resolve ||= begin
261
256
  last_resolve = converge_locked_specs
262
- resolve =
263
- if Bundler.frozen_bundle?
264
- Bundler.ui.debug "Frozen, using resolution from the lockfile"
265
- last_resolve
266
- elsif !unlocking? && nothing_changed?
267
- Bundler.ui.debug("Found no changes, using resolution from the lockfile")
268
- last_resolve
269
- else
270
- # Run a resolve against the locally available gems
271
- Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
272
- expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, @remote)
273
- last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
274
- end
275
-
276
- # filter out gems that _can_ be installed on multiple platforms, but don't need
277
- # to be
278
- resolve.for(expand_dependencies(dependencies, true), [], false, false, false)
257
+ if Bundler.frozen_bundle?
258
+ Bundler.ui.debug "Frozen, using resolution from the lockfile"
259
+ last_resolve
260
+ elsif !unlocking? && nothing_changed?
261
+ Bundler.ui.debug("Found no changes, using resolution from the lockfile")
262
+ last_resolve
263
+ else
264
+ # Run a resolve against the locally available gems
265
+ Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
266
+ expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, @remote)
267
+ Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
268
+ end
279
269
  end
280
270
  end
281
271
 
@@ -604,7 +594,7 @@ module Bundler
604
594
  deps_for_source = @dependencies.select {|s| s.source == source }
605
595
  locked_deps_for_source = @locked_deps.values.select {|dep| dep.source == locked_source }
606
596
 
607
- Set.new(deps_for_source) != Set.new(locked_deps_for_source)
597
+ deps_for_source.sort != locked_deps_for_source.sort
608
598
  end
609
599
 
610
600
  def specs_for_source_changed?(source)
@@ -818,11 +808,6 @@ module Bundler
818
808
  # commonly happens if the version changed in the gemspec
819
809
  next unless new_spec
820
810
 
821
- new_runtime_deps = new_spec.dependencies.select {|d| d.type != :development }
822
- old_runtime_deps = s.dependencies.select {|d| d.type != :development }
823
- # If the dependencies of the path source have changed and locked spec can't satisfy new dependencies, unlock it
824
- next unless new_runtime_deps.sort == old_runtime_deps.sort || new_runtime_deps.all? {|d| satisfies_locked_spec?(d) }
825
-
826
811
  s.dependencies.replace(new_spec.dependencies)
827
812
  end
828
813
 
@@ -889,7 +874,7 @@ module Bundler
889
874
  dependencies.each do |dep|
890
875
  dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
891
876
  next unless remote || dep.current_platform?
892
- target_platforms = dep.gem_platforms(remote ? Resolver.sort_platforms(@platforms) : [generic_local_platform])
877
+ target_platforms = dep.gem_platforms(remote ? @platforms : [generic_local_platform])
893
878
  deps += expand_dependency_with_platforms(dep, target_platforms)
894
879
  end
895
880
  deps
@@ -897,7 +882,7 @@ module Bundler
897
882
 
898
883
  def expand_dependency_with_platforms(dep, platforms)
899
884
  platforms.map do |p|
900
- DepProxy.new(dep, p)
885
+ DepProxy.get_proxy(dep, p)
901
886
  end
902
887
  end
903
888
 
@@ -918,6 +903,7 @@ module Bundler
918
903
  metadata_dependencies.each do |dep|
919
904
  source_requirements[dep.name] = sources.metadata_source
920
905
  end
906
+ source_requirements[:default_bundler] = source_requirements["bundler"] || source_requirements[:default]
921
907
  source_requirements["bundler"] = sources.metadata_source # needs to come last to override
922
908
  source_requirements
923
909
  end
@@ -977,7 +963,7 @@ module Bundler
977
963
  next requirements if @locked_gems.dependencies[name] != dependency
978
964
  next requirements if dependency.source.is_a?(Source::Path)
979
965
  dep = Gem::Dependency.new(name, ">= #{locked_spec.version}")
980
- requirements[name] = DepProxy.new(dep, locked_spec.platform)
966
+ requirements[name] = DepProxy.get_proxy(dep, locked_spec.platform)
981
967
  requirements
982
968
  end.values
983
969
  end