summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-03-31 20:59:49 +0300
committerGitHub <noreply@github.com>2019-03-31 20:59:49 +0300
commitbe0acf0a6744f9a9a79b0fce4875ee1d56743752 (patch)
tree58554b715f528a99cce1d5c46d84725274450dc3
parentd4ff3af71e5e804bcd5f5b7acb0289e7a8758af4 (diff)
parent9f3ec4bc2318f879c493cc632145468f87d74442 (diff)
downloadpry-be0acf0a6744f9a9a79b0fce4875ee1d56743752.tar.gz
Merge pull request #2001 from pry/deprecated-command-removal
Delete commands/disabled_commands
-rw-r--r--CHANGELOG.md4
-rw-r--r--lib/pry.rb1
-rw-r--r--lib/pry/command_set.rb13
-rw-r--r--lib/pry/commands/disable_pry.rb2
-rw-r--r--lib/pry/commands/disabled_commands.rb2
5 files changed, 6 insertions, 16 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69e8bc8e..a443510e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -59,6 +59,10 @@
* Deleted commands: `gem-cd`, `gem-install`, `gem-list`, `gem-open`,
`gem-readme`, `gem-search`, `gem-stats`
([#1981](https://github.com/pry/pry/pull/1981))
+* Deleted deprecated commands: `edit-method` and `show-command`
+ ([#2001](https://github.com/pry/pry/pull/2001))
+* Deleted `Pry::Command#disabled_commands`
+ ([#2001](https://github.com/pry/pry/pull/2001))
#### Bug fixes
diff --git a/lib/pry.rb b/lib/pry.rb
index 7a5e7c80..251271c0 100644
--- a/lib/pry.rb
+++ b/lib/pry.rb
@@ -90,7 +90,6 @@ require 'pry/commands/change_prompt'
require 'pry/commands/clear_screen'
require 'pry/commands/code_collector'
require 'pry/commands/disable_pry'
-require 'pry/commands/disabled_commands'
require 'pry/commands/easter_eggs'
require 'pry/commands/edit'
diff --git a/lib/pry/command_set.rb b/lib/pry/command_set.rb
index 3d5164a5..737a5cf7 100644
--- a/lib/pry/command_set.rb
+++ b/lib/pry/command_set.rb
@@ -34,7 +34,7 @@ class Pry
# executing the command. Defaults to true.
# @option options [String] :listing The listing name of the
# command. That is the name by which the command is looked up by
- # help and by show-command. Necessary for commands with regex matches.
+ # help and by show-source. Necessary for commands with regex matches.
# @option options [Boolean] :use_prefix Whether the command uses
# `Pry.config.command_prefix` prefix (if one is defined). Defaults
# to true.
@@ -236,17 +236,6 @@ class Pry
@commands.delete(cmd.match)
end
- def disabled_command(disabled_command_name, message, matcher = disabled_command_name)
- create_command(disabled_command_name) do
- match matcher
- description ""
-
- define_method(:process) do
- output.puts "DISABLED: #{message}"
- end
- end
- end
-
# Sets or gets the description for a command (replacing the old
# description). Returns current description if no description
# parameter provided.
diff --git a/lib/pry/commands/disable_pry.rb b/lib/pry/commands/disable_pry.rb
index eb8d3017..9dc970f4 100644
--- a/lib/pry/commands/disable_pry.rb
+++ b/lib/pry/commands/disable_pry.rb
@@ -14,7 +14,7 @@ class Pry
the end.
As alternatives, consider using `exit!` to force the current Ruby process
- to quit immediately; or using `edit-method -p` to remove the `binding.pry`
+ to quit immediately; or using `edit -p` to remove the `binding.pry`
from the code.
BANNER
diff --git a/lib/pry/commands/disabled_commands.rb b/lib/pry/commands/disabled_commands.rb
deleted file mode 100644
index 9866f901..00000000
--- a/lib/pry/commands/disabled_commands.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-Pry::Commands.disabled_command("edit-method", "Use `edit` instead.")
-Pry::Commands.disabled_command("show-command", "Use show-source [command_name] instead.")