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,169 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Scanners
|
3
|
+
|
4
|
+
# by Josh Goebel
|
5
|
+
class SQL < Scanner
|
6
|
+
|
7
|
+
register_for :sql
|
8
|
+
|
9
|
+
KEYWORDS = %w(
|
10
|
+
all and any as before begin between by case check collate
|
11
|
+
each else end exists
|
12
|
+
for foreign from full group having if in inner is join
|
13
|
+
like not of on or order outer over references
|
14
|
+
then to union using values when where
|
15
|
+
left right distinct
|
16
|
+
)
|
17
|
+
|
18
|
+
OBJECTS = %w(
|
19
|
+
database databases table tables column columns fields index constraint
|
20
|
+
constraints transaction function procedure row key view trigger
|
21
|
+
)
|
22
|
+
|
23
|
+
COMMANDS = %w(
|
24
|
+
add alter comment create delete drop grant insert into select update set
|
25
|
+
show prompt begin commit rollback replace truncate
|
26
|
+
)
|
27
|
+
|
28
|
+
PREDEFINED_TYPES = %w(
|
29
|
+
char varchar varchar2 enum binary text tinytext mediumtext
|
30
|
+
longtext blob tinyblob mediumblob longblob timestamp
|
31
|
+
date time datetime year double decimal float int
|
32
|
+
integer tinyint mediumint bigint smallint unsigned bit
|
33
|
+
bool boolean hex bin oct
|
34
|
+
)
|
35
|
+
|
36
|
+
PREDEFINED_FUNCTIONS = %w( sum cast substring abs pi count min max avg now )
|
37
|
+
|
38
|
+
DIRECTIVES = %w(
|
39
|
+
auto_increment unique default charset initially deferred
|
40
|
+
deferrable cascade immediate read write asc desc after
|
41
|
+
primary foreign return engine
|
42
|
+
)
|
43
|
+
|
44
|
+
PREDEFINED_CONSTANTS = %w( null true false )
|
45
|
+
|
46
|
+
IDENT_KIND = WordList::CaseIgnoring.new(:ident).
|
47
|
+
add(KEYWORDS, :keyword).
|
48
|
+
add(OBJECTS, :type).
|
49
|
+
add(COMMANDS, :class).
|
50
|
+
add(PREDEFINED_TYPES, :predefined_type).
|
51
|
+
add(PREDEFINED_CONSTANTS, :predefined_constant).
|
52
|
+
add(PREDEFINED_FUNCTIONS, :predefined).
|
53
|
+
add(DIRECTIVES, :directive)
|
54
|
+
|
55
|
+
ESCAPE = / [rbfntv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | . /mx
|
56
|
+
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
|
57
|
+
|
58
|
+
STRING_PREFIXES = /[xnb]|_\w+/i
|
59
|
+
|
60
|
+
STRING_CONTENT_PATTERN = {
|
61
|
+
'"' => / (?: [^\\"] | "" )+ /x,
|
62
|
+
"'" => / (?: [^\\'] | '' )+ /x,
|
63
|
+
'`' => / (?: [^\\`] | `` )+ /x,
|
64
|
+
}
|
65
|
+
|
66
|
+
def scan_tokens encoder, options
|
67
|
+
|
68
|
+
state = :initial
|
69
|
+
string_type = nil
|
70
|
+
string_content = ''
|
71
|
+
name_expected = false
|
72
|
+
|
73
|
+
until eos?
|
74
|
+
|
75
|
+
if state == :initial
|
76
|
+
|
77
|
+
if match = scan(/ \s+ | \\\n /x)
|
78
|
+
encoder.text_token match, :space
|
79
|
+
|
80
|
+
elsif match = scan(/(?:--\s?|#).*/)
|
81
|
+
encoder.text_token match, :comment
|
82
|
+
|
83
|
+
elsif match = scan(%r( /\* (!)? (?: .*? \*/ | .* ) )mx)
|
84
|
+
encoder.text_token match, self[1] ? :directive : :comment
|
85
|
+
|
86
|
+
elsif match = scan(/ [*\/=<>:;,!&^|()\[\]{}~%] | [-+\.](?!\d) /x)
|
87
|
+
name_expected = true if match == '.' && check(/[A-Za-z_]/)
|
88
|
+
encoder.text_token match, :operator
|
89
|
+
|
90
|
+
elsif match = scan(/(#{STRING_PREFIXES})?([`"'])/o)
|
91
|
+
prefix = self[1]
|
92
|
+
string_type = self[2]
|
93
|
+
encoder.begin_group :string
|
94
|
+
encoder.text_token prefix, :modifier if prefix
|
95
|
+
match = string_type
|
96
|
+
state = :string
|
97
|
+
encoder.text_token match, :delimiter
|
98
|
+
|
99
|
+
elsif match = scan(/ @? [A-Za-z_][A-Za-z_0-9\$]* /x)
|
100
|
+
encoder.text_token match, name_expected ? :ident : (match[0] == ?@ ? :variable : IDENT_KIND[match])
|
101
|
+
name_expected = false
|
102
|
+
|
103
|
+
elsif match = scan(/0[xX][0-9A-Fa-f]+/)
|
104
|
+
encoder.text_token match, :hex
|
105
|
+
|
106
|
+
elsif match = scan(/0[0-7]+(?![89.eEfF])/)
|
107
|
+
encoder.text_token match, :octal
|
108
|
+
|
109
|
+
elsif match = scan(/[-+]?(?>\d+)(?![.eEfF])/)
|
110
|
+
encoder.text_token match, :integer
|
111
|
+
|
112
|
+
elsif match = scan(/[-+]?(?:\d[fF]|\d*\.\d+(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+)/)
|
113
|
+
encoder.text_token match, :float
|
114
|
+
|
115
|
+
elsif match = scan(/\\N/)
|
116
|
+
encoder.text_token match, :predefined_constant
|
117
|
+
|
118
|
+
else
|
119
|
+
encoder.text_token getch, :error
|
120
|
+
|
121
|
+
end
|
122
|
+
|
123
|
+
elsif state == :string
|
124
|
+
if match = scan(STRING_CONTENT_PATTERN[string_type])
|
125
|
+
encoder.text_token match, :content
|
126
|
+
elsif match = scan(/["'`]/)
|
127
|
+
if string_type == match
|
128
|
+
if peek(1) == string_type # doubling means escape
|
129
|
+
encoder.text_token match + getch, :content
|
130
|
+
else
|
131
|
+
encoder.text_token match, :delimiter
|
132
|
+
encoder.end_group :string
|
133
|
+
state = :initial
|
134
|
+
string_type = nil
|
135
|
+
end
|
136
|
+
else
|
137
|
+
encoder.text_token match, :content
|
138
|
+
end
|
139
|
+
elsif match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
|
140
|
+
encoder.text_token match, :char
|
141
|
+
elsif match = scan(/ \\ . /mox)
|
142
|
+
encoder.text_token match, :content
|
143
|
+
elsif match = scan(/ \\ | $ /x)
|
144
|
+
encoder.text_token match, :error unless match.empty?
|
145
|
+
encoder.end_group :string
|
146
|
+
state = :initial
|
147
|
+
else
|
148
|
+
raise "else case \" reached; %p not handled." % peek(1), encoder
|
149
|
+
end
|
150
|
+
|
151
|
+
else
|
152
|
+
raise 'else-case reached', encoder
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
end
|
157
|
+
|
158
|
+
if state == :string
|
159
|
+
encoder.end_group state
|
160
|
+
end
|
161
|
+
|
162
|
+
encoder
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Scanners
|
3
|
+
|
4
|
+
class Taskpaper < Scanner
|
5
|
+
|
6
|
+
register_for :taskpaper
|
7
|
+
file_extension 'taskpaper'
|
8
|
+
|
9
|
+
protected
|
10
|
+
|
11
|
+
def scan_tokens encoder, options
|
12
|
+
until eos?
|
13
|
+
if match = scan(/\S.*:.*$/) # project
|
14
|
+
encoder.text_token(match, :namespace)
|
15
|
+
elsif match = scan(/-.+@done.*/) # completed task
|
16
|
+
encoder.text_token(match, :done)
|
17
|
+
elsif match = scan(/-(?:[^@\n]+|@(?!due))*/) # task
|
18
|
+
encoder.text_token(match, :plain)
|
19
|
+
elsif match = scan(/@due.*/) # comment
|
20
|
+
encoder.text_token(match, :important)
|
21
|
+
elsif match = scan(/.+/) # comment
|
22
|
+
encoder.text_token(match, :comment)
|
23
|
+
elsif match = scan(/\s+/) # space
|
24
|
+
encoder.text_token(match, :space)
|
25
|
+
else # other
|
26
|
+
encoder.text_token getch, :error
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
encoder
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Scanners
|
3
|
+
|
4
|
+
# Scanner for plain text.
|
5
|
+
#
|
6
|
+
# Yields just one token of the kind :plain.
|
7
|
+
#
|
8
|
+
# Alias: +plaintext+, +plain+
|
9
|
+
class Text < Scanner
|
10
|
+
|
11
|
+
register_for :text
|
12
|
+
title 'Plain text'
|
13
|
+
|
14
|
+
KINDS_NOT_LOC = [:plain] # :nodoc:
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
def scan_tokens encoder, options
|
19
|
+
encoder.text_token string, :plain
|
20
|
+
encoder
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Scanners
|
3
|
+
|
4
|
+
# Scanner for YAML.
|
5
|
+
#
|
6
|
+
# Based on the YAML scanner from Syntax by Jamis Buck.
|
7
|
+
class YAML < Scanner
|
8
|
+
|
9
|
+
register_for :yaml
|
10
|
+
file_extension 'yml'
|
11
|
+
|
12
|
+
KINDS_NOT_LOC = :all
|
13
|
+
|
14
|
+
protected
|
15
|
+
|
16
|
+
def scan_tokens encoder, options
|
17
|
+
|
18
|
+
state = :initial
|
19
|
+
key_indent = string_indent = 0
|
20
|
+
|
21
|
+
until eos?
|
22
|
+
|
23
|
+
key_indent = nil if bol?
|
24
|
+
|
25
|
+
if match = scan(/ +[\t ]*/)
|
26
|
+
encoder.text_token match, :space
|
27
|
+
|
28
|
+
elsif match = scan(/\n+/)
|
29
|
+
encoder.text_token match, :space
|
30
|
+
state = :initial if match.index(?\n)
|
31
|
+
|
32
|
+
elsif match = scan(/#.*/)
|
33
|
+
encoder.text_token match, :comment
|
34
|
+
|
35
|
+
elsif bol? and case
|
36
|
+
when match = scan(/---|\.\.\./)
|
37
|
+
encoder.begin_group :head
|
38
|
+
encoder.text_token match, :head
|
39
|
+
encoder.end_group :head
|
40
|
+
next
|
41
|
+
when match = scan(/%.*/)
|
42
|
+
encoder.text_token match, :doctype
|
43
|
+
next
|
44
|
+
end
|
45
|
+
|
46
|
+
elsif state == :value and case
|
47
|
+
when !check(/(?:"[^"]*")(?=: |:$)/) && match = scan(/"/)
|
48
|
+
encoder.begin_group :string
|
49
|
+
encoder.text_token match, :delimiter
|
50
|
+
encoder.text_token match, :content if (match = scan(/ [^"\\]* (?: \\. [^"\\]* )* /mx)) && !match.empty?
|
51
|
+
encoder.text_token match, :delimiter if match = scan(/"/)
|
52
|
+
encoder.end_group :string
|
53
|
+
next
|
54
|
+
when match = scan(/[|>][-+]?/)
|
55
|
+
encoder.begin_group :string
|
56
|
+
encoder.text_token match, :delimiter
|
57
|
+
string_indent = key_indent || column(pos - match.size) - 1
|
58
|
+
encoder.text_token matched, :content if scan(/(?:\n+ {#{string_indent + 1}}.*)+/)
|
59
|
+
encoder.end_group :string
|
60
|
+
next
|
61
|
+
when match = scan(/(?![!"*&]).+?(?=$|\s+#)/)
|
62
|
+
encoder.begin_group :string
|
63
|
+
encoder.text_token match, :content
|
64
|
+
string_indent = key_indent || column(pos - match.size) - 1
|
65
|
+
encoder.text_token matched, :content if scan(/(?:\n+ {#{string_indent + 1}}.*)+/)
|
66
|
+
encoder.end_group :string
|
67
|
+
next
|
68
|
+
end
|
69
|
+
|
70
|
+
elsif case
|
71
|
+
when match = scan(/[-:](?= |$)/)
|
72
|
+
state = :value if state == :colon && (match == ':' || match == '-')
|
73
|
+
state = :value if state == :initial && match == '-'
|
74
|
+
encoder.text_token match, :operator
|
75
|
+
next
|
76
|
+
when match = scan(/[,{}\[\]]/)
|
77
|
+
encoder.text_token match, :operator
|
78
|
+
next
|
79
|
+
when state == :initial && match = scan(/[-\w.()\/ ]*\S(?= *:(?: |$))/)
|
80
|
+
encoder.text_token match, :key
|
81
|
+
key_indent = column(pos - match.size) - 1
|
82
|
+
state = :colon
|
83
|
+
next
|
84
|
+
when match = scan(/(?:"[^"\n]*"|'[^'\n]*')(?= *:(?: |$))/)
|
85
|
+
encoder.begin_group :key
|
86
|
+
encoder.text_token match[0,1], :delimiter
|
87
|
+
encoder.text_token match[1..-2], :content if match.size > 2
|
88
|
+
encoder.text_token match[-1,1], :delimiter
|
89
|
+
encoder.end_group :key
|
90
|
+
key_indent = column(pos - match.size) - 1
|
91
|
+
state = :colon
|
92
|
+
next
|
93
|
+
when match = scan(/(![\w\/]+)(:([\w:]+))?/)
|
94
|
+
encoder.text_token self[1], :type
|
95
|
+
if self[2]
|
96
|
+
encoder.text_token ':', :operator
|
97
|
+
encoder.text_token self[3], :class
|
98
|
+
end
|
99
|
+
next
|
100
|
+
when match = scan(/&\S+/)
|
101
|
+
encoder.text_token match, :variable
|
102
|
+
next
|
103
|
+
when match = scan(/\*\w+/)
|
104
|
+
encoder.text_token match, :global_variable
|
105
|
+
next
|
106
|
+
when match = scan(/<</)
|
107
|
+
encoder.text_token match, :class_variable
|
108
|
+
next
|
109
|
+
when match = scan(/\d\d:\d\d:\d\d/)
|
110
|
+
encoder.text_token match, :octal
|
111
|
+
next
|
112
|
+
when match = scan(/\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d(\.\d+)? [-+]\d\d:\d\d/)
|
113
|
+
encoder.text_token match, :octal
|
114
|
+
next
|
115
|
+
when match = scan(/:\w+/)
|
116
|
+
encoder.text_token match, :symbol
|
117
|
+
next
|
118
|
+
when match = scan(/[^:\s]+(:(?! |$)[^:\s]*)* .*/)
|
119
|
+
encoder.text_token match, :error
|
120
|
+
next
|
121
|
+
when match = scan(/[^:\s]+(:(?! |$)[^:\s]*)*/)
|
122
|
+
encoder.text_token match, :error
|
123
|
+
next
|
124
|
+
end
|
125
|
+
|
126
|
+
else
|
127
|
+
raise if eos?
|
128
|
+
encoder.text_token getch, :error
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|
133
|
+
|
134
|
+
encoder
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'strscan'
|
2
|
+
|
3
|
+
module CodeRay
|
4
|
+
|
5
|
+
autoload :WordList, coderay_path('helpers', 'word_list')
|
6
|
+
|
7
|
+
# = Scanners
|
8
|
+
#
|
9
|
+
# This module holds the Scanner class and its subclasses.
|
10
|
+
# For example, the Ruby scanner is named CodeRay::Scanners::Ruby
|
11
|
+
# can be found in coderay/scanners/ruby.
|
12
|
+
#
|
13
|
+
# Scanner also provides methods and constants for the register
|
14
|
+
# mechanism and the [] method that returns the Scanner class
|
15
|
+
# belonging to the given lang.
|
16
|
+
#
|
17
|
+
# See PluginHost.
|
18
|
+
module Scanners
|
19
|
+
|
20
|
+
extend PluginHost
|
21
|
+
plugin_path File.dirname(__FILE__), 'scanners'
|
22
|
+
|
23
|
+
autoload :Scanner, CodeRay.coderay_path('scanners', 'scanner')
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
module CodeRay
|
2
|
+
module Styles
|
3
|
+
|
4
|
+
# A colorful theme using CSS 3 colors (with alpha channel).
|
5
|
+
class Alpha < Style
|
6
|
+
|
7
|
+
register_for :alpha
|
8
|
+
|
9
|
+
code_background = 'hsl(0,0%,95%)'
|
10
|
+
numbers_background = 'hsl(180,65%,90%)'
|
11
|
+
border_color = 'silver'
|
12
|
+
normal_color = 'black'
|
13
|
+
|
14
|
+
CSS_MAIN_STYLES = <<-MAIN # :nodoc:
|
15
|
+
.CodeRay {
|
16
|
+
background-color: #{code_background};
|
17
|
+
border: 1px solid #{border_color};
|
18
|
+
color: #{normal_color};
|
19
|
+
}
|
20
|
+
.CodeRay pre {
|
21
|
+
margin: 0px;
|
22
|
+
}
|
23
|
+
|
24
|
+
span.CodeRay { white-space: pre; border: 0px; padding: 2px; }
|
25
|
+
|
26
|
+
table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px; }
|
27
|
+
table.CodeRay td { padding: 2px 4px; vertical-align: top; }
|
28
|
+
|
29
|
+
.CodeRay .line-numbers {
|
30
|
+
background-color: #{numbers_background};
|
31
|
+
color: gray;
|
32
|
+
text-align: right;
|
33
|
+
-webkit-user-select: none;
|
34
|
+
-moz-user-select: none;
|
35
|
+
user-select: none;
|
36
|
+
}
|
37
|
+
.CodeRay .line-numbers a {
|
38
|
+
background-color: #{numbers_background} !important;
|
39
|
+
color: gray !important;
|
40
|
+
text-decoration: none !important;
|
41
|
+
}
|
42
|
+
.CodeRay .line-numbers pre {
|
43
|
+
word-break: normal;
|
44
|
+
}
|
45
|
+
.CodeRay .line-numbers a:target { color: blue !important; }
|
46
|
+
.CodeRay .line-numbers .highlighted { color: red !important; }
|
47
|
+
.CodeRay .line-numbers .highlighted a { color: red !important; }
|
48
|
+
.CodeRay span.line-numbers { padding: 0px 4px; }
|
49
|
+
.CodeRay .line { display: block; float: left; width: 100%; }
|
50
|
+
.CodeRay .code { width: 100%; }
|
51
|
+
MAIN
|
52
|
+
|
53
|
+
TOKEN_COLORS = <<-'TOKENS'
|
54
|
+
.debug { color: white !important; background: blue !important; }
|
55
|
+
|
56
|
+
.annotation { color:#007 }
|
57
|
+
.attribute-name { color:#b48 }
|
58
|
+
.attribute-value { color:#700 }
|
59
|
+
.binary { color:#549 }
|
60
|
+
.binary .char { color:#325 }
|
61
|
+
.binary .delimiter { color:#325 }
|
62
|
+
.char { color:#D20 }
|
63
|
+
.char .content { color:#D20 }
|
64
|
+
.char .delimiter { color:#710 }
|
65
|
+
.class { color:#B06; font-weight:bold }
|
66
|
+
.class-variable { color:#369 }
|
67
|
+
.color { color:#0A0 }
|
68
|
+
.comment { color:#777 }
|
69
|
+
.comment .char { color:#444 }
|
70
|
+
.comment .delimiter { color:#444 }
|
71
|
+
.constant { color:#036; font-weight:bold }
|
72
|
+
.decorator { color:#B0B }
|
73
|
+
.definition { color:#099; font-weight:bold }
|
74
|
+
.delimiter { color:black }
|
75
|
+
.directive { color:#088; font-weight:bold }
|
76
|
+
.docstring { color:#D42; }
|
77
|
+
.doctype { color:#34b }
|
78
|
+
.done { text-decoration: line-through; color: gray }
|
79
|
+
.entity { color:#800; font-weight:bold }
|
80
|
+
.error { color:#F00; background-color:#FAA }
|
81
|
+
.escape { color:#666 }
|
82
|
+
.exception { color:#C00; font-weight:bold }
|
83
|
+
.float { color:#60E }
|
84
|
+
.function { color:#06B; font-weight:bold }
|
85
|
+
.function .delimiter { color:#059 }
|
86
|
+
.function .content { color:#037 }
|
87
|
+
.global-variable { color:#d70 }
|
88
|
+
.hex { color:#02b }
|
89
|
+
.id { color:#33D; font-weight:bold }
|
90
|
+
.include { color:#B44; font-weight:bold }
|
91
|
+
.inline { background-color: hsla(0,0%,0%,0.07); color: black }
|
92
|
+
.inline-delimiter { font-weight: bold; color: #666 }
|
93
|
+
.instance-variable { color:#33B }
|
94
|
+
.integer { color:#00D }
|
95
|
+
.imaginary { color:#f00 }
|
96
|
+
.important { color:#D00 }
|
97
|
+
.key { color: #606 }
|
98
|
+
.key .char { color: #60f }
|
99
|
+
.key .delimiter { color: #404 }
|
100
|
+
.keyword { color:#080; font-weight:bold }
|
101
|
+
.label { color:#970; font-weight:bold }
|
102
|
+
.local-variable { color:#950 }
|
103
|
+
.map .content { color:#808 }
|
104
|
+
.map .delimiter { color:#40A}
|
105
|
+
.map { background-color:hsla(200,100%,50%,0.06); }
|
106
|
+
.namespace { color:#707; font-weight:bold }
|
107
|
+
.octal { color:#40E }
|
108
|
+
.operator { }
|
109
|
+
.predefined { color:#369; font-weight:bold }
|
110
|
+
.predefined-constant { color:#069 }
|
111
|
+
.predefined-type { color:#0a8; font-weight:bold }
|
112
|
+
.preprocessor { color:#579 }
|
113
|
+
.pseudo-class { color:#00C; font-weight:bold }
|
114
|
+
.regexp { background-color:hsla(300,100%,50%,0.06); }
|
115
|
+
.regexp .content { color:#808 }
|
116
|
+
.regexp .delimiter { color:#404 }
|
117
|
+
.regexp .modifier { color:#C2C }
|
118
|
+
.reserved { color:#080; font-weight:bold }
|
119
|
+
.shell { background-color:hsla(120,100%,50%,0.06); }
|
120
|
+
.shell .content { color:#2B2 }
|
121
|
+
.shell .delimiter { color:#161 }
|
122
|
+
.string { background-color:hsla(0,100%,50%,0.05); }
|
123
|
+
.string .char { color: #b0b }
|
124
|
+
.string .content { color: #D20 }
|
125
|
+
.string .delimiter { color: #710 }
|
126
|
+
.string .modifier { color: #E40 }
|
127
|
+
.symbol { color:#A60 }
|
128
|
+
.symbol .content { color:#A60 }
|
129
|
+
.symbol .delimiter { color:#740 }
|
130
|
+
.tag { color:#070; font-weight:bold }
|
131
|
+
.type { color:#339; font-weight:bold }
|
132
|
+
.value { color: #088 }
|
133
|
+
.variable { color:#037 }
|
134
|
+
|
135
|
+
.insert { background: hsla(120,100%,50%,0.12) }
|
136
|
+
.delete { background: hsla(0,100%,50%,0.12) }
|
137
|
+
.change { color: #bbf; background: #007 }
|
138
|
+
.head { color: #f8f; background: #505 }
|
139
|
+
.head .filename { color: white; }
|
140
|
+
|
141
|
+
.delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; }
|
142
|
+
.insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
|
143
|
+
|
144
|
+
.insert .insert { color: #0c0; background:transparent; font-weight:bold }
|
145
|
+
.delete .delete { color: #c00; background:transparent; font-weight:bold }
|
146
|
+
.change .change { color: #88f }
|
147
|
+
.head .head { color: #f4f }
|
148
|
+
TOKENS
|
149
|
+
|
150
|
+
end
|
151
|
+
|
152
|
+
end
|
153
|
+
end
|