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.
- checksums.yaml +7 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +21 -0
- data/README.md +26 -0
- data/chess_engine.gemspec +14 -0
- data/lib/chess_engine/board.rb +95 -0
- data/lib/chess_engine/cli.rb +105 -0
- data/lib/chess_engine/game.rb +148 -0
- data/lib/chess_engine/input.rb +19 -0
- data/lib/chess_engine/move.rb +35 -0
- data/lib/chess_engine/piece.rb +97 -0
- data/lib/chess_engine/validator.rb +87 -0
- data/lib/chess_engine.rb +1 -0
- data/spec/board_spec.rb +70 -0
- data/spec/game_helper.rb +5 -0
- data/spec/game_spec.rb +79 -0
- data/spec/spec_helper.rb +100 -0
- data/spec/validator_spec.rb +26 -0
- data/vendor/bundle/bin/coderay +27 -0
- data/vendor/bundle/bin/pry +27 -0
- 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 +22 -0
- data/vendor/bundle/gems/coderay-1.1.2/README_INDEX.rdoc +123 -0
- data/vendor/bundle/gems/coderay-1.1.2/bin/coderay +215 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/duo.rb +81 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +17 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +25 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +39 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +49 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +63 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +23 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +190 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +58 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +65 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +108 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +166 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +333 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +83 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +45 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +59 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +18 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +24 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +23 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +95 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +195 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +46 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +111 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +72 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +50 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders.rb +18 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +95 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +151 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +55 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +221 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +72 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +24 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +189 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +217 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +217 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +196 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +75 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +144 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +221 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +81 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +208 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +268 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +168 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +275 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +421 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +174 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +237 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +98 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +280 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +527 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +287 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +75 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +178 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +79 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +477 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +232 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +337 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +169 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +36 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +26 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +17 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +140 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners.rb +27 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +7 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +153 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/style.rb +18 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles.rb +15 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +85 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens.rb +161 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +55 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/version.rb +3 -0
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay.rb +284 -0
- data/vendor/bundle/gems/colorize-0.8.1/CHANGELOG +65 -0
- data/vendor/bundle/gems/colorize-0.8.1/LICENSE +339 -0
- data/vendor/bundle/gems/colorize-0.8.1/README.md +105 -0
- data/vendor/bundle/gems/colorize-0.8.1/Rakefile +13 -0
- data/vendor/bundle/gems/colorize-0.8.1/colorize.gemspec +36 -0
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/class_methods.rb +120 -0
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/instance_methods.rb +132 -0
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize.rb +12 -0
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorized_string.rb +19 -0
- data/vendor/bundle/gems/colorize-0.8.1/test/test_colorize.rb +164 -0
- data/vendor/bundle/gems/method_source-0.9.2/Gemfile +2 -0
- data/vendor/bundle/gems/method_source-0.9.2/LICENSE +25 -0
- data/vendor/bundle/gems/method_source-0.9.2/README.markdown +91 -0
- data/vendor/bundle/gems/method_source-0.9.2/Rakefile +81 -0
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/code_helpers.rb +154 -0
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/source_location.rb +138 -0
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/version.rb +3 -0
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source.rb +141 -0
- data/vendor/bundle/gems/method_source-0.9.2/method_source.gemspec +35 -0
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source/code_helpers_spec.rb +43 -0
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source_spec.rb +143 -0
- data/vendor/bundle/gems/method_source-0.9.2/spec/spec_helper.rb +101 -0
- data/vendor/bundle/gems/pry-0.12.2/CHANGELOG.md +953 -0
- data/vendor/bundle/gems/pry-0.12.2/LICENSE +25 -0
- data/vendor/bundle/gems/pry-0.12.2/README.md +390 -0
- data/vendor/bundle/gems/pry-0.12.2/bin/pry +8 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/basic_object.rb +6 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/cli.rb +218 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_file.rb +110 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_range.rb +71 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/loc.rb +98 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code.rb +353 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code_object.rb +195 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/color_printer.rb +65 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command.rb +723 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command_set.rb +415 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/amend_line.rb +98 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang.rb +20 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang_pry.rb +17 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/abstract_formatter.rb +27 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/exception_formatter.rb +79 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/file_formatter.rb +71 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/input_expression_formatter.rb +43 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat.rb +63 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cd.rb +41 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_inspector.rb +27 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_prompt.rb +46 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/clear_screen.rb +14 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/code_collector.rb +167 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disable_pry.rb +27 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disabled_commands.rb +2 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/easter_eggs.rb +112 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/exception_patcher.rb +25 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/file_and_line_locator.rb +36 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit.rb +200 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit.rb +43 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_all.rb +29 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_program.rb +23 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/find_method.rb +191 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/fix_indent.rb +19 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_cd.rb +26 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_install.rb +32 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_list.rb +33 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_open.rb +29 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_readme.rb +25 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_search.rb +40 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_stats.rb +83 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gist.rb +102 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/help.rb +164 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/hist.rb +181 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/import_set.rb +23 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/install_command.rb +54 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/jump_to.rb +29 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/list_inspectors.rb +35 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/constants.rb +58 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/formatter.rb +51 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/globals.rb +46 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/grep.rb +19 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/instance_vars.rb +38 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/interrogatable.rb +18 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/jruby_hacks.rb +49 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_names.rb +33 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_vars.rb +37 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/ls_entity.rb +69 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods.rb +54 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods_helper.rb +46 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/self_methods.rb +33 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls.rb +113 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/nesting.rb +25 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/play.rb +102 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_backtrace.rb +25 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_version.rb +17 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/raise_up.rb +33 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reload_code.rb +62 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reset.rb +18 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ri.rb +65 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/save_file.rb +61 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_command.rb +75 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_mode.rb +25 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_doc.rb +81 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_info.rb +216 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_input.rb +17 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_source.rb +53 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/stat.rb +40 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/switch_to.rb +23 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/toggle_color.rb +24 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression/expression.rb +38 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression.rb +107 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb +197 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/wtf.rb +70 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands.rb +6 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/behavior.rb +255 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/convenience.rb +28 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/default.rb +159 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/memoization.rb +48 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config.rb +35 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/core_extensions.rb +142 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/editor.rb +128 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/exceptions.rb +76 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/forwardable.rb +23 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/base_helpers.rb +200 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/command_helpers.rb +157 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/documentation_helpers.rb +76 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/options_helpers.rb +27 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/platform.rb +58 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/table.rb +114 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/text.rb +115 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers.rb +6 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/history.rb +161 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/hooks.rb +171 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/indent.rb +408 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_completer.rb +265 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_lock.rb +130 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/inspector.rb +27 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/last_exception.rb +61 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/disowned.rb +55 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/patcher.rb +122 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb +198 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method.rb +552 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/object_path.rb +83 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/output.rb +50 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pager.rb +250 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/platform.rb +91 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/plugins.rb +122 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/prompt.rb +145 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_class.rb +425 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_instance.rb +699 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl.rb +261 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl_file_loader.rb +73 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/ring.rb +84 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/rubygem.rb +84 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/LICENSE +20 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/commands.rb +195 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/option.rb +206 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop.rb +661 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/terminal.rb +91 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb +15 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/mockable.rb +14 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/pry_tester.rb +73 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/utility.rb +26 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/variables.rb +46 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable.rb +70 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/version.rb +3 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module/candidate.rb +131 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module.rb +378 -0
- data/vendor/bundle/gems/pry-0.12.2/lib/pry.rb +132 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/CHANGES +94 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/LICENSE +25 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/README.md +81 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/Rakefile +25 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/bench/_rl_adjust_point.rb +26 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline.rb +8 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline_with_completion.rb +18 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/tinyirb.rb +11 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rb-readline.rb +18 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline/version.rb +3 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline.rb +8920 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/readline.rb +539 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/rb-readline.gemspec +51 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/setup.rb +1585 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/test/support/filesystem_completion_helper.rb +53 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_completion.rb +100 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_filename_completion_proc.rb +88 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_history.rb +29 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_rbreadline.rb +23 -0
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_readline.rb +221 -0
- data/vendor/bundle/specifications/coderay-1.1.2.gemspec +26 -0
- data/vendor/bundle/specifications/colorize-0.8.1.gemspec +38 -0
- data/vendor/bundle/specifications/method_source-0.9.2.gemspec +35 -0
- data/vendor/bundle/specifications/pry-0.12.2.gemspec +38 -0
- data/vendor/bundle/specifications/rb-readline-0.5.5.gemspec +39 -0
- metadata +363 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Encoders
|
3
|
+
|
4
|
+
# Concats the tokens into a single string, resulting in the original
|
5
|
+
# code string if no tokens were removed.
|
6
|
+
#
|
7
|
+
# Alias: +plain+, +plaintext+
|
8
|
+
#
|
9
|
+
# == Options
|
10
|
+
#
|
11
|
+
# === :separator
|
12
|
+
# A separator string to join the tokens.
|
13
|
+
#
|
14
|
+
# Default: empty String
|
15
|
+
class Text < Encoder
|
16
|
+
|
17
|
+
register_for :text
|
18
|
+
|
19
|
+
FILE_EXTENSION = 'txt'
|
20
|
+
|
21
|
+
DEFAULT_OPTIONS = {
|
22
|
+
:separator => nil
|
23
|
+
}
|
24
|
+
|
25
|
+
def text_token text, kind
|
26
|
+
super
|
27
|
+
|
28
|
+
if @first
|
29
|
+
@first = false
|
30
|
+
else
|
31
|
+
@out << @sep
|
32
|
+
end if @sep
|
33
|
+
end
|
34
|
+
|
35
|
+
protected
|
36
|
+
def setup options
|
37
|
+
super
|
38
|
+
|
39
|
+
@first = true
|
40
|
+
@sep = options[:separator]
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Encoders
|
3
|
+
|
4
|
+
load :filter
|
5
|
+
|
6
|
+
# A Filter that selects tokens based on their token kind.
|
7
|
+
#
|
8
|
+
# == Options
|
9
|
+
#
|
10
|
+
# === :exclude
|
11
|
+
#
|
12
|
+
# One or many symbols (in an Array) which shall be excluded.
|
13
|
+
#
|
14
|
+
# Default: []
|
15
|
+
#
|
16
|
+
# === :include
|
17
|
+
#
|
18
|
+
# One or many symbols (in an array) which shall be included.
|
19
|
+
#
|
20
|
+
# Default: :all, which means all tokens are included.
|
21
|
+
#
|
22
|
+
# Exclusion wins over inclusion.
|
23
|
+
#
|
24
|
+
# See also: CommentFilter
|
25
|
+
class TokenKindFilter < Filter
|
26
|
+
|
27
|
+
register_for :token_kind_filter
|
28
|
+
|
29
|
+
DEFAULT_OPTIONS = {
|
30
|
+
:exclude => [],
|
31
|
+
:include => :all
|
32
|
+
}
|
33
|
+
|
34
|
+
protected
|
35
|
+
def setup options
|
36
|
+
super
|
37
|
+
|
38
|
+
@group_excluded = false
|
39
|
+
@exclude = options[:exclude]
|
40
|
+
@exclude = Array(@exclude) unless @exclude == :all
|
41
|
+
@include = options[:include]
|
42
|
+
@include = Array(@include) unless @include == :all
|
43
|
+
end
|
44
|
+
|
45
|
+
def include_text_token? text, kind
|
46
|
+
include_group? kind
|
47
|
+
end
|
48
|
+
|
49
|
+
def include_group? kind
|
50
|
+
(@include == :all || @include.include?(kind)) &&
|
51
|
+
!(@exclude == :all || @exclude.include?(kind))
|
52
|
+
end
|
53
|
+
|
54
|
+
public
|
55
|
+
|
56
|
+
# Add the token to the output stream if +kind+ matches the conditions.
|
57
|
+
def text_token text, kind
|
58
|
+
super if !@group_excluded && include_text_token?(text, kind)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Add the token group to the output stream if +kind+ matches the
|
62
|
+
# conditions.
|
63
|
+
#
|
64
|
+
# If it does not, all tokens inside the group are excluded from the
|
65
|
+
# stream, even if their kinds match.
|
66
|
+
def begin_group kind
|
67
|
+
if @group_excluded
|
68
|
+
@group_excluded += 1
|
69
|
+
elsif include_group? kind
|
70
|
+
super
|
71
|
+
else
|
72
|
+
@group_excluded = 1
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# See +begin_group+.
|
77
|
+
def begin_line kind
|
78
|
+
if @group_excluded
|
79
|
+
@group_excluded += 1
|
80
|
+
elsif include_group? kind
|
81
|
+
super
|
82
|
+
else
|
83
|
+
@group_excluded = 1
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Take care of re-enabling the delegation of tokens to the output stream
|
88
|
+
# if an exluded group has ended.
|
89
|
+
def end_group kind
|
90
|
+
if @group_excluded
|
91
|
+
@group_excluded -= 1
|
92
|
+
@group_excluded = false if @group_excluded.zero?
|
93
|
+
else
|
94
|
+
super
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# See +end_group+.
|
99
|
+
def end_line kind
|
100
|
+
if @group_excluded
|
101
|
+
@group_excluded -= 1
|
102
|
+
@group_excluded = false if @group_excluded.zero?
|
103
|
+
else
|
104
|
+
super
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Encoders
|
3
|
+
|
4
|
+
# = XML Encoder
|
5
|
+
#
|
6
|
+
# Uses REXML. Very slow.
|
7
|
+
class XML < Encoder
|
8
|
+
|
9
|
+
register_for :xml
|
10
|
+
|
11
|
+
FILE_EXTENSION = 'xml'
|
12
|
+
|
13
|
+
autoload :REXML, 'rexml/document'
|
14
|
+
|
15
|
+
DEFAULT_OPTIONS = {
|
16
|
+
:tab_width => 8,
|
17
|
+
:pretty => -1,
|
18
|
+
:transitive => false,
|
19
|
+
}
|
20
|
+
|
21
|
+
protected
|
22
|
+
def setup options
|
23
|
+
super
|
24
|
+
|
25
|
+
@doc = REXML::Document.new
|
26
|
+
@doc << REXML::XMLDecl.new
|
27
|
+
@tab_width = options[:tab_width]
|
28
|
+
@root = @node = @doc.add_element('coderay-tokens')
|
29
|
+
end
|
30
|
+
|
31
|
+
def finish options
|
32
|
+
@doc.write @out, options[:pretty], options[:transitive], true
|
33
|
+
|
34
|
+
super
|
35
|
+
end
|
36
|
+
|
37
|
+
public
|
38
|
+
def text_token text, kind
|
39
|
+
if kind == :space
|
40
|
+
token = @node
|
41
|
+
else
|
42
|
+
token = @node.add_element kind.to_s
|
43
|
+
end
|
44
|
+
text.scan(/(\x20+)|(\t+)|(\n)|[^\x20\t\n]+/) do |space, tab, nl|
|
45
|
+
case
|
46
|
+
when space
|
47
|
+
token << REXML::Text.new(space, true)
|
48
|
+
when tab
|
49
|
+
token << REXML::Text.new(tab, true)
|
50
|
+
when nl
|
51
|
+
token << REXML::Text.new(nl, true)
|
52
|
+
else
|
53
|
+
token << REXML::Text.new($&)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def begin_group kind
|
59
|
+
@node = @node.add_element kind.to_s
|
60
|
+
end
|
61
|
+
|
62
|
+
def end_group kind
|
63
|
+
if @node == @root
|
64
|
+
raise 'no token to close!'
|
65
|
+
end
|
66
|
+
@node = @node.parent
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
autoload :YAML, 'yaml'
|
2
|
+
|
3
|
+
module CodeRay
|
4
|
+
module Encoders
|
5
|
+
|
6
|
+
# = YAML Encoder
|
7
|
+
#
|
8
|
+
# Slow.
|
9
|
+
class YAML < Encoder
|
10
|
+
|
11
|
+
register_for :yaml
|
12
|
+
|
13
|
+
FILE_EXTENSION = 'yaml'
|
14
|
+
|
15
|
+
protected
|
16
|
+
def setup options
|
17
|
+
super
|
18
|
+
|
19
|
+
@data = []
|
20
|
+
end
|
21
|
+
|
22
|
+
def finish options
|
23
|
+
output ::YAML.dump(@data)
|
24
|
+
end
|
25
|
+
|
26
|
+
public
|
27
|
+
def text_token text, kind
|
28
|
+
@data << [text, kind]
|
29
|
+
end
|
30
|
+
|
31
|
+
def begin_group kind
|
32
|
+
@data << [:begin_group, kind]
|
33
|
+
end
|
34
|
+
|
35
|
+
def end_group kind
|
36
|
+
@data << [:end_group, kind]
|
37
|
+
end
|
38
|
+
|
39
|
+
def begin_line kind
|
40
|
+
@data << [:begin_line, kind]
|
41
|
+
end
|
42
|
+
|
43
|
+
def end_line kind
|
44
|
+
@data << [:end_line, kind]
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module CodeRay
|
2
|
+
|
3
|
+
# This module holds the Encoder class and its subclasses.
|
4
|
+
# For example, the HTML encoder is named CodeRay::Encoders::HTML
|
5
|
+
# can be found in coderay/encoders/html.
|
6
|
+
#
|
7
|
+
# Encoders also provides methods and constants for the register
|
8
|
+
# mechanism and the [] method that returns the Encoder class
|
9
|
+
# belonging to the given format.
|
10
|
+
module Encoders
|
11
|
+
|
12
|
+
extend PluginHost
|
13
|
+
plugin_path File.dirname(__FILE__), 'encoders'
|
14
|
+
|
15
|
+
autoload :Encoder, CodeRay.coderay_path('encoders', 'encoder')
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
module CodeRay
|
2
|
+
|
3
|
+
# A little hack to enable CodeRay highlighting in RedCloth.
|
4
|
+
#
|
5
|
+
# Usage:
|
6
|
+
# require 'coderay'
|
7
|
+
# require 'coderay/for_redcloth'
|
8
|
+
# RedCloth.new('@[ruby]puts "Hello, World!"@').to_html
|
9
|
+
#
|
10
|
+
# Make sure you have RedCloth 4.0.3 activated, for example by calling
|
11
|
+
# require 'rubygems'
|
12
|
+
# before RedCloth is loaded and before calling CodeRay.for_redcloth.
|
13
|
+
module ForRedCloth
|
14
|
+
|
15
|
+
def self.install
|
16
|
+
gem 'RedCloth', '>= 4.0.3' if defined? gem
|
17
|
+
require 'redcloth'
|
18
|
+
unless RedCloth::VERSION.to_s >= '4.0.3'
|
19
|
+
if defined? gem
|
20
|
+
raise 'CodeRay.for_redcloth needs RedCloth version 4.0.3 or later. ' +
|
21
|
+
"You have #{RedCloth::VERSION}. Please gem install RedCloth."
|
22
|
+
else
|
23
|
+
$".delete 'redcloth.rb' # sorry, but it works
|
24
|
+
require 'rubygems'
|
25
|
+
return install # retry
|
26
|
+
end
|
27
|
+
end
|
28
|
+
unless RedCloth::VERSION.to_s >= '4.2.2'
|
29
|
+
warn 'CodeRay.for_redcloth works best with RedCloth version 4.2.2 or later.'
|
30
|
+
end
|
31
|
+
RedCloth::TextileDoc.send :include, ForRedCloth::TextileDoc
|
32
|
+
RedCloth::Formatters::HTML.module_eval do
|
33
|
+
def unescape(html) # :nodoc:
|
34
|
+
replacements = {
|
35
|
+
'&' => '&',
|
36
|
+
'"' => '"',
|
37
|
+
'>' => '>',
|
38
|
+
'<' => '<',
|
39
|
+
}
|
40
|
+
html.gsub(/&(?:amp|quot|[gl]t);/) { |entity| replacements[entity] }
|
41
|
+
end
|
42
|
+
undef code, bc_open, bc_close, escape_pre
|
43
|
+
def code(opts) # :nodoc:
|
44
|
+
opts[:block] = true
|
45
|
+
if !opts[:lang] && RedCloth::VERSION.to_s >= '4.2.0'
|
46
|
+
# simulating pre-4.2 behavior
|
47
|
+
if opts[:text].sub!(/\A\[(\w+)\]/, '')
|
48
|
+
if CodeRay::Scanners[$1].lang == :text
|
49
|
+
opts[:text] = $& + opts[:text]
|
50
|
+
else
|
51
|
+
opts[:lang] = $1
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
if opts[:lang] && !filter_coderay
|
56
|
+
require 'coderay'
|
57
|
+
@in_bc ||= nil
|
58
|
+
format = @in_bc ? :div : :span
|
59
|
+
opts[:text] = unescape(opts[:text]) unless @in_bc
|
60
|
+
highlighted_code = CodeRay.encode opts[:text], opts[:lang], format
|
61
|
+
highlighted_code.sub!(/\A<(span|div)/) { |m| m + pba(@in_bc || opts) }
|
62
|
+
highlighted_code
|
63
|
+
else
|
64
|
+
"<code#{pba(opts)}>#{opts[:text]}</code>"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
def bc_open(opts) # :nodoc:
|
68
|
+
opts[:block] = true
|
69
|
+
@in_bc = opts
|
70
|
+
opts[:lang] ? '' : "<pre#{pba(opts)}>"
|
71
|
+
end
|
72
|
+
def bc_close(opts) # :nodoc:
|
73
|
+
opts = @in_bc
|
74
|
+
@in_bc = nil
|
75
|
+
opts[:lang] ? '' : "</pre>\n"
|
76
|
+
end
|
77
|
+
def escape_pre(text) # :nodoc:
|
78
|
+
if @in_bc ||= nil
|
79
|
+
text
|
80
|
+
else
|
81
|
+
html_esc(text, :html_escape_preformatted)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
module TextileDoc # :nodoc:
|
88
|
+
attr_accessor :filter_coderay
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
CodeRay::ForRedCloth.install
|
@@ -0,0 +1,151 @@
|
|
1
|
+
module CodeRay
|
2
|
+
|
3
|
+
# = FileType
|
4
|
+
#
|
5
|
+
# A simple filetype recognizer.
|
6
|
+
#
|
7
|
+
# == Usage
|
8
|
+
#
|
9
|
+
# # determine the type of the given
|
10
|
+
# lang = FileType[file_name]
|
11
|
+
#
|
12
|
+
# # return :text if the file type is unknown
|
13
|
+
# lang = FileType.fetch file_name, :text
|
14
|
+
#
|
15
|
+
# # try the shebang line, too
|
16
|
+
# lang = FileType.fetch file_name, :text, true
|
17
|
+
module FileType
|
18
|
+
|
19
|
+
UnknownFileType = Class.new Exception
|
20
|
+
|
21
|
+
class << self
|
22
|
+
|
23
|
+
# Try to determine the file type of the file.
|
24
|
+
#
|
25
|
+
# +filename+ is a relative or absolute path to a file.
|
26
|
+
#
|
27
|
+
# The file itself is only accessed when +read_shebang+ is set to true.
|
28
|
+
# That means you can get filetypes from files that don't exist.
|
29
|
+
def [] filename, read_shebang = false
|
30
|
+
name = File.basename filename
|
31
|
+
ext = File.extname(name).sub(/^\./, '') # from last dot, delete the leading dot
|
32
|
+
ext2 = filename.to_s[/\.(.*)/, 1] # from first dot
|
33
|
+
|
34
|
+
type =
|
35
|
+
TypeFromExt[ext] ||
|
36
|
+
TypeFromExt[ext.downcase] ||
|
37
|
+
(TypeFromExt[ext2] if ext2) ||
|
38
|
+
(TypeFromExt[ext2.downcase] if ext2) ||
|
39
|
+
TypeFromName[name] ||
|
40
|
+
TypeFromName[name.downcase]
|
41
|
+
type ||= type_from_shebang(filename) if read_shebang
|
42
|
+
|
43
|
+
type
|
44
|
+
end
|
45
|
+
|
46
|
+
# This works like Hash#fetch.
|
47
|
+
#
|
48
|
+
# If the filetype cannot be found, the +default+ value
|
49
|
+
# is returned.
|
50
|
+
def fetch filename, default = nil, read_shebang = false
|
51
|
+
if default && block_given?
|
52
|
+
warn 'Block supersedes default value argument; use either.'
|
53
|
+
end
|
54
|
+
|
55
|
+
if type = self[filename, read_shebang]
|
56
|
+
type
|
57
|
+
else
|
58
|
+
return yield if block_given?
|
59
|
+
return default if default
|
60
|
+
raise UnknownFileType, 'Could not determine type of %p.' % filename
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
protected
|
65
|
+
|
66
|
+
def type_from_shebang filename
|
67
|
+
return unless File.exist? filename
|
68
|
+
File.open filename, 'r' do |f|
|
69
|
+
if first_line = f.gets
|
70
|
+
if type = first_line[TypeFromShebang]
|
71
|
+
type.to_sym
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
TypeFromExt = {
|
80
|
+
'c' => :c,
|
81
|
+
'cfc' => :xml,
|
82
|
+
'cfm' => :xml,
|
83
|
+
'clj' => :clojure,
|
84
|
+
'css' => :css,
|
85
|
+
'diff' => :diff,
|
86
|
+
'dpr' => :delphi,
|
87
|
+
'erb' => :erb,
|
88
|
+
'gemspec' => :ruby,
|
89
|
+
'go' => :go,
|
90
|
+
'groovy' => :groovy,
|
91
|
+
'gvy' => :groovy,
|
92
|
+
'h' => :c,
|
93
|
+
'haml' => :haml,
|
94
|
+
'htm' => :html,
|
95
|
+
'html' => :html,
|
96
|
+
'html.erb' => :erb,
|
97
|
+
'java' => :java,
|
98
|
+
'js' => :java_script,
|
99
|
+
'json' => :json,
|
100
|
+
'lua' => :lua,
|
101
|
+
'mab' => :ruby,
|
102
|
+
'pas' => :delphi,
|
103
|
+
'patch' => :diff,
|
104
|
+
'phtml' => :php,
|
105
|
+
'php' => :php,
|
106
|
+
'php3' => :php,
|
107
|
+
'php4' => :php,
|
108
|
+
'php5' => :php,
|
109
|
+
'prawn' => :ruby,
|
110
|
+
'py' => :python,
|
111
|
+
'py3' => :python,
|
112
|
+
'pyw' => :python,
|
113
|
+
'rake' => :ruby,
|
114
|
+
'raydebug' => :raydebug,
|
115
|
+
'rb' => :ruby,
|
116
|
+
'rbw' => :ruby,
|
117
|
+
'rhtml' => :erb,
|
118
|
+
'rjs' => :ruby,
|
119
|
+
'rpdf' => :ruby,
|
120
|
+
'ru' => :ruby, # config.ru
|
121
|
+
'rxml' => :ruby,
|
122
|
+
'sass' => :sass,
|
123
|
+
'sql' => :sql,
|
124
|
+
'taskpaper' => :taskpaper,
|
125
|
+
'template' => :json, # AWS CloudFormation template
|
126
|
+
'tmproj' => :xml,
|
127
|
+
'xaml' => :xml,
|
128
|
+
'xhtml' => :html,
|
129
|
+
'xml' => :xml,
|
130
|
+
'yaml' => :yaml,
|
131
|
+
'yml' => :yaml,
|
132
|
+
}
|
133
|
+
for cpp_alias in %w[cc cpp cp cxx c++ C hh hpp h++ cu]
|
134
|
+
TypeFromExt[cpp_alias] = :cpp
|
135
|
+
end
|
136
|
+
|
137
|
+
TypeFromShebang = /\b(?:ruby|perl|python|sh)\b/
|
138
|
+
|
139
|
+
TypeFromName = {
|
140
|
+
'Capfile' => :ruby,
|
141
|
+
'Rakefile' => :ruby,
|
142
|
+
'Rantfile' => :ruby,
|
143
|
+
'Gemfile' => :ruby,
|
144
|
+
'Guardfile' => :ruby,
|
145
|
+
'Vagrantfile' => :ruby,
|
146
|
+
'Appraisals' => :ruby
|
147
|
+
}
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|