pry 0.10.4 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +439 -16
  3. data/LICENSE +1 -1
  4. data/README.md +362 -302
  5. data/bin/pry +4 -7
  6. data/lib/pry/basic_object.rb +10 -0
  7. data/lib/pry/block_command.rb +22 -0
  8. data/lib/pry/class_command.rb +194 -0
  9. data/lib/pry/cli.rb +84 -97
  10. data/lib/pry/code/code_file.rb +37 -26
  11. data/lib/pry/code/code_range.rb +7 -5
  12. data/lib/pry/code/loc.rb +26 -13
  13. data/lib/pry/code.rb +41 -32
  14. data/lib/pry/code_object.rb +53 -28
  15. data/lib/pry/color_printer.rb +46 -35
  16. data/lib/pry/command.rb +197 -369
  17. data/lib/pry/command_set.rb +89 -114
  18. data/lib/pry/command_state.rb +31 -0
  19. data/lib/pry/commands/amend_line.rb +86 -82
  20. data/lib/pry/commands/bang.rb +18 -14
  21. data/lib/pry/commands/bang_pry.rb +15 -11
  22. data/lib/pry/commands/cat/abstract_formatter.rb +23 -18
  23. data/lib/pry/commands/cat/exception_formatter.rb +85 -72
  24. data/lib/pry/commands/cat/file_formatter.rb +56 -46
  25. data/lib/pry/commands/cat/input_expression_formatter.rb +35 -30
  26. data/lib/pry/commands/cat.rb +62 -54
  27. data/lib/pry/commands/cd.rb +40 -35
  28. data/lib/pry/commands/change_inspector.rb +29 -22
  29. data/lib/pry/commands/change_prompt.rb +48 -23
  30. data/lib/pry/commands/clear_screen.rb +20 -0
  31. data/lib/pry/commands/code_collector.rb +148 -131
  32. data/lib/pry/commands/disable_pry.rb +23 -19
  33. data/lib/pry/commands/easter_eggs.rb +23 -34
  34. data/lib/pry/commands/edit/exception_patcher.rb +21 -17
  35. data/lib/pry/commands/edit/file_and_line_locator.rb +34 -23
  36. data/lib/pry/commands/edit.rb +185 -157
  37. data/lib/pry/commands/exit.rb +40 -35
  38. data/lib/pry/commands/exit_all.rb +24 -20
  39. data/lib/pry/commands/exit_program.rb +20 -16
  40. data/lib/pry/commands/find_method.rb +168 -162
  41. data/lib/pry/commands/fix_indent.rb +16 -12
  42. data/lib/pry/commands/help.rb +140 -133
  43. data/lib/pry/commands/hist.rb +151 -149
  44. data/lib/pry/commands/import_set.rb +20 -15
  45. data/lib/pry/commands/jump_to.rb +25 -21
  46. data/lib/pry/commands/list_inspectors.rb +35 -28
  47. data/lib/pry/commands/ls/constants.rb +59 -31
  48. data/lib/pry/commands/ls/formatter.rb +42 -36
  49. data/lib/pry/commands/ls/globals.rb +38 -36
  50. data/lib/pry/commands/ls/grep.rb +17 -15
  51. data/lib/pry/commands/ls/instance_vars.rb +29 -28
  52. data/lib/pry/commands/ls/interrogatable.rb +18 -12
  53. data/lib/pry/commands/ls/jruby_hacks.rb +47 -41
  54. data/lib/pry/commands/ls/local_names.rb +26 -24
  55. data/lib/pry/commands/ls/local_vars.rb +38 -30
  56. data/lib/pry/commands/ls/ls_entity.rb +47 -52
  57. data/lib/pry/commands/ls/methods.rb +49 -51
  58. data/lib/pry/commands/ls/methods_helper.rb +46 -42
  59. data/lib/pry/commands/ls/self_methods.rb +23 -21
  60. data/lib/pry/commands/ls.rb +124 -103
  61. data/lib/pry/commands/nesting.rb +21 -17
  62. data/lib/pry/commands/play.rb +92 -82
  63. data/lib/pry/commands/pry_backtrace.rb +22 -17
  64. data/lib/pry/commands/pry_version.rb +15 -11
  65. data/lib/pry/commands/raise_up.rb +33 -27
  66. data/lib/pry/commands/reload_code.rb +60 -48
  67. data/lib/pry/commands/reset.rb +16 -12
  68. data/lib/pry/commands/ri.rb +57 -42
  69. data/lib/pry/commands/save_file.rb +45 -43
  70. data/lib/pry/commands/shell_command.rb +56 -29
  71. data/lib/pry/commands/shell_mode.rb +22 -18
  72. data/lib/pry/commands/show_doc.rb +80 -70
  73. data/lib/pry/commands/show_info.rb +193 -160
  74. data/lib/pry/commands/show_input.rb +16 -11
  75. data/lib/pry/commands/show_source.rb +110 -42
  76. data/lib/pry/commands/stat.rb +35 -31
  77. data/lib/pry/commands/switch_to.rb +21 -15
  78. data/lib/pry/commands/toggle_color.rb +20 -16
  79. data/lib/pry/commands/watch_expression/expression.rb +32 -27
  80. data/lib/pry/commands/watch_expression.rb +89 -84
  81. data/lib/pry/commands/whereami.rb +155 -146
  82. data/lib/pry/commands/wtf.rb +78 -40
  83. data/lib/pry/config/attributable.rb +22 -0
  84. data/lib/pry/config/lazy_value.rb +29 -0
  85. data/lib/pry/config/memoized_value.rb +34 -0
  86. data/lib/pry/config/value.rb +24 -0
  87. data/lib/pry/config.rb +310 -20
  88. data/lib/pry/control_d_handler.rb +28 -0
  89. data/lib/pry/core_extensions.rb +22 -9
  90. data/lib/pry/editor.rb +56 -34
  91. data/lib/pry/env.rb +18 -0
  92. data/lib/pry/exception_handler.rb +43 -0
  93. data/lib/pry/exceptions.rb +13 -18
  94. data/lib/pry/forwardable.rb +27 -0
  95. data/lib/pry/helpers/base_helpers.rb +20 -62
  96. data/lib/pry/helpers/command_helpers.rb +52 -62
  97. data/lib/pry/helpers/documentation_helpers.rb +21 -12
  98. data/lib/pry/helpers/options_helpers.rb +15 -8
  99. data/lib/pry/helpers/platform.rb +55 -0
  100. data/lib/pry/helpers/table.rb +44 -32
  101. data/lib/pry/helpers/text.rb +96 -85
  102. data/lib/pry/helpers.rb +3 -0
  103. data/lib/pry/history.rb +81 -55
  104. data/lib/pry/hooks.rb +60 -110
  105. data/lib/pry/indent.rb +74 -68
  106. data/lib/pry/input_completer.rb +199 -158
  107. data/lib/pry/input_lock.rb +7 -10
  108. data/lib/pry/inspector.rb +36 -24
  109. data/lib/pry/last_exception.rb +45 -45
  110. data/lib/pry/method/disowned.rb +19 -5
  111. data/lib/pry/method/patcher.rb +14 -8
  112. data/lib/pry/method/weird_method_locator.rb +79 -45
  113. data/lib/pry/method.rb +178 -124
  114. data/lib/pry/object_path.rb +37 -28
  115. data/lib/pry/output.rb +102 -16
  116. data/lib/pry/pager.rb +187 -177
  117. data/lib/pry/prompt.rb +213 -25
  118. data/lib/pry/pry_class.rb +119 -98
  119. data/lib/pry/pry_instance.rb +261 -224
  120. data/lib/pry/repl.rb +83 -29
  121. data/lib/pry/repl_file_loader.rb +27 -22
  122. data/lib/pry/ring.rb +89 -0
  123. data/lib/pry/slop/LICENSE +20 -0
  124. data/lib/pry/slop/commands.rb +190 -0
  125. data/lib/pry/slop/option.rb +210 -0
  126. data/lib/pry/slop.rb +672 -0
  127. data/lib/pry/syntax_highlighter.rb +26 -0
  128. data/lib/pry/system_command_handler.rb +17 -0
  129. data/lib/pry/testable/evalable.rb +24 -0
  130. data/lib/pry/testable/mockable.rb +22 -0
  131. data/lib/pry/testable/pry_tester.rb +88 -0
  132. data/lib/pry/testable/utility.rb +34 -0
  133. data/lib/pry/testable/variables.rb +52 -0
  134. data/lib/pry/testable.rb +68 -0
  135. data/lib/pry/version.rb +3 -1
  136. data/lib/pry/warning.rb +20 -0
  137. data/lib/pry/{module_candidate.rb → wrapped_module/candidate.rb} +34 -32
  138. data/lib/pry/wrapped_module.rb +67 -63
  139. data/lib/pry.rb +133 -149
  140. metadata +52 -63
  141. data/lib/pry/commands/disabled_commands.rb +0 -2
  142. data/lib/pry/commands/gem_cd.rb +0 -26
  143. data/lib/pry/commands/gem_install.rb +0 -32
  144. data/lib/pry/commands/gem_list.rb +0 -33
  145. data/lib/pry/commands/gem_open.rb +0 -29
  146. data/lib/pry/commands/gist.rb +0 -101
  147. data/lib/pry/commands/install_command.rb +0 -53
  148. data/lib/pry/commands/list_prompts.rb +0 -35
  149. data/lib/pry/commands/simple_prompt.rb +0 -22
  150. data/lib/pry/commands.rb +0 -6
  151. data/lib/pry/config/behavior.rb +0 -139
  152. data/lib/pry/config/convenience.rb +0 -25
  153. data/lib/pry/config/default.rb +0 -161
  154. data/lib/pry/history_array.rb +0 -121
  155. data/lib/pry/plugins.rb +0 -103
  156. data/lib/pry/rbx_path.rb +0 -22
  157. data/lib/pry/rubygem.rb +0 -82
  158. data/lib/pry/terminal.rb +0 -79
  159. data/lib/pry/test/helper.rb +0 -170
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f1b85ec70167eee63c4f58e11c27f2c1f94f49db
4
- data.tar.gz: 08a2b56e67aef2cdaf4fb6c4aa3ac0c1e8bf395f
2
+ SHA256:
3
+ metadata.gz: 6d8bac7565d29bff46039481c17aa6a88fec28084916dd8dad12cd4e83b146c1
4
+ data.tar.gz: 90b46a979aaac6d01ddf589217baca57bc2d7ce8197c8f27bc22f823eeaffcdd
5
5
  SHA512:
6
- metadata.gz: f82d5ccba499a9dc6a11bc48496424f691248134bad714cdaf8704bc95ffd3368fa07471d3651f464fcf92cac0b0779860276fa973783f1b2bd34b338c14ce92
7
- data.tar.gz: 088a2f47add7c3e16ca078f4e84ebac15b05051d945b3f5c25a295292ec6478bf5bbe0c6752a143f16d323116fbf1e19ebd72b5fbbfa716830a9181a768fe20a
6
+ metadata.gz: 2e671cca56deb75c1c47ba9108155bec171ebe34d5ba740b3dd7ea3e848fc789291111e40b7c604835b3d90209873a4a3364ec72a5f4c0f062dea98e5b466a30
7
+ data.tar.gz: f4c80ad6f3187823c18e1fff35306fc1e0a0ee4045a06b190f4742c92099b89d7ef5bafcb1c1dd68c8ae09b251a9a9b64bfd33179c2a7778f3122c90d636afa5
data/CHANGELOG.md CHANGED
@@ -1,11 +1,427 @@
1
- ### 0.10.3
1
+ ### master
2
2
 
3
- * cherry-pick 0d1d72b and e0e5c75 to fix the install of Pry on Windows.
3
+ ### [v0.14.2][v0.14.2] (January 9, 2023)
4
4
 
5
- ### 0.10.2
5
+ #### Features
6
+
7
+ * Configure `code` as a supported editor on Pry::Editor
8
+ ([#2236](https://github.com/pry/pry/pull/2236))
9
+ * Added support for Ruby 3.2
10
+ ([#2263](https://github.com/pry/pry/pull/2263))
11
+ * Added support for Ruby 3.1
12
+ ([#2228](https://github.com/pry/pry/pull/2228))
13
+
14
+ #### Bug fixes
15
+
16
+ * Short circuit eval regexes in finding module definition
17
+ ([#2253](https://github.com/pry/pry/pull/2253))
18
+ * Revert "Escape non-printing characters"
19
+ ([#2235](https://github.com/pry/pry/pull/2235))
20
+ * Fixed bug where WeirdMethodLocator would fail to find the source of a method breaking whereami
21
+ ([#2244](https://github.com/pry/pry/pull/2244))
22
+ * Fixed bug where pry would throw an FrozenError when dealing with incomplete tokens
23
+ ([#2136](https://github.com/pry/pry/pull/2136))
24
+ * Restore --no-history CLI flag functionality
25
+ ([#2196](https://github.com/pry/pry/pull/2196))
26
+ * Fixed bug where reading from the `_out_` sticky local variable could return
27
+ wrong results ([#2201](https://github.com/pry/pry/pull/2201))
28
+
29
+ #### Breaking Changes
30
+
31
+ * Remove support for Ruby 1.9 and JRuby < 9.0
32
+ ([#2239](https://github.com/pry/pry/pull/2239))
33
+
34
+ ### [v0.14.1][v0.14.1] (April 12, 2021)
35
+
36
+ #### Bug fixes
37
+
38
+ * Fixed bad coloring of some RDoc-style docs
39
+ ([#2182](https://github.com/pry/pry/pull/2182))
40
+ * Fixed broken `--plugins` option. It shows a warning now
41
+ ([#2180](https://github.com/pry/pry/pull/2180))
42
+ * Fixed bad output on printing non-visible characters with color codes
43
+ ([#2154](https://github.com/pry/pry/pull/2154))
44
+ * Fixed bad output when colors are disabled and a string with color codes is
45
+ printed ([#2158](https://github.com/pry/pry/pull/2158))
46
+
47
+ ### [v0.14.0][v0.14.0] (February 8, 2021)
48
+
49
+ #### Features
50
+
51
+ * Made `?` an alias to `show-source -d`
52
+ ([#2133](https://github.com/pry/pry/pull/2133))
53
+ * Added support for Ruby 3.0
54
+
55
+ #### Breaking changes
56
+
57
+ * Deleted support for plugin autoloading
58
+ ([#2119](https://github.com/pry/pry/pull/2119)). In order to load a Pry plugin
59
+ you must `require` it from your `pryrc` or add it to your Gemfile.
60
+
61
+ ```rb
62
+ # ~/.pryrc
63
+ require 'pryrc'
64
+ ```
65
+
66
+ ### [v0.13.1][v0.13.1] (April 12, 2020)
67
+
68
+ #### Bug fixes
69
+
70
+ * Fixed bug where on invalid input only the last syntax error is displayed
71
+ (instead of all of them) ([#2117](https://github.com/pry/pry/pull/2117))
72
+ * Fixed `Pry::Config` raising `NoMethodError` on undefined option instead of
73
+ returning `nil` (usually invoked via `Pry.config.foo_option` calls)
74
+ ([#2126](https://github.com/pry/pry/pull/2126))
75
+ * Fixed `help` command not displaying regexp aliases properly
76
+ ([#2120](https://github.com/pry/pry/pull/2120))
77
+ * Fixed `pry-backtrace` not working ([#2122](https://github.com/pry/pry/pull/2122))
78
+
79
+ ### [v0.13.0][v0.13.0] (March 21, 2020)
80
+
81
+ #### Features
82
+
83
+ * Added metadata to the gem (such as changelog URI, source code URI & bug
84
+ tracker URI), so it shows on https://rubygems.org/gems/pry
85
+ ([#1869](https://github.com/pry/pry/pull/1869))
86
+ * Added ability to forward ARGV to a Pry session via `--` (or `-`) when
87
+ launching Pry from shell
88
+ ([#1902](https://github.com/pry/pry/commit/5cd65d3c0eb053f6edcdf571eea5d0cd990626ed))
89
+ * Added `Pry::Config::LazyValue` & `Pry::Config::MemoizedValue`, which allow
90
+ storing callable procs in the config
91
+ ([#2024](https://github.com/pry/pry/pull/2024))
92
+ * Added the `rc_file` config option that tells Pry the path to `pryrc`
93
+ ([#2027](https://github.com/pry/pry/pull/2027))
94
+ * Added the `--code` flag to the `wtf` command, which shows code for each
95
+ backtrace frame ([#2037](https://github.com/pry/pry/pull/2037))
96
+ * Added the ability to paste method call chains with leading dots
97
+ ([#2060](https://github.com/pry/pry/pull/2060))
98
+
99
+ #### API changes
100
+
101
+ * `Pry::Prompt` is a class now and it can be instantiated to create new prompts
102
+ on the fly that are not registered with `Pry::Prompt#add`. Learn more about
103
+ its API in the docs ([#1877](https://github.com/pry/pry/pull/1877))
104
+
105
+ #### Deprecations
106
+
107
+ * Deprecated `Pry.config.exception_whitelist` in favor of
108
+ `Pry.config.unrescued_exceptions`
109
+ ([#1874](https://github.com/pry/pry/pull/1874))
110
+ * Deprecated `Pry.config.prompt = Pry::Prompt[:simple][:value]` in favor of
111
+ `Pry.config.prompt = Pry::Prompt[:simple]` when setting Pry prompt via
112
+ `pryrc`. `Pry::Prompt[:simple]` would return an instance of `Pry::Prompt`
113
+ instead of `Hash` ([#1877](https://github.com/pry/pry/pull/1877))
114
+ * Deprecated setting prompt via an array of two procs:
115
+ ([#1877](https://github.com/pry/pry/pull/1877))
116
+
117
+ ```ruby
118
+ # Deprecated, emits a warning.
119
+ Pry.config.prompt = [proc {}, proc {}]
120
+ ```
121
+
122
+ This will be removed in the next release.
123
+ * Deprecated the `show-doc` command. The `show-source -d` is the new recommended
124
+ way of reading docs ([#1934](https://github.com/pry/pry/pull/1934))
125
+ * Deprecated `Pry::Command#_pry_`. Use `Pry::Command#pry_instance` instead
126
+ ([#1989](https://github.com/pry/pry/pull/1989))
127
+
128
+ #### Breaking changes
129
+
130
+ * Deleted deprecated `Pry::Platform`
131
+ ([#1863](https://github.com/pry/pry/pull/1863))
132
+ * Deleted deprecated `Pry#{input/output}_array`
133
+ ([#1884](https://github.com/pry/pry/pull/1864))
134
+ * Deleted deprecated `Pry::Prompt::MAP`
135
+ ([#1866](https://github.com/pry/pry/pull/1866))
136
+ * Deleted deprecated methods of `Pry::Helpers::BaseHelpers` such as `mac_osx?`,
137
+ `linux?`, `windows?`, `windows_ansi?`, `jruby?`, `jruby_19?`, `mri?`,
138
+ `mri_19?`, `mri_2?` ([#1867](https://github.com/pry/pry/pull/1867))
139
+ * Deleted deprecated `Pry::Command#text`
140
+ ([#1865](https://github.com/pry/pry/pull/1865))
141
+ * Deleted deprecated `Pry::Method#all_from_common`
142
+ ([#1868](https://github.com/pry/pry/pull/1868))
143
+ * Deleted `install-command` ([#1979](https://github.com/pry/pry/pull/1979))
144
+ * Deleted `Pry::Helpers::BaseHelpers#command_dependencies_met?`
145
+ ([#1979](https://github.com/pry/pry/pull/1979))
146
+ * Deleted commands: `gem-cd`, `gem-install`, `gem-list`, `gem-open`,
147
+ `gem-readme`, `gem-search`, `gem-stats`
148
+ ([#1981](https://github.com/pry/pry/pull/1981))
149
+ * Deleted deprecated commands: `edit-method` and `show-command`
150
+ ([#2001](https://github.com/pry/pry/pull/2001))
151
+ * Deleted `Pry::Command#disabled_commands`
152
+ ([#2001](https://github.com/pry/pry/pull/2001))
153
+ * Deleted `Pry::BlockCommand#opts` (use `#context` instead)
154
+ ([#2003](https://github.com/pry/pry/pull/2003))
155
+ * Deleted `Pry.lazy` (use `Pry::Config::LazyValue` instead)
156
+ ([#2024](https://github.com/pry/pry/pull/2024))
157
+
158
+ #### Bug fixes
159
+
160
+ * Fixed bug where using `Pry.config.prompt_name` can return a
161
+ `Pry::Config::Lazy` instead of expected instance of `String`
162
+ ([#1890](https://github.com/pry/pry/commit/c8f23b3464d596c08922dc923c64bb57488e6227))
163
+ * Fixed `LoadError` being raised when using auto completions and Bundler
164
+ ([#1896](https://github.com/pry/pry/commit/85850f47e074fe01f93e5cb7d561e7c2de7aede9))
165
+ * Fixed bug where `Pry.input_ring` doesn't append duplicate elements
166
+ ([#1898](https://github.com/pry/pry/pull/1898))
167
+ * Fixed Ruby 2.6 warning about `Binding#source_location`
168
+ ([#1904](https://github.com/pry/pry/pull/1904))
169
+ * Fixed wrong `winsize` when custom `output` is passed to Pry
170
+ ([#2045](https://github.com/pry/pry/pull/2045))
171
+ * Fixed `XDG_CONFIG_HOME` & `XDG_DATA_HOME` precedence. When these env variables
172
+ are set, Pry no longer uses traditional files like `~/.pryrc` &
173
+ `~/.pry_history`. Instead, the env variable paths are loaded first
174
+ ([#2056](https://github.com/pry/pry/pull/2056))
175
+ * Fixed the `$SAFE will become a normal global variable in Ruby 3.0` warning on
176
+ Ruby 2.7 ([#2107](https://github.com/pry/pry/pull/2107))
177
+ * Fixed bug when `whereami -c` cannot show beginning of the class, which is on
178
+ the same line as another expression
179
+ ([#2098](https://github.com/pry/pry/pull/2098))
180
+ * Fixed bug when `Object#owner` is defined, which results into somewhat broken
181
+ method introspection ([#2113](https://github.com/pry/pry/pull/2113))
182
+ * Fixed bug when indentation leaves parts of input after pressing enter when
183
+ Readline is enabled with mode indicators for vi mode. This was supposed to be
184
+ fixed in v0.12.2 but it regressed
185
+ ([#2114](https://github.com/pry/pry/pull/2114))
186
+
187
+ ### [v0.12.2][v0.12.2] (November 12, 2018)
188
+
189
+ #### Bug fixes
190
+
191
+ * Restore removed deprecations, which were removed by accident due to a bad
192
+ rebase.
193
+
194
+ ### [v0.12.1][v0.12.1] (November 12, 2018)
195
+
196
+ #### Bug fixes
197
+
198
+ * Stopped creating a new hash each time `Pry::Prompt#[]` is invoked
199
+ ([#1855](https://github.com/pry/pry/pull/1855))
200
+ * Fixed `less` pager not working when it's available
201
+ ([#1861](https://github.com/pry/pry/pull/1861))
202
+
203
+ ### [v0.12.0][v0.12.0] (November 5, 2018)
204
+
205
+ #### Major changes
206
+
207
+ * Dropped support for Rubinius ([#1785](https://github.com/pry/pry/pull/1785))
208
+
209
+ #### Features
6
210
 
7
- * cherry-pick c2ed9ec135bd791a32c70fbe05cc0508ea17c4040e from master (fix inf. loop with prepended methods source retrieval)
8
- * Update some specs for recent ruby versions (2.2+)
211
+ * Added a new command, `clear-screen`, that clears the content of the screen Pry
212
+ is running in regardless of platform (Windows or UNIX-like)
213
+ ([#1723](https://github.com/pry/pry/pull/1723))
214
+ * Added a new command, `gem-stat`, that prints gem statistics such as gem
215
+ dependencies and downloads ([#1707](https://github.com/pry/pry/pull/1707))
216
+ * Added support for nested exceptions for the `wtf` command
217
+ ([#1791](https://github.com/pry/pry/pull/1791))
218
+ * Added support for dynamic prompt names
219
+ ([#1833](https://github.com/pry/pry/pull/1833))
220
+
221
+ ```rb
222
+ # pryrc
223
+ Pry.config.prompt_name = Pry.lazy { rand(100) }
224
+
225
+ # Session
226
+ [1] 80(main)>
227
+ [2] 87(main)>
228
+ [3] 30(main)>
229
+ ```
230
+ * Added support for XDG Base Directory Specification
231
+ ([#1609](https://github.com/pry/pry/pull/1609),
232
+ [#1844](https://github.com/pry/pry/pull/1844),
233
+ ([#1848](https://github.com/pry/pry/pull/1848)))
234
+ * Removed the `simple-prompt`. Use `change-prompt simple` instead. The
235
+ `list-prompt` command was removed and embedded as `change-prompt --list`
236
+ ([#1849](https://github.com/pry/pry/pull/1849))
237
+
238
+ #### API changes
239
+
240
+ * The following methods started accepting the new optional `config` parameter
241
+ ([#1809](https://github.com/pry/pry/pull/1809)):
242
+ * `Pry::Helpers.tablify(things, line_length, config = Pry.config)`
243
+ * `Pry::Helpers.tablify_or_one_line(heading, things, config = Pry.config)`
244
+ * `Pry::Helpers.tablify_to_screen_width(things, options, config = Pry.config)`
245
+ * `Pry::Helpers::Table.new(items, args, config = Pry.config)`
246
+
247
+ You are expected to pass a session-local `_pry_.config` instead of the global
248
+ one.
249
+
250
+ * Added new method `Pry::Config.assign`, for creating a Config non-recursively
251
+ ([#1725](https://github.com/pry/pry/issues/1725))
252
+ * Added `Pry.lazy`, which is a helper method for values that need to be
253
+ calculated dynamically. Currently, only `config.prompt_name` supports it
254
+ ([#1833](https://github.com/pry/pry/pull/1833))
255
+ * `Pry::Prompt` responds to `.[]`, `.all` & `.add` now. The `Pry::Prompt.add`
256
+ method must be used for implementing custom prompts. See the API in the
257
+ documentation for the class ([#1846](https://github.com/pry/pry/pull/1846))
258
+
259
+ #### Breaking changes
260
+
261
+ * Deleted the `Pry::Helpers::Text.bright_default` alias for
262
+ `Pry::Helpers::Text.bold` ([#1795](https://github.com/pry/pry/pull/1795))
263
+ * `Pry::Helpers.tablify_to_screen_width(things, options, config = Pry.config)`
264
+ requires `options` or `nil` in place of them.
265
+ * `Pry::Helpers::Table.new(items, args, config = Pry.config)` requires `args`
266
+ or `nil` in place of them.
267
+ * Completely revamped `Pry::HistoryArray`
268
+ ([#1818](https://github.com/pry/pry/pull/1818)).
269
+ * It's been renamed to `Pry::Ring`
270
+ ([#1817](https://github.com/pry/pry/pull/1817))
271
+ * The implementation has changed and as result, the following methods were
272
+ removed:
273
+ * `Pry::Ring#length` (use `Pry::Ring#count` instead)
274
+ * `#empty?`, `#each`, `#inspect`, `#pop!`, `#to_h`
275
+ * To access old Enumerable methods convert the ring to Array with `#to_a`
276
+ * Fixed indexing for elements (e.g. `_pry_.input_ring[0]` always return some
277
+ element and not `nil`)
278
+ * Renamed `Pry.config.prompt_safe_objects` to `Pry.config.prompt_safe_contexts`
279
+ * Removed deprecated `Pry::CommandSet#before_command` &
280
+ `Pry::CommandSet#after_command` ([#1838](https://github.com/pry/pry/pull/1838))
281
+
282
+ #### Deprecations
283
+
284
+ * Deprecated `_pry_.input_array` & `_pry_.output_array` in favour of
285
+ `_pry_.input_ring` & `_pry_.output_ring` respectively
286
+ ([#1814](https://github.com/pry/pry/pull/1814))
287
+ * Deprecated `Pry::Command#text`. Please use `#black`, `#white`, etc. directly
288
+ instead (as you would with helper functions from `BaseHelpers` and
289
+ `CommandHelpers`) ([#1701](https://github.com/pry/pry/pull/1701))
290
+ * Deprecated `_pry_.input_array` & `_pry_.output_array` in favour of
291
+ `_pry_.input_ring` and `_pry_.output_ring` respectively
292
+ ([#1817](https://github.com/pry/pry/pull/1817))
293
+ * Deprecated `Pry::Platform`. Use `Pry::Helpers::Platform` instead. Note that
294
+ `Pry::Helpers::BaseHelpers` still includes the `Platform` methods but emits a
295
+ warning. You must switch to `Pry::Helpers::Platform` in your code
296
+ ([#1838](https://github.com/pry/pry/pull/1838),
297
+ ([#1845](https://github.com/pry/pry/pull/1845)))
298
+ * Deprecated `Pry::Prompt::MAP`. You should use `Pry::Prompt.all` instead to
299
+ access the same map ([#1846](https://github.com/pry/pry/pull/1846))
300
+
301
+ #### Bug fixes
302
+
303
+ * Fixed a bug where `cd Hash.new` reported `self` as an instance of Pry::Config
304
+ in the prompt ([#1725](https://github.com/pry/pry/pull/1725))
305
+ * Silenced the `Could not find files for the given pattern(s)` error message
306
+ coming from `where` on Windows, when `less` or another pager is not installed
307
+ ([#1767](https://github.com/pry/pry/pull/1767))
308
+ * Fixed possible double loading of Pry plugins' `cli.rb` on Ruby (>= 2.4) due to
309
+ [the `realpath` changes while invoking
310
+ `require`](https://bugs.ruby-lang.org/issues/10222)
311
+ ([#1762](https://github.com/pry/pry/pull/1762),
312
+ [#1774](https://github.com/pry/pry/pull/1762))
313
+ * Fixed `NoMethodError` on code objects that have a comment but no source when
314
+ invoking `show-source` ([#1779](https://github.com/pry/pry/pull/1779))
315
+ * Fixed `negative argument (ArgumentError)` upon pasting code with tabs, which
316
+ used to confuse automatic indentation
317
+ ([#1771](https://github.com/pry/pry/pull/1771))
318
+ * Fixed Pry not being able to load history on Ruby 2.4.4+ when it contains the
319
+ null character ([#1789](https://github.com/pry/pry/pull/1789))
320
+ * Fixed Pry raising errors on `cd`'ing into some objects that redefine
321
+ `method_missing` and `respond_to?`
322
+ ([#1811](https://github.com/pry/pry/pull/1811))
323
+ * Fixed bug when indentation leaves parts of input after pressing enter when
324
+ Readline is enabled with mode indicators for vi mode
325
+ ([#1813](https://github.com/pry/pry/pull/1813),
326
+ [#1820](https://github.com/pry/pry/pull/1820),
327
+ [#1825](https://github.com/pry/pry/pull/1825))
328
+ * Fixed `edit` not writing to history
329
+ ([#1749](https://github.com/pry/pry/issues/1749))
330
+
331
+ #### Other changes
332
+
333
+ * Deprecated the `Data` constant to match Ruby 2.5 in the `ls` command
334
+ ([#1731](https://github.com/pry/pry/pull/1731))
335
+
336
+ ### 0.11.3
337
+
338
+ #### Features
339
+
340
+ * Add Pry::Testable, an improved modular replacement for PryTestHelpers.
341
+ **breaking change**.
342
+
343
+ See pull request [#1679](https://github.com/pry/pry/pull/1679).
344
+
345
+ * Add a new category module: "Pry::Platform". Loosely related to #1668 below.
346
+
347
+ See pull request [#1670](https://github.com/pry/pry/pull/1670)
348
+
349
+ * Add `mac_osx?` and `linux?` utility functions to Pry::Helpers::BaseHelpers.
350
+
351
+ See pull request [#1668](https://github.com/pry/pry/pull/1668).
352
+
353
+ * Add utility functions for drawing colorised text on a colorised background.
354
+
355
+ See pull request [#1673](https://github.com/pry/pry/pull/1673).
356
+
357
+ #### Bug fixes
358
+
359
+ * Fix a case of infinite recursion in `Pry::Method::WeirdMethodLocator#find_method_in_superclass`
360
+ that users of the [Hanami](http://hanamirb.org/) web framework experienced and
361
+ reported since 2015.
362
+
363
+ See pull request [#1689](https://github.com/pry/pry/pull/1689).
364
+
365
+ * Fix a bug where Method objects were not returned for setters inherited
366
+ from a default (Pry::Config::Default). Eg, this is no longer an error:
367
+
368
+ pry(main)> d = Pry::Config.from_hash({}, Pry::Config::Default.new)
369
+ pry(main)> d.method(:exception_whitelist=) # Error
370
+
371
+ See pull request [#1688](https://github.com/pry/pry/pull/1688).
372
+
373
+ * Do not capture unused Proc objects in Text helper methods `no_color` and `no_paging`,
374
+ for performance reasons. Improve the documentation of both methods.
375
+
376
+ See pull request [#1691](https://github.com/pry/pry/pull/1691).
377
+
378
+ * Fix `String#pp` output color.
379
+
380
+ See pull request [#1674](https://github.com/pry/pry/pull/1674).
381
+
382
+
383
+ ### 0.11.0
384
+
385
+ * Add alias 'whereami[?!]+' for 'whereami' command. ([#1597](https://github.com/pry/pry/pull/1597))
386
+ * Improve Ruby 2.4 support ([#1611](https://github.com/pry/pry/pull/1611)):
387
+ * Deprecated constants are hidden from `ls` output by default, use the `-d` switch to see them.
388
+ * Fix warnings that originate in Pry while using the repl.
389
+ * Improve completion speed in large applications. ([#1588](https://github.com/pry/pry/pull/1588))
390
+ * Pry::ColorPrinter.pp: add `newline` argument and pass it on to PP. ([#1603](https://github.com/pry/pry/pull/1603))
391
+ * Use `less` or system pager pager on MS Windows if it is available. ([#1512](https://github.com/pry/pry/pull/1512))
392
+ * Add `Pry.configure` as an alternative to the current way of changing configuration options in `.pryrc` files. ([#1502](https://github.com/pry/pry/pull/1502))
393
+ * Add `Pry::Config::Behavior#eager_load!` to add a possible workaround for issues like ([#1501](https://github.com/pry/pry/issues/1501))
394
+ * Remove Slop as a runtime dependency by vendoring v3.4 as Pry::Slop.
395
+ People can depend on Slop v4 and Pry at the same time without running into version conflicts. ([#1497](https://github.com/pry/pry/issues/1497))
396
+ * Fix auto-indentation of code that uses a single-line rescue ([#1450](https://github.com/pry/pry/issues/1450))
397
+ * Remove "Pry::Config#refresh", please use "Pry::Config#clear" instead.
398
+ * Defining a method called "ls" no longer breaks the "ls" command ([#1407](https://github.com/pry/pry/issues/1407))
399
+ * Don't raise when directory permissions don't allow file expansion ([#1432](https://github.com/pry/pry/issues/1432))
400
+ * Syntax highlight &lt;tt&gt; tags in documentation output.
401
+ * Add support for BasicObject subclasses who implement their own #inspect (#1341)
402
+ * Fix 'include RSpec::Matchers' at the top-level (#1277)
403
+ * Add 'gem-readme' command, prints the README file bundled with a rubygem
404
+ * Add 'gem-search' command, searches for a gem with the rubygems.org HTTP API
405
+ * Fixed bug in the `cat` command where it was impossible to use line numbers with files ([#1349](https://github.com/pry/pry/issues/1349))
406
+ * Fixed uncaught Errno::EOPNOTSUPP exception when $stdout is a socket ([#1352](https://github.com/pry/pry/issues/1352))
407
+ * Display a warning when you cd'ed inside a C object and executed 'show-source' without arguments ([#691](https://github.com/pry/pry/issues/691))
408
+ * Make the stagger_output method more reliable by reusing possibly available Pry instance ([#1364](https://github.com/pry/pry/pull/1364))
409
+ * Make the 'gem-install' message less confusing by removing backticks ([#1350](https://github.com/pry/pry/pull/1350))
410
+ * Fixed error when Pry was trying to load incompatible versions of plugins ([#1312](https://github.com/pry/pry/issues/1312))
411
+ * Fixed bug when `hist --clear` led to ArgumentError ([#1340](https://github.com/pry/pry/pull/1340))
412
+ * Fixed the "uninitialized constant Pry::ObjectPath::StringScanner" exception during autocomplete ([#1330](https://github.com/pry/pry/issues/1330))
413
+ * Secured usage of colours with special characters (RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE) in Pry::Helpers::Text ([#493](https://github.com/pry/pry/issues/493#issuecomment-39232771))
414
+ * Fixed regression with `pry -e` when it messes the terminal ([#1387](https://github.com/pry/pry/issues/1387))
415
+ * Fixed regression with space prefixes of expressions ([#1369](https://github.com/pry/pry/issues/1369))
416
+ * Introduced the new way to define hooks for commands (with `Pry.hooks.add_hook("{before,after}_commandName")`). The old way is deprecated, but still supported (with `Pry.commands.{before,after}_command`) ([#651](https://github.com/pry/pry/issues/651))
417
+ * Removed old API's using `Pry::Hooks.from_hash` altogether
418
+ * Removed hints on Foreman support (see [this](https://github.com/ddollar/foreman/pull/536))
419
+ * Fixed support for the tee command ([#1334](https://github.com/pry/pry/issues/1334))
420
+ * Implemented support for CDPATH for ShellCommand ([#1433](https://github.com/pry/pry/issues/1433), [#1434](https://github.com/pry/pry/issues/1434))
421
+ * `Pry::CLI.parse_options` does not start Pry anymore ([#1393](https://github.com/pry/pry/pull/1393))
422
+ * The gem uses CPU-less platforms for Windows now ([#1410](https://github.com/pry/pry/pull/1410))
423
+ * Add `Pry::Config::Memoization` to make it easier to implement your own `Pry::Config::Default` class.([#1503](https://github.com/pry/pry/pull/1503/))
424
+ * Lazy load the config defaults for `Pry.config.history` and `Pry.config.gist`.
9
425
 
10
426
  ### 0.10.1
11
427
 
@@ -13,7 +429,6 @@
13
429
  * Move to rspec for testing (from bacon)
14
430
  * Clean up ruby warnings
15
431
 
16
-
17
432
  ### 0.10.0
18
433
 
19
434
  #### Features
@@ -376,7 +791,7 @@
376
791
  * Fewer internal methods polluting output
377
792
 
378
793
  ### 0.9.8.4 (2012/6/3)
379
- * ~/.pry_history wasnt being created (if it did not exist)! FIXED
794
+ * ~/.pry_history wasn't being created (if it did not exist)! FIXED
380
795
  * `hist --save` saved colors! FIXED
381
796
  * added Pry#add_sticky_local API for adding sticky locals to individual pry instances
382
797
 
@@ -384,7 +799,7 @@
384
799
  * various tweaks to improve rbx support
385
800
  * commands now support optional block arguments
386
801
  * much improved help command
387
- * updated method_source dependencya
802
+ * updated method_source dependency
388
803
  * added wtf command
389
804
  * jruby should now work in windows (though without color)
390
805
 
@@ -412,7 +827,7 @@ MAJOR NEW FEATURES
412
827
  - added gist command (removed gist-method, new gist command is more general)
413
828
 
414
829
  complete CHANGELOG:
415
- * CommandError's no longer cause the current input to be disgarded
830
+ * CommandError's no longer cause the current input to be discarded
416
831
  * Better syntax highlighting for rbx code code
417
832
  * added cat --in to show pry input history
418
833
  * prefixed temporary file names with 'pry'
@@ -425,7 +840,7 @@ complete CHANGELOG:
425
840
  * added CommandSet#{before_command,after_command} for enhancing builtin commands
426
841
  * added checking for namespace collisions with pry commands, set Pry.config.collision_warning
427
842
  * work around namespace collisions by ensuring lines starting with a space are executed as
428
- * ruby.work around namespace collisions by prensuring lines starting with a space are executed as ruby
843
+ * ruby.work around namespace collisions by pressuring lines starting with a space are executed as ruby
429
844
  * added handlers for Ctrl+C (SIGINT) on jruby, these are now caught as in other ruby versions
430
845
  * removed dependency on ruby_parser
431
846
  * prevented colours leaking across the pry prompt
@@ -445,7 +860,7 @@ complete CHANGELOG:
445
860
 
446
861
  ### 0.9.7.4 (2011/11/5)
447
862
  * ls -M now works in modules (bugfix)
448
- * added exception msg for bad cd object/path
863
+ * added exception message for bad cd object/path
449
864
  * no longer die when encounter exceptions in .pryrc
450
865
  * baked in CoolLine support
451
866
  * Pry.config.input in .pryrc now respected
@@ -462,7 +877,7 @@ complete CHANGELOG:
462
877
  * changed ^D so it no longer resets indent level automatically
463
878
 
464
879
  ### 0.9.7.1 (2011/10/26)
465
- * fixed gem dependecy issues
880
+ * fixed gem dependency issues
466
881
 
467
882
  ### 0.9.7 (2011/10/25)
468
883
 
@@ -503,7 +918,7 @@ complete CHANGELOG:
503
918
  * play -m --open uses show-input to show play'd code
504
919
  * added "unindent" helper to make adding help to commands easier
505
920
  * local ./.pryrc now loaded after ~/.pryrc if it exists
506
- * cat --ex N and edit --ex N now can navigate through backtrace, where cat --ex (with no args) moves throuh successive levels of the backtrace automatically with state stored on the exceptino object itself
921
+ * cat --ex N and edit --ex N now can navigate through backtrace, where cat --ex (with no args) moves through successive levels of the backtrace automatically with state stored on the exception object itself
507
922
  * new option Pry.config.exception_window_size determines window size for cat --ex
508
923
  * input_stack now implemented - pushing objects onto a pry instance's input_stack causes the instance to read from those objects in turn as it encounters EOF on the previous object. On finishing the input_stack the input object for the pry instance is set back to Pry.config.input, if this fails, pry breaks out of the REPL (throw(:breakout)) with an error message
509
924
  * Pry.config.system() defines how pry runs system commands
@@ -536,10 +951,10 @@ complete CHANGELOG:
536
951
  * fixed bug #200 ( https://github.com/pry/pry/issues/200 )- string interpolation bug (thanks to ryanf)
537
952
  * show-doc and stat now display method visibility (update WIKI)
538
953
  * got rid of warnings caused by stricter ruby 1.9.3 rules
539
- * remove interpolation of command names and fix interpolation error messag (update WIKI) (thanks ryanf!)
954
+ * remove interpolation of command names and fix interpolation error message (update WIKI) (thanks ryanf!)
540
955
  * 'nested sessions' now use binding stacks (so each instance manages its own collection of bindings without spawning other instances)
541
956
  * 'cd ..' just pops a binding off the binding_stack with special behaviour when only one binding in stack - it breaks out of the repl loop
542
- * added switch-to command (like jump-to but doesnt unwind the stack)
957
+ * added switch-to command (like jump-to but doesn't unwind the stack)
543
958
  * show-method and show-doc now accept multiple method names
544
959
  * control_d hook added (Pry.config.control_d_handler)
545
960
  * behaviour of ^d is now to break out of current expr if in multi-line expr, or break out of current context if nested, or break out of pry repl loop if at top-level
@@ -633,7 +1048,7 @@ complete CHANGELOG:
633
1048
  * -I mode for pry commandline
634
1049
  * --color mode for pry commandline
635
1050
  * clean up requires (put them all in one place)
636
- * simple-prompt command and toggle-color commandd.
1051
+ * simple-prompt command and toggle-color command.
637
1052
 
638
1053
  ### 0.6.3 (2011/2/28)
639
1054
  * Using MethodSource 0.3.4 so 1.8 show-method support provided
@@ -716,3 +1131,11 @@ complete CHANGELOG:
716
1131
 
717
1132
  ### 0.1.0 (2010/12/8)
718
1133
  * release!
1134
+
1135
+ [v0.12.0]: https://github.com/pry/pry/releases/tag/v0.12.0
1136
+ [v0.12.1]: https://github.com/pry/pry/releases/tag/v0.12.1
1137
+ [v0.12.2]: https://github.com/pry/pry/releases/tag/v0.12.2
1138
+ [v0.13.0]: https://github.com/pry/pry/releases/tag/v0.13.0
1139
+ [v0.13.1]: https://github.com/pry/pry/releases/tag/v0.13.1
1140
+ [v0.14.0]: https://github.com/pry/pry/releases/tag/v0.14.0
1141
+ [v0.14.1]: https://github.com/pry/pry/releases/tag/v0.14.1
data/LICENSE CHANGED
@@ -3,7 +3,7 @@ License
3
3
 
4
4
  (The MIT License)
5
5
 
6
- Copyright (c) 2013 John Mair (banisterfiend)
6
+ Copyright (c) 2018 John Mair (banisterfiend)
7
7
 
8
8
  Permission is hereby granted, free of charge, to any person obtaining
9
9
  a copy of this software and associated documentation files (the