chess_engine 0.0.2 → 0.0.5
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.
- checksums.yaml +4 -4
- data/bin/chess_engine +4 -0
- metadata +5 -288
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -21
- data/README.md +0 -26
- data/chess_engine-0.0.1.gem +0 -0
- data/chess_engine.gemspec +0 -14
- data/lib/chess_engine/board.rb +0 -95
- data/lib/chess_engine/cli.rb +0 -105
- data/lib/chess_engine/game.rb +0 -148
- data/lib/chess_engine/input.rb +0 -19
- data/lib/chess_engine/move.rb +0 -35
- data/lib/chess_engine/piece.rb +0 -97
- data/lib/chess_engine/validator.rb +0 -87
- data/vendor/bundle/bin/coderay +0 -27
- data/vendor/bundle/bin/pry +0 -27
- data/vendor/bundle/cache/coderay-1.1.2.gem +0 -0
- data/vendor/bundle/cache/colorize-0.8.1.gem +0 -0
- data/vendor/bundle/cache/method_source-0.9.2.gem +0 -0
- data/vendor/bundle/cache/pry-0.12.2.gem +0 -0
- data/vendor/bundle/cache/rb-readline-0.5.5.gem +0 -0
- data/vendor/bundle/gems/coderay-1.1.2/MIT-LICENSE +0 -22
- data/vendor/bundle/gems/coderay-1.1.2/README_INDEX.rdoc +0 -123
- data/vendor/bundle/gems/coderay-1.1.2/bin/coderay +0 -215
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/duo.rb +0 -81
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +0 -17
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +0 -25
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +0 -39
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +0 -49
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +0 -63
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +0 -23
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +0 -190
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +0 -58
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +0 -65
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +0 -108
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +0 -166
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +0 -333
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +0 -83
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +0 -45
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +0 -59
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +0 -24
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +0 -23
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +0 -95
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +0 -195
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +0 -46
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +0 -111
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +0 -72
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +0 -50
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +0 -95
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +0 -151
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +0 -55
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +0 -221
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +0 -72
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +0 -24
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +0 -189
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +0 -217
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +0 -217
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +0 -196
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +0 -75
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +0 -144
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +0 -221
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +0 -81
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +0 -208
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +0 -268
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +0 -168
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +0 -275
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +0 -421
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +0 -174
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +0 -237
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +0 -98
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +0 -280
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +0 -527
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +0 -287
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +0 -75
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +0 -178
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +0 -79
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +0 -477
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +0 -232
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +0 -337
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +0 -169
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +0 -36
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +0 -26
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +0 -17
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +0 -140
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners.rb +0 -27
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +0 -7
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +0 -153
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/style.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles.rb +0 -15
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +0 -85
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens.rb +0 -161
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +0 -55
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/version.rb +0 -3
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay.rb +0 -284
- data/vendor/bundle/gems/colorize-0.8.1/CHANGELOG +0 -65
- data/vendor/bundle/gems/colorize-0.8.1/LICENSE +0 -339
- data/vendor/bundle/gems/colorize-0.8.1/README.md +0 -105
- data/vendor/bundle/gems/colorize-0.8.1/Rakefile +0 -13
- data/vendor/bundle/gems/colorize-0.8.1/colorize.gemspec +0 -36
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/class_methods.rb +0 -120
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/instance_methods.rb +0 -132
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize.rb +0 -12
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorized_string.rb +0 -19
- data/vendor/bundle/gems/colorize-0.8.1/test/test_colorize.rb +0 -164
- data/vendor/bundle/gems/method_source-0.9.2/Gemfile +0 -2
- data/vendor/bundle/gems/method_source-0.9.2/LICENSE +0 -25
- data/vendor/bundle/gems/method_source-0.9.2/README.markdown +0 -91
- data/vendor/bundle/gems/method_source-0.9.2/Rakefile +0 -81
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/code_helpers.rb +0 -154
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/source_location.rb +0 -138
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/version.rb +0 -3
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source.rb +0 -141
- data/vendor/bundle/gems/method_source-0.9.2/method_source.gemspec +0 -35
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source/code_helpers_spec.rb +0 -43
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source_spec.rb +0 -143
- data/vendor/bundle/gems/method_source-0.9.2/spec/spec_helper.rb +0 -101
- data/vendor/bundle/gems/pry-0.12.2/CHANGELOG.md +0 -953
- data/vendor/bundle/gems/pry-0.12.2/LICENSE +0 -25
- data/vendor/bundle/gems/pry-0.12.2/README.md +0 -390
- data/vendor/bundle/gems/pry-0.12.2/bin/pry +0 -8
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/basic_object.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/cli.rb +0 -218
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_file.rb +0 -110
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_range.rb +0 -71
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/loc.rb +0 -98
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code.rb +0 -353
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code_object.rb +0 -195
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/color_printer.rb +0 -65
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command.rb +0 -723
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command_set.rb +0 -415
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/amend_line.rb +0 -98
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang.rb +0 -20
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang_pry.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/abstract_formatter.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/exception_formatter.rb +0 -79
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/file_formatter.rb +0 -71
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/input_expression_formatter.rb +0 -43
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat.rb +0 -63
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cd.rb +0 -41
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_inspector.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_prompt.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/clear_screen.rb +0 -14
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/code_collector.rb +0 -167
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disable_pry.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disabled_commands.rb +0 -2
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/easter_eggs.rb +0 -112
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/exception_patcher.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/file_and_line_locator.rb +0 -36
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit.rb +0 -200
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit.rb +0 -43
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_all.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_program.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/find_method.rb +0 -191
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/fix_indent.rb +0 -19
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_cd.rb +0 -26
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_install.rb +0 -32
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_list.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_open.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_readme.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_search.rb +0 -40
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_stats.rb +0 -83
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gist.rb +0 -102
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/help.rb +0 -164
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/hist.rb +0 -181
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/import_set.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/install_command.rb +0 -54
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/jump_to.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/list_inspectors.rb +0 -35
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/constants.rb +0 -58
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/formatter.rb +0 -51
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/globals.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/grep.rb +0 -19
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/instance_vars.rb +0 -38
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/interrogatable.rb +0 -18
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/jruby_hacks.rb +0 -49
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_names.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_vars.rb +0 -37
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/ls_entity.rb +0 -69
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods.rb +0 -54
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods_helper.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/self_methods.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls.rb +0 -113
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/nesting.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/play.rb +0 -102
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_backtrace.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_version.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/raise_up.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reload_code.rb +0 -62
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reset.rb +0 -18
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ri.rb +0 -65
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/save_file.rb +0 -61
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_command.rb +0 -75
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_mode.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_doc.rb +0 -81
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_info.rb +0 -216
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_input.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_source.rb +0 -53
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/stat.rb +0 -40
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/switch_to.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/toggle_color.rb +0 -24
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression/expression.rb +0 -38
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression.rb +0 -107
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb +0 -197
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/wtf.rb +0 -70
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/behavior.rb +0 -255
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/convenience.rb +0 -28
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/default.rb +0 -159
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/memoization.rb +0 -48
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config.rb +0 -35
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/core_extensions.rb +0 -142
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/editor.rb +0 -128
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/exceptions.rb +0 -76
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/forwardable.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/base_helpers.rb +0 -200
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/command_helpers.rb +0 -157
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/documentation_helpers.rb +0 -76
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/options_helpers.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/platform.rb +0 -58
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/table.rb +0 -114
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/text.rb +0 -115
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/history.rb +0 -161
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/hooks.rb +0 -171
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/indent.rb +0 -408
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_completer.rb +0 -265
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_lock.rb +0 -130
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/inspector.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/last_exception.rb +0 -61
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/disowned.rb +0 -55
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/patcher.rb +0 -122
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb +0 -198
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method.rb +0 -552
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/object_path.rb +0 -83
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/output.rb +0 -50
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pager.rb +0 -250
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/platform.rb +0 -91
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/plugins.rb +0 -122
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/prompt.rb +0 -145
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_class.rb +0 -425
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_instance.rb +0 -699
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl.rb +0 -261
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl_file_loader.rb +0 -73
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/ring.rb +0 -84
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/rubygem.rb +0 -84
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/LICENSE +0 -20
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/commands.rb +0 -195
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/option.rb +0 -206
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop.rb +0 -661
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/terminal.rb +0 -91
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb +0 -15
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/mockable.rb +0 -14
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/pry_tester.rb +0 -73
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/utility.rb +0 -26
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/variables.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable.rb +0 -70
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/version.rb +0 -3
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module/candidate.rb +0 -131
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module.rb +0 -378
- data/vendor/bundle/gems/pry-0.12.2/lib/pry.rb +0 -132
- data/vendor/bundle/gems/rb-readline-0.5.5/CHANGES +0 -94
- data/vendor/bundle/gems/rb-readline-0.5.5/LICENSE +0 -25
- data/vendor/bundle/gems/rb-readline-0.5.5/README.md +0 -81
- data/vendor/bundle/gems/rb-readline-0.5.5/Rakefile +0 -25
- data/vendor/bundle/gems/rb-readline-0.5.5/bench/_rl_adjust_point.rb +0 -26
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline.rb +0 -8
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline_with_completion.rb +0 -18
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/tinyirb.rb +0 -11
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rb-readline.rb +0 -18
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline/version.rb +0 -3
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline.rb +0 -8920
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/readline.rb +0 -539
- data/vendor/bundle/gems/rb-readline-0.5.5/rb-readline.gemspec +0 -51
- data/vendor/bundle/gems/rb-readline-0.5.5/setup.rb +0 -1585
- data/vendor/bundle/gems/rb-readline-0.5.5/test/support/filesystem_completion_helper.rb +0 -53
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_completion.rb +0 -100
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_filename_completion_proc.rb +0 -88
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_history.rb +0 -29
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_rbreadline.rb +0 -23
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_readline.rb +0 -221
- data/vendor/bundle/specifications/coderay-1.1.2.gemspec +0 -26
- data/vendor/bundle/specifications/colorize-0.8.1.gemspec +0 -38
- data/vendor/bundle/specifications/method_source-0.9.2.gemspec +0 -35
- data/vendor/bundle/specifications/pry-0.12.2.gemspec +0 -38
- data/vendor/bundle/specifications/rb-readline-0.5.5.gemspec +0 -39
@@ -1,53 +0,0 @@
|
|
1
|
-
require "fileutils"
|
2
|
-
|
3
|
-
module FilesystemCompletionHelper
|
4
|
-
SEP = File::SEPARATOR
|
5
|
-
COMP_TEST_DIR = "comp_test#{SEP}"
|
6
|
-
SUB_DIR = "#{COMP_TEST_DIR}a_sub_dir#{SEP}"
|
7
|
-
SUB_SUB_DIR = "#{SUB_DIR}another_sub_dir#{SEP}"
|
8
|
-
DIR_WITH_SPACES = "#{COMP_TEST_DIR}dir with spaces#{SEP}"
|
9
|
-
SUB_DIR_WITH_SPACES = "#{DIR_WITH_SPACES}sub dir with spaces#{SEP}"
|
10
|
-
|
11
|
-
# This creates:
|
12
|
-
#
|
13
|
-
# comp_test/
|
14
|
-
# abc
|
15
|
-
# aaa
|
16
|
-
# a_sub_dir/
|
17
|
-
# abc
|
18
|
-
# aaa
|
19
|
-
# another_sub_dir/
|
20
|
-
# aaa
|
21
|
-
# dir with spaces/
|
22
|
-
# filename with spaces
|
23
|
-
# sub dir with spaces/
|
24
|
-
# another filename with spaces
|
25
|
-
def setup_filesystem_for_completion
|
26
|
-
FileUtils.mkdir_p("#{SUB_SUB_DIR}")
|
27
|
-
FileUtils.mkdir_p("#{SUB_DIR_WITH_SPACES}")
|
28
|
-
@comp_test_dir = Dir.new COMP_TEST_DIR
|
29
|
-
@sub_dir = Dir.new SUB_DIR
|
30
|
-
@sub_sub_dir = Dir.new SUB_SUB_DIR
|
31
|
-
@dir_with_spaces = Dir.new DIR_WITH_SPACES
|
32
|
-
@sub_dir_with_spaces = Dir.new SUB_DIR_WITH_SPACES
|
33
|
-
|
34
|
-
FileUtils.touch("#{@comp_test_dir.path}abc")
|
35
|
-
FileUtils.touch("#{@comp_test_dir.path}aaa")
|
36
|
-
FileUtils.touch("#{@sub_dir.path}abc")
|
37
|
-
FileUtils.touch("#{@sub_dir.path}aaa")
|
38
|
-
FileUtils.touch("#{@sub_sub_dir.path}aaa")
|
39
|
-
FileUtils.touch("#{@dir_with_spaces.path}filename with spaces")
|
40
|
-
FileUtils.touch("#{@sub_dir_with_spaces.path}another filename with spaces")
|
41
|
-
|
42
|
-
# The previous Dir.new calls seem to cache the dir entries on Windows.
|
43
|
-
@comp_test_dir = Dir.new COMP_TEST_DIR
|
44
|
-
@sub_dir = Dir.new SUB_DIR
|
45
|
-
@sub_sub_dir = Dir.new SUB_SUB_DIR
|
46
|
-
@sub_dir_with_spaces = Dir.new SUB_DIR_WITH_SPACES
|
47
|
-
@dir_with_spaces = Dir.new DIR_WITH_SPACES
|
48
|
-
end
|
49
|
-
|
50
|
-
def teardown_filesystem_after_completion
|
51
|
-
FileUtils.rm_r(COMP_TEST_DIR)
|
52
|
-
end
|
53
|
-
end
|
@@ -1,100 +0,0 @@
|
|
1
|
-
require "minitest/autorun"
|
2
|
-
require "readline"
|
3
|
-
|
4
|
-
require 'timeout'
|
5
|
-
require "support/filesystem_completion_helper"
|
6
|
-
|
7
|
-
class TestCompletion < Minitest::Test
|
8
|
-
include RbReadline
|
9
|
-
include FilesystemCompletionHelper
|
10
|
-
|
11
|
-
def filename_quoting_function(filename, mtype, quote_char)
|
12
|
-
quoted_filename = filename.dup
|
13
|
-
@rl_filename_quote_characters.split("").each do |c|
|
14
|
-
quoted_filename.gsub!(c, "\\#{c}")
|
15
|
-
end
|
16
|
-
quoted_filename
|
17
|
-
end
|
18
|
-
|
19
|
-
def filename_dequoting_function(filename, quote_char = "\\")
|
20
|
-
filename.delete quote_char
|
21
|
-
end
|
22
|
-
|
23
|
-
def setup
|
24
|
-
@rl_completion_word_break_hook, @rl_char_is_quoted_p = nil
|
25
|
-
@rl_basic_quote_characters, @rl_special_prefixes = nil
|
26
|
-
@rl_completer_word_break_characters = Readline.basic_word_break_characters
|
27
|
-
@rl_completer_quote_characters = "\\"
|
28
|
-
@rl_completion_quote_character = "\\"
|
29
|
-
@rl_filename_quote_characters = " "
|
30
|
-
@rl_byte_oriented = true
|
31
|
-
@rl_filename_quoting_desired = true
|
32
|
-
@rl_filename_completion_desired = true
|
33
|
-
@rl_complete_with_tilde_expansion = true
|
34
|
-
@_rl_match_hidden_files = false
|
35
|
-
@rl_completion_found_quote = false
|
36
|
-
@_rl_completion_case_fold = false
|
37
|
-
@directory = nil
|
38
|
-
|
39
|
-
@rl_filename_quoting_function = :filename_quoting_function
|
40
|
-
@rl_filename_dequoting_function = :filename_dequoting_function
|
41
|
-
@rl_directory_completion_hook = nil
|
42
|
-
|
43
|
-
setup_filesystem_for_completion
|
44
|
-
end
|
45
|
-
|
46
|
-
def teardown
|
47
|
-
teardown_filesystem_after_completion
|
48
|
-
end
|
49
|
-
|
50
|
-
def set_line_buffer(text)
|
51
|
-
@rl_line_buffer = text
|
52
|
-
@rl_point = @rl_line_buffer.size
|
53
|
-
@rl_line_buffer << 0.chr
|
54
|
-
end
|
55
|
-
|
56
|
-
def test__find_completion_word_doesnt_hang_on_completer_quote_character
|
57
|
-
set_line_buffer "#{@dir_with_spaces.path}filename\\ w"
|
58
|
-
|
59
|
-
Timeout::timeout(3) do
|
60
|
-
assert_equal([ "\000", true, "\000" ], _rl_find_completion_word)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def test__find_completion_word_without_quote_characters
|
65
|
-
set_line_buffer "#{@comp_test_dir.path}a"
|
66
|
-
assert_equal([ "\000", false, "\000" ], _rl_find_completion_word)
|
67
|
-
end
|
68
|
-
|
69
|
-
def test_make_quoted_replacement_calls_filename_quoting_function
|
70
|
-
assert_equal "dir/with\\ space", make_quoted_replacement("dir/with space", RbReadline::SINGLE_MATCH, 0.chr)
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_rl_filname_completion_function_calls_dequoting_function
|
74
|
-
@rl_completion_found_quote = true
|
75
|
-
dir = filename_quoting_function(@dir_with_spaces.path, nil, 0.chr)
|
76
|
-
|
77
|
-
# rl_filename_completion_function is called with an increasing state in
|
78
|
-
# order to iterate through directory entries.
|
79
|
-
|
80
|
-
entries = [ "#{@dir_with_spaces.path}sub dir with spaces", "#{@dir_with_spaces.path}filename with spaces" ]
|
81
|
-
|
82
|
-
assert entries.include?(rl_filename_completion_function(dir, 0))
|
83
|
-
assert entries.include?(rl_filename_completion_function(dir, 1))
|
84
|
-
assert_nil rl_filename_completion_function(dir, 2)
|
85
|
-
ensure
|
86
|
-
@rl_completion_found_quote = false
|
87
|
-
end
|
88
|
-
|
89
|
-
def test_completing_path_starting_dot_slash
|
90
|
-
assert_equal "./#{COMP_TEST_DIR.chop}", rl_filename_completion_function("./#{COMP_TEST_DIR.chop}", 0)
|
91
|
-
end
|
92
|
-
|
93
|
-
def test_completing_non_existant_directory
|
94
|
-
assert_nil rl_filename_completion_function("/this/dir/does/not/exist", 0)
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_completing_a_file_as_a_directory
|
98
|
-
assert_nil rl_filename_completion_function("#{File.expand_path(__FILE__)}/", 0)
|
99
|
-
end
|
100
|
-
end
|
@@ -1,88 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'readline'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require "rbconfig"
|
6
|
-
require "support/filesystem_completion_helper"
|
7
|
-
|
8
|
-
class TestFilenameCompletionProc < Minitest::Test
|
9
|
-
include FilesystemCompletionHelper
|
10
|
-
|
11
|
-
def setup
|
12
|
-
FileUtils.mkdir_p("#{SUB_SUB_DIR}")
|
13
|
-
FileUtils.mkdir_p("#{SUB_DIR_WITH_SPACES}")
|
14
|
-
@comp_test_dir = Dir.new COMP_TEST_DIR
|
15
|
-
@sub_dir = Dir.new SUB_DIR
|
16
|
-
@sub_sub_dir = Dir.new SUB_SUB_DIR
|
17
|
-
@dir_with_spaces = Dir.new DIR_WITH_SPACES
|
18
|
-
@sub_dir_with_spaces = Dir.new SUB_DIR_WITH_SPACES
|
19
|
-
|
20
|
-
FileUtils.touch("#{@comp_test_dir.path}abc")
|
21
|
-
FileUtils.touch("#{@comp_test_dir.path}aaa")
|
22
|
-
FileUtils.touch("#{@sub_dir.path}abc")
|
23
|
-
FileUtils.touch("#{@sub_dir.path}aaa")
|
24
|
-
FileUtils.touch("#{@sub_sub_dir.path}aaa")
|
25
|
-
FileUtils.touch("#{@dir_with_spaces.path}filename with spaces")
|
26
|
-
FileUtils.touch("#{@sub_dir_with_spaces.path}another filename with spaces")
|
27
|
-
|
28
|
-
# The previous Dir.new calls seem to cache the dir entries on Windows.
|
29
|
-
@comp_test_dir = Dir.new COMP_TEST_DIR
|
30
|
-
@sub_dir = Dir.new SUB_DIR
|
31
|
-
@sub_sub_dir = Dir.new SUB_SUB_DIR
|
32
|
-
@dir_with_spaces = Dir.new DIR_WITH_SPACES
|
33
|
-
@sub_dir_with_spaces = Dir.new SUB_DIR_WITH_SPACES
|
34
|
-
setup_filesystem_for_completion
|
35
|
-
end
|
36
|
-
|
37
|
-
def teardown
|
38
|
-
teardown_filesystem_after_completion
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_listing_files_in_cwd
|
42
|
-
Dir.chdir(COMP_TEST_DIR) do
|
43
|
-
entries = Dir.entries(".").select { |e| e[0,1] == "a" }
|
44
|
-
assert_equal entries, Readline::FILENAME_COMPLETION_PROC.call("a")
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_list_files_in_sub_directories
|
49
|
-
entries = @sub_dir.entries.select { |e| e[0,1] == "a" }
|
50
|
-
entries.map! { |e| "#{@sub_dir.path}#{e}" }
|
51
|
-
assert_equal entries, Readline::FILENAME_COMPLETION_PROC.call("#{@sub_dir.path}a")
|
52
|
-
|
53
|
-
entries = @sub_sub_dir.entries - %w( . .. )
|
54
|
-
entries.map! { |e| "#{@sub_sub_dir.path}#{e}" }
|
55
|
-
assert_equal entries, Readline::FILENAME_COMPLETION_PROC.call("#{@sub_sub_dir.path}")
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_list_files_and_directories_with_spaces
|
59
|
-
entries = @comp_test_dir.entries.select { |e| e[0,1] == "d" }
|
60
|
-
entries.map! { |e| @comp_test_dir.path + e }
|
61
|
-
assert_equal entries, Readline::FILENAME_COMPLETION_PROC.call("#{@comp_test_dir.path}d")
|
62
|
-
|
63
|
-
entries = @dir_with_spaces.entries - %w( . .. )
|
64
|
-
entries.map! { |e| @dir_with_spaces.path + e }
|
65
|
-
assert_equal entries, Readline::FILENAME_COMPLETION_PROC.call("#{@dir_with_spaces.path}")
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_list_files_in_current_directory
|
69
|
-
assert_equal((Dir.entries(".") - %w( . .. )).sort, Readline::FILENAME_COMPLETION_PROC.call("").sort)
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_listing_files_with_no_read_access
|
73
|
-
FileUtils.mkdir("test_no_access")
|
74
|
-
FileUtils.touch("test_no_access/123")
|
75
|
-
|
76
|
-
skip "chmod is noop in Windows" if windows?
|
77
|
-
|
78
|
-
FileUtils.chmod(0333, "test_no_access")
|
79
|
-
assert_nil Readline::FILENAME_COMPLETION_PROC.call("test_no_access/")
|
80
|
-
ensure
|
81
|
-
FileUtils.chmod(0775, "test_no_access")
|
82
|
-
FileUtils.rm_r("test_no_access")
|
83
|
-
end
|
84
|
-
|
85
|
-
def windows?
|
86
|
-
RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
|
87
|
-
end
|
88
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require "minitest/autorun"
|
2
|
-
require "readline"
|
3
|
-
|
4
|
-
class TestHistory < Minitest::Test
|
5
|
-
|
6
|
-
# RbReadline::HISTORY_WORD_DELIMITERS.inspect
|
7
|
-
# => " \t\n;&()|<>"
|
8
|
-
# RbReadline::HISTORY_QUOTE_CHARACTERS = "\"'`"
|
9
|
-
# => "\"'`"
|
10
|
-
def test_history_arg_extract
|
11
|
-
assert_raises(RuntimeError) { RbReadline.history_arg_extract("!", "$", "one two three") }
|
12
|
-
assert_raises(RuntimeError) { RbReadline.history_arg_extract("$", "!", "one two three") }
|
13
|
-
|
14
|
-
assert_equal "one", RbReadline.history_arg_extract("$", "$", "one")
|
15
|
-
assert_equal "three", RbReadline.history_arg_extract("$", "$", "one two three")
|
16
|
-
assert_equal "two\\ three", RbReadline.history_arg_extract("$", "$", "one two\\ three")
|
17
|
-
assert_equal "three", RbReadline.history_arg_extract("$", "$", "one two;three")
|
18
|
-
assert_equal "two\\;three", RbReadline.history_arg_extract("$", "$", "one two\\;three")
|
19
|
-
|
20
|
-
assert_equal "'two three'", RbReadline.history_arg_extract("$", "$", "one 'two three'")
|
21
|
-
assert_equal "`two three`", RbReadline.history_arg_extract("$", "$", "one `two three`")
|
22
|
-
assert_equal "three\\'", RbReadline.history_arg_extract("$", "$", "one \\'two three\\'")
|
23
|
-
assert_equal "`one`", RbReadline.history_arg_extract("$", "$", "`one`")
|
24
|
-
|
25
|
-
assert_equal "three'", RbReadline.history_arg_extract("$", "$", "one two three'")
|
26
|
-
assert_equal "three", RbReadline.history_arg_extract("$", "$", "one two' three")
|
27
|
-
assert_equal "'two three '", RbReadline.history_arg_extract("$", "$", "one 'two three '")
|
28
|
-
end
|
29
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'rbreadline'
|
3
|
-
|
4
|
-
class TestRbReadline < Minitest::Test
|
5
|
-
def test_versions
|
6
|
-
assert_equal('5.2', RbReadline::RL_LIBRARY_VERSION)
|
7
|
-
assert_equal(0x0502, RbReadline::RL_READLINE_VERSION)
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_rl_adjust_point
|
11
|
-
encoding_name = RbReadline.instance_variable_get(:@encoding_name)
|
12
|
-
RbReadline.instance_variable_set(:@encoding_name, Encoding.find('UTF-8'))
|
13
|
-
|
14
|
-
assert_equal(0, RbReadline._rl_adjust_point("a".force_encoding('ASCII-8BIT'), 0))
|
15
|
-
assert_equal(0, RbReadline._rl_adjust_point("a".force_encoding('ASCII-8BIT'), 1))
|
16
|
-
assert_equal(0, RbReadline._rl_adjust_point(("a" * 40).force_encoding('ASCII-8BIT'), 0))
|
17
|
-
assert_equal(0, RbReadline._rl_adjust_point(("a" * 40).force_encoding('ASCII-8BIT'), 40))
|
18
|
-
assert_equal(2, RbReadline._rl_adjust_point(("\u3042" * 10).force_encoding('ASCII-8BIT'), 1))
|
19
|
-
assert_equal(1, RbReadline._rl_adjust_point(("\u3042" * 15).force_encoding('ASCII-8BIT'), 38))
|
20
|
-
ensure
|
21
|
-
RbReadline.instance_variable_set(:@encoding_name, encoding_name)
|
22
|
-
end if defined?(Encoding)
|
23
|
-
end
|
@@ -1,221 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'readline'
|
3
|
-
|
4
|
-
class TestReadline < Minitest::Test
|
5
|
-
def setup
|
6
|
-
@proc = proc{ |s| ['alpha', 'beta'].grep( /^#{Regexp.escape(s)}/) }
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_version
|
10
|
-
assert_equal('5.2', Readline::VERSION)
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_readline_basic
|
14
|
-
assert_respond_to(Readline, :readline)
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_readline_with_default_parameters_does_not_error
|
18
|
-
thread = Thread.new { Readline.readline }
|
19
|
-
sleep 0.1
|
20
|
-
assert thread.alive?
|
21
|
-
ensure
|
22
|
-
thread.kill
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_input_basic
|
26
|
-
assert_respond_to(Readline, :input=)
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_input
|
30
|
-
Readline.input = $stdin
|
31
|
-
assert_equal $stdin, RbReadline.rl_instream
|
32
|
-
end
|
33
|
-
|
34
|
-
def test_output_basic
|
35
|
-
assert_respond_to(Readline, :output=)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_output
|
39
|
-
Readline.output = $stdout
|
40
|
-
assert_equal $stdout, RbReadline.rl_outstream
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_completion_proc_get_basic
|
44
|
-
assert_respond_to(Readline, :completion_proc)
|
45
|
-
end
|
46
|
-
|
47
|
-
def test_completion_proc_set_basic
|
48
|
-
assert_respond_to(Readline, :completion_proc=)
|
49
|
-
end
|
50
|
-
|
51
|
-
def test_completion_proc
|
52
|
-
Readline.completion_proc = @proc
|
53
|
-
assert_equal @proc, Readline.completion_proc
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_completion_case_fold_get_basic
|
57
|
-
assert_respond_to(Readline, :completion_case_fold)
|
58
|
-
end
|
59
|
-
|
60
|
-
def test_completion_case_fold_default
|
61
|
-
assert_equal(false, Readline.completion_case_fold) # default
|
62
|
-
end
|
63
|
-
|
64
|
-
def test_completion_case_fold_set_basic
|
65
|
-
assert_respond_to(Readline, :completion_case_fold=)
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_completion_case_fold_changed
|
69
|
-
Readline.completion_case_fold = false
|
70
|
-
refute Readline.completion_case_fold
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_completion_proc_expected_errors
|
74
|
-
assert_raises(ArgumentError) { Readline.completion_proc = 1 }
|
75
|
-
assert_raises(ArgumentError) { Readline.completion_proc = 'a' }
|
76
|
-
end
|
77
|
-
|
78
|
-
def test_vi_editing_mode_basic
|
79
|
-
assert_respond_to(Readline, :vi_editing_mode)
|
80
|
-
end
|
81
|
-
|
82
|
-
def test_emacs_editing_mode_basic
|
83
|
-
assert_respond_to(Readline, :emacs_editing_mode)
|
84
|
-
end
|
85
|
-
|
86
|
-
def test_completion_append_character_get_basic
|
87
|
-
assert_respond_to(Readline, :completion_append_character)
|
88
|
-
end
|
89
|
-
|
90
|
-
def test_completion_append_character_get
|
91
|
-
assert_equal(' ', Readline.completion_append_character) # default
|
92
|
-
end
|
93
|
-
|
94
|
-
def test_completion_append_character_set_basic
|
95
|
-
assert_respond_to(Readline, :completion_append_character=)
|
96
|
-
end
|
97
|
-
|
98
|
-
def test_completion_append_character_set
|
99
|
-
assert_equal " ", Readline.completion_append_character
|
100
|
-
end
|
101
|
-
|
102
|
-
def test_completion_append_character
|
103
|
-
orig_char = Readline.completion_append_character
|
104
|
-
begin
|
105
|
-
[
|
106
|
-
[ "x", "x" ],
|
107
|
-
[ "xyx", "x" ],
|
108
|
-
[ " ", " " ],
|
109
|
-
[ "\t", "\t" ],
|
110
|
-
[ "", nil ],
|
111
|
-
].each do |data, expected|
|
112
|
-
Readline.completion_append_character = data
|
113
|
-
assert_equal(expected, Readline.completion_append_character,
|
114
|
-
"failed case: [#{data.inspect}, #{expected.inspect}]")
|
115
|
-
end
|
116
|
-
ensure
|
117
|
-
Readline.completion_append_character = orig_char
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
def test_basic_word_break_characters_get_basic
|
122
|
-
assert_respond_to(Readline, :basic_word_break_characters)
|
123
|
-
end
|
124
|
-
|
125
|
-
def test_basic_word_break_characters_get
|
126
|
-
assert_equal(" \t\n\"\\'`@$><=|&{(", Readline.basic_word_break_characters)
|
127
|
-
end
|
128
|
-
|
129
|
-
def test_basic_word_break_characters_set_basic
|
130
|
-
assert_respond_to(Readline, :basic_word_break_characters=)
|
131
|
-
end
|
132
|
-
|
133
|
-
def test_basic_word_break_characters_set
|
134
|
-
chars = " \t\n\"\\'`@$><=|&{("
|
135
|
-
Readline.basic_word_break_characters = chars
|
136
|
-
assert_equal chars, Readline.basic_word_break_characters
|
137
|
-
end
|
138
|
-
|
139
|
-
def test_basic_quote_characters_get_basic
|
140
|
-
assert_respond_to(Readline, :basic_quote_characters)
|
141
|
-
end
|
142
|
-
|
143
|
-
def test_basic_quote_characters_get
|
144
|
-
assert_equal "\"'", Readline.basic_quote_characters
|
145
|
-
end
|
146
|
-
|
147
|
-
def test_basic_quote_characters_set_basic
|
148
|
-
assert_respond_to(Readline, :basic_quote_characters=)
|
149
|
-
end
|
150
|
-
|
151
|
-
def test_basic_quote_characters_set
|
152
|
-
chars = "\"'"
|
153
|
-
Readline.basic_quote_characters = chars
|
154
|
-
assert_equal chars, Readline.basic_quote_characters
|
155
|
-
end
|
156
|
-
|
157
|
-
def test_some_character_methods
|
158
|
-
expecteds = [ " ", " .,|\t", "" ]
|
159
|
-
[
|
160
|
-
:basic_word_break_characters,
|
161
|
-
:completer_word_break_characters,
|
162
|
-
:basic_quote_characters,
|
163
|
-
:completer_quote_characters,
|
164
|
-
:filename_quote_characters,
|
165
|
-
].each do |method|
|
166
|
-
begin
|
167
|
-
saved = Readline.send(method)
|
168
|
-
expecteds.each do |e|
|
169
|
-
Readline.send("#{method}=".to_sym, e)
|
170
|
-
assert_equal(e, Readline.send(method),
|
171
|
-
"failed case #{e.inspect} for method #{method}")
|
172
|
-
end
|
173
|
-
ensure
|
174
|
-
Readline.send("#{method}=".to_sym, saved) if saved
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
def test_attempted_comp_func_returns_nil_when_no_completion_proc_set
|
180
|
-
assert_equal nil, Readline.readline_attempted_completion_function("12", 0, 1)
|
181
|
-
end
|
182
|
-
|
183
|
-
def test_attempted_comp_func_case_folding
|
184
|
-
Readline.completion_proc = Proc.new do |word|
|
185
|
-
%w( 123456 123abc abc123 ).grep(/^#{word}/i)
|
186
|
-
end
|
187
|
-
|
188
|
-
Readline.completion_case_fold = true
|
189
|
-
|
190
|
-
assert_equal [ "123", "123456", "123abc", nil ], Readline.readline_attempted_completion_function("123", 0, 3)
|
191
|
-
|
192
|
-
assert_equal [ "123abc", nil, nil ], Readline.readline_attempted_completion_function("123A", 0, 3)
|
193
|
-
|
194
|
-
ensure
|
195
|
-
Readline.completion_case_fold = false
|
196
|
-
Readline.module_eval do
|
197
|
-
@completion_proc = nil
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
def test_attempted_comp_func_removes_replacement_from_possible_matches
|
202
|
-
Readline.completion_proc = Proc.new do |word|
|
203
|
-
%w( 123456 123abc abc123 ).grep(/^#{word}/)
|
204
|
-
end
|
205
|
-
|
206
|
-
assert_equal [ "123", "123456", "123abc", nil ], Readline.readline_attempted_completion_function("12", 0, 1)
|
207
|
-
|
208
|
-
assert_equal [ "123", "123456", "123abc", nil ], Readline.readline_attempted_completion_function("123", 0, 2)
|
209
|
-
|
210
|
-
assert_equal [ "123456", nil, nil ], Readline.readline_attempted_completion_function("1234", 0, 3)
|
211
|
-
|
212
|
-
ensure
|
213
|
-
Readline.module_eval do
|
214
|
-
@completion_proc = nil
|
215
|
-
end
|
216
|
-
end
|
217
|
-
|
218
|
-
def teardown
|
219
|
-
@proc = nil
|
220
|
-
end
|
221
|
-
end
|