rubygems-update 3.4.1 → 3.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/bundler/CHANGELOG.md +10 -0
  4. data/bundler/lib/bundler/build_metadata.rb +2 -2
  5. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  6. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  7. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  8. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  9. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  10. data/bundler/lib/bundler/man/bundle-config.1 +2 -2
  11. data/bundler/lib/bundler/man/bundle-config.1.ronn +1 -1
  12. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  13. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  14. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  15. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  16. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  17. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  18. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  19. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  20. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  24. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle.1 +1 -1
  34. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  35. data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +4 -0
  36. data/bundler/lib/bundler/version.rb +1 -1
  37. data/lib/rubygems/command.rb +5 -1
  38. data/lib/rubygems/command_manager.rb +17 -4
  39. data/lib/rubygems/commands/build_command.rb +3 -0
  40. data/lib/rubygems.rb +1 -1
  41. data/rubygems-update.gemspec +1 -1
  42. data/test/rubygems/test_gem_command_manager.rb +40 -0
  43. data/test/rubygems/test_gem_commands_build_command.rb +10 -0
  44. data/test/rubygems/test_gem_installer.rb +1 -1
  45. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ff07798220eea8fe771daf272bc87ef2e3e37cc0a6868107be9c6778956fa35
4
- data.tar.gz: 0c77e50152f414b51e7d57d07d270b883b8b775cd55e1804cbac0318384b323b
3
+ metadata.gz: 315bca7b295e6cfebcf797ed7c5a990d67ad9c5cc34bf31be185ce9619225c52
4
+ data.tar.gz: 0dc3d94e2489d5baba85309a61ce9701de37c0f164b8601892b69b3af287f7c1
5
5
  SHA512:
6
- metadata.gz: 9d75fee7a19d1b77e660665c3880063201df700d261c21e28d050d07102a5817f7561f5832f6cd4aadd3aba0f29606ba264e38db378d87d38c1133dee2fb8e3b
7
- data.tar.gz: cf3773f53b3f5fb0555286da101354b7259412af4476991b6e854d0d3755837275b0712c8ad994955f1e374918cf8f220e50c1983aee7f9611058e1cb4a4d1f8
6
+ metadata.gz: b8ac8e366afdd66d7ffe5813bfd43c3f3e7502cc0ece3c6a848c7eae2614fedac9e8f9a82a232ef5f37bdeb3a3010785febf4286a5de2d46fd2fdd0eba897dae
7
+ data.tar.gz: ddb4c87e1c284243814bab308356a00ddc42e0818078c5abd467d18cd183d3bbc89414e7b1053184427a832d59ef67b70512e845870cc4bd4a19178a624f46c4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 3.4.2 / 2023-01-01
2
+
3
+ ## Enhancements:
4
+
5
+ * Add global flag (`-C`) to change execution directory. Pull request #6180
6
+ by gustavothecoder
7
+ * Installs bundler 2.4.2 as a default gem.
8
+
1
9
  # 3.4.1 / 2022-12-24
2
10
 
3
11
  ## Enhancements:
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 2.4.2 (January 1, 2023)
2
+
3
+ ## Performance:
4
+
5
+ - Speed up resolution by properly merging incompatibility ranges [#6215](https://github.com/rubygems/rubygems/pull/6215)
6
+
7
+ ## Documentation:
8
+
9
+ - Remove stray word in `bundle config` man page [#6220](https://github.com/rubygems/rubygems/pull/6220)
10
+
1
11
  # 2.4.1 (December 24, 2022)
2
12
 
3
13
  ## Enhancements:
@@ -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 = "2022-12-24".freeze
8
- @git_commit_sha = "f3175f033c".freeze
7
+ @built_at = "2023-01-01".freeze
8
+ @git_commit_sha = "2cd3ed45bf".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-ADD" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-ADD" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-BINSTUBS" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-BINSTUBS" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CACHE" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-CACHE" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CHECK" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-CHECK" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CLEAN" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-CLEAN" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CONFIG" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-CONFIG" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-config\fR \- Set bundler configuration options
@@ -39,7 +39,7 @@ Bundler default config
39
39
  .IP "" 0
40
40
  .
41
41
  .P
42
- Executing \fBbundle config list\fR with will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
42
+ Executing \fBbundle config list\fR will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
43
43
  .
44
44
  .P
45
45
  Executing \fBbundle config get <name>\fR will print the value of that configuration setting, and where it was set\.
@@ -19,7 +19,7 @@ Bundler loads configuration settings in this order:
19
19
  3. Global config (`~/.bundle/config`)
20
20
  4. Bundler default config
21
21
 
22
- Executing `bundle config list` with will print a list of all bundler
22
+ Executing `bundle config list` will print a list of all bundler
23
23
  configuration for the current bundle, and where that configuration
24
24
  was set.
25
25
 
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-CONSOLE" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-CONSOLE" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-DOCTOR" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-DOCTOR" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-EXEC" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-EXEC" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-GEM" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-GEM" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-HELP" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-HELP" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INFO" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-INFO" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INIT" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-INIT" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INJECT" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-INJECT" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INSTALL" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-INSTALL" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-LIST" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-LIST" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-list\fR \- List all the gems in the bundle
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-LOCK" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-LOCK" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-OPEN" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-OPEN" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-OUTDATED" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-OUTDATED" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PLATFORM" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-PLATFORM" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-platform\fR \- Displays platform compatibility information
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PLUGIN" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-PLUGIN" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-plugin\fR \- Manage Bundler plugins
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PRISTINE" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-PRISTINE" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-REMOVE" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-REMOVE" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-SHOW" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-SHOW" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-UPDATE" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-UPDATE" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-update\fR \- Update your gems to the latest available versions
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-VERSION" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-VERSION" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-version\fR \- Prints Bundler version information
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-VIZ" "1" "December 2022" "" ""
4
+ .TH "BUNDLE\-VIZ" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE" "1" "December 2022" "" ""
4
+ .TH "BUNDLE" "1" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\fR \- Ruby Dependency Management
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "GEMFILE" "5" "December 2022" "" ""
4
+ .TH "GEMFILE" "5" "January 2023" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -20,6 +20,10 @@ module Bundler::PubGrub
20
20
  range.eql?(other.range)
21
21
  end
22
22
 
23
+ def ==(other)
24
+ package == other.package && range == other.range
25
+ end
26
+
23
27
  class << self
24
28
  def exact(package, version)
25
29
  range = VersionRange.new(min: version, max: version, include_min: true, include_max: true)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.4.1".freeze
4
+ VERSION = "2.4.2".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -630,7 +630,11 @@ RubyGems is a package manager for Ruby.
630
630
  Usage:
631
631
  gem -h/--help
632
632
  gem -v/--version
633
- gem command [arguments...] [options...]
633
+ gem [global options...] command [arguments...] [options...]
634
+
635
+ Global options:
636
+ -C PATH run as if gem was started in <PATH>
637
+ instead of the current working directory
634
638
 
635
639
  Examples:
636
640
  gem install rake
@@ -175,14 +175,20 @@ class Gem::CommandManager
175
175
  when "-v", "--version" then
176
176
  say Gem::VERSION
177
177
  terminate_interaction 0
178
+ when "-C" then
179
+ args.shift
180
+ start_point = args.shift
181
+ if Dir.exist?(start_point)
182
+ Dir.chdir(start_point) { invoke_command(args, build_args) }
183
+ else
184
+ alert_error clean_text("#{start_point} isn't a directory.")
185
+ terminate_interaction 1
186
+ end
178
187
  when /^-/ then
179
188
  alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.")
180
189
  terminate_interaction 1
181
190
  else
182
- cmd_name = args.shift.downcase
183
- cmd = find_command cmd_name
184
- cmd.deprecation_warning if cmd.deprecated?
185
- cmd.invoke_with_build_args args, build_args
191
+ invoke_command(args, build_args)
186
192
  end
187
193
  end
188
194
 
@@ -237,4 +243,11 @@ class Gem::CommandManager
237
243
  ui.backtrace e
238
244
  end
239
245
  end
246
+
247
+ def invoke_command(args, build_args)
248
+ cmd_name = args.shift.downcase
249
+ cmd = find_command cmd_name
250
+ cmd.deprecation_warning if cmd.deprecated?
251
+ cmd.invoke_with_build_args args, build_args
252
+ end
240
253
  end
@@ -26,6 +26,9 @@ class Gem::Commands::BuildCommand < Gem::Command
26
26
  add_option "-C PATH", "Run as if gem build was started in <PATH> instead of the current working directory." do |value, options|
27
27
  options[:build_path] = value
28
28
  end
29
+ deprecate_option "-C",
30
+ version: "4.0",
31
+ extra_msg: "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead"
29
32
  end
30
33
 
31
34
  def arguments # :nodoc:
data/lib/rubygems.rb CHANGED
@@ -8,7 +8,7 @@
8
8
  require "rbconfig"
9
9
 
10
10
  module Gem
11
- VERSION = "3.4.1".freeze
11
+ VERSION = "3.4.2".freeze
12
12
  end
13
13
 
14
14
  # Must be first since it unloads the prelude from 1.9.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubygems-update"
5
- s.version = "3.4.1"
5
+ s.version = "3.4.2"
6
6
  s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
7
7
  s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
8
8
 
@@ -126,6 +126,46 @@ class TestGemCommandManager < Gem::TestCase
126
126
  @command_manager.unregister_command :crash
127
127
  end
128
128
 
129
+ def test_process_args_with_c_flag
130
+ custom_start_point = File.join @tempdir, "nice_folder"
131
+ FileUtils.mkdir_p custom_start_point
132
+
133
+ execution_path = nil
134
+ use_ui @ui do
135
+ @command_manager[:install].when_invoked do
136
+ execution_path = Dir.pwd
137
+ true
138
+ end
139
+ @command_manager.process_args %W[-C #{custom_start_point} install net-scp-4.0.0.gem --local]
140
+ end
141
+
142
+ assert_equal custom_start_point, execution_path
143
+ end
144
+
145
+ def test_process_args_with_c_flag_without_path
146
+ use_ui @ui do
147
+ assert_raise Gem::MockGemUi::TermError do
148
+ @command_manager.process_args %w[-C install net-scp-4.0.0.gem --local]
149
+ end
150
+ end
151
+
152
+ assert_match(/install isn't a directory./i, @ui.error)
153
+ end
154
+
155
+ def test_process_args_with_c_flag_path_not_found
156
+ custom_start_point = File.join @tempdir, "nice_folder"
157
+ FileUtils.mkdir_p custom_start_point
158
+ custom_start_point.tr!("_", "-")
159
+
160
+ use_ui @ui do
161
+ assert_raise Gem::MockGemUi::TermError do
162
+ @command_manager.process_args %W[-C #{custom_start_point} install net-scp-4.0.0.gem --local]
163
+ end
164
+ end
165
+
166
+ assert_match(/#{custom_start_point} isn't a directory./i, @ui.error)
167
+ end
168
+
129
169
  def test_process_args_bad_arg
130
170
  use_ui @ui do
131
171
  assert_raise Gem::MockGemUi::TermError do
@@ -41,6 +41,16 @@ class TestGemCommandsBuildCommand < Gem::TestCase
41
41
  assert_includes Gem.platforms, Gem::Platform.local
42
42
  end
43
43
 
44
+ def test_handle_deprecated_options
45
+ use_ui @ui do
46
+ @cmd.handle_options %w[-C ./test/dir]
47
+ end
48
+
49
+ assert_equal "WARNING: The \"-C\" option has been deprecated and will be removed in Rubygems 4.0. " \
50
+ "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead\n",
51
+ @ui.error
52
+ end
53
+
44
54
  def test_options_filename
45
55
  gemspec_file = File.join(@tempdir, @gem.spec_name)
46
56
 
@@ -1828,7 +1828,7 @@ gem 'other', version
1828
1828
 
1829
1829
  installer = Gem::Installer.at(
1830
1830
  gem_with_ill_formated_platform,
1831
- :install_dir => @gem_home,
1831
+ :install_dir => @gemhome,
1832
1832
  :user_install => false,
1833
1833
  :force => true
1834
1834
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-update
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2022-12-24 00:00:00.000000000 Z
19
+ date: 2023-01-01 00:00:00.000000000 Z
20
20
  dependencies: []
21
21
  description: |-
22
22
  A package (also known as a library) contains a set of functionality
@@ -834,7 +834,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
834
834
  - !ruby/object:Gem::Version
835
835
  version: '0'
836
836
  requirements: []
837
- rubygems_version: 3.4.0
837
+ rubygems_version: 3.4.2
838
838
  signing_key:
839
839
  specification_version: 4
840
840
  summary: RubyGems is a package management framework for Ruby.