pry 0.10.4 → 0.14.1

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 +408 -16
  3. data/LICENSE +1 -1
  4. data/README.md +352 -306
  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 +83 -96
  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 +49 -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 +313 -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 +53 -33
  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 +60 -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 +72 -66
  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 +177 -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 +106 -98
  119. data/lib/pry/pry_instance.rb +261 -224
  120. data/lib/pry/repl.rb +82 -27
  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 +27 -0
  137. data/lib/pry/{module_candidate.rb → wrapped_module/candidate.rb} +28 -27
  138. data/lib/pry/wrapped_module.rb +66 -57
  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: d3d394fb61f0a41511177954f810a8aa4ab0c390baa89e538878121806a28c08
4
+ data.tar.gz: d36e350eb1e8ff448e088dab7233f6c9f28849f6ae94d3eed0b9ad4768ade770
5
5
  SHA512:
6
- metadata.gz: f82d5ccba499a9dc6a11bc48496424f691248134bad714cdaf8704bc95ffd3368fa07471d3651f464fcf92cac0b0779860276fa973783f1b2bd34b338c14ce92
7
- data.tar.gz: 088a2f47add7c3e16ca078f4e84ebac15b05051d945b3f5c25a295292ec6478bf5bbe0c6752a143f16d323116fbf1e19ebd72b5fbbfa716830a9181a768fe20a
6
+ metadata.gz: fe3608e5e7046c474a6e8b077dded9bfc091bfdeaa44d178bb69e66bbeaafaca2a3447fac31dd6d5d5bab8ecc10cbb2e2de327f3c4f55393d4024a45f6407b55
7
+ data.tar.gz: 1596aef2f91334198c2705f79fa6c93e324cd89071a1f6c04c60c471a5c168864c8a3bb991c1d362b5fd5e040782c4a680e7b1eb3cbf4324258c11379d8019f0
data/CHANGELOG.md CHANGED
@@ -1,11 +1,396 @@
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.1][v0.14.1] (April 12, 2021)
4
4
 
5
- ### 0.10.2
5
+ #### Bug fixes
6
6
 
7
- * cherry-pick c2ed9ec135bd791a32c70fbe05cc0508ea17c4040e from master (fix inf. loop with prepended methods source retrieval)
8
- * Update some specs for recent ruby versions (2.2+)
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))
155
+
156
+ ### [v0.12.2][v0.12.2] (November 12, 2018)
157
+
158
+ #### Bug fixes
159
+
160
+ * Restore removed deprecations, which were removed by accident due to a bad
161
+ rebase.
162
+
163
+ ### [v0.12.1][v0.12.1] (November 12, 2018)
164
+
165
+ #### Bug fixes
166
+
167
+ * Stopped creating a new hash each time `Pry::Prompt#[]` is invoked
168
+ ([#1855](https://github.com/pry/pry/pull/1855))
169
+ * Fixed `less` pager not working when it's available
170
+ ([#1861](https://github.com/pry/pry/pull/1861))
171
+
172
+ ### [v0.12.0][v0.12.0] (November 5, 2018)
173
+
174
+ #### Major changes
175
+
176
+ * Dropped support for Rubinius ([#1785](https://github.com/pry/pry/pull/1785))
177
+
178
+ #### Features
179
+
180
+ * Added a new command, `clear-screen`, that clears the content of the screen Pry
181
+ is running in regardless of platform (Windows or UNIX-like)
182
+ ([#1723](https://github.com/pry/pry/pull/1723))
183
+ * Added a new command, `gem-stat`, that prints gem statistics such as gem
184
+ dependencies and downloads ([#1707](https://github.com/pry/pry/pull/1707))
185
+ * Added support for nested exceptions for the `wtf` command
186
+ ([#1791](https://github.com/pry/pry/pull/1791))
187
+ * Added support for dynamic prompt names
188
+ ([#1833](https://github.com/pry/pry/pull/1833))
189
+
190
+ ```rb
191
+ # pryrc
192
+ Pry.config.prompt_name = Pry.lazy { rand(100) }
193
+
194
+ # Session
195
+ [1] 80(main)>
196
+ [2] 87(main)>
197
+ [3] 30(main)>
198
+ ```
199
+ * Added support for XDG Base Directory Specification
200
+ ([#1609](https://github.com/pry/pry/pull/1609),
201
+ [#1844](https://github.com/pry/pry/pull/1844),
202
+ ([#1848](https://github.com/pry/pry/pull/1848)))
203
+ * Removed the `simple-prompt`. Use `change-prompt simple` instead. The
204
+ `list-prompt` command was removed and embedded as `change-prompt --list`
205
+ ([#1849](https://github.com/pry/pry/pull/1849))
206
+
207
+ #### API changes
208
+
209
+ * The following methods started accepting the new optional `config` parameter
210
+ ([#1809](https://github.com/pry/pry/pull/1809)):
211
+ * `Pry::Helpers.tablify(things, line_length, config = Pry.config)`
212
+ * `Pry::Helpers.tablify_or_one_line(heading, things, config = Pry.config)`
213
+ * `Pry::Helpers.tablify_to_screen_width(things, options, config = Pry.config)`
214
+ * `Pry::Helpers::Table.new(items, args, config = Pry.config)`
215
+
216
+ You are expected to pass a session-local `_pry_.config` instead of the global
217
+ one.
218
+
219
+ * Added new method `Pry::Config.assign`, for creating a Config non-recursively
220
+ ([#1725](https://github.com/pry/pry/issues/1725))
221
+ * Added `Pry.lazy`, which is a helper method for values that need to be
222
+ calculated dynamically. Currently, only `config.prompt_name` supports it
223
+ ([#1833](https://github.com/pry/pry/pull/1833))
224
+ * `Pry::Prompt` responds to `.[]`, `.all` & `.add` now. The `Pry::Prompt.add`
225
+ method must be used for implementing custom prompts. See the API in the
226
+ documentation for the class ([#1846](https://github.com/pry/pry/pull/1846))
227
+
228
+ #### Breaking changes
229
+
230
+ * Deleted the `Pry::Helpers::Text.bright_default` alias for
231
+ `Pry::Helpers::Text.bold` ([#1795](https://github.com/pry/pry/pull/1795))
232
+ * `Pry::Helpers.tablify_to_screen_width(things, options, config = Pry.config)`
233
+ requires `options` or `nil` in place of them.
234
+ * `Pry::Helpers::Table.new(items, args, config = Pry.config)` requires `args`
235
+ or `nil` in place of them.
236
+ * Completely revamped `Pry::HistoryArray`
237
+ ([#1818](https://github.com/pry/pry/pull/1818)).
238
+ * It's been renamed to `Pry::Ring`
239
+ ([#1817](https://github.com/pry/pry/pull/1817))
240
+ * The implementation has changed and as result, the following methods were
241
+ removed:
242
+ * `Pry::Ring#length` (use `Pry::Ring#count` instead)
243
+ * `#empty?`, `#each`, `#inspect`, `#pop!`, `#to_h`
244
+ * To access old Enumerable methods convert the ring to Array with `#to_a`
245
+ * Fixed indexing for elements (e.g. `_pry_.input_ring[0]` always return some
246
+ element and not `nil`)
247
+ * Renamed `Pry.config.prompt_safe_objects` to `Pry.config.prompt_safe_contexts`
248
+ * Removed deprecated `Pry::CommandSet#before_command` &
249
+ `Pry::CommandSet#after_command` ([#1838](https://github.com/pry/pry/pull/1838))
250
+
251
+ #### Deprecations
252
+
253
+ * Deprecated `_pry_.input_array` & `_pry_.output_array` in favour of
254
+ `_pry_.input_ring` & `_pry_.output_ring` respectively
255
+ ([#1814](https://github.com/pry/pry/pull/1814))
256
+ * Deprecated `Pry::Command#text`. Please use `#black`, `#white`, etc. directly
257
+ instead (as you would with helper functions from `BaseHelpers` and
258
+ `CommandHelpers`) ([#1701](https://github.com/pry/pry/pull/1701))
259
+ * Deprecated `_pry_.input_array` & `_pry_.output_array` in favour of
260
+ `_pry_.input_ring` and `_pry_.output_ring` respectively
261
+ ([#1817](https://github.com/pry/pry/pull/1817))
262
+ * Deprecated `Pry::Platform`. Use `Pry::Helpers::Platform` instead. Note that
263
+ `Pry::Helpers::BaseHelpers` still includes the `Platform` methods but emits a
264
+ warning. You must switch to `Pry::Helpers::Platform` in your code
265
+ ([#1838](https://github.com/pry/pry/pull/1838),
266
+ ([#1845](https://github.com/pry/pry/pull/1845)))
267
+ * Deprecated `Pry::Prompt::MAP`. You should use `Pry::Prompt.all` instead to
268
+ access the same map ([#1846](https://github.com/pry/pry/pull/1846))
269
+
270
+ #### Bug fixes
271
+
272
+ * Fixed a bug where `cd Hash.new` reported `self` as an instance of Pry::Config
273
+ in the prompt ([#1725](https://github.com/pry/pry/pull/1725))
274
+ * Silenced the `Could not find files for the given pattern(s)` error message
275
+ coming from `where` on Windows, when `less` or another pager is not installed
276
+ ([#1767](https://github.com/pry/pry/pull/1767))
277
+ * Fixed possible double loading of Pry plugins' `cli.rb` on Ruby (>= 2.4) due to
278
+ [the `realpath` changes while invoking
279
+ `require`](https://bugs.ruby-lang.org/issues/10222)
280
+ ([#1762](https://github.com/pry/pry/pull/1762),
281
+ [#1774](https://github.com/pry/pry/pull/1762))
282
+ * Fixed `NoMethodError` on code objects that have a comment but no source when
283
+ invoking `show-source` ([#1779](https://github.com/pry/pry/pull/1779))
284
+ * Fixed `negative argument (ArgumentError)` upon pasting code with tabs, which
285
+ used to confuse automatic indentation
286
+ ([#1771](https://github.com/pry/pry/pull/1771))
287
+ * Fixed Pry not being able to load history on Ruby 2.4.4+ when it contains the
288
+ null character ([#1789](https://github.com/pry/pry/pull/1789))
289
+ * Fixed Pry raising errors on `cd`'ing into some objects that redefine
290
+ `method_missing` and `respond_to?`
291
+ ([#1811](https://github.com/pry/pry/pull/1811))
292
+ * Fixed bug when indentation leaves parts of input after pressing enter when
293
+ Readline is enabled with mode indicators for vi mode
294
+ ([#1813](https://github.com/pry/pry/pull/1813),
295
+ [#1820](https://github.com/pry/pry/pull/1820),
296
+ [#1825](https://github.com/pry/pry/pull/1825))
297
+ * Fixed `edit` not writing to history
298
+ ([#1749](https://github.com/pry/pry/issues/1749))
299
+
300
+ #### Other changes
301
+
302
+ * Deprecated the `Data` constant to match Ruby 2.5 in the `ls` command
303
+ ([#1731](https://github.com/pry/pry/pull/1731))
304
+
305
+ ### 0.11.3
306
+
307
+ #### Features
308
+
309
+ * Add Pry::Testable, an improved modular replacement for PryTestHelpers.
310
+ **breaking change**.
311
+
312
+ See pull request [#1679](https://github.com/pry/pry/pull/1679).
313
+
314
+ * Add a new category module: "Pry::Platform". Loosely related to #1668 below.
315
+
316
+ See pull request [#1670](https://github.com/pry/pry/pull/1670)
317
+
318
+ * Add `mac_osx?` and `linux?` utility functions to Pry::Helpers::BaseHelpers.
319
+
320
+ See pull request [#1668](https://github.com/pry/pry/pull/1668).
321
+
322
+ * Add utility functions for drawing colorised text on a colorised background.
323
+
324
+ See pull request [#1673](https://github.com/pry/pry/pull/1673).
325
+
326
+ #### Bug fixes
327
+
328
+ * Fix a case of infinite recursion in `Pry::Method::WeirdMethodLocator#find_method_in_superclass`
329
+ that users of the [Hanami](http://hanamirb.org/) web framework experienced and
330
+ reported since 2015.
331
+
332
+ See pull request [#1689](https://github.com/pry/pry/pull/1689).
333
+
334
+ * Fix a bug where Method objects were not returned for setters inherited
335
+ from a default (Pry::Config::Default). Eg, this is no longer an error:
336
+
337
+ pry(main)> d = Pry::Config.from_hash({}, Pry::Config::Default.new)
338
+ pry(main)> d.method(:exception_whitelist=) # Error
339
+
340
+ See pull request [#1688](https://github.com/pry/pry/pull/1688).
341
+
342
+ * Do not capture unused Proc objects in Text helper methods `no_color` and `no_paging`,
343
+ for performance reasons. Improve the documentation of both methods.
344
+
345
+ See pull request [#1691](https://github.com/pry/pry/pull/1691).
346
+
347
+ * Fix `String#pp` output color.
348
+
349
+ See pull request [#1674](https://github.com/pry/pry/pull/1674).
350
+
351
+
352
+ ### 0.11.0
353
+
354
+ * Add alias 'whereami[?!]+' for 'whereami' command. ([#1597](https://github.com/pry/pry/pull/1597))
355
+ * Improve Ruby 2.4 support ([#1611](https://github.com/pry/pry/pull/1611)):
356
+ * Deprecated constants are hidden from `ls` output by default, use the `-d` switch to see them.
357
+ * Fix warnings that originate in Pry while using the repl.
358
+ * Improve completion speed in large applications. ([#1588](https://github.com/pry/pry/pull/1588))
359
+ * Pry::ColorPrinter.pp: add `newline` argument and pass it on to PP. ([#1603](https://github.com/pry/pry/pull/1603))
360
+ * Use `less` or system pager pager on MS Windows if it is available. ([#1512](https://github.com/pry/pry/pull/1512))
361
+ * 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))
362
+ * Add `Pry::Config::Behavior#eager_load!` to add a possible workaround for issues like ([#1501](https://github.com/pry/pry/issues/1501))
363
+ * Remove Slop as a runtime dependency by vendoring v3.4 as Pry::Slop.
364
+ 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))
365
+ * Fix auto-indentation of code that uses a single-line rescue ([#1450](https://github.com/pry/pry/issues/1450))
366
+ * Remove "Pry::Config#refresh", please use "Pry::Config#clear" instead.
367
+ * Defining a method called "ls" no longer breaks the "ls" command ([#1407](https://github.com/pry/pry/issues/1407))
368
+ * Don't raise when directory permissions don't allow file expansion ([#1432](https://github.com/pry/pry/issues/1432))
369
+ * Syntax highlight <tt> tags in documentation output.
370
+ * Add support for BasicObject subclasses who implement their own #inspect (#1341)
371
+ * Fix 'include RSpec::Matchers' at the top-level (#1277)
372
+ * Add 'gem-readme' command, prints the README file bundled with a rubygem
373
+ * Add 'gem-search' command, searches for a gem with the rubygems.org HTTP API
374
+ * Fixed bug in the `cat` command where it was impossible to use line numbers with files ([#1349](https://github.com/pry/pry/issues/1349))
375
+ * Fixed uncaught Errno::EOPNOTSUPP exception when $stdout is a socket ([#1352](https://github.com/pry/pry/issues/1352))
376
+ * 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))
377
+ * Make the stagger_output method more reliable by reusing possibly available Pry instance ([#1364](https://github.com/pry/pry/pull/1364))
378
+ * Make the 'gem-install' message less confusing by removing backticks ([#1350](https://github.com/pry/pry/pull/1350))
379
+ * Fixed error when Pry was trying to load incompatible versions of plugins ([#1312](https://github.com/pry/pry/issues/1312))
380
+ * Fixed bug when `hist --clear` led to ArgumentError ([#1340](https://github.com/pry/pry/pull/1340))
381
+ * Fixed the "uninitialized constant Pry::ObjectPath::StringScanner" exception during autocomplete ([#1330](https://github.com/pry/pry/issues/1330))
382
+ * 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))
383
+ * Fixed regression with `pry -e` when it messes the terminal ([#1387](https://github.com/pry/pry/issues/1387))
384
+ * Fixed regression with space prefixes of expressions ([#1369](https://github.com/pry/pry/issues/1369))
385
+ * 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))
386
+ * Removed old API's using `Pry::Hooks.from_hash` altogether
387
+ * Removed hints on Foreman support (see [this](https://github.com/ddollar/foreman/pull/536))
388
+ * Fixed support for the tee command ([#1334](https://github.com/pry/pry/issues/1334))
389
+ * Implemented support for CDPATH for ShellCommand ([#1433](https://github.com/pry/pry/issues/1433), [#1434](https://github.com/pry/pry/issues/1434))
390
+ * `Pry::CLI.parse_options` does not start Pry anymore ([#1393](https://github.com/pry/pry/pull/1393))
391
+ * The gem uses CPU-less platforms for Windows now ([#1410](https://github.com/pry/pry/pull/1410))
392
+ * Add `Pry::Config::Memoization` to make it easier to implement your own `Pry::Config::Default` class.([#1503](https://github.com/pry/pry/pull/1503/))
393
+ * Lazy load the config defaults for `Pry.config.history` and `Pry.config.gist`.
9
394
 
10
395
  ### 0.10.1
11
396
 
@@ -13,7 +398,6 @@
13
398
  * Move to rspec for testing (from bacon)
14
399
  * Clean up ruby warnings
15
400
 
16
-
17
401
  ### 0.10.0
18
402
 
19
403
  #### Features
@@ -376,7 +760,7 @@
376
760
  * Fewer internal methods polluting output
377
761
 
378
762
  ### 0.9.8.4 (2012/6/3)
379
- * ~/.pry_history wasnt being created (if it did not exist)! FIXED
763
+ * ~/.pry_history wasn't being created (if it did not exist)! FIXED
380
764
  * `hist --save` saved colors! FIXED
381
765
  * added Pry#add_sticky_local API for adding sticky locals to individual pry instances
382
766
 
@@ -384,7 +768,7 @@
384
768
  * various tweaks to improve rbx support
385
769
  * commands now support optional block arguments
386
770
  * much improved help command
387
- * updated method_source dependencya
771
+ * updated method_source dependency
388
772
  * added wtf command
389
773
  * jruby should now work in windows (though without color)
390
774
 
@@ -412,7 +796,7 @@ MAJOR NEW FEATURES
412
796
  - added gist command (removed gist-method, new gist command is more general)
413
797
 
414
798
  complete CHANGELOG:
415
- * CommandError's no longer cause the current input to be disgarded
799
+ * CommandError's no longer cause the current input to be discarded
416
800
  * Better syntax highlighting for rbx code code
417
801
  * added cat --in to show pry input history
418
802
  * prefixed temporary file names with 'pry'
@@ -425,7 +809,7 @@ complete CHANGELOG:
425
809
  * added CommandSet#{before_command,after_command} for enhancing builtin commands
426
810
  * added checking for namespace collisions with pry commands, set Pry.config.collision_warning
427
811
  * 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
812
+ * ruby.work around namespace collisions by pressuring lines starting with a space are executed as ruby
429
813
  * added handlers for Ctrl+C (SIGINT) on jruby, these are now caught as in other ruby versions
430
814
  * removed dependency on ruby_parser
431
815
  * prevented colours leaking across the pry prompt
@@ -445,7 +829,7 @@ complete CHANGELOG:
445
829
 
446
830
  ### 0.9.7.4 (2011/11/5)
447
831
  * ls -M now works in modules (bugfix)
448
- * added exception msg for bad cd object/path
832
+ * added exception message for bad cd object/path
449
833
  * no longer die when encounter exceptions in .pryrc
450
834
  * baked in CoolLine support
451
835
  * Pry.config.input in .pryrc now respected
@@ -462,7 +846,7 @@ complete CHANGELOG:
462
846
  * changed ^D so it no longer resets indent level automatically
463
847
 
464
848
  ### 0.9.7.1 (2011/10/26)
465
- * fixed gem dependecy issues
849
+ * fixed gem dependency issues
466
850
 
467
851
  ### 0.9.7 (2011/10/25)
468
852
 
@@ -503,7 +887,7 @@ complete CHANGELOG:
503
887
  * play -m --open uses show-input to show play'd code
504
888
  * added "unindent" helper to make adding help to commands easier
505
889
  * 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
890
+ * 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
891
  * new option Pry.config.exception_window_size determines window size for cat --ex
508
892
  * 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
893
  * Pry.config.system() defines how pry runs system commands
@@ -536,10 +920,10 @@ complete CHANGELOG:
536
920
  * fixed bug #200 ( https://github.com/pry/pry/issues/200 )- string interpolation bug (thanks to ryanf)
537
921
  * show-doc and stat now display method visibility (update WIKI)
538
922
  * 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!)
923
+ * remove interpolation of command names and fix interpolation error message (update WIKI) (thanks ryanf!)
540
924
  * 'nested sessions' now use binding stacks (so each instance manages its own collection of bindings without spawning other instances)
541
925
  * '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)
926
+ * added switch-to command (like jump-to but doesn't unwind the stack)
543
927
  * show-method and show-doc now accept multiple method names
544
928
  * control_d hook added (Pry.config.control_d_handler)
545
929
  * 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 +1017,7 @@ complete CHANGELOG:
633
1017
  * -I mode for pry commandline
634
1018
  * --color mode for pry commandline
635
1019
  * clean up requires (put them all in one place)
636
- * simple-prompt command and toggle-color commandd.
1020
+ * simple-prompt command and toggle-color command.
637
1021
 
638
1022
  ### 0.6.3 (2011/2/28)
639
1023
  * Using MethodSource 0.3.4 so 1.8 show-method support provided
@@ -716,3 +1100,11 @@ complete CHANGELOG:
716
1100
 
717
1101
  ### 0.1.0 (2010/12/8)
718
1102
  * release!
1103
+
1104
+ [v0.12.0]: https://github.com/pry/pry/releases/tag/v0.12.0
1105
+ [v0.12.1]: https://github.com/pry/pry/releases/tag/v0.12.1
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
@@ -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