-
Notifications
You must be signed in to change notification settings - Fork 121
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
Standardize command related names #873
Conversation
d66af64
to
5cb1821
Compare
I think we can maybe postpone the raise of deprecation warning. Otherwise, gems need to start requiring IRB release with this PR + start referencing to the new constants to avoid the warning. But at the same time, it won't bring immediate benefit to them, nor us, other than having clearer names in their codebase. Update: I decided not to raise deprecation warning on old constants. |
7856c3d
to
30ce967
Compare
It looks like some repository is requiring How about adding a file |
1. Rename lib/irb/extend-command.rb to lib/irb/command.rb 2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb 3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb 4. Rename ExtendCommand to Command
30ce967
to
0d514c7
Compare
@tompng That's a good point 👍 |
(ruby/irb#873) * Replace ExtendCommand with Command and standardize command related names 1. Rename lib/irb/extend-command.rb to lib/irb/command.rb 2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb 3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb 4. Rename ExtendCommand to Command * Alias ExtendCommand to Command and deprecate it * Rename Command::Nop to Command::Base * Not deprecate old constants just yet * Add lib/irb/cmd/nop.rb back ruby/irb@462c1284af
Before we expose command extension APIs, I think it'd be beneficial to first standardize (or even modernize) the names we use for command related concepts. This includes namespace, base class, and folder names:
lib/irb/extend-command.rb
tolib/irb/command.rb
lib/irb/cmd/*.rb
tolib/irb/command/*.rb
test/irb/test_cmd.rb
totest/irb/test_command.rb
ExtendCommand
toCommand
and alias it toCommand
Nop
toBase
and alias it toBase