chess_engine 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +21 -0
  4. data/README.md +26 -0
  5. data/chess_engine.gemspec +14 -0
  6. data/lib/chess_engine/board.rb +95 -0
  7. data/lib/chess_engine/cli.rb +105 -0
  8. data/lib/chess_engine/game.rb +148 -0
  9. data/lib/chess_engine/input.rb +19 -0
  10. data/lib/chess_engine/move.rb +35 -0
  11. data/lib/chess_engine/piece.rb +97 -0
  12. data/lib/chess_engine/validator.rb +87 -0
  13. data/lib/chess_engine.rb +1 -0
  14. data/spec/board_spec.rb +70 -0
  15. data/spec/game_helper.rb +5 -0
  16. data/spec/game_spec.rb +79 -0
  17. data/spec/spec_helper.rb +100 -0
  18. data/spec/validator_spec.rb +26 -0
  19. data/vendor/bundle/bin/coderay +27 -0
  20. data/vendor/bundle/bin/pry +27 -0
  21. data/vendor/bundle/cache/coderay-1.1.2.gem +0 -0
  22. data/vendor/bundle/cache/colorize-0.8.1.gem +0 -0
  23. data/vendor/bundle/cache/method_source-0.9.2.gem +0 -0
  24. data/vendor/bundle/cache/pry-0.12.2.gem +0 -0
  25. data/vendor/bundle/cache/rb-readline-0.5.5.gem +0 -0
  26. data/vendor/bundle/gems/coderay-1.1.2/MIT-LICENSE +22 -0
  27. data/vendor/bundle/gems/coderay-1.1.2/README_INDEX.rdoc +123 -0
  28. data/vendor/bundle/gems/coderay-1.1.2/bin/coderay +215 -0
  29. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/duo.rb +81 -0
  30. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +17 -0
  31. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +25 -0
  32. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +39 -0
  33. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +49 -0
  34. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +63 -0
  35. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +23 -0
  36. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +190 -0
  37. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +58 -0
  38. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +65 -0
  39. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +108 -0
  40. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +166 -0
  41. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +333 -0
  42. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +83 -0
  43. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +45 -0
  44. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +59 -0
  45. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +18 -0
  46. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +24 -0
  47. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +23 -0
  48. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +95 -0
  49. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +195 -0
  50. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +46 -0
  51. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +111 -0
  52. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +72 -0
  53. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +50 -0
  54. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders.rb +18 -0
  55. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +95 -0
  56. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +151 -0
  57. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +55 -0
  58. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +221 -0
  59. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +72 -0
  60. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +24 -0
  61. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +189 -0
  62. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +217 -0
  63. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +217 -0
  64. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +196 -0
  65. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +75 -0
  66. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +144 -0
  67. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +221 -0
  68. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +81 -0
  69. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +208 -0
  70. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +268 -0
  71. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +168 -0
  72. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +275 -0
  73. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +421 -0
  74. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +174 -0
  75. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +237 -0
  76. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +98 -0
  77. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +280 -0
  78. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +527 -0
  79. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +287 -0
  80. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +75 -0
  81. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +178 -0
  82. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +79 -0
  83. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +477 -0
  84. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +232 -0
  85. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +337 -0
  86. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +169 -0
  87. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +36 -0
  88. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +26 -0
  89. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +17 -0
  90. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +140 -0
  91. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners.rb +27 -0
  92. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +7 -0
  93. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +153 -0
  94. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/style.rb +18 -0
  95. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles.rb +15 -0
  96. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +85 -0
  97. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens.rb +161 -0
  98. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +55 -0
  99. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/version.rb +3 -0
  100. data/vendor/bundle/gems/coderay-1.1.2/lib/coderay.rb +284 -0
  101. data/vendor/bundle/gems/colorize-0.8.1/CHANGELOG +65 -0
  102. data/vendor/bundle/gems/colorize-0.8.1/LICENSE +339 -0
  103. data/vendor/bundle/gems/colorize-0.8.1/README.md +105 -0
  104. data/vendor/bundle/gems/colorize-0.8.1/Rakefile +13 -0
  105. data/vendor/bundle/gems/colorize-0.8.1/colorize.gemspec +36 -0
  106. data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/class_methods.rb +120 -0
  107. data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/instance_methods.rb +132 -0
  108. data/vendor/bundle/gems/colorize-0.8.1/lib/colorize.rb +12 -0
  109. data/vendor/bundle/gems/colorize-0.8.1/lib/colorized_string.rb +19 -0
  110. data/vendor/bundle/gems/colorize-0.8.1/test/test_colorize.rb +164 -0
  111. data/vendor/bundle/gems/method_source-0.9.2/Gemfile +2 -0
  112. data/vendor/bundle/gems/method_source-0.9.2/LICENSE +25 -0
  113. data/vendor/bundle/gems/method_source-0.9.2/README.markdown +91 -0
  114. data/vendor/bundle/gems/method_source-0.9.2/Rakefile +81 -0
  115. data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/code_helpers.rb +154 -0
  116. data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/source_location.rb +138 -0
  117. data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/version.rb +3 -0
  118. data/vendor/bundle/gems/method_source-0.9.2/lib/method_source.rb +141 -0
  119. data/vendor/bundle/gems/method_source-0.9.2/method_source.gemspec +35 -0
  120. data/vendor/bundle/gems/method_source-0.9.2/spec/method_source/code_helpers_spec.rb +43 -0
  121. data/vendor/bundle/gems/method_source-0.9.2/spec/method_source_spec.rb +143 -0
  122. data/vendor/bundle/gems/method_source-0.9.2/spec/spec_helper.rb +101 -0
  123. data/vendor/bundle/gems/pry-0.12.2/CHANGELOG.md +953 -0
  124. data/vendor/bundle/gems/pry-0.12.2/LICENSE +25 -0
  125. data/vendor/bundle/gems/pry-0.12.2/README.md +390 -0
  126. data/vendor/bundle/gems/pry-0.12.2/bin/pry +8 -0
  127. data/vendor/bundle/gems/pry-0.12.2/lib/pry/basic_object.rb +6 -0
  128. data/vendor/bundle/gems/pry-0.12.2/lib/pry/cli.rb +218 -0
  129. data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_file.rb +110 -0
  130. data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_range.rb +71 -0
  131. data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/loc.rb +98 -0
  132. data/vendor/bundle/gems/pry-0.12.2/lib/pry/code.rb +353 -0
  133. data/vendor/bundle/gems/pry-0.12.2/lib/pry/code_object.rb +195 -0
  134. data/vendor/bundle/gems/pry-0.12.2/lib/pry/color_printer.rb +65 -0
  135. data/vendor/bundle/gems/pry-0.12.2/lib/pry/command.rb +723 -0
  136. data/vendor/bundle/gems/pry-0.12.2/lib/pry/command_set.rb +415 -0
  137. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/amend_line.rb +98 -0
  138. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang.rb +20 -0
  139. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang_pry.rb +17 -0
  140. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/abstract_formatter.rb +27 -0
  141. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/exception_formatter.rb +79 -0
  142. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/file_formatter.rb +71 -0
  143. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/input_expression_formatter.rb +43 -0
  144. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat.rb +63 -0
  145. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cd.rb +41 -0
  146. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_inspector.rb +27 -0
  147. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_prompt.rb +46 -0
  148. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/clear_screen.rb +14 -0
  149. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/code_collector.rb +167 -0
  150. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disable_pry.rb +27 -0
  151. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disabled_commands.rb +2 -0
  152. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/easter_eggs.rb +112 -0
  153. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/exception_patcher.rb +25 -0
  154. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/file_and_line_locator.rb +36 -0
  155. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit.rb +200 -0
  156. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit.rb +43 -0
  157. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_all.rb +29 -0
  158. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_program.rb +23 -0
  159. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/find_method.rb +191 -0
  160. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/fix_indent.rb +19 -0
  161. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_cd.rb +26 -0
  162. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_install.rb +32 -0
  163. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_list.rb +33 -0
  164. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_open.rb +29 -0
  165. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_readme.rb +25 -0
  166. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_search.rb +40 -0
  167. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_stats.rb +83 -0
  168. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gist.rb +102 -0
  169. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/help.rb +164 -0
  170. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/hist.rb +181 -0
  171. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/import_set.rb +23 -0
  172. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/install_command.rb +54 -0
  173. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/jump_to.rb +29 -0
  174. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/list_inspectors.rb +35 -0
  175. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/constants.rb +58 -0
  176. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/formatter.rb +51 -0
  177. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/globals.rb +46 -0
  178. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/grep.rb +19 -0
  179. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/instance_vars.rb +38 -0
  180. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/interrogatable.rb +18 -0
  181. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/jruby_hacks.rb +49 -0
  182. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_names.rb +33 -0
  183. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_vars.rb +37 -0
  184. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/ls_entity.rb +69 -0
  185. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods.rb +54 -0
  186. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods_helper.rb +46 -0
  187. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/self_methods.rb +33 -0
  188. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls.rb +113 -0
  189. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/nesting.rb +25 -0
  190. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/play.rb +102 -0
  191. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_backtrace.rb +25 -0
  192. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_version.rb +17 -0
  193. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/raise_up.rb +33 -0
  194. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reload_code.rb +62 -0
  195. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reset.rb +18 -0
  196. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ri.rb +65 -0
  197. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/save_file.rb +61 -0
  198. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_command.rb +75 -0
  199. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_mode.rb +25 -0
  200. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_doc.rb +81 -0
  201. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_info.rb +216 -0
  202. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_input.rb +17 -0
  203. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_source.rb +53 -0
  204. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/stat.rb +40 -0
  205. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/switch_to.rb +23 -0
  206. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/toggle_color.rb +24 -0
  207. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression/expression.rb +38 -0
  208. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression.rb +107 -0
  209. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb +197 -0
  210. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/wtf.rb +70 -0
  211. data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands.rb +6 -0
  212. data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/behavior.rb +255 -0
  213. data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/convenience.rb +28 -0
  214. data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/default.rb +159 -0
  215. data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/memoization.rb +48 -0
  216. data/vendor/bundle/gems/pry-0.12.2/lib/pry/config.rb +35 -0
  217. data/vendor/bundle/gems/pry-0.12.2/lib/pry/core_extensions.rb +142 -0
  218. data/vendor/bundle/gems/pry-0.12.2/lib/pry/editor.rb +128 -0
  219. data/vendor/bundle/gems/pry-0.12.2/lib/pry/exceptions.rb +76 -0
  220. data/vendor/bundle/gems/pry-0.12.2/lib/pry/forwardable.rb +23 -0
  221. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/base_helpers.rb +200 -0
  222. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/command_helpers.rb +157 -0
  223. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/documentation_helpers.rb +76 -0
  224. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/options_helpers.rb +27 -0
  225. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/platform.rb +58 -0
  226. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/table.rb +114 -0
  227. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/text.rb +115 -0
  228. data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers.rb +6 -0
  229. data/vendor/bundle/gems/pry-0.12.2/lib/pry/history.rb +161 -0
  230. data/vendor/bundle/gems/pry-0.12.2/lib/pry/hooks.rb +171 -0
  231. data/vendor/bundle/gems/pry-0.12.2/lib/pry/indent.rb +408 -0
  232. data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_completer.rb +265 -0
  233. data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_lock.rb +130 -0
  234. data/vendor/bundle/gems/pry-0.12.2/lib/pry/inspector.rb +27 -0
  235. data/vendor/bundle/gems/pry-0.12.2/lib/pry/last_exception.rb +61 -0
  236. data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/disowned.rb +55 -0
  237. data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/patcher.rb +122 -0
  238. data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb +198 -0
  239. data/vendor/bundle/gems/pry-0.12.2/lib/pry/method.rb +552 -0
  240. data/vendor/bundle/gems/pry-0.12.2/lib/pry/object_path.rb +83 -0
  241. data/vendor/bundle/gems/pry-0.12.2/lib/pry/output.rb +50 -0
  242. data/vendor/bundle/gems/pry-0.12.2/lib/pry/pager.rb +250 -0
  243. data/vendor/bundle/gems/pry-0.12.2/lib/pry/platform.rb +91 -0
  244. data/vendor/bundle/gems/pry-0.12.2/lib/pry/plugins.rb +122 -0
  245. data/vendor/bundle/gems/pry-0.12.2/lib/pry/prompt.rb +145 -0
  246. data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_class.rb +425 -0
  247. data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_instance.rb +699 -0
  248. data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl.rb +261 -0
  249. data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl_file_loader.rb +73 -0
  250. data/vendor/bundle/gems/pry-0.12.2/lib/pry/ring.rb +84 -0
  251. data/vendor/bundle/gems/pry-0.12.2/lib/pry/rubygem.rb +84 -0
  252. data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/LICENSE +20 -0
  253. data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/commands.rb +195 -0
  254. data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/option.rb +206 -0
  255. data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop.rb +661 -0
  256. data/vendor/bundle/gems/pry-0.12.2/lib/pry/terminal.rb +91 -0
  257. data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb +15 -0
  258. data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/mockable.rb +14 -0
  259. data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/pry_tester.rb +73 -0
  260. data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/utility.rb +26 -0
  261. data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/variables.rb +46 -0
  262. data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable.rb +70 -0
  263. data/vendor/bundle/gems/pry-0.12.2/lib/pry/version.rb +3 -0
  264. data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module/candidate.rb +131 -0
  265. data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module.rb +378 -0
  266. data/vendor/bundle/gems/pry-0.12.2/lib/pry.rb +132 -0
  267. data/vendor/bundle/gems/rb-readline-0.5.5/CHANGES +94 -0
  268. data/vendor/bundle/gems/rb-readline-0.5.5/LICENSE +25 -0
  269. data/vendor/bundle/gems/rb-readline-0.5.5/README.md +81 -0
  270. data/vendor/bundle/gems/rb-readline-0.5.5/Rakefile +25 -0
  271. data/vendor/bundle/gems/rb-readline-0.5.5/bench/_rl_adjust_point.rb +26 -0
  272. data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline.rb +8 -0
  273. data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline_with_completion.rb +18 -0
  274. data/vendor/bundle/gems/rb-readline-0.5.5/examples/tinyirb.rb +11 -0
  275. data/vendor/bundle/gems/rb-readline-0.5.5/lib/rb-readline.rb +18 -0
  276. data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline/version.rb +3 -0
  277. data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline.rb +8920 -0
  278. data/vendor/bundle/gems/rb-readline-0.5.5/lib/readline.rb +539 -0
  279. data/vendor/bundle/gems/rb-readline-0.5.5/rb-readline.gemspec +51 -0
  280. data/vendor/bundle/gems/rb-readline-0.5.5/setup.rb +1585 -0
  281. data/vendor/bundle/gems/rb-readline-0.5.5/test/support/filesystem_completion_helper.rb +53 -0
  282. data/vendor/bundle/gems/rb-readline-0.5.5/test/test_completion.rb +100 -0
  283. data/vendor/bundle/gems/rb-readline-0.5.5/test/test_filename_completion_proc.rb +88 -0
  284. data/vendor/bundle/gems/rb-readline-0.5.5/test/test_history.rb +29 -0
  285. data/vendor/bundle/gems/rb-readline-0.5.5/test/test_rbreadline.rb +23 -0
  286. data/vendor/bundle/gems/rb-readline-0.5.5/test/test_readline.rb +221 -0
  287. data/vendor/bundle/specifications/coderay-1.1.2.gemspec +26 -0
  288. data/vendor/bundle/specifications/colorize-0.8.1.gemspec +38 -0
  289. data/vendor/bundle/specifications/method_source-0.9.2.gemspec +35 -0
  290. data/vendor/bundle/specifications/pry-0.12.2.gemspec +38 -0
  291. data/vendor/bundle/specifications/rb-readline-0.5.5.gemspec +39 -0
  292. metadata +363 -0
@@ -0,0 +1,216 @@
1
+ class Pry
2
+ class Command::ShowInfo < Pry::ClassCommand
3
+ extend Pry::Helpers::BaseHelpers
4
+
5
+ command_options shellwords: false, interpolate: false
6
+
7
+ def initialize(*)
8
+ super
9
+
10
+ @used_super = nil
11
+ end
12
+
13
+ def options(opt)
14
+ opt.on :s, :super, "Select the 'super' method. Can be repeated to traverse the ancestors", as: :count
15
+ opt.on :l, "line-numbers", "Show line numbers"
16
+ opt.on :b, "base-one", "Show line numbers but start numbering at 1 (useful for `amend-line` and `play` commands)"
17
+ opt.on :a, :all, "Show all definitions and monkeypatches of the module/class"
18
+ end
19
+
20
+ def process
21
+ code_object = Pry::CodeObject.lookup(obj_name, _pry_, super: opts[:super])
22
+ raise CommandError, no_definition_message if !code_object
23
+
24
+ @original_code_object = code_object
25
+
26
+ if !obj_name && code_object.c_module? && !opts[:all]
27
+ result = "Warning: You're inside an object, whose class is defined by means\n" +
28
+ " of the C Ruby API. Pry cannot display the information for\n" +
29
+ " this class."
30
+ if code_object.candidates.any?
31
+ result += "\n However, you can view monkey-patches applied to this class.\n" +
32
+ " Just execute the same command with the '--all' switch."
33
+ end
34
+ elsif show_all_modules?(code_object)
35
+ # show all monkey patches for a module
36
+
37
+ result = content_and_headers_for_all_module_candidates(code_object)
38
+ else
39
+ # show a specific code object
40
+ co = code_object_with_accessible_source(code_object)
41
+ result = content_and_header_for_code_object(co)
42
+ end
43
+
44
+ set_file_and_dir_locals(code_object.source_file)
45
+ _pry_.pager.page result
46
+ end
47
+
48
+ # This method checks whether the `code_object` is a WrappedModule,
49
+ # if it is, then it returns the first candidate (monkeypatch) with
50
+ # accessible source (or docs). If `code_object` is not a WrappedModule (i.e a
51
+ # method or a command) then the `code_object` itself is just
52
+ # returned.
53
+ #
54
+ # @return [Pry::WrappedModule, Pry::Method, Pry::Command]
55
+ def code_object_with_accessible_source(code_object)
56
+ if code_object.is_a?(WrappedModule)
57
+ candidate = code_object.candidates.find(&:source)
58
+ if candidate
59
+ return candidate
60
+ else
61
+ raise CommandError, no_definition_message if !valid_superclass?(code_object)
62
+
63
+ @used_super = true
64
+ code_object_with_accessible_source(code_object.super)
65
+ end
66
+ else
67
+ code_object
68
+ end
69
+ end
70
+
71
+ def valid_superclass?(code_object)
72
+ code_object.super && code_object.super.wrapped != Object
73
+ end
74
+
75
+ def content_and_header_for_code_object(code_object)
76
+ header(code_object) << content_for(code_object)
77
+ end
78
+
79
+ def content_and_headers_for_all_module_candidates(mod)
80
+ result = "Found #{mod.number_of_candidates} candidates for `#{mod.name}` definition:\n"
81
+ mod.number_of_candidates.times do |v|
82
+ candidate = mod.candidate(v)
83
+ begin
84
+ result << "\nCandidate #{v + 1}/#{mod.number_of_candidates}: #{candidate.source_file} @ line #{candidate.source_line}:\n"
85
+ content = content_for(candidate)
86
+
87
+ result << "Number of lines: #{content.lines.count}\n\n" << content
88
+ rescue Pry::RescuableException
89
+ result << "\nNo content found.\n"
90
+ next
91
+ end
92
+ end
93
+ result
94
+ end
95
+
96
+ def no_definition_message
97
+ "Couldn't locate a definition for #{obj_name}"
98
+ end
99
+
100
+ # Generate a header (meta-data information) for all the code
101
+ # object types: methods, modules, commands, procs...
102
+ def header(code_object)
103
+ file_name, line_num = file_and_line_for(code_object)
104
+ content = content_for(code_object)
105
+
106
+ h = "\n#{bold('From:')} #{file_name} "
107
+ h << code_object_header(code_object, line_num)
108
+ h << "\n#{bold('Number of lines:')} " << "#{content.lines.count}\n\n"
109
+ h << bold('** Warning:') << " Cannot find code for #{@original_code_object.nonblank_name}. Showing superclass #{code_object.nonblank_name} instead. **\n\n" if @used_super
110
+
111
+ if content.lines.none?
112
+ h << bold('** Warning:') << " Cannot find code for '#{code_object.name}' (source_location is nil)"
113
+ end
114
+
115
+ h
116
+ end
117
+
118
+ def code_object_header(code_object, line_num)
119
+ if code_object.real_method_object?
120
+ method_header(code_object, line_num)
121
+
122
+ # It sucks we have to test for both Pry::WrappedModule and WrappedModule::Candidate,
123
+ # probably indicates a deep refactor needs to happen in those classes.
124
+ elsif code_object.is_a?(Pry::WrappedModule) || code_object.is_a?(Pry::WrappedModule::Candidate)
125
+ module_header(code_object, line_num)
126
+ else
127
+ ""
128
+ end
129
+ end
130
+
131
+ def method_header(code_object, line_num)
132
+ h = ""
133
+ h << (code_object.c_method? ? "(C Method):" : "@ line #{line_num}:")
134
+ h << method_sections(code_object)[:owner]
135
+ h << method_sections(code_object)[:visibility]
136
+ h << method_sections(code_object)[:signature]
137
+ h
138
+ end
139
+
140
+ def module_header(code_object, line_num)
141
+ h = ""
142
+ h << "@ line #{line_num}:\n"
143
+ h << bold(code_object.module? ? "Module" : "Class")
144
+ h << " #{bold('name:')} #{code_object.nonblank_name}"
145
+
146
+ if code_object.number_of_candidates > 1
147
+ h << (bold("\nNumber of monkeypatches: ") << code_object.number_of_candidates.to_s)
148
+ h << ". Use the `-a` option to display all available monkeypatches"
149
+ end
150
+ h
151
+ end
152
+
153
+ def method_sections(code_object)
154
+ {
155
+ owner: "\n#{bold("Owner:")} #{code_object.owner || "N/A"}\n",
156
+ visibility: "#{bold("Visibility:")} #{code_object.visibility}",
157
+ signature: "\n#{bold("Signature:")} #{code_object.signature}"
158
+ }.merge(header_options) { |key, old, new| (new && old).to_s }
159
+ end
160
+
161
+ def header_options
162
+ {
163
+ owner: true,
164
+ visibility: true,
165
+ signature: nil
166
+ }
167
+ end
168
+
169
+ def show_all_modules?(code_object)
170
+ code_object.is_a?(Pry::WrappedModule) && opts.present?(:all)
171
+ end
172
+
173
+ def obj_name
174
+ @obj_name ||= args.empty? ? nil : args.join(' ')
175
+ end
176
+
177
+ def use_line_numbers?
178
+ opts.present?(:b) || opts.present?(:l)
179
+ end
180
+
181
+ def start_line_for(code_object)
182
+ if opts.present?(:'base-one')
183
+ 1
184
+ else
185
+ code_object.source_line || 1
186
+ end
187
+ end
188
+
189
+ # takes into account possible yard docs, and returns yard_file / yard_line
190
+ # Also adjusts for start line of comments (using start_line_for), which it has to infer
191
+ # by subtracting number of lines of comment from start line of code_object
192
+ def file_and_line_for(code_object)
193
+ if code_object.module_with_yard_docs?
194
+ [code_object.yard_file, code_object.yard_line]
195
+ else
196
+ [code_object.source_file, start_line_for(code_object)]
197
+ end
198
+ end
199
+
200
+ def complete(input)
201
+ if input =~ /([^ ]*)#([a-z0-9_]*)\z/
202
+ prefix, search = [$1, $2]
203
+ methods = begin
204
+ Pry::Method.all_from_class(binding.eval(prefix))
205
+ rescue RescuableException
206
+ return super
207
+ end
208
+ methods.map do |method|
209
+ [prefix, method.name].join('#') if method.name.start_with?(search)
210
+ end.compact
211
+ else
212
+ super
213
+ end
214
+ end
215
+ end
216
+ end
@@ -0,0 +1,17 @@
1
+ class Pry
2
+ class Command::ShowInput < Pry::ClassCommand
3
+ match 'show-input'
4
+ group 'Editing'
5
+ description 'Show the contents of the input buffer for the current multi-line expression.'
6
+
7
+ banner <<-'BANNER'
8
+ Show the contents of the input buffer for the current multi-line expression.
9
+ BANNER
10
+
11
+ def process
12
+ output.puts Code.new(eval_string).with_line_numbers
13
+ end
14
+ end
15
+
16
+ Pry::Commands.add_command(Pry::Command::ShowInput)
17
+ end
@@ -0,0 +1,53 @@
1
+ require 'pry/commands/show_info'
2
+
3
+ class Pry
4
+ class Command::ShowSource < Command::ShowInfo
5
+ match 'show-source'
6
+ group 'Introspection'
7
+ description 'Show the source for a method or class.'
8
+
9
+ banner <<-'BANNER'
10
+ Usage: show-source [OPTIONS] [METH|CLASS]
11
+ Aliases: $, show-method
12
+
13
+ Show the source for a method or class. Tries instance methods first and then
14
+ methods by default.
15
+
16
+ show-source hi_method
17
+ show-source hi_method
18
+ show-source Pry#rep # source for Pry#rep method
19
+ show-source Pry # for Pry class
20
+ show-source Pry -a # for all Pry class definitions (all monkey patches)
21
+ show-source Pry.foo -e # for class of the return value of expression `Pry.foo`
22
+ show-source Pry --super # for superclass of Pry (Object class)
23
+
24
+ https://github.com/pry/pry/wiki/Source-browsing#wiki-Show_method
25
+ BANNER
26
+
27
+ def options(opt)
28
+ opt.on :e, :eval, "evaluate the command's argument as a ruby expression and show the class its return value"
29
+ super(opt)
30
+ end
31
+
32
+ def process
33
+ if opts.present?(:e)
34
+ obj = target.eval(args.first)
35
+ self.args = Array.new(1) { Module === obj ? obj.name : obj.class.name }
36
+ end
37
+ super
38
+ end
39
+
40
+ # The source for code_object prepared for display.
41
+ def content_for(code_object)
42
+ code = Code.new(
43
+ code_object.source || [],
44
+ start_line_for(code_object)
45
+ )
46
+ code.with_line_numbers(use_line_numbers?).highlighted
47
+ end
48
+ end
49
+
50
+ Pry::Commands.add_command(Pry::Command::ShowSource)
51
+ Pry::Commands.alias_command 'show-method', 'show-source'
52
+ Pry::Commands.alias_command '$', 'show-source'
53
+ end
@@ -0,0 +1,40 @@
1
+ class Pry
2
+ class Command::Stat < Pry::ClassCommand
3
+ match 'stat'
4
+ group 'Introspection'
5
+ description 'View method information and set _file_ and _dir_ locals.'
6
+ command_options shellwords: false
7
+
8
+ banner <<-'BANNER'
9
+ Usage: stat [OPTIONS] [METH]
10
+
11
+ Show method information for method METH and set _file_ and _dir_ locals.
12
+
13
+ stat hello_method
14
+ BANNER
15
+
16
+ def options(opt)
17
+ method_options(opt)
18
+ end
19
+
20
+ def process
21
+ meth = method_object
22
+ aliases = meth.aliases
23
+
24
+ output.puts unindent <<-EOS
25
+ Method Information:
26
+ --
27
+ Name: #{meth.name}
28
+ Alias#{ "es" if aliases.length > 1 }: #{ aliases.any? ? aliases.join(", ") : "None." }
29
+ Owner: #{meth.owner ? meth.owner : "Unknown"}
30
+ Visibility: #{meth.visibility}
31
+ Type: #{meth.is_a?(::Method) ? "Bound" : "Unbound"}
32
+ Arity: #{meth.arity}
33
+ Method Signature: #{meth.signature}
34
+ Source Location: #{meth.source_location ? meth.source_location.join(":") : "Not found."}
35
+ EOS
36
+ end
37
+ end
38
+
39
+ Pry::Commands.add_command(Pry::Command::Stat)
40
+ end
@@ -0,0 +1,23 @@
1
+ class Pry
2
+ class Command::SwitchTo < Pry::ClassCommand
3
+ match 'switch-to'
4
+ group 'Navigating Pry'
5
+ description 'Start a new subsession on a binding in the current stack.'
6
+
7
+ banner <<-'BANNER'
8
+ Start a new subsession on a binding in the current stack (numbered by nesting).
9
+ BANNER
10
+
11
+ def process(selection)
12
+ selection = selection.to_i
13
+
14
+ if selection < 0 || selection > _pry_.binding_stack.size - 1
15
+ raise CommandError, "Invalid binding index #{selection} - use `nesting` command to view valid indices."
16
+ else
17
+ Pry.start(_pry_.binding_stack[selection])
18
+ end
19
+ end
20
+ end
21
+
22
+ Pry::Commands.add_command(Pry::Command::SwitchTo)
23
+ end
@@ -0,0 +1,24 @@
1
+ class Pry
2
+ class Command::ToggleColor < Pry::ClassCommand
3
+ match 'toggle-color'
4
+ group 'Misc'
5
+ description 'Toggle syntax highlighting.'
6
+
7
+ banner <<-'BANNER'
8
+ Usage: toggle-color
9
+
10
+ Toggle syntax highlighting.
11
+ BANNER
12
+
13
+ def process
14
+ _pry_.color = color_toggle
15
+ output.puts "Syntax highlighting #{_pry_.color ? "on" : "off"}"
16
+ end
17
+
18
+ def color_toggle
19
+ !_pry_.color
20
+ end
21
+
22
+ Pry::Commands.add_command(self)
23
+ end
24
+ end
@@ -0,0 +1,38 @@
1
+ class Pry
2
+ class Command::WatchExpression
3
+ class Expression
4
+ attr_reader :target, :source, :value, :previous_value, :_pry_
5
+
6
+ def initialize(_pry_, target, source)
7
+ @_pry_ = _pry_
8
+ @target = target
9
+ @source = Code.new(source).strip
10
+ end
11
+
12
+ def eval!
13
+ @previous_value = value
14
+ @value = Pry::ColorPrinter.pp(target_eval(target, source), "")
15
+ end
16
+
17
+ def to_s
18
+ "#{Code.new(source).highlighted.strip} => #{value}"
19
+ end
20
+
21
+ # Has the value of the expression changed?
22
+ #
23
+ # We use the pretty-printed string represenation to detect differences
24
+ # as this avoids problems with dup (causes too many differences) and == (causes too few)
25
+ def changed?
26
+ (value != previous_value)
27
+ end
28
+
29
+ private
30
+
31
+ def target_eval(target, source)
32
+ target.eval(source)
33
+ rescue => e
34
+ e
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,107 @@
1
+ class Pry
2
+ class Command::WatchExpression < Pry::ClassCommand
3
+ require 'pry/commands/watch_expression/expression.rb'
4
+
5
+ match 'watch'
6
+ group 'Context'
7
+ description 'Watch the value of an expression and print a notification whenever it changes.'
8
+ command_options use_prefix: false
9
+
10
+ banner <<-'BANNER'
11
+ Usage: watch [EXPRESSION]
12
+ watch
13
+ watch --delete [INDEX]
14
+
15
+ watch [EXPRESSION] adds an expression to the list of those being watched.
16
+ It will be re-evaluated every time you hit enter in pry. If its value has
17
+ changed, the new value will be printed to the console.
18
+
19
+ This is useful if you are step-through debugging and want to see how
20
+ something changes over time. It's also useful if you're trying to write
21
+ a method inside pry and want to check that it gives the right answers
22
+ every time you redefine it.
23
+
24
+ watch on its own displays all the currently watched expressions and their
25
+ values, and watch --delete [INDEX] allows you to delete expressions from
26
+ the list being watched.
27
+ BANNER
28
+
29
+ def options(opt)
30
+ opt.on :d, :delete,
31
+ "Delete the watch expression with the given index. If no index is given; clear all watch expressions.",
32
+ optional_argument: true, as: Integer
33
+ opt.on :l, :list,
34
+ "Show all current watch expressions and their values. Calling watch with no expressions or options will also show the watch expressions."
35
+ end
36
+
37
+ def process
38
+ case
39
+ when opts.present?(:delete)
40
+ delete opts[:delete]
41
+ when opts.present?(:list) || args.empty?
42
+ list
43
+ else
44
+ add_hook
45
+ add_expression(args)
46
+ end
47
+ end
48
+
49
+ private
50
+
51
+ def expressions
52
+ _pry_.config.watch_expressions ||= []
53
+ end
54
+
55
+ def delete(index)
56
+ if index
57
+ output.puts "Deleting watch expression ##{index}: #{expressions[index - 1]}"
58
+ expressions.delete_at(index - 1)
59
+ else
60
+ output.puts "Deleting all watched expressions"
61
+ expressions.clear
62
+ end
63
+ end
64
+
65
+ def list
66
+ if expressions.empty?
67
+ output.puts "No watched expressions"
68
+ else
69
+ _pry_.pager.open do |pager|
70
+ pager.puts "Listing all watched expressions:"
71
+ pager.puts ""
72
+ expressions.each_with_index do |expr, index|
73
+ pager.print with_line_numbers(expr.to_s, index + 1)
74
+ end
75
+ pager.puts ""
76
+ end
77
+ end
78
+ end
79
+
80
+ def eval_and_print_changed(output)
81
+ expressions.each do |expr|
82
+ expr.eval!
83
+ if expr.changed?
84
+ output.puts "#{blue "watch"}: #{expr}"
85
+ end
86
+ end
87
+ end
88
+
89
+ # TODO: fix arguments.
90
+ # https://github.com/pry/pry/commit/b031df2f2f5850ee6e9018f33d35f3485a9b0423
91
+ def add_expression(_arguments)
92
+ expressions << Expression.new(_pry_, target, arg_string)
93
+ output.puts "Watching #{Code.new(arg_string).highlighted}"
94
+ end
95
+
96
+ def add_hook
97
+ hook = [:after_eval, :watch_expression]
98
+ unless _pry_.hooks.hook_exists?(*hook)
99
+ _pry_.hooks.add_hook(*hook) do |_, _pry_|
100
+ eval_and_print_changed _pry_.output
101
+ end
102
+ end
103
+ end
104
+ end
105
+
106
+ Pry::Commands.add_command(Pry::Command::WatchExpression)
107
+ end