pry 0.12.2 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +158 -1
- data/LICENSE +1 -1
- data/README.md +331 -269
- data/bin/pry +5 -0
- data/lib/pry/basic_object.rb +8 -4
- data/lib/pry/block_command.rb +22 -0
- data/lib/pry/class_command.rb +194 -0
- data/lib/pry/cli.rb +44 -55
- data/lib/pry/code/code_file.rb +28 -24
- data/lib/pry/code/code_range.rb +4 -2
- data/lib/pry/code/loc.rb +15 -8
- data/lib/pry/code.rb +40 -28
- data/lib/pry/code_object.rb +40 -38
- data/lib/pry/color_printer.rb +47 -46
- data/lib/pry/command.rb +166 -369
- data/lib/pry/command_set.rb +76 -73
- data/lib/pry/command_state.rb +31 -0
- data/lib/pry/commands/amend_line.rb +86 -81
- data/lib/pry/commands/bang.rb +18 -14
- data/lib/pry/commands/bang_pry.rb +15 -11
- data/lib/pry/commands/cat/abstract_formatter.rb +23 -18
- data/lib/pry/commands/cat/exception_formatter.rb +71 -60
- data/lib/pry/commands/cat/file_formatter.rb +55 -49
- data/lib/pry/commands/cat/input_expression_formatter.rb +35 -30
- data/lib/pry/commands/cat.rb +61 -54
- data/lib/pry/commands/cd.rb +40 -35
- data/lib/pry/commands/change_inspector.rb +29 -22
- data/lib/pry/commands/change_prompt.rb +44 -39
- data/lib/pry/commands/clear_screen.rb +16 -10
- data/lib/pry/commands/code_collector.rb +148 -133
- data/lib/pry/commands/disable_pry.rb +23 -19
- data/lib/pry/commands/easter_eggs.rb +19 -30
- data/lib/pry/commands/edit/exception_patcher.rb +21 -17
- data/lib/pry/commands/edit/file_and_line_locator.rb +34 -23
- data/lib/pry/commands/edit.rb +184 -161
- data/lib/pry/commands/exit.rb +39 -35
- data/lib/pry/commands/exit_all.rb +24 -20
- data/lib/pry/commands/exit_program.rb +20 -16
- data/lib/pry/commands/find_method.rb +168 -160
- data/lib/pry/commands/fix_indent.rb +16 -12
- data/lib/pry/commands/help.rb +140 -133
- data/lib/pry/commands/hist.rb +151 -150
- data/lib/pry/commands/import_set.rb +20 -16
- data/lib/pry/commands/jump_to.rb +25 -21
- data/lib/pry/commands/list_inspectors.rb +35 -28
- data/lib/pry/commands/ls/constants.rb +59 -42
- data/lib/pry/commands/ls/formatter.rb +50 -46
- data/lib/pry/commands/ls/globals.rb +38 -34
- data/lib/pry/commands/ls/grep.rb +17 -13
- data/lib/pry/commands/ls/instance_vars.rb +29 -27
- data/lib/pry/commands/ls/interrogatable.rb +18 -12
- data/lib/pry/commands/ls/jruby_hacks.rb +47 -41
- data/lib/pry/commands/ls/local_names.rb +26 -22
- data/lib/pry/commands/ls/local_vars.rb +38 -28
- data/lib/pry/commands/ls/ls_entity.rb +47 -51
- data/lib/pry/commands/ls/methods.rb +44 -43
- data/lib/pry/commands/ls/methods_helper.rb +46 -42
- data/lib/pry/commands/ls/self_methods.rb +23 -22
- data/lib/pry/commands/ls.rb +124 -102
- data/lib/pry/commands/nesting.rb +21 -17
- data/lib/pry/commands/play.rb +93 -82
- data/lib/pry/commands/pry_backtrace.rb +22 -17
- data/lib/pry/commands/pry_version.rb +15 -11
- data/lib/pry/commands/raise_up.rb +27 -22
- data/lib/pry/commands/reload_code.rb +60 -48
- data/lib/pry/commands/reset.rb +16 -12
- data/lib/pry/commands/ri.rb +55 -45
- data/lib/pry/commands/save_file.rb +45 -43
- data/lib/pry/commands/shell_command.rb +51 -51
- data/lib/pry/commands/shell_mode.rb +21 -17
- data/lib/pry/commands/show_doc.rb +80 -68
- data/lib/pry/commands/show_info.rb +189 -171
- data/lib/pry/commands/show_input.rb +16 -11
- data/lib/pry/commands/show_source.rb +110 -45
- data/lib/pry/commands/stat.rb +35 -31
- data/lib/pry/commands/switch_to.rb +21 -15
- data/lib/pry/commands/toggle_color.rb +20 -16
- data/lib/pry/commands/watch_expression/expression.rb +32 -27
- data/lib/pry/commands/watch_expression.rb +89 -86
- data/lib/pry/commands/whereami.rb +156 -148
- data/lib/pry/commands/wtf.rb +75 -50
- data/lib/pry/config/attributable.rb +22 -0
- data/lib/pry/config/lazy_value.rb +29 -0
- data/lib/pry/config/memoized_value.rb +34 -0
- data/lib/pry/config/value.rb +24 -0
- data/lib/pry/config.rb +307 -25
- data/lib/pry/control_d_handler.rb +28 -0
- data/lib/pry/core_extensions.rb +9 -7
- data/lib/pry/editor.rb +48 -21
- data/lib/pry/env.rb +18 -0
- data/lib/pry/exception_handler.rb +43 -0
- data/lib/pry/exceptions.rb +13 -16
- data/lib/pry/forwardable.rb +5 -1
- data/lib/pry/helpers/base_helpers.rb +68 -197
- data/lib/pry/helpers/command_helpers.rb +50 -61
- data/lib/pry/helpers/documentation_helpers.rb +21 -13
- data/lib/pry/helpers/options_helpers.rb +14 -7
- data/lib/pry/helpers/platform.rb +7 -5
- data/lib/pry/helpers/table.rb +33 -26
- data/lib/pry/helpers/text.rb +22 -19
- data/lib/pry/helpers.rb +2 -0
- data/lib/pry/history.rb +48 -56
- data/lib/pry/hooks.rb +21 -12
- data/lib/pry/indent.rb +54 -50
- data/lib/pry/input_completer.rb +248 -230
- data/lib/pry/input_lock.rb +8 -9
- data/lib/pry/inspector.rb +36 -24
- data/lib/pry/last_exception.rb +45 -45
- data/lib/pry/method/disowned.rb +16 -4
- data/lib/pry/method/patcher.rb +12 -3
- data/lib/pry/method/weird_method_locator.rb +68 -44
- data/lib/pry/method.rb +141 -94
- data/lib/pry/object_path.rb +33 -25
- data/lib/pry/output.rb +121 -35
- data/lib/pry/pager.rb +41 -42
- data/lib/pry/prompt.rb +123 -54
- data/lib/pry/pry_class.rb +61 -103
- data/lib/pry/pry_instance.rb +217 -215
- data/lib/pry/repl.rb +18 -22
- data/lib/pry/repl_file_loader.rb +27 -21
- data/lib/pry/ring.rb +11 -6
- data/lib/pry/slop/commands.rb +164 -169
- data/lib/pry/slop/option.rb +172 -168
- data/lib/pry/slop.rb +574 -563
- data/lib/pry/syntax_highlighter.rb +26 -0
- data/lib/pry/system_command_handler.rb +17 -0
- data/lib/pry/testable/evalable.rb +21 -12
- data/lib/pry/testable/mockable.rb +18 -10
- data/lib/pry/testable/pry_tester.rb +71 -56
- data/lib/pry/testable/utility.rb +29 -21
- data/lib/pry/testable/variables.rb +49 -43
- data/lib/pry/testable.rb +59 -61
- data/lib/pry/version.rb +3 -1
- data/lib/pry/warning.rb +27 -0
- data/lib/pry/wrapped_module/candidate.rb +21 -14
- data/lib/pry/wrapped_module.rb +51 -42
- data/lib/pry.rb +132 -119
- metadata +34 -34
- data/lib/pry/commands/disabled_commands.rb +0 -2
- data/lib/pry/commands/gem_cd.rb +0 -26
- data/lib/pry/commands/gem_install.rb +0 -32
- data/lib/pry/commands/gem_list.rb +0 -33
- data/lib/pry/commands/gem_open.rb +0 -29
- data/lib/pry/commands/gem_readme.rb +0 -25
- data/lib/pry/commands/gem_search.rb +0 -40
- data/lib/pry/commands/gem_stats.rb +0 -83
- data/lib/pry/commands/gist.rb +0 -102
- data/lib/pry/commands/install_command.rb +0 -54
- data/lib/pry/commands.rb +0 -6
- data/lib/pry/config/behavior.rb +0 -255
- data/lib/pry/config/convenience.rb +0 -28
- data/lib/pry/config/default.rb +0 -159
- data/lib/pry/config/memoization.rb +0 -48
- data/lib/pry/platform.rb +0 -91
- data/lib/pry/plugins.rb +0 -122
- data/lib/pry/rubygem.rb +0 -84
- data/lib/pry/terminal.rb +0 -91
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3d394fb61f0a41511177954f810a8aa4ab0c390baa89e538878121806a28c08
|
4
|
+
data.tar.gz: d36e350eb1e8ff448e088dab7233f6c9f28849f6ae94d3eed0b9ad4768ade770
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe3608e5e7046c474a6e8b077dded9bfc091bfdeaa44d178bb69e66bbeaafaca2a3447fac31dd6d5d5bab8ecc10cbb2e2de327f3c4f55393d4024a45f6407b55
|
7
|
+
data.tar.gz: 1596aef2f91334198c2705f79fa6c93e324cd89071a1f6c04c60c471a5c168864c8a3bb991c1d362b5fd5e040782c4a680e7b1eb3cbf4324258c11379d8019f0
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,157 @@
|
|
1
|
-
###
|
1
|
+
### master
|
2
|
+
|
3
|
+
### [v0.14.1][v0.14.1] (April 12, 2021)
|
4
|
+
|
5
|
+
#### Bug fixes
|
6
|
+
|
7
|
+
* Fixed bad coloring of some RDoc-style docs
|
8
|
+
([#2182](https://github.com/pry/pry/pull/2182))
|
9
|
+
* Fixed broken `--plugins` option. It shows a warning now
|
10
|
+
([#2180](https://github.com/pry/pry/pull/2180))
|
11
|
+
* Fixed bad output on printing non-visible characters with color codes
|
12
|
+
([#2154](https://github.com/pry/pry/pull/2154))
|
13
|
+
* Fixed bad output when colors are disabled and a string with color codes is
|
14
|
+
printed ([#2158](https://github.com/pry/pry/pull/2158))
|
15
|
+
|
16
|
+
### [v0.14.0][v0.14.0] (February 8, 2021)
|
17
|
+
|
18
|
+
#### Features
|
19
|
+
|
20
|
+
* Made `?` an alias to `show-source -d`
|
21
|
+
([#2133](https://github.com/pry/pry/pull/2133))
|
22
|
+
* Added support for Ruby 3.0
|
23
|
+
|
24
|
+
#### Breaking changes
|
25
|
+
|
26
|
+
* Deleted support for plugin autoloading
|
27
|
+
([#2119](https://github.com/pry/pry/pull/2119)). In order to load a Pry plugin
|
28
|
+
you must `require` it from your `pryrc` or add it to your Gemfile.
|
29
|
+
|
30
|
+
```rb
|
31
|
+
# ~/.pryrc
|
32
|
+
require 'pryrc'
|
33
|
+
```
|
34
|
+
|
35
|
+
### [v0.13.1][v0.13.1] (April 12, 2020)
|
36
|
+
|
37
|
+
#### Bug fixes
|
38
|
+
|
39
|
+
* Fixed bug where on invalid input only the last syntax error is displayed
|
40
|
+
(instead of all of them) ([#2117](https://github.com/pry/pry/pull/2117))
|
41
|
+
* Fixed `Pry::Config` raising `NoMethodError` on undefined option instead of
|
42
|
+
returning `nil` (usually invoked via `Pry.config.foo_option` calls)
|
43
|
+
([#2126](https://github.com/pry/pry/pull/2126))
|
44
|
+
* Fixed `help` command not displaying regexp aliases properly
|
45
|
+
([#2120](https://github.com/pry/pry/pull/2120))
|
46
|
+
* Fixed `pry-backtrace` not working ([#2122](https://github.com/pry/pry/pull/2122))
|
47
|
+
|
48
|
+
### [v0.13.0][v0.13.0] (March 21, 2020)
|
49
|
+
|
50
|
+
#### Features
|
51
|
+
|
52
|
+
* Added metadata to the gem (such as changelog URI, source code URI & bug
|
53
|
+
tracker URI), so it shows on https://rubygems.org/gems/pry
|
54
|
+
([#1869](https://github.com/pry/pry/pull/1869))
|
55
|
+
* Added ability to forward ARGV to a Pry session via `--` (or `-`) when
|
56
|
+
launching Pry from shell
|
57
|
+
([#1902](https://github.com/pry/pry/commit/5cd65d3c0eb053f6edcdf571eea5d0cd990626ed))
|
58
|
+
* Added `Pry::Config::LazyValue` & `Pry::Config::MemoizedValue`, which allow
|
59
|
+
storing callable procs in the config
|
60
|
+
([#2024](https://github.com/pry/pry/pull/2024))
|
61
|
+
* Added the `rc_file` config option that tells Pry the path to `pryrc`
|
62
|
+
([#2027](https://github.com/pry/pry/pull/2027))
|
63
|
+
* Added the `--code` flag to the `wtf` command, which shows code for each
|
64
|
+
backtrace frame ([#2037](https://github.com/pry/pry/pull/2037))
|
65
|
+
* Added the ability to paste method call chains with leading dots
|
66
|
+
([#2060](https://github.com/pry/pry/pull/2060))
|
67
|
+
|
68
|
+
#### API changes
|
69
|
+
|
70
|
+
* `Pry::Prompt` is a class now and it can be instantiated to create new prompts
|
71
|
+
on the fly that are not registered with `Pry::Prompt#add`. Learn more about
|
72
|
+
its API in the docs ([#1877](https://github.com/pry/pry/pull/1877))
|
73
|
+
|
74
|
+
#### Deprecations
|
75
|
+
|
76
|
+
* Deprecated `Pry.config.exception_whitelist` in favor of
|
77
|
+
`Pry.config.unrescued_exceptions`
|
78
|
+
([#1874](https://github.com/pry/pry/pull/1874))
|
79
|
+
* Deprecated `Pry.config.prompt = Pry::Prompt[:simple][:value]` in favor of
|
80
|
+
`Pry.config.prompt = Pry::Prompt[:simple]` when setting Pry prompt via
|
81
|
+
`pryrc`. `Pry::Prompt[:simple]` would return an instance of `Pry::Prompt`
|
82
|
+
instead of `Hash` ([#1877](https://github.com/pry/pry/pull/1877))
|
83
|
+
* Deprecated setting prompt via an array of two procs:
|
84
|
+
([#1877](https://github.com/pry/pry/pull/1877))
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
# Deprecated, emits a warning.
|
88
|
+
Pry.config.prompt = [proc {}, proc {}]
|
89
|
+
```
|
90
|
+
|
91
|
+
This will be removed in the next release.
|
92
|
+
* Deprecated the `show-doc` command. The `show-source -d` is the new recommended
|
93
|
+
way of reading docs ([#1934](https://github.com/pry/pry/pull/1934))
|
94
|
+
* Deprecated `Pry::Command#_pry_`. Use `Pry::Command#pry_instance` instead
|
95
|
+
([#1989](https://github.com/pry/pry/pull/1989))
|
96
|
+
|
97
|
+
#### Breaking changes
|
98
|
+
|
99
|
+
* Deleted deprecated `Pry::Platform`
|
100
|
+
([#1863](https://github.com/pry/pry/pull/1863))
|
101
|
+
* Deleted deprecated `Pry#{input/output}_array`
|
102
|
+
([#1884](https://github.com/pry/pry/pull/1864))
|
103
|
+
* Deleted deprecated `Pry::Prompt::MAP`
|
104
|
+
([#1866](https://github.com/pry/pry/pull/1866))
|
105
|
+
* Deleted deprecated methods of `Pry::Helpers::BaseHelpers` such as `mac_osx?`,
|
106
|
+
`linux?`, `windows?`, `windows_ansi?`, `jruby?`, `jruby_19?`, `mri?`,
|
107
|
+
`mri_19?`, `mri_2?` ([#1867](https://github.com/pry/pry/pull/1867))
|
108
|
+
* Deleted deprecated `Pry::Command#text`
|
109
|
+
([#1865](https://github.com/pry/pry/pull/1865))
|
110
|
+
* Deleted deprecated `Pry::Method#all_from_common`
|
111
|
+
([#1868](https://github.com/pry/pry/pull/1868))
|
112
|
+
* Deleted `install-command` ([#1979](https://github.com/pry/pry/pull/1979))
|
113
|
+
* Deleted `Pry::Helpers::BaseHelpers#command_dependencies_met?`
|
114
|
+
([#1979](https://github.com/pry/pry/pull/1979))
|
115
|
+
* Deleted commands: `gem-cd`, `gem-install`, `gem-list`, `gem-open`,
|
116
|
+
`gem-readme`, `gem-search`, `gem-stats`
|
117
|
+
([#1981](https://github.com/pry/pry/pull/1981))
|
118
|
+
* Deleted deprecated commands: `edit-method` and `show-command`
|
119
|
+
([#2001](https://github.com/pry/pry/pull/2001))
|
120
|
+
* Deleted `Pry::Command#disabled_commands`
|
121
|
+
([#2001](https://github.com/pry/pry/pull/2001))
|
122
|
+
* Deleted `Pry::BlockCommand#opts` (use `#context` instead)
|
123
|
+
([#2003](https://github.com/pry/pry/pull/2003))
|
124
|
+
* Deleted `Pry.lazy` (use `Pry::Config::LazyValue` instead)
|
125
|
+
([#2024](https://github.com/pry/pry/pull/2024))
|
126
|
+
|
127
|
+
#### Bug fixes
|
128
|
+
|
129
|
+
* Fixed bug where using `Pry.config.prompt_name` can return a
|
130
|
+
`Pry::Config::Lazy` instead of expected instance of `String`
|
131
|
+
([#1890](https://github.com/pry/pry/commit/c8f23b3464d596c08922dc923c64bb57488e6227))
|
132
|
+
* Fixed `LoadError` being raised when using auto completions and Bundler
|
133
|
+
([#1896](https://github.com/pry/pry/commit/85850f47e074fe01f93e5cb7d561e7c2de7aede9))
|
134
|
+
* Fixed bug where `Pry.input_ring` doesn't append duplicate elements
|
135
|
+
([#1898](https://github.com/pry/pry/pull/1898))
|
136
|
+
* Fixed Ruby 2.6 warning about `Binding#source_location`
|
137
|
+
([#1904](https://github.com/pry/pry/pull/1904))
|
138
|
+
* Fixed wrong `winsize` when custom `output` is passed to Pry
|
139
|
+
([#2045](https://github.com/pry/pry/pull/2045))
|
140
|
+
* Fixed `XDG_CONFIG_HOME` & `XDG_DATA_HOME` precedence. When these env variables
|
141
|
+
are set, Pry no longer uses traditional files like `~/.pryrc` &
|
142
|
+
`~/.pry_history`. Instead, the env variable paths are loaded first
|
143
|
+
([#2056](https://github.com/pry/pry/pull/2056))
|
144
|
+
* Fixed the `$SAFE will become a normal global variable in Ruby 3.0` warning on
|
145
|
+
Ruby 2.7 ([#2107](https://github.com/pry/pry/pull/2107))
|
146
|
+
* Fixed bug when `whereami -c` cannot show beginning of the class, which is on
|
147
|
+
the same line as another expression
|
148
|
+
([#2098](https://github.com/pry/pry/pull/2098))
|
149
|
+
* Fixed bug when `Object#owner` is defined, which results into somewhat broken
|
150
|
+
method introspection ([#2113](https://github.com/pry/pry/pull/2113))
|
151
|
+
* Fixed bug when indentation leaves parts of input after pressing enter when
|
152
|
+
Readline is enabled with mode indicators for vi mode. This was supposed to be
|
153
|
+
fixed in v0.12.2 but it regressed
|
154
|
+
([#2114](https://github.com/pry/pry/pull/2114))
|
2
155
|
|
3
156
|
### [v0.12.2][v0.12.2] (November 12, 2018)
|
4
157
|
|
@@ -951,3 +1104,7 @@ complete CHANGELOG:
|
|
951
1104
|
[v0.12.0]: https://github.com/pry/pry/releases/tag/v0.12.0
|
952
1105
|
[v0.12.1]: https://github.com/pry/pry/releases/tag/v0.12.1
|
953
1106
|
[v0.12.2]: https://github.com/pry/pry/releases/tag/v0.12.2
|
1107
|
+
[v0.13.0]: https://github.com/pry/pry/releases/tag/v0.13.0
|
1108
|
+
[v0.13.1]: https://github.com/pry/pry/releases/tag/v0.13.1
|
1109
|
+
[v0.14.0]: https://github.com/pry/pry/releases/tag/v0.14.0
|
1110
|
+
[v0.14.1]: https://github.com/pry/pry/releases/tag/v0.14.1
|
data/LICENSE
CHANGED