-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deprecate command method #2935
Conversation
Bundler specs failing 🤔 @deivid-rodriguez @hsbt @duckinator what you think of adding this method in general? |
@bronzdoc I'm in favor of this being added, if there's commands that need to be deprecated. And I imagine there are, since the RubyGems codebase is 10+ years old. |
I'm thinking of the |
Yeah, that seems worth deprecating, so I'd say it's worth adding |
Me too, I like the idea of |
@bronzdoc https://github.com/rubygems/rubygems/pull/2935/checks?check_run_id=239916853 is issue of GitHub Actions. It exceeded 6h of execution limit. |
@deivid-rodriguez @duckinator @hsbt what you think of of the implementation of this method? do you approve? |
@bronzdoc this looks good to me. 👍 |
@bundlerbot r+ |
2935: Add deprecate command method r=bronzdoc a=bronzdoc # Description: This PR adds a `deprecate_command` method to deprecate RubyGems commands. ### Example ```ruby class Gem::Commands::QueryCommand extend Gem::Deprecate deprecate_command(2019, 12) def execute gem_names = Array(options[:name]) if !args.empty? gem_names = options[:exact] ? args.map{|arg| /\A#{Regexp.escape(arg)}\Z/ } : args.map{|arg| /#{arg}/i } end terminate_interaction(check_installed_gems(gem_names)) if check_installed_gems? gem_names.each { |n| show_gems(n) } end ... end ``` ```shell $ gem query ebsocket-driver (0.7.1, 0.7.0, 0.6.5) websocket-extensions (0.1.4, 0.1.3) will_paginate (3.0.12) xml-simple (1.1.5) xmlrpc (0.3.0) xpath (3.2.0, 2.1.0) yajl-ruby (1.4.1) yard (0.9.20, 0.8.7.6) yell (2.2.0) zeitwerk (2.1.10, 2.1.9, 2.1.8, 2.1.6, 2.1.2) zlib (default: 1.0.0) NOTE: query command is deprecated. It will be removed on or after 2019-12-01. ``` ______________ I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: bronzdoc <lsagastume1990@gmail.com>
Build succeeded |
2974: Simplify deprecate command method r=deivid-rodriguez a=bronzdoc # Description: Simplify `Gem::Deprecate#deprecate_command` that was introduced here #2935 ______________ I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: bronzdoc <lsagastume1990@gmail.com>
2974: Simplify deprecate command method r=deivid-rodriguez a=bronzdoc # Description: Simplify `Gem::Deprecate#deprecate_command` that was introduced here rubygems/rubygems#2935 ______________ I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: bronzdoc <lsagastume1990@gmail.com>
Description:
This PR adds a
deprecate_command
method to deprecate RubyGems commands.Example
$ gem query ebsocket-driver (0.7.1, 0.7.0, 0.6.5) websocket-extensions (0.1.4, 0.1.3) will_paginate (3.0.12) xml-simple (1.1.5) xmlrpc (0.3.0) xpath (3.2.0, 2.1.0) yajl-ruby (1.4.1) yard (0.9.20, 0.8.7.6) yell (2.2.0) zeitwerk (2.1.10, 2.1.9, 2.1.8, 2.1.6, 2.1.2) zlib (default: 1.0.0) NOTE: query command is deprecated. It will be removed on or after 2019-12-01.
I will abide by the code of conduct.