pry 0.9.12.2 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1141 -0
  3. data/LICENSE +2 -2
  4. data/README.md +466 -0
  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 +97 -92
  10. data/lib/pry/code/code_file.rb +114 -0
  11. data/lib/pry/code/code_range.rb +7 -4
  12. data/lib/pry/code/loc.rb +27 -14
  13. data/lib/pry/code.rb +62 -90
  14. data/lib/pry/code_object.rb +83 -39
  15. data/lib/pry/color_printer.rb +66 -0
  16. data/lib/pry/command.rb +202 -371
  17. data/lib/pry/command_set.rb +151 -133
  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 -73
  24. data/lib/pry/commands/cat/file_formatter.rb +56 -63
  25. data/lib/pry/commands/cat/input_expression_formatter.rb +35 -30
  26. data/lib/pry/commands/cat.rb +64 -47
  27. data/lib/pry/commands/cd.rb +42 -26
  28. data/lib/pry/commands/change_inspector.rb +34 -0
  29. data/lib/pry/commands/change_prompt.rb +51 -0
  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 +33 -24
  36. data/lib/pry/commands/edit.rb +183 -167
  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 -17
  40. data/lib/pry/commands/find_method.rb +167 -167
  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 +153 -132
  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 +42 -0
  47. data/lib/pry/commands/ls/constants.rb +75 -0
  48. data/lib/pry/commands/ls/formatter.rb +55 -0
  49. data/lib/pry/commands/ls/globals.rb +50 -0
  50. data/lib/pry/commands/ls/grep.rb +23 -0
  51. data/lib/pry/commands/ls/instance_vars.rb +40 -0
  52. data/lib/pry/commands/ls/interrogatable.rb +24 -0
  53. data/lib/pry/commands/ls/jruby_hacks.rb +55 -0
  54. data/lib/pry/commands/ls/local_names.rb +37 -0
  55. data/lib/pry/commands/ls/local_vars.rb +47 -0
  56. data/lib/pry/commands/ls/ls_entity.rb +65 -0
  57. data/lib/pry/commands/ls/methods.rb +55 -0
  58. data/lib/pry/commands/ls/methods_helper.rb +50 -0
  59. data/lib/pry/commands/ls/self_methods.rb +34 -0
  60. data/lib/pry/commands/ls.rb +100 -303
  61. data/lib/pry/commands/nesting.rb +21 -17
  62. data/lib/pry/commands/play.rb +93 -49
  63. data/lib/pry/commands/pry_backtrace.rb +22 -18
  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 +57 -48
  67. data/lib/pry/commands/reset.rb +16 -12
  68. data/lib/pry/commands/ri.rb +57 -38
  69. data/lib/pry/commands/save_file.rb +45 -43
  70. data/lib/pry/commands/shell_command.rb +66 -34
  71. data/lib/pry/commands/shell_mode.rb +22 -20
  72. data/lib/pry/commands/show_doc.rb +80 -65
  73. data/lib/pry/commands/show_info.rb +193 -159
  74. data/lib/pry/commands/show_input.rb +16 -11
  75. data/lib/pry/commands/show_source.rb +113 -33
  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 +21 -13
  79. data/lib/pry/commands/watch_expression/expression.rb +43 -0
  80. data/lib/pry/commands/watch_expression.rb +110 -0
  81. data/lib/pry/commands/whereami.rb +157 -134
  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 +290 -220
  88. data/lib/pry/control_d_handler.rb +28 -0
  89. data/lib/pry/core_extensions.rb +50 -27
  90. data/lib/pry/editor.rb +130 -102
  91. data/lib/pry/env.rb +18 -0
  92. data/lib/pry/exception_handler.rb +43 -0
  93. data/lib/pry/exceptions.rb +73 -0
  94. data/lib/pry/forwardable.rb +27 -0
  95. data/lib/pry/helpers/base_helpers.rb +22 -151
  96. data/lib/pry/helpers/command_helpers.rb +55 -63
  97. data/lib/pry/helpers/documentation_helpers.rb +21 -13
  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 -86
  102. data/lib/pry/helpers.rb +3 -0
  103. data/lib/pry/history.rb +101 -70
  104. data/lib/pry/hooks.rb +67 -137
  105. data/lib/pry/indent.rb +79 -73
  106. data/lib/pry/input_completer.rb +283 -0
  107. data/lib/pry/input_lock.rb +129 -0
  108. data/lib/pry/inspector.rb +39 -0
  109. data/lib/pry/last_exception.rb +61 -0
  110. data/lib/pry/method/disowned.rb +19 -5
  111. data/lib/pry/{commands/edit/method_patcher.rb → method/patcher.rb} +51 -42
  112. data/lib/pry/method/weird_method_locator.rb +80 -44
  113. data/lib/pry/method.rb +225 -176
  114. data/lib/pry/object_path.rb +91 -0
  115. data/lib/pry/output.rb +136 -0
  116. data/lib/pry/pager.rb +227 -68
  117. data/lib/pry/prompt.rb +214 -0
  118. data/lib/pry/pry_class.rb +216 -289
  119. data/lib/pry/pry_instance.rb +438 -500
  120. data/lib/pry/repl.rb +256 -0
  121. data/lib/pry/repl_file_loader.rb +34 -35
  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} +36 -43
  138. data/lib/pry/wrapped_module.rb +102 -103
  139. data/lib/pry.rb +135 -261
  140. metadata +94 -283
  141. data/.document +0 -2
  142. data/.gitignore +0 -16
  143. data/.travis.yml +0 -21
  144. data/.yardopts +0 -1
  145. data/CHANGELOG +0 -534
  146. data/CONTRIBUTORS +0 -55
  147. data/Gemfile +0 -9
  148. data/Guardfile +0 -62
  149. data/README.markdown +0 -400
  150. data/Rakefile +0 -140
  151. data/TODO +0 -117
  152. data/lib/pry/commands/disabled_commands.rb +0 -2
  153. data/lib/pry/commands/gem_cd.rb +0 -26
  154. data/lib/pry/commands/gem_install.rb +0 -29
  155. data/lib/pry/commands/gem_list.rb +0 -33
  156. data/lib/pry/commands/gem_open.rb +0 -29
  157. data/lib/pry/commands/gist.rb +0 -102
  158. data/lib/pry/commands/install_command.rb +0 -51
  159. data/lib/pry/commands/simple_prompt.rb +0 -22
  160. data/lib/pry/commands.rb +0 -6
  161. data/lib/pry/completion.rb +0 -304
  162. data/lib/pry/custom_completions.rb +0 -6
  163. data/lib/pry/history_array.rb +0 -116
  164. data/lib/pry/plugins.rb +0 -103
  165. data/lib/pry/rbx_method.rb +0 -13
  166. data/lib/pry/rbx_path.rb +0 -22
  167. data/lib/pry/rubygem.rb +0 -74
  168. data/lib/pry/terminal.rb +0 -78
  169. data/lib/pry/test/helper.rb +0 -185
  170. data/man/pry.1 +0 -195
  171. data/man/pry.1.html +0 -204
  172. data/man/pry.1.ronn +0 -141
  173. data/pry.gemspec +0 -30
  174. data/spec/Procfile +0 -3
  175. data/spec/cli_spec.rb +0 -78
  176. data/spec/code_object_spec.rb +0 -277
  177. data/spec/code_spec.rb +0 -219
  178. data/spec/command_helpers_spec.rb +0 -29
  179. data/spec/command_integration_spec.rb +0 -644
  180. data/spec/command_set_spec.rb +0 -627
  181. data/spec/command_spec.rb +0 -821
  182. data/spec/commands/amend_line_spec.rb +0 -247
  183. data/spec/commands/bang_spec.rb +0 -19
  184. data/spec/commands/cat_spec.rb +0 -164
  185. data/spec/commands/cd_spec.rb +0 -250
  186. data/spec/commands/disable_pry_spec.rb +0 -25
  187. data/spec/commands/edit_spec.rb +0 -727
  188. data/spec/commands/exit_all_spec.rb +0 -34
  189. data/spec/commands/exit_program_spec.rb +0 -19
  190. data/spec/commands/exit_spec.rb +0 -34
  191. data/spec/commands/find_method_spec.rb +0 -70
  192. data/spec/commands/gem_list_spec.rb +0 -26
  193. data/spec/commands/gist_spec.rb +0 -79
  194. data/spec/commands/help_spec.rb +0 -56
  195. data/spec/commands/hist_spec.rb +0 -181
  196. data/spec/commands/jump_to_spec.rb +0 -15
  197. data/spec/commands/ls_spec.rb +0 -181
  198. data/spec/commands/play_spec.rb +0 -140
  199. data/spec/commands/raise_up_spec.rb +0 -56
  200. data/spec/commands/save_file_spec.rb +0 -177
  201. data/spec/commands/show_doc_spec.rb +0 -510
  202. data/spec/commands/show_input_spec.rb +0 -17
  203. data/spec/commands/show_source_spec.rb +0 -782
  204. data/spec/commands/whereami_spec.rb +0 -203
  205. data/spec/completion_spec.rb +0 -239
  206. data/spec/control_d_handler_spec.rb +0 -58
  207. data/spec/documentation_helper_spec.rb +0 -73
  208. data/spec/editor_spec.rb +0 -79
  209. data/spec/exception_whitelist_spec.rb +0 -21
  210. data/spec/fixtures/candidate_helper1.rb +0 -11
  211. data/spec/fixtures/candidate_helper2.rb +0 -8
  212. data/spec/fixtures/example.erb +0 -5
  213. data/spec/fixtures/example_nesting.rb +0 -33
  214. data/spec/fixtures/show_source_doc_examples.rb +0 -15
  215. data/spec/fixtures/testrc +0 -2
  216. data/spec/fixtures/testrcbad +0 -2
  217. data/spec/fixtures/whereami_helper.rb +0 -6
  218. data/spec/helper.rb +0 -34
  219. data/spec/helpers/bacon.rb +0 -86
  220. data/spec/helpers/mock_pry.rb +0 -43
  221. data/spec/helpers/table_spec.rb +0 -105
  222. data/spec/history_array_spec.rb +0 -67
  223. data/spec/hooks_spec.rb +0 -522
  224. data/spec/indent_spec.rb +0 -301
  225. data/spec/input_stack_spec.rb +0 -90
  226. data/spec/method_spec.rb +0 -482
  227. data/spec/prompt_spec.rb +0 -60
  228. data/spec/pry_defaults_spec.rb +0 -419
  229. data/spec/pry_history_spec.rb +0 -99
  230. data/spec/pry_output_spec.rb +0 -95
  231. data/spec/pry_spec.rb +0 -504
  232. data/spec/run_command_spec.rb +0 -25
  233. data/spec/sticky_locals_spec.rb +0 -157
  234. data/spec/syntax_checking_spec.rb +0 -81
  235. data/spec/wrapped_module_spec.rb +0 -261
  236. data/wiki/Customizing-pry.md +0 -397
  237. data/wiki/Home.md +0 -4
data/CHANGELOG DELETED
@@ -1,534 +0,0 @@
1
- 10/05/2013 version 0.9.12.2 minor fix
2
- * reload-code (with no args) should reload 'current file', issue #920
3
-
4
- 21/04/2013 version 0.9.12.1 HOTFIX
5
- * Fixes #890, workaround for jruby crash related to http://jira.codehaus.org/browse/JRUBY-7114
6
- * note this fix is just applied to the 0.9.12 tag, not master. However, master has
7
- this fix applied too.
8
-
9
- 12/02/2013 version 0.9.12
10
- Bug fixes:
11
- * Fix major bug where commands broke due to slop looking at ARGV
12
- instead of command parameters (#828)
13
- * Fix bug where pager broke in some situations (#845)
14
- * Fix broken rendering of some docs (#795)
15
- * silence warnings during failed tab-completion attempts
16
- * fix broken prompt when prompt is colored (#822 / #823)
17
- * added reload-method alias for reload-code (for backwards compat)
18
- * Reopen Readline.output if it is not a tty (see 1538bc0990)
19
-
20
- Features:
21
- * added pry --gem (see 19bfc13aa)
22
- * show-source now works on commands created with create_command
23
- * add -m (method) -c (class) and -f (file) switches to 'whereami' command
24
- * show-source now falls back to superclass if can't find class code
25
- (displays warning)
26
- * show-source/show-doc now indicate when -a option is available.
27
-
28
- 20/01/2013 version 0.9.11.4
29
- * fixed pager bug (wouldn't render color codes in some circumstances)
30
- * added Pry.last_internal_error, useful for devs debugging commands
31
-
32
- 17/01/2013 version 0.9.11.3
33
- * fix Pry.run_command
34
- * improve `ls` output
35
- * add :requires_gem => "jist" to 'gist' command (so deps can be installed
36
- via install-command)
37
- * improve help for 'edit' command
38
-
39
- 16/01/2013 version 0.9.11.2
40
- * minor bug fix for gist on windows, rescuing Jist::ClipboardError
41
- rather than letting the scary error spill out to users and potentially
42
- have them think the gist didnt post.
43
-
44
- 16/01/2013 version 0.9.11.1
45
- * fixed minor bug in 'gist' command where i neglected to remove
46
- a call to a non-existent method (no_arg) which was called when
47
- `gist` is invoked with no parameters
48
-
49
- 16/01/2013 version 0.9.11
50
- dependency changes:
51
- * upgrade the slop gem to version ~> 3.4
52
- * new optional dependency: Bond (you'll need to perform `gem install bond`). It enables autocompletion if you use Readline. Does not support work for Editline (more info: https://github.com/pry/pry/wiki/FAQ#wiki-readline). Big thanks to cldwalker.
53
-
54
- new features:
55
- * #738 basic Ruby 2.0 support
56
- * #732 JRuby 1.7.0+ support
57
- * new reload-code command, using it you can reload code for methods,
58
- classes, commands, objects and so on. e.g reload-code MyCLass,
59
- reload-code my_method, reload-code my_obj
60
- * added bond tabcompletion, much more powerful than standard tab
61
- completion. However, it requires a real 'readline' to work,
62
- so will not work on standard osx setup (since it uses Editline)
63
- * show-source can now extract source for classes, methods, procs,
64
- pry commands, and arbitrary objects (it shows the source for the class of
65
- the object). As a result, show-command is now deprecated
66
- * gist/play/save-file now infer object type without requiring flags,
67
- e.g play MyClass, play my_file.rb, play my_method
68
- * edit command can now edit most things, including: files, methods,
69
- classes, commands. As a result the 'edit-method' command is now
70
- deprecatd.
71
- e.g edit my_file.rb, edit my_method, edit MyClass
72
- * removed "edit-method", now merged with 'edit'
73
- * amend-line and play now properly indent code added to input buffer.
74
- * #674 added support for require switches chaining (`pry -rubygems -r./a.rb`)
75
- * #695 added ability to customize the name displayed in the prompt
76
- * #716 added `--patch` switch for `edit --ex` command
77
- * #736 respect the `$PAGER` environment variable
78
- * #497 added `disable-pry` command
79
- * removed "show-command" command; use "show-source" command instead
80
- * exec switch chaining (`pry -e ':one' -e ':two'`)
81
- * added two new hooks: "before_eval" and "after_eval"
82
- * added tabcompletion for "show-source", "show-doc" commands and "Array#<tab>" cases
83
- * immediately require gems after gem-install
84
- * added `-l` switch for `ls` command (displays local variables)
85
- * added "gem-open" command
86
- * added "fix-indent" command
87
- * added subcommands API
88
- * exposed the test API for plugin writers (d1489a)
89
- * tablifed ls output
90
- * added `--no-line-numbers` switch for "whereami" command
91
- * added `--lines` switch for "play" command
92
-
93
- bug fixes:
94
- * #652 find-method uses single escape instead of double
95
- * #657 fixed blank string delimiters
96
- * #622 fixed "unwanted 'binding_impl_method' local now exists in scratch bindings"
97
- * #645 fixed "edit-method -p changes constant lookup"
98
- * #682 fixed ".pryrc" loading twice when invoked from `$HOME` directory
99
- * #675 fixed pry not remembering initial "pwd"
100
- * #717 fixed multiline object coloring
101
- * #719 fixed "show-method" not supporting `String::new` notation
102
- * #754 fixed "whereami" command not showing correct line numbers
103
- * #751 fixed buggy Cucumber AST output
104
- * #787 fixed `while/until do` loops indentation
105
- * #526 fixed buggy `--no-plugins` switch of pry
106
- * #774 ensure all errors go to the error handler
107
- * fixed ".pryrc" loading with wrong `__FILE__`
108
- * fixed bug when pager doesn't work if "less" is not available on system
109
- * fixed "Control-D" press in nested REPL
110
- * many small improvements of unclear error messages and formatting of documentation
111
-
112
- 14/07/2012 version 0.9.10
113
- dependency changes:
114
- * #561 upgrade the slop gem to version 3
115
- * #590 move to the jist gem from gist.
116
- * upgrade method_source to 0.8
117
-
118
- new features:
119
- * #572 add --hist, -o and -k flags to gist command
120
- * #584 support show-source/doc on methods defined in class-eval
121
- * #585 support show-source/doc on gem methods defined in C
122
- * #596 add --disable-plugin and --select-plugin options
123
- * #597 allow "cd -" to switch between bindings
124
- * #612 add Pry.config.should_load_local_rc to turn off ./.pryrc
125
- * allow running a file of pry input with pry <file>
126
- * support colours in "ri" command
127
- * add before_eval hook
128
- * prompt now gets a lot more data when proc arity is 1
129
-
130
- bug fixes &c.
131
- * #554 removed the "req" command
132
- * #567 fix rendering bugs when starting pry
133
- * #568 fix Array#pretty_print on Jruby
134
- * #575 fix "edit" on windows
135
- * #576 fix "find-method" in the presence of badly behaved objects
136
- * #580 fix "whereami" in erb files on rails
137
- * #632 raise fewer exceptions while tab completing
138
- * #605 dont immediately quite pry when an error happens in readline
139
- * #606 support for ansicon to give jruby windows users colour
140
- * #613 massive speed improvements to show-source for modules
141
- * #620 improve whereami command when not in a binding.pry
142
- * #622 support embedded documents (=begin ... =end)
143
- * #627 support editing files with spaces in the name
144
- * changed __binding_impl__ to __pry__
145
- * support for absolute paths in $EDITOR
146
- * fix "cat" command on files with unknown extensions
147
- * many many internal refactorings and tidyings
148
-
149
- 09/05/2012 version 0.9.9.6 fixes #558
150
- * #558 has been a thorn in our side for long enough, hopefully this properly fixes it
151
- (though im not too confident :P)
152
-
153
- 09/05/2012 version 0.9.9.5 minor bugfix
154
- * fixed ZeroDivisionError in correct_indentation, bug #558
155
- * fix double highlighting in rdoc, bug #562
156
- * autocreate configuration for plugins, bug #548
157
-
158
- 26/4/2012 version 0.9.9.4 major bugfix
159
- * fixed `NoMethodError: undefined method `winsize' for #<IO:<STDOUT>>`, bug #549
160
- * fixes for jruby
161
- * breakage on `exit` syntax error, fixes, #550
162
- * heredoc content no longer auto-indented
163
-
164
- 19/4/2012 version 0.9.9.3 major doc bugfix
165
- * show-doc would fail on some core classes, i.e `show-doc Bignum`. This is now fixed
166
- and show allow a wider range of core documentation to be viewed directly in Pry.
167
-
168
- 18/4/2012 version 0.9.9.2 minor bugfix
169
- * make correct_indentation's auto-colorization respect Pry.color
170
-
171
- 18/4/2012 version 0.9.9.1 very minor release
172
- * cleared up confusion in show-source/show-doc docs that -a switch applies to classes
173
- as well as modules
174
-
175
- 18/4/2012 version 0.9.9
176
- MAJOR NEW FEATURES
177
- * lines of input are syntax highlighted upon 'enter' keypress
178
- * show-source command can now show class/module sourcecode (use -a to see all monkeypatches). Hard dependency on ruby18_source_location gem in MRI 1.8
179
- * show-doc command can show class/module docs (use -a to see docs for all monkeypatches) Hard dependency on ruby18_source_location gem in MRI 1.8.
180
- * new `find-method` command, performs a recursive search in a namespace for the existence of methods. Can find methods whose names match a regex or methods which contain provided CODE! This command is like a ruby-aware 'grep', very cool (thanks swarley)
181
- * pry-coolline now works properly with Pry (https://github.com/pry/pry-coolline)
182
- * alias_command method now much more powerful, e.g: alias_command "lM", "ls -M"
183
- * `whereami` is now more intelligent, automatically showing entire sourcecode of current method if current context is a method (thanks robgleeson).
184
- * new `raise-up` command. Allows you to raise an exception that will bubble out of pry (ending the session) and escape into enclosing program.
185
-
186
- remaining items:
187
- * fixed windows crashing bug when paging
188
- * lines ending with \ are incomplete (kudos to fowl)
189
- * `edit-method -n` no longer blocks (thanks misfo)s
190
- * show instance methods of modules by default in ls
191
- * docs for REPL defined methods can now be displayed using show-doc
192
- * autoload ruby18_source_location on mri18, when available (https://github.com/conradirwin/ruby18_source_location)
193
- * tab completion should work on first line now (historic bug fixed)
194
- * :quiet => true option added to `Pry.start`, turns off whereami
195
- * another easter egg added
196
- * show unloaded constants in yellow for ls
197
- * improved documentation for Pry.config options
198
- * improved auto indentation
199
- * JRuby: heuristics used to clean up 'ls' output (less internal methods polluting output)
200
-
201
- 6/3/2012 version 0.9.8.4 major bugfix
202
- * ~/.pry_history wasnt being created (if it did not exist)! FIXED
203
- * `hist --save` saved colors! FIXED
204
- * added Pry#add_sticky_local API for adding sticky locals to individual pry instances
205
-
206
- 2/3/2012 version 0.9.8.3 minor update
207
- * various tweaks to improve rbx support
208
- * commands now support optional block arguments
209
- * much improved help command
210
- * updated method_source dependencya
211
- * added wtf command
212
- * jruby should now work in windows (though without color)
213
-
214
- 9/2/2012 version 0.9.8.2 bugfix
215
- * fixed bugs related to --super
216
- * upgraded slop dependency
217
- * added edit -c (edit current line)
218
- * edit now respects Pry.config.disable_autoreload option
219
-
220
- 30/1/2012 version 0.9.8.1 bugfix
221
- * fixed broken --no-plugins option
222
- * Ensure ARGV is not mutated during option parsing.
223
- * Use a more rbx-friendly test for unicodeness
224
- * Use rbx-{18,19}mode as indicated http://about.travis-ci.org/docs/user/languages/ruby/
225
- * Don't explode in gem-list [Fixes #453, #454]
226
- * Check for command-name collision on assignment [Fixes #450]
227
-
228
- 25/1/2012 version 0.9.8
229
-
230
- MAJOR NEW FEATURES
231
- - upgraded command api, https://github.com/pry/pry/wiki/Custom-commands
232
- - added a system of hooks for customizing pry behaviour
233
- - changed syntax checking to use eval() for improved accuracy
234
- - added save-file command
235
- - added gist command (removed gist-method, new gist command is more general)
236
-
237
- complete CHANGELOG:
238
- * CommandError's no longer cause the current input to be disgarded
239
- * Better syntax highlighting for rbx code code
240
- * added cat --in to show pry input history
241
- * prefixed temporary file names with 'pry'
242
- * show-doc now supports -l and -b options (line numbers)
243
- * play now supports -i and -d options
244
- * moved UserCommandAPI command-set to pry-developer_tools plugin
245
- * added :when_started event for hooks, called in Pry.start
246
- * added a man page
247
- * added rename method to Pry::CommandSet (commands can be renamed)
248
- * added CommandSet#{before_command,after_command} for enhancing builtin commands
249
- * added checking for namespace collisions with pry commands, set Pry.config.collision_warning
250
- * work around namespace collisions by ensuring lines starting with a space are executed as
251
- * ruby.work around namespace collisions by prensuring lines starting with a space are executed as ruby
252
- * added handlers for Ctrl+C (SIGINT) on jruby, these are now caught as in other ruby versions
253
- * removed dependency on ruby_parser
254
- * prevented colours leaking across the pry prompt
255
- * fixed edge cases in Pry::Method, for methods with crazy names and methods that have been 'undef'd
256
- * refactored history handling code for clarity and correctness
257
- * added Pry::WrappedModule as a counterpart to Pry::Method
258
- * made a trailing , cause pry to wait for further input
259
- * removed gist-method command, added gist command
260
- * added pry-backtrace command to show history of current session
261
- * fixed whereami within 'super' methods
262
- * replaced inline version guards by Pry::Helpers::BaseHelpers.{rbx?,jruby?,windows?} etc.
263
- * removed the CommandProcessor, its functionality is part of the new Command class
264
- * changed cd .. at the top level so it doesn't quit pry.
265
- * changed edit-command to no-longer need a command set argument
266
- * fixed empty lines so that they don't replace _ by nil
267
- * fixed SyntaxErrors at the REPL level so they don't replace _ex_.
268
-
269
- 5/11/2011 version 0.9.7.4 hotfix
270
- * ls -M now works in modules (bugfix)
271
- * added exception msg for bad cd object/path
272
- * no longer die when encounter exceptions in .pryrc
273
- * baked in CoolLine support
274
- * Pry.config.input in .pryrc now respected
275
-
276
- 28/10/2011 version 0.9.7.3 hotfix-hotfix ;)
277
- * really fixed indentation for 'super if' and friends
278
- * Fixed indentation for tmux
279
- * added Pry.config.correct_indent option (to toggle whether indentation
280
- * corrected optional param behaviour for method signatures: e.g Signature meth(param1=?, param2=?)
281
-
282
- 27/10/2011 version 0.9.7.2 hotfix
283
- * fixed indentation for 'super if' and 'ensure', 'next if', etc
284
- * refactored Pry#run_command so it can accept an eval_string parameter (so amend-line and so on can work with it)
285
- * changed ^D so it no longer resets indent level automatically
286
-
287
- 26/10/2011 version 0.9.7.1 hotfix
288
- * fixed gem dependecy issues
289
-
290
- 25/10/2011 version 0.9.7
291
-
292
- MAJOR NEW FEATURES:
293
- - upgraded ls command to have a more intuitive interface
294
- - added automatic indentation (thanks YorickPeterse!)
295
- - added Pry::Method wrapper class to encapsulate method-related functionality
296
-
297
- complete CHANGELOG:
298
- * fixed syntax highlighting for object literals
299
- * fixed ActiveSupport method-naming conflict with "in?"
300
- * added --super option to edit-method, show-method, and friends - making it easier to operate on superclass methods
301
- * officially added edit --in to open previous expressions in an editor
302
- * whereami now works for REPL-defined code
303
- * started using JRuby parser for input validation in JRuby (thanks pangloss!)
304
- * fixed bug where ~/.pryrc could be loaded more than once (thanks kelseyjudson!)
305
- * added parse_options! helper to pull option parsing out of commands
306
- * Pry now respects the terminal's input encoding
307
- * moved some requires out of the startup process for improved speed
308
- * added input_array info to DEFAULT_PROMPT, e.g [1] pry(main)>
309
- * added --no-history option to pry binary (prevent history being LOADED, history will still be saved)
310
-
311
- 27/9/2011 version 0.9.6.2 HOTFIX release
312
- * downgrading to CodeRay 0.9.8 due to problems with 1.0 and rails (autoloading problem) see #280 on pry and #6 on CodeRay
313
- * also added (as a minor feature) cirwin's implementation of edit --in
314
- * added early break/exit for objectpath errors (the 'cd 34/@hello/bad_path/23')
315
-
316
- 19/9/2011 version 0.9.6
317
- * restored previous behavior of command-line switches (allowing "-rfilename")
318
- * removed -p option (--play) from edit command
319
- * `edit` with no arguments now edits the current or most recent expression
320
- * `edit` auto-reloads .rb files (need to specify -n to suppress)
321
- * added -p option (--patch) to edit-method command, which allows
322
- monkeypatching methods without touching the original file
323
- * edit-method can now edit REPL-defined methods
324
- * cat --ex now works on exceptions in REPL-defined code
325
- * play -m now uses eval_string.replace()
326
- * play -m --open uses show-input to show play'd code
327
- * added "unindent" helper to make adding help to commands easier
328
- * local ./.pryrc now loaded after ~/.pryrc if it exists
329
- * 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
330
- * new option Pry.config.exception_window_size determines window size for cat --ex
331
- * 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
332
- * Pry.config.system() defines how pry runs system commands
333
- * now injecting target_self method into command scope
334
- * play now performs 'show-input' always unless eval_string contains a valid expression (i.e it's about to be eval'd)
335
- * play and hist --replay now push the current input object onto the input_stack before redirecting input to a StringIO (works much better with pry-remote now)
336
-
337
- 8/9/2011 version 0.9.5
338
-
339
- MAJOR NEW FEATURES:
340
- - JRuby support, including show-method/edit-method and editor integration on both 1.8 and 1.9 versions
341
- - extended cd syntax: cd ../@x/y
342
- - play command now works much better with _in_ array (this is a very powerful feature, esp with Pry::NAV_PROMPT)
343
- - history saving/loading is now lightning fast
344
- - 'edit' (entered by itself) now opens current lines in input buffer in an editor, and evals on exit
345
- - 'edit' command is also, in general more intelligent
346
- - ls output no longer in array format, and colors can be configured, e.g: Pry.config.ls.ivar_color = :bright_blue
347
- - new switch-to command for moving around the binding stack without exiting out of sessions
348
- - more sophisticated prompts, Pry::NAV_PROMPT to ease deep spelunking of code
349
- - major bug fix for windows systems
350
- - much better support for huge objects, should no longer hang pry (see #245)
351
- - cat --ex and edit --ex now work better
352
-
353
- complete CHANGELOG:
354
- * tempfile should end in .rb (for edit -t)
355
- * ls output should not be in array format
356
- * fix history saving (should not save all of Readline::HISTORY, but only what changed)
357
- * prevent blank lines going to Readline::HISTORY (thanks cirwin!)
358
- * ensure that cat --ex emulates the `whereami` format - includes line numbers and formatted the same, etc
359
- * fixed bug #200 ( https://github.com/pry/pry/issues/200 )- string interpolation bug (thanks to ryanf)
360
- * show-doc and stat now display method visibility (update WIKI)
361
- * got rid of warnings caused by stricter ruby 1.9.3 rules
362
- * remove interpolation of command names and fix interpolation error messag (update WIKI) (thanks ryanf!)
363
- * 'nested sessions' now use binding stacks (so each instance manages its own collection of bindings without spawning other instances)
364
- * '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
365
- * added switch-to command (like jump-to but doesnt unwind the stack)
366
- * show-method and show-doc now accept multiple method names
367
- * control_d hook added (Pry.config.control_d_handler)
368
- * 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
369
- * can no longer interpolate command name itself e.g #{x}-#{y} where x = "show" and y = "doc"
370
- * ^C no longer captured
371
- * got rid of Pry.active_instance, Pry.last_exception and friends.
372
- * also special locals now shared among bindings in a pry instance (i.e _ex_ (and friends) re-injected into new binding entered with 'cd')
373
- * renamed inp and out to _in_ and _out_ (to avoid collisions with actual locals in debugging scope)
374
- * added third parameter to prompts, the pry instance itself (_pry) see https://github.com/pry/pry/issues/233 for why it's important
375
- * cd behaviour when no args performs the same as `cd /`
376
- * commands with keep_retval can now return nil (to suppress output now return 'void' instead)
377
- * Pry::CommandProcessor::Result introduced
378
- * Pry.view_clip() modified to be more robust and properly display Class#name
379
- * edit command when invoked with no args now works like edit -t
380
- * when edit is invoked (with no args or with -t) inside a multi-line expression input buffer, it dumps that buffer into a temp file and takes you to it
381
- * got rid of Pry#null_input? since all that was needed was eval_string.empty?
382
- * cd command now supports complex syntax: cd ../@y/y/../z
383
- * JRuby is no longer a 2nd class citizen, almost full JRuby support, passing 100% tests
384
- * added Pry::NAV_PROMPT (great new navigation prompt, per robgleeson) and Pry::SIMPLE_PRINT for simple (IRB-style) print output (just using inspect)
385
- * _pry_ now passed as 3rd parameter to :before_session hook
386
- * ls colors now configurable via Pry.config.ls.local_var_color = :bright_red etc
387
- * ls separator configurable via, e.g Pry.config.ls.separator = " "
388
- * Pry.view_clip() now only calls inspect on a few immediates, otherwise uses the #<> syntax, which has been truncated further to exclude teh mem address, again related to #245
389
-
390
- 27/7/2011 version 0.9.3
391
- * cat --ex (cats 5 lines above and below line in file where exception was raised)
392
- * edit --ex (edits line in file where exception was raised)
393
- * edit -t (opens a temporary file and evals it in current context when closed)
394
- * `pry -r` requires now happen after plugin loading (so as not to interfere with
395
- * new Pry.config.disable_auto_reload option, for turning off auto reloading by edit-method and related (thanks ryanf)
396
- * add better error messages for `cd` command
397
- * fixed exotic object regression - BasicObject.new etc now return "=> unknown"
398
- * added reload-method command (reloads the associated file of a method)
399
- * converted: import => import-set, version => pry-version, install => install-command
400
- * Pry.config.command_prefix support (thanks ryanf!)
401
- * fixed indentation for simple-prompt
402
- * hist command now excludes last line of input (the command invocation itself)
403
- * hist now has `history` alias
404
- * missing plugins no longer raise exception, just print a warning to $stderr
405
- * fixed jedit editor support
406
-
407
- 21/6/2011 version 0.9.2
408
- * fixed string interpolation bug (caused valid ruby code not to execute, sorry!)
409
- * fixed `ls` command, so it can properly display members of Object and classes, and BasicObject, etc
410
- * added a few git related commands to experimental command set, blame and diff
411
-
412
- 17/6/2011 version 0.9.0
413
- * plugin system
414
- * regex commands
415
- * show-method works on methods defined in REPL
416
- * new command system/API
417
- * rubinius core support
418
- * more backports to ruby 1.8
419
- * inp/out special locals
420
- * _ex_ backtrace navigation object (_ex_.line, _ex_.file)
421
- * readline history saving/loading
422
- * prompt stack
423
- * more hooks
424
- * amend-line
425
- * play
426
- * show-input
427
- * edit
428
- * much more comprehensive test suite
429
- * support for new and old rubygems API
430
- * changed -s behaviour of ls (now excludes Object methods)
431
- * removed eval-file, lls, lcd, and a few other commands
432
-
433
-
434
- 26/3/2011 version 0.7.6.1
435
- * added slightly better support for YARD
436
- * now @param and @return tags are colored green and markdown `code` is syntax highlighted using coderay
437
-
438
- 26/3/2011 version 0.7.6
439
- * `whereami` command now accepts parameter AROUND, to display AROUND lines on eitherside of invocation line.
440
- * made it so `whereami` is invoked even if no method exists in current context (i.e in rspec tests)
441
- * added rubinius support for `whereami` invocation in HOOKS by checking for __unknown__.rb rather than just <main>
442
-
443
- 15/3/2011 version 0.7.0
444
- * add pry-doc support with syntax highlighting for docs
445
- * add 'mj' option to ls (restrict to singleton methods)
446
- * add _ex_ local to hold last exception raised in an exception
447
-
448
- 6/3/2011 version 0.6.8
449
- * add whereami command, a la the `ir_b` gem
450
- * make whereami run at the start of every session
451
- * make .pryrc be loaded by run-time pry sessions
452
-
453
- 4/3/2011 version 0.6.7
454
- * color support
455
- * --simple-prompt for pry commandline
456
- * -I mode for pry commandline
457
- * --color mode for pry commandline
458
- * clean up requires (put them all in one place)
459
- * simple-prompt command and toggle-color commandd.
460
-
461
- 28/2/2011 version 0.6.3
462
- * Using MethodSource 0.3.4 so 1.8 show-method support provided
463
- * `Set` class added to list of classes that are inspected
464
-
465
- 26/2/2011 version 0.6.1
466
- * !@ command alias for exit_all
467
- * `cd /` for breaking out to pry top level (jump-to 0)
468
- * made `-e` option work in a more effective way for `pry` command line invocation
469
- * exit and exit-all commands now accept a parameter, this parameter becomes the return value of repl()
470
- * `command` method from CommandBase now accepts a :keep_retval arg that determines if command value is returned to pry session or just `nil` (`nil` was old behaviour)
471
- * tests for new :keep_retval and exit-all/exit behaviour; :keep_retval will remain undocumented.
472
-
473
- 22/2/2011 version 0.5.8
474
- * Added -c (context) option to show-doc, show-methods and eval-file
475
- * Fixed up ordering issue of -c and -r parameters to command line pry
476
-
477
- 21/2/2011 version 0.5.7
478
- * Added pry executable, auto-loads .pryrc in user's home directory, if it
479
- exists.
480
-
481
- 19/2/2011 version 0.5.5
482
- * Added Pry.run_command
483
- * More useful error messages
484
- * Easter eggs (game and cohen-poem)
485
-
486
- 17/2/2011 version 0.5.0
487
- * Use clipped version of Pry.view() for large objects
488
- * Exit Pry session on ^d
489
- * Use Shellwords for breaking up parameters to pry commands
490
- * Use OptionParser to parse options for default pry commands
491
- * Add version command
492
- * Refactor 'status' command: add current method info
493
- * Add meth_name_from_binding utility lambda to commands.rb
494
- * Add -M, -m, -v(erbose), -a(ll), -s(uper), -l(ocals), -i(ivars), -k(klass
495
- vars), etc options to ls
496
- * add -M(instance method) options to show-method and show-doc
497
- * add --help option to most commands
498
- * Get rid of ls_method and ls_imethods (subsumed by more powerful ls)
499
- * Get rid of show_idoc and show_imethod
500
- * Add special eval-file command that evals target file in current context
501
-
502
- 27/1/2011 version 0.4.5
503
- * fixed show_method (though fragile as it references __binding_impl__
504
- directly, making a name change to that method difficult
505
- 27/1/2011 version 0.4.4
506
- * oops, added examples/ directory
507
- 26/1/2011 version 0.4.3
508
- * added alias_command and desc methods to Pry::CommandBase
509
- * changed behaviour of ls_methods and ls_imethods to return sorted lists
510
- of methods
511
- 23/1/2011 version 0.4.1
512
- * made it so a 'def meth;end' in an object Pry session defines singleton
513
- methods, not methods on the class (except in the case of
514
- immediates)
515
- * reorganized documentation, moving customization to a separate wiki file
516
- * storing wiki in a nested git repo, as github wiki pages have their own
517
- repo
518
- * added more tests for new method definition behaviour
519
- 21/1/2011 version 0.4.0
520
- * added command API
521
- * added many new commands, i.e ls_methods and friends
522
- * modified other commands
523
- * now accepts greater customization, can modify: input, output, hooks,
524
- prompt, print object
525
- * added tab completion (even completes commands)
526
- * added extensive tests
527
- * added examples
528
- * many more changes
529
- 9/12/2010 version 0.1.3
530
- * Got rid of rubygems dependency, refactored some code.
531
- 8/12/2010 version 0.1.2
532
- * now rescuing SyntaxError as well as Racc::Parser error in valid_expression?
533
- 8/12/2010 version 0.1.0
534
- * release!
data/CONTRIBUTORS DELETED
@@ -1,55 +0,0 @@
1
- 1068 John Mair
2
- 372 Conrad Irwin
3
- 215 Ryan Fitzgerald
4
- 108 Kyrylo Silin
5
- 92 Rob Gleeson
6
- 54 Mon ouïe
7
- 51 Lee Jarvis
8
- 47 ☈king
9
- 40 Jordon Bedwell
10
- 28 Yorick Peterse
11
- 18 David Palm
12
- 18 Robert Gleeson
13
- 15 epitron
14
- 12 Andrew Vos
15
- 11 Reginald Tan
16
- 10 Matt Carey
17
- 8 Eero Saynatkari
18
- 8 Trey Lawrence
19
- 6 Jason Laster
20
- 3 misfo
21
- 3 fowlmouth
22
- 3 Darrick Wiebe
23
- 2 Kelsey Judson
24
- 2 Ben Langfeld
25
- 2 Bram Swenson
26
- 2 Erik Michaels-Ober
27
- 2 Ingrid
28
- 2 Vít Ondruch
29
- 2 Xavier Shay
30
- 2 Jonathan Soeder
31
- 2 Eric Christopherson
32
- 2 robgleeson
33
- 1 Ben Pickles
34
- 1 Zeh Rizzatti
35
- 1 shirmung
36
- 1 sonnym
37
- 1 Shawn Anderson
38
- 1 Joe Peduto
39
- 1 Greg Stearns
40
- 1 Jonathan Jackson
41
- 1 Jordan Running
42
- 1 Gosha Arinich
43
- 1 Josh Cheek
44
- 1 Kirill Lashuk
45
- 1 Gerbert Olivé
46
- 1 Larry Gilbert
47
- 1 Lars Haugseth
48
- 1 Loic Nageleisen
49
- 1 Matthew Carey
50
- 1 Michael Bensoussan
51
- 1 Renato Mascarenhas
52
- 1 Havenwood
53
- 1 Sherin C
54
- 1 Sonali Sridhar
55
- 1 Tim Pope
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source :rubygems
2
- gemspec
3
-
4
- # For Guard
5
- group :development do
6
- gem 'jist'
7
- gem 'rb-inotify', :require => 'false'
8
- gem 'rb-fsevent', :require => 'false'
9
- end
data/Guardfile DELETED
@@ -1,62 +0,0 @@
1
- require 'guard/guard'
2
-
3
- module ::Guard
4
- class Bacon < Guard
5
- def run_all
6
- system "rake spec"
7
- puts
8
- true
9
- end
10
-
11
- def run_on_changes(paths)
12
- paths.delete('some_lib')
13
- puts "Running: #{paths.join ' '}"
14
- if paths.size.zero?
15
- warn 'Running all tests'
16
- system 'rake recspec'
17
- else
18
- paths.each do |path|
19
- warn "Running #{path}"
20
- system "rake spec run=#{path}" or return
21
- warn "\e[32;1mNice!!\e[0m Now running all specs, just to be sure."
22
- run_all
23
- end
24
- end
25
- end
26
- end
27
- end
28
-
29
- guard 'bacon' do
30
- def deduce_spec_from(token)
31
- %W(
32
- spec/#{token}_spec.rb
33
- spec/pry_#{token}_spec.rb
34
- spec/commands/#{token}_spec.rb
35
- ).each do |e|
36
- return e if File.exists? e
37
- end
38
- nil
39
- end
40
-
41
- Dir['lib/pry/**/*.rb'].each do |rb|
42
- rb[%r(lib/pry/(.+)\.rb$)]
43
- spec_rb = deduce_spec_from($1)
44
- if spec_rb
45
- # run as 'bundle exec guard -d' to see these.
46
- ::Guard::UI.debug "'#{rb}' maps to '#{spec_rb}'"
47
- else
48
- ::Guard::UI.debug "No map, so run all for: '#{rb}'"
49
- end
50
- next unless spec_rb
51
- watch(rb) do |m| spec_rb end
52
- end
53
-
54
- watch(%r{^lib/.+\.rb$}) do |m|
55
- return if deduce_spec_from(m[0])
56
- 'some_lib'
57
- end
58
-
59
- watch(%r{^spec/.+\.rb$}) do |m| m end
60
- end
61
-
62
- # vim:ft=ruby