rubygems-update 3.1.0 → 3.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -1
  3. data/History.txt +72 -2
  4. data/Manifest.txt +3 -3
  5. data/README.md +4 -4
  6. data/Rakefile +10 -5
  7. data/bin/update_rubygems +1 -1
  8. data/bundler/CHANGELOG.md +53 -0
  9. data/bundler/lib/bundler/build_metadata.rb +2 -2
  10. data/bundler/lib/bundler/cli.rb +2 -3
  11. data/bundler/lib/bundler/cli/exec.rb +3 -12
  12. data/bundler/lib/bundler/cli/gem.rb +1 -10
  13. data/bundler/lib/bundler/cli/info.rb +0 -7
  14. data/bundler/lib/bundler/cli/install.rb +3 -2
  15. data/bundler/lib/bundler/cli/list.rb +9 -11
  16. data/bundler/lib/bundler/cli/outdated.rb +63 -86
  17. data/bundler/lib/bundler/cli/pristine.rb +0 -5
  18. data/bundler/lib/bundler/gem_helper.rb +2 -3
  19. data/bundler/lib/bundler/inline.rb +1 -1
  20. data/bundler/lib/bundler/rubygems_integration.rb +39 -0
  21. data/bundler/lib/bundler/setup.rb +5 -0
  22. data/bundler/lib/bundler/source/git.rb +4 -4
  23. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +0 -3
  24. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +3 -10
  25. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
  26. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +0 -22
  27. data/bundler/lib/bundler/version.rb +1 -1
  28. data/bundler/man/bundle-add.1 +1 -1
  29. data/bundler/man/bundle-add.1.txt +1 -1
  30. data/bundler/man/bundle-binstubs.1 +1 -1
  31. data/bundler/man/bundle-binstubs.1.txt +1 -1
  32. data/bundler/man/bundle-cache.1 +1 -1
  33. data/bundler/man/bundle-cache.1.txt +1 -1
  34. data/bundler/man/bundle-check.1 +1 -1
  35. data/bundler/man/bundle-check.1.txt +1 -1
  36. data/bundler/man/bundle-clean.1 +1 -1
  37. data/bundler/man/bundle-clean.1.txt +1 -1
  38. data/bundler/man/bundle-config.1 +1 -1
  39. data/bundler/man/bundle-config.1.txt +1 -1
  40. data/bundler/man/bundle-doctor.1 +1 -1
  41. data/bundler/man/bundle-doctor.1.txt +1 -1
  42. data/bundler/man/bundle-exec.1 +1 -1
  43. data/bundler/man/bundle-exec.1.txt +1 -1
  44. data/bundler/man/bundle-gem.1 +1 -1
  45. data/bundler/man/bundle-gem.1.txt +1 -1
  46. data/bundler/man/bundle-info.1 +1 -1
  47. data/bundler/man/bundle-info.1.txt +1 -1
  48. data/bundler/man/bundle-init.1 +1 -1
  49. data/bundler/man/bundle-init.1.txt +1 -1
  50. data/bundler/man/bundle-inject.1 +1 -1
  51. data/bundler/man/bundle-inject.1.txt +1 -1
  52. data/bundler/man/bundle-install.1 +1 -1
  53. data/bundler/man/bundle-install.1.txt +1 -1
  54. data/bundler/man/bundle-list.1 +7 -7
  55. data/bundler/man/bundle-list.1.txt +8 -9
  56. data/bundler/man/bundle-list.ronn +6 -6
  57. data/bundler/man/bundle-lock.1 +1 -1
  58. data/bundler/man/bundle-lock.1.txt +1 -1
  59. data/bundler/man/bundle-open.1 +1 -1
  60. data/bundler/man/bundle-open.1.txt +1 -1
  61. data/bundler/man/bundle-outdated.1 +1 -1
  62. data/bundler/man/bundle-outdated.1.txt +1 -1
  63. data/bundler/man/bundle-platform.1 +1 -1
  64. data/bundler/man/bundle-platform.1.txt +1 -1
  65. data/bundler/man/bundle-pristine.1 +1 -1
  66. data/bundler/man/bundle-pristine.1.txt +1 -1
  67. data/bundler/man/bundle-remove.1 +1 -1
  68. data/bundler/man/bundle-remove.1.txt +1 -1
  69. data/bundler/man/bundle-show.1 +1 -1
  70. data/bundler/man/bundle-show.1.txt +1 -1
  71. data/bundler/man/bundle-update.1 +1 -1
  72. data/bundler/man/bundle-update.1.txt +1 -1
  73. data/bundler/man/bundle-viz.1 +1 -1
  74. data/bundler/man/bundle-viz.1.txt +1 -1
  75. data/bundler/man/bundle.1 +1 -1
  76. data/bundler/man/bundle.1.txt +1 -1
  77. data/bundler/man/gemfile.5 +1 -1
  78. data/bundler/man/gemfile.5.txt +1 -1
  79. data/lib/rubygems.rb +60 -33
  80. data/lib/rubygems/basic_specification.rb +1 -1
  81. data/lib/rubygems/command.rb +1 -1
  82. data/lib/rubygems/commands/help_command.rb +1 -1
  83. data/lib/rubygems/commands/setup_command.rb +29 -14
  84. data/lib/rubygems/commands/sources_command.rb +3 -3
  85. data/lib/rubygems/commands/uninstall_command.rb +1 -1
  86. data/lib/rubygems/ext/builder.rb +3 -1
  87. data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
  88. data/lib/rubygems/resolver/api_set.rb +1 -1
  89. data/lib/rubygems/resolver/api_specification.rb +1 -1
  90. data/lib/rubygems/server.rb +1 -1
  91. data/lib/rubygems/source_list.rb +2 -0
  92. data/lib/rubygems/specification.rb +12 -8
  93. data/lib/rubygems/specification_policy.rb +9 -1
  94. data/lib/rubygems/ssl_certs/{index.rubygems.org → rubygems.org}/GlobalSignRootCA.pem +0 -0
  95. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
  96. data/lib/rubygems/test_case.rb +60 -0
  97. data/lib/rubygems/util.rb +7 -1
  98. data/lib/rubygems/version.rb +1 -1
  99. data/rubygems-update.gemspec +1 -1
  100. data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +14 -0
  101. data/test/rubygems/test_bundled_ca.rb +7 -4
  102. data/test/rubygems/test_gem.rb +87 -43
  103. data/test/rubygems/test_gem_commands_build_command.rb +18 -1
  104. data/test/rubygems/test_gem_commands_setup_command.rb +56 -10
  105. data/test/rubygems/test_gem_commands_sources_command.rb +39 -1
  106. data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -0
  107. data/test/rubygems/test_gem_installer.rb +10 -23
  108. data/test/rubygems/test_gem_package.rb +3 -8
  109. data/test/rubygems/test_gem_package_tar_writer.rb +5 -0
  110. data/test/rubygems/test_gem_request_set.rb +52 -0
  111. data/test/rubygems/test_gem_specification.rb +26 -6
  112. data/test/rubygems/test_gem_stub_specification.rb +0 -1
  113. data/util/update_bundled_ca_certificates.rb +1 -3
  114. data/util/update_changelog.rb +7 -10
  115. metadata +10 -9
  116. data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  117. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0273e627afbd4a866b93b475062215fa3d664f05b4af35bb281788b0d4ef982f
4
- data.tar.gz: d7ab9c72b868a79376e8d9c89660084fb5dfb2e81552430f3a501a159e11769e
3
+ metadata.gz: 78a4d800b2d75e1b49ee618dee0f663d8b9cecb90fe46043b65a88865aa4fc78
4
+ data.tar.gz: a4535a4ee7fd3e14a60c11d1ec8c82c01063c7023f4b5a63070e8dfbc322b3c9
5
5
  SHA512:
6
- metadata.gz: 77432b7859ec5ac93762d5f24f87b18548a30fac80c7f550770e5a22992003e3224dc77ecda5327e2aa78442ee7a555c628207d53f5b069c8cadcef3ac08fa54
7
- data.tar.gz: 989de44cc58e5f1bface196fb30961b5d737d55209f7c22534029c06cd7f46e2234ab8869aa791a4026e370d5a7dae51b54120407c42d6db6fd0d3442293e2f9
6
+ metadata.gz: 1c0b699ea3e0a12b393e4f54fb2bb095ff26bcb52911d77ae38dbe82d6591e061d6a9e6b99bb475aed7c2ed48a83e81ad36e4eebda065a86aaf3385d553bbeb8
7
+ data.tar.gz: 3710d47156752e7ef3d4cdf8e1aab2a6e0aaf8e80cc9f79a9314f5774a1ea64d7a40283989e5f8fc6d67e2fb4616531d391d892536155a1f78bb6fab1657c924
@@ -26,7 +26,7 @@ contributors to follow to reduce the time it takes to get changes merged in.
26
26
 
27
27
 
28
28
  For more information and ideas on how to contribute to RubyGems ecosystem, see
29
- here: http://guides.rubygems.org/contributing/
29
+ here: https://guides.rubygems.org/contributing/
30
30
 
31
31
  ## Getting Started
32
32
 
@@ -1,5 +1,75 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 3.1.5 / 2020-12-09
4
+
5
+ Minor enhancements:
6
+
7
+ * Add GlobalSign Root CA - R3 cert and remove outdated certs. Pull request #4100
8
+ by Aditya Prakash.
9
+
10
+ === 3.1.4 / 2020-06-03
11
+
12
+ Minor enhancements:
13
+
14
+ * Deprecate rubyforge_project attribute only during build
15
+ time. Pull request #3609 by Josef Šimánek.
16
+ * Update links. Pull request #3610 by Josef Šimánek.
17
+ * Run CI at 3.1 branch head as well. Pull request #3677 by Josef Šimánek.
18
+ * Remove failing ubuntu-rvm CI flow. Pull request #3611 by
19
+ Josef Šimánek.
20
+
21
+ === 3.1.3 / 2020-05-05
22
+
23
+ Minor enhancements:
24
+
25
+ * Resolver: require NameTuple before use. Pull request #3171 by Olle
26
+ Jonsson.
27
+ * Use absolute paths with autoload. Pull request #3100 by David Rodríguez.
28
+ * Avoid changing $SOURCE_DATE_EPOCH. Pull request #3088 by Ellen Marie
29
+ Dash.
30
+ * Use Bundler 2.1.4. Pull request #3072 by Hiroshi SHIBATA.
31
+ * Add tests to check if Gem.ruby_version works with ruby git master.
32
+ Pull request #3049 by Yusuke Endoh.
33
+
34
+ Bug fixes:
35
+
36
+ * Fix platform comparison check in #contains_requirable_file?. Pull
37
+ request #3495 by Benoit Daloze.
38
+ * Improve gzip errors logging. Pull request #3485 by David Rodríguez.
39
+ * Fix incorrect `gem uninstall --all` message. Pull request #3483 by David
40
+ Rodríguez.
41
+ * Fix incorrect bundler version being required. Pull request #3458 by
42
+ David Rodríguez.
43
+ * Fix gem install from a gemdeps file with complex dependencies.
44
+ Pull request #3054 by Luis Sagastume.
45
+
46
+ === 3.1.2 / 2019-12-20
47
+
48
+ Minor enhancements:
49
+
50
+ * Restore non prompting `gem update --system` behavior. Pull request #3040
51
+ by David Rodríguez.
52
+ * Show only release notes for new code installed. Pull request #3041 by
53
+ David Rodríguez.
54
+ * Inform about installed `bundle` executable after `gem update --system`.
55
+ Pull request #3042 by David Rodríguez.
56
+ * Use Bundler 2.1.2. Pull request #3043 by SHIBATA Hiroshi.
57
+
58
+ Bug fixes:
59
+
60
+ * Require `uri` in source.rb. Pull request #3034 by mihaibuzgau.
61
+ * Fix `gem update --system --force`. Pull request #3035 by David
62
+ Rodríguez.
63
+ * Move `require uri` to source_list. Pull request #3038 by mihaibuzgau.
64
+
65
+ === 3.1.1 / 2019-12-16
66
+
67
+ Bug fixes:
68
+
69
+ * Vendor Bundler 2.1.0 again. The version of Bundler with
70
+ RubyGems 3.1.0 was Bundler 2.1.0.pre.3. Pull request #3029 by
71
+ SHIBATA Hiroshi.
72
+
3
73
  === 3.1.0 / 2019-12-16
4
74
 
5
75
  Major enhancements:
@@ -3509,10 +3579,10 @@ Bug fixes:
3509
3579
 
3510
3580
  NOTE:
3511
3581
 
3512
- http://rubygems.org is now the default source for downloading gems.
3582
+ https://rubygems.org/ is now the default source for downloading gems.
3513
3583
 
3514
3584
  You may have sources set via ~/.gemrc, so you should replace
3515
- http://gems.rubyforge.org with http://rubygems.org
3585
+ http://gems.rubyforge.org with https://rubygems.org/
3516
3586
 
3517
3587
  http://gems.rubyforge.org will continue to work for the foreseeable future.
3518
3588
 
@@ -497,9 +497,8 @@ lib/rubygems/spec_fetcher.rb
497
497
  lib/rubygems/specification.rb
498
498
  lib/rubygems/specification_policy.rb
499
499
  lib/rubygems/ssl_certs/.document
500
- lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem
501
- lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem
502
- lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem
500
+ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
501
+ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
503
502
  lib/rubygems/stub_specification.rb
504
503
  lib/rubygems/syck_hack.rb
505
504
  lib/rubygems/test_case.rb
@@ -566,6 +565,7 @@ test/rubygems/sff/discover.rb
566
565
  test/rubygems/simple_gem.rb
567
566
  test/rubygems/specifications/bar-0.0.2.gemspec
568
567
  test/rubygems/specifications/foo-0.0.1-x86-mswin32.gemspec
568
+ test/rubygems/specifications/rubyforge-0.0.1.gemspec
569
569
  test/rubygems/ssl_cert.pem
570
570
  test/rubygems/ssl_key.pem
571
571
  test/rubygems/test_bundled_ca.rb
data/README.md CHANGED
@@ -6,7 +6,7 @@ A package (also known as a library) contains a set of functionality that can be
6
6
  We call these packages "gems" and RubyGems is a tool to install, create, manage and load these packages in your Ruby environment.
7
7
 
8
8
  RubyGems is also a client for [RubyGems.org](https://rubygems.org), a public repository of Gems that allows you to publish a Gem
9
- that can be shared and used by other developers. See our guide on publishing a Gem at [guides.rubygems.org](http://guides.rubygems.org/publishing/)
9
+ that can be shared and used by other developers. See our guide on publishing a Gem at [guides.rubygems.org](https://guides.rubygems.org/publishing/)
10
10
 
11
11
  ## Getting Started
12
12
 
@@ -23,7 +23,7 @@ Finally, inside your Ruby program, load the Nokogiri gem and start parsing your
23
23
 
24
24
  Nokogiri.XML('<h1>Hello World</h1>')
25
25
 
26
- For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](http://guides.rubygems.org/rubygems-basics/)
26
+ For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](https://guides.rubygems.org/rubygems-basics/)
27
27
 
28
28
  ## Requirements
29
29
 
@@ -65,10 +65,10 @@ See [UPGRADING](UPGRADING.md) for more details and alternative instructions.
65
65
  ## Documentation
66
66
 
67
67
  RubyGems uses [rdoc](https://github.com/rdoc/rdoc) for documentation. A compiled set of the docs
68
- can be viewed online at [rubydoc](http://www.rubydoc.info/github/rubygems/rubygems).
68
+ can be viewed online at [rubydoc](https://www.rubydoc.info/github/rubygems/rubygems).
69
69
 
70
70
  RubyGems also provides a comprehensive set of guides which covers numerous topics such as
71
- creating a new gem, security practices and other resources at http://guides.rubygems.org
71
+ creating a new gem, security practices and other resources at https://guides.rubygems.org
72
72
 
73
73
  ## Getting Help
74
74
 
data/Rakefile CHANGED
@@ -96,8 +96,13 @@ task :check_deprecations do
96
96
  end
97
97
 
98
98
  desc "Install rubygems to local system"
99
- task :install => :package do
100
- sh "gem install pkg/rubygems-update-#{v}.gem && update_rubygems"
99
+ task :install => [:clear_package, :package] do
100
+ sh "ruby -Ilib bin/gem install pkg/rubygems-update-#{v}.gem && update_rubygems"
101
+ end
102
+
103
+ desc "Clears previously built package"
104
+ task :clear_package do
105
+ rm_rf "pkg"
101
106
  end
102
107
 
103
108
  desc "Release rubygems-#{v}"
@@ -146,7 +151,7 @@ file "pkg/rubygems-#{v}.tgz" => "pkg/rubygems-#{v}" do
146
151
  sh "7z a -ttar rubygems-#{v}.tar rubygems-#{v}"
147
152
  sh "7z a -tgzip rubygems-#{v}.tgz rubygems-#{v}.tar"
148
153
  else
149
- sh "tar -czf rubygems-#{v}.tgz rubygems-#{v}"
154
+ sh "tar -czf rubygems-#{v}.tgz --owner=rubygems:0 --group=rubygems:0 rubygems-#{v}"
150
155
  end
151
156
  end
152
157
  end
@@ -162,7 +167,7 @@ task :upload_to_s3 do
162
167
  s3 = Aws::S3::Resource.new(region:'us-west-2')
163
168
  %w[zip tgz].each do |ext|
164
169
  obj = s3.bucket('oregon.production.s3.rubygems.org').object("rubygems/rubygems-#{v}.#{ext}")
165
- obj.upload_file("pkg/rubygems-#{v}.#{ext}")
170
+ obj.upload_file("pkg/rubygems-#{v}.#{ext}", acl: 'public-read')
166
171
  end
167
172
  end
168
173
 
@@ -335,7 +340,7 @@ SHA256 Checksums:
335
340
 
336
341
  #{checksums}
337
342
 
338
- [download]: http://rubygems.org/pages/download
343
+ [download]: https://rubygems.org/pages/download
339
344
  [upgrading]: http://docs.seattlerb.org/rubygems/UPGRADING_rdoc.html
340
345
 
341
346
  ANNOUNCEMENT
@@ -32,5 +32,5 @@ else
32
32
  update_dir = File.dirname(update_dir)
33
33
  Dir.chdir update_dir
34
34
  ENV["GEM_PREV_VER"] = Gem::VERSION
35
- system(Gem.ruby, 'setup.rb', *ARGV)
35
+ abort unless system(Gem.ruby, 'setup.rb', *ARGV)
36
36
  end
@@ -1,3 +1,56 @@
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
+
8
+ ## 2.1.3 (January 2, 2020)
9
+
10
+ Bugfixes:
11
+
12
+ - Fix `rake build` when path has spaces on it [#7514](https://github.com/bundler/bundler/pull/7514)
13
+ - Fix `rake release` git push tasks when the running shell has `git` as an alias of another command (like `hub`) [#7510](https://github.com/bundler/bundler/pull/7510)
14
+ - Fix some circular require warnings [#7520](https://github.com/bundler/bundler/pull/7520)
15
+ - Fix `bundle config set deployment true` recommended alternative to `bundle config --deployment` to behave in the same way as the `--deployment` flag [#7519](https://github.com/bundler/bundler/pull/7519)
16
+
17
+ ## 2.1.2 (December 20, 2019)
18
+
19
+ Bugfixes:
20
+
21
+ - Restore an explicit `require "rubygems"` on top `rubygems_integration.rb` to avoid some missing constant errors under some convoluted setups [#7505](https://github.com/bundler/bundler/pull/7505)
22
+
23
+ ## 2.1.1 (December 17, 2019)
24
+
25
+ Bugfixes:
26
+
27
+ - Fix some cases of shelling out to `rubygems` still being silent [#7493](https://github.com/bundler/bundler/pull/7493)
28
+ - Restore compatibility with `rubygems-bundler` so that binstubs work under `RVM` [#7498](https://github.com/bundler/bundler/pull/7498)
29
+
30
+ ## 2.1.0 (December 15, 2019)
31
+
32
+ Features:
33
+
34
+ - Add support for new default gems. In particular,
35
+
36
+ * `open3` [#7455](https://github.com/bundler/bundler/pull/7455)
37
+ * `cgi`: [#7456](https://github.com/bundler/bundler/pull/7456)
38
+ * `uri` [#7460](https://github.com/bundler/bundler/pull/7460)
39
+
40
+ plus other PRs removing or lazily loading usages of these gems from other places to not interfere with user's choice, such as [#7471](https://github.com/bundler/bundler/pull/7471) or [#7473](https://github.com/bundler/bundler/pull/7473)
41
+
42
+ Bugfixes:
43
+
44
+ - Fix `bundle exec rake install` failing [#7474](https://github.com/bundler/bundler/pull/7474)
45
+ - Fix `bundle exec`'ing to rubygems being silent [#7442](https://github.com/bundler/bundler/pull/7442)
46
+ - Restore previous `BUNDLE_GEMFILE` in `bundler/inline` [#7418](https://github.com/bundler/bundler/pull/7418)
47
+ - Fix error when using `gem` DSL's `:glob` option for selecting gemspecs from a specific source [#7419](https://github.com/bundler/bundler/pull/7419)
48
+
49
+ Changes:
50
+
51
+ - `bundle config` no longer warns when using "old interface" (might be deprecated again in the future) [#7475](https://github.com/bundler/bundler/pull/7475)
52
+ - `bundle update` no longer warns when used without arguments (might be deprecated again in the future) [#7475](https://github.com/bundler/bundler/pull/7475)
53
+
1
54
  ## 2.1.0.pre.3 (November 12, 2019)
2
55
 
3
56
  Features:
@@ -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 = "2019-12-16".freeze
8
- @git_commit_sha = "4045ba4bb".freeze
7
+ @built_at = "2020-12-09".freeze
8
+ @git_commit_sha = "32a4159325".freeze
9
9
  @release = false
10
10
  # end ivars
11
11
 
@@ -342,8 +342,8 @@ module Bundler
342
342
 
343
343
  desc "list", "List all gems in the bundle"
344
344
  method_option "name-only", :type => :boolean, :banner => "print only the gem names"
345
- method_option "only-group", :type => :array, :default => [], :banner => "print gems from a given set of groups"
346
- method_option "without-group", :type => :array, :default => [], :banner => "print all gems except from a given set of groups"
345
+ method_option "only-group", :type => :string, :banner => "print gems from a particular group"
346
+ method_option "without-group", :type => :string, :banner => "print all gems except from a group"
347
347
  method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
348
348
  def list
349
349
  require_relative "cli/list"
@@ -567,7 +567,6 @@ module Bundler
567
567
  method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
568
568
  method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
569
569
  method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set gem.mit true`."
570
- method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set gem.rubocop true`."
571
570
  method_option :test, :type => :string, :lazy_default => "rspec", :aliases => "-t", :banner => "rspec",
572
571
  :desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config set gem.test rspec`."
573
572
  def gem(name)
@@ -25,12 +25,12 @@ module Bundler
25
25
  SharedHelpers.set_bundle_environment
26
26
  if bin_path = Bundler.which(cmd)
27
27
  if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
28
- return with_verbose_rubygems { kernel_load(bin_path, *args) }
28
+ return kernel_load(bin_path, *args)
29
29
  end
30
- with_verbose_rubygems { kernel_exec(bin_path, *args) }
30
+ kernel_exec(bin_path, *args)
31
31
  else
32
32
  # exec using the given command
33
- with_verbose_rubygems { kernel_exec(cmd, *args) }
33
+ kernel_exec(cmd, *args)
34
34
  end
35
35
  end
36
36
 
@@ -89,14 +89,5 @@ module Bundler
89
89
  first_line = File.open(file, "rb") {|f| f.read(possibilities.map(&:size).max) }
90
90
  possibilities.any? {|shebang| first_line.start_with?(shebang) }
91
91
  end
92
-
93
- def with_verbose_rubygems
94
- old_ui = Gem::DefaultUserInteraction.ui
95
- Gem::DefaultUserInteraction.ui = nil
96
-
97
- yield
98
- ensure
99
- Gem::DefaultUserInteraction.ui = old_ui
100
- end
101
92
  end
102
93
  end
@@ -100,7 +100,7 @@ module Bundler
100
100
  end
101
101
  end
102
102
 
103
- config[:test_task] = config[:test] == "minitest" ? :test : :spec
103
+ config[:test_task] = config[:test] == "minitest" ? "test" : "spec"
104
104
 
105
105
  if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
106
106
  "This means that any other developer or company will be legally allowed to use your code " \
@@ -124,15 +124,6 @@ module Bundler
124
124
  templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
125
125
  end
126
126
 
127
- if ask_and_set(:rubocop, "Do you want to add rubocop as a dependency for gems you generate?",
128
- "RuboCop is a static code analyzer that has out-of-the-box rules for many " \
129
- "of the guidelines in the community style guide. " \
130
- "For more information, see the RuboCop docs (https://docs.rubocop.org/en/stable/) " \
131
- "and the Ruby Style Guides (https://github.com/rubocop-hq/ruby-style-guide).")
132
- config[:rubocop] = true
133
- Bundler.ui.info "RuboCop enabled in config"
134
- end
135
-
136
127
  templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
137
128
 
138
129
  if options[:ext]
@@ -50,17 +50,10 @@ module Bundler
50
50
  end
51
51
 
52
52
  def print_gem_info(spec)
53
- metadata = spec.metadata
54
53
  gem_info = String.new
55
54
  gem_info << " * #{spec.name} (#{spec.version}#{spec.git_version})\n"
56
55
  gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
57
56
  gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
58
- gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
59
- gem_info << "\tSource Code: #{metadata["source_code_uri"]}\n" if metadata.key?("source_code_uri")
60
- gem_info << "\tWiki: #{metadata["wiki_uri"]}\n" if metadata.key?("wiki_uri")
61
- gem_info << "\tChangelog: #{metadata["changelog_uri"]}\n" if metadata.key?("changelog_uri")
62
- gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
63
- gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
64
57
  gem_info << "\tPath: #{spec.full_gem_path}\n"
65
58
  gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
66
59
  Bundler.ui.info gem_info
@@ -38,7 +38,8 @@ module Bundler
38
38
  if Bundler.feature_flag.deployment_means_frozen?
39
39
  Bundler.settings.set_command_option :deployment, true
40
40
  else
41
- Bundler.settings.set_command_option :frozen, true
41
+ Bundler.settings.set_command_option :deployment, true if options[:deployment]
42
+ Bundler.settings.set_command_option :frozen, true if options[:frozen]
42
43
  end
43
44
  end
44
45
 
@@ -169,7 +170,7 @@ module Bundler
169
170
  def normalize_settings
170
171
  Bundler.settings.set_command_option :path, nil if options[:system]
171
172
  Bundler.settings.temporary(:path_relative_to_cwd => false) do
172
- Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment]
173
+ Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
173
174
  end
174
175
  Bundler.settings.set_command_option_if_given :path, options[:path]
175
176
  Bundler.settings.temporary(:path_relative_to_cwd => false) do
@@ -4,16 +4,14 @@ module Bundler
4
4
  class CLI::List
5
5
  def initialize(options)
6
6
  @options = options
7
- @without_group = options["without-group"].map(&:to_sym)
8
- @only_group = options["only-group"].map(&:to_sym)
9
7
  end
10
8
 
11
9
  def run
12
- raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @only_group.any? && @without_group.any?
10
+ raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @options["only-group"] && @options["without-group"]
13
11
 
14
12
  raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options[:paths]
15
13
 
16
- specs = if @only_group.any? || @without_group.any?
14
+ specs = if @options["only-group"] || @options["without-group"]
17
15
  filtered_specs_by_groups
18
16
  else
19
17
  Bundler.load.specs
@@ -34,9 +32,9 @@ module Bundler
34
32
  private
35
33
 
36
34
  def verify_group_exists(groups)
37
- (@without_group + @only_group).each do |group|
38
- raise InvalidOption, "`#{group}` group could not be found." unless groups.include?(group)
39
- end
35
+ raise InvalidOption, "`#{@options["without-group"]}` group could not be found." if @options["without-group"] && !groups.include?(@options["without-group"].to_sym)
36
+
37
+ raise InvalidOption, "`#{@options["only-group"]}` group could not be found." if @options["only-group"] && !groups.include?(@options["only-group"].to_sym)
40
38
  end
41
39
 
42
40
  def filtered_specs_by_groups
@@ -46,10 +44,10 @@ module Bundler
46
44
  verify_group_exists(groups)
47
45
 
48
46
  show_groups =
49
- if @without_group.any?
50
- groups.reject {|g| @without_group.include?(g) }
51
- elsif @only_group.any?
52
- groups.select {|g| @only_group.include?(g) }
47
+ if @options["without-group"]
48
+ groups.reject {|g| g == @options["without-group"].to_sym }
49
+ elsif @options["only-group"]
50
+ groups.select {|g| g == @options["only-group"].to_sym }
53
51
  else
54
52
  groups
55
53
  end.map(&:to_sym)
@@ -3,16 +3,18 @@
3
3
  module Bundler
4
4
  class CLI::Outdated
5
5
  attr_reader :options, :gems, :options_include_groups, :filter_options_patch, :sources, :strict
6
- attr_accessor :outdated_gems
6
+ attr_accessor :outdated_gems_by_groups, :outdated_gems_list
7
7
 
8
8
  def initialize(options, gems)
9
9
  @options = options
10
10
  @gems = gems
11
11
  @sources = Array(options[:source])
12
12
 
13
- @filter_options_patch = options.keys & %w[filter-major filter-minor filter-patch]
13
+ @filter_options_patch = options.keys &
14
+ %w[filter-major filter-minor filter-patch]
14
15
 
15
- @outdated_gems = []
16
+ @outdated_gems_by_groups = {}
17
+ @outdated_gems_list = []
16
18
 
17
19
  @options_include_groups = [:group, :groups].any? do |v|
18
20
  options.keys.include?(v.to_s)
@@ -20,7 +22,8 @@ module Bundler
20
22
 
21
23
  # the patch level options imply strict is also true. It wouldn't make
22
24
  # sense otherwise.
23
- @strict = options["filter-strict"] || Bundler::CLI::Common.patch_level_options(options).any?
25
+ @strict = options["filter-strict"] ||
26
+ Bundler::CLI::Common.patch_level_options(options).any?
24
27
  end
25
28
 
26
29
  def run
@@ -73,52 +76,58 @@ module Bundler
73
76
  end
74
77
 
75
78
  specs.sort_by(&:name).each do |current_spec|
76
- next unless gems.empty? || gems.include?(current_spec.name)
79
+ next if !gems.empty? && !gems.include?(current_spec.name)
77
80
 
81
+ dependency = current_dependencies[current_spec.name]
78
82
  active_spec = retrieve_active_spec(definition, current_spec)
79
- next unless filter_options_patch.empty? || update_present_via_semver_portions(current_spec, active_spec, options)
83
+
84
+ next if active_spec.nil?
85
+ next if filter_options_patch.any? &&
86
+ !update_present_via_semver_portions(current_spec, active_spec, options)
80
87
 
81
88
  gem_outdated = Gem::Version.new(active_spec.version) > Gem::Version.new(current_spec.version)
82
89
  next unless gem_outdated || (current_spec.git_version != active_spec.git_version)
83
-
84
- dependency = current_dependencies[current_spec.name]
85
- groups = ""
90
+ groups = nil
86
91
  if dependency && !options[:parseable]
87
92
  groups = dependency.groups.join(", ")
88
93
  end
89
94
 
90
- outdated_gems << {
91
- :active_spec => active_spec,
92
- :current_spec => current_spec,
93
- :dependency => dependency,
94
- :groups => groups,
95
- }
95
+ outdated_gems_list << { :active_spec => active_spec,
96
+ :current_spec => current_spec,
97
+ :dependency => dependency,
98
+ :groups => groups }
99
+
100
+ outdated_gems_by_groups[groups] ||= []
101
+ outdated_gems_by_groups[groups] << outdated_gems_list[-1]
96
102
  end
97
103
 
98
- if outdated_gems.empty?
104
+ if outdated_gems_list.empty?
105
+ display_nothing_outdated_message
106
+ else
99
107
  unless options[:parseable]
100
- Bundler.ui.info(nothing_outdated_message)
108
+ Bundler.ui.info(header_outdated_message)
101
109
  end
102
- else
110
+
103
111
  if options_include_groups
104
- relevant_outdated_gems = outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems|
105
- contains_group = groups.split(", ").include?(options[:group])
106
- next unless options[:groups] || contains_group
112
+ ordered_groups = outdated_gems_by_groups.keys.compact.sort
113
+ ordered_groups.insert(0, nil).each do |groups|
114
+ gems = outdated_gems_by_groups[groups]
115
+ contains_group = if groups
116
+ groups.split(", ").include?(options[:group])
117
+ else
118
+ options[:group] == "group"
119
+ end
107
120
 
108
- gems
109
- end.compact
121
+ next if (!options[:groups] && !contains_group) || gems.nil?
110
122
 
111
- if options[:parseable]
112
- relevant_outdated_gems.each do |gems|
113
- print_gems(gems)
123
+ unless options[:parseable]
124
+ Bundler.ui.info(header_group_message(groups))
114
125
  end
115
- else
116
- print_gems_table(relevant_outdated_gems)
126
+
127
+ print_gems(gems)
117
128
  end
118
- elsif options[:parseable]
119
- print_gems(outdated_gems)
120
129
  else
121
- print_gems_table(outdated_gems)
130
+ print_gems(outdated_gems_list)
122
131
  end
123
132
 
124
133
  exit 1
@@ -131,6 +140,22 @@ module Bundler
131
140
  "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
132
141
  end
133
142
 
143
+ def header_outdated_message
144
+ if options[:pre]
145
+ "Outdated gems included in the bundle (including pre-releases):"
146
+ else
147
+ "Outdated gems included in the bundle:"
148
+ end
149
+ end
150
+
151
+ def header_group_message(groups)
152
+ if groups
153
+ "===== #{groups_text("Group", groups)} ====="
154
+ else
155
+ "===== Without group ====="
156
+ end
157
+ end
158
+
134
159
  def nothing_outdated_message
135
160
  if filter_options_patch.any?
136
161
  display = filter_options_patch.map do |o|
@@ -157,28 +182,21 @@ module Bundler
157
182
  active_spec
158
183
  end
159
184
 
160
- def print_gems(gems_list)
161
- gems_list.each do |gem|
162
- print_gem(
163
- gem[:current_spec],
164
- gem[:active_spec],
165
- gem[:dependency],
166
- gem[:groups],
167
- )
185
+ def display_nothing_outdated_message
186
+ unless options[:parseable]
187
+ Bundler.ui.info(nothing_outdated_message)
168
188
  end
169
189
  end
170
190
 
171
- def print_gems_table(gems_list)
172
- data = gems_list.map do |gem|
173
- gem_column_for(
191
+ def print_gems(gems_list)
192
+ gems_list.each do |gem|
193
+ print_gem(
174
194
  gem[:current_spec],
175
195
  gem[:active_spec],
176
196
  gem[:dependency],
177
197
  gem[:groups],
178
198
  )
179
199
  end
180
-
181
- print_indented([table_header] + data)
182
200
  end
183
201
 
184
202
  def print_gem(current_spec, active_spec, dependency, groups)
@@ -195,7 +213,7 @@ module Bundler
195
213
 
196
214
  output_message = if options[:parseable]
197
215
  spec_outdated_info.to_s
198
- elsif options_include_groups || groups.empty?
216
+ elsif options_include_groups || !groups
199
217
  " * #{spec_outdated_info}"
200
218
  else
201
219
  " * #{spec_outdated_info} in #{groups_text("group", groups)}"
@@ -204,16 +222,6 @@ module Bundler
204
222
  Bundler.ui.info output_message.rstrip
205
223
  end
206
224
 
207
- def gem_column_for(current_spec, active_spec, dependency, groups)
208
- current_version = "#{current_spec.version}#{current_spec.git_version}"
209
- spec_version = "#{active_spec.version}#{active_spec.git_version}"
210
- dependency = dependency.requirement if dependency
211
-
212
- ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s]
213
- ret_val << active_spec.loaded_from.to_s if Bundler.ui.debug?
214
- ret_val
215
- end
216
-
217
225
  def check_for_deployment_mode!
218
226
  return unless Bundler.frozen_bundle?
219
227
  suggested_command = if Bundler.settings.locations("frozen")[:global]
@@ -231,8 +239,6 @@ module Bundler
231
239
  end
232
240
 
233
241
  def update_present_via_semver_portions(current_spec, active_spec, options)
234
- return false if active_spec.nil?
235
-
236
242
  current_major = current_spec.version.segments.first
237
243
  active_major = active_spec.version.segments.first
238
244
 
@@ -260,34 +266,5 @@ module Bundler
260
266
  version_section = spec.version.segments[version_portion_index, 1]
261
267
  version_section.to_a[0].to_i
262
268
  end
263
-
264
- def print_indented(matrix)
265
- header = matrix[0]
266
- data = matrix[1..-1]
267
-
268
- column_sizes = Array.new(header.size) do |index|
269
- matrix.max_by {|row| row[index].length }[index].length
270
- end
271
-
272
- Bundler.ui.info justify(header, column_sizes)
273
-
274
- data.sort_by! {|row| row[0] }
275
-
276
- data.each do |row|
277
- Bundler.ui.info justify(row, column_sizes)
278
- end
279
- end
280
-
281
- def table_header
282
- header = ["Gem", "Current", "Latest", "Requested", "Groups"]
283
- header << "Path" if Bundler.ui.debug?
284
- header
285
- end
286
-
287
- def justify(row, sizes)
288
- row.each_with_index.map do |element, index|
289
- element.ljust(sizes[index])
290
- end.join(" ").strip + "\n"
291
- end
292
269
  end
293
270
  end