sshp 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.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/bin/sshp +16 -0
- data/bin/sshp-alias +17 -0
- data/lib/sshp.rb +3 -0
- data/lib/sshp/alias.rb +27 -0
- data/lib/sshp/version.rb +3 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/sshp/alias_spec.rb +33 -0
- data/sshp.gemspec +24 -0
- data/vendor/ruby/1.9.1/bin/autospec +23 -0
- data/vendor/ruby/1.9.1/bin/coderay +23 -0
- data/vendor/ruby/1.9.1/bin/htmldiff +25 -0
- data/vendor/ruby/1.9.1/bin/ldiff +25 -0
- data/vendor/ruby/1.9.1/bin/pry +23 -0
- data/vendor/ruby/1.9.1/bin/rake +23 -0
- data/vendor/ruby/1.9.1/bin/rspec +23 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/README_INDEX.rdoc +123 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/Rakefile +35 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/bin/coderay +215 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay.rb +285 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/duo.rb +81 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoder.rb +201 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/_map.rb +17 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/comment_filter.rb +25 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/count.rb +39 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/debug.rb +61 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/div.rb +23 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/filter.rb +58 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/html.rb +327 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/html/css.rb +65 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/html/numbering.rb +103 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/html/output.rb +166 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/json.rb +83 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/lines_of_code.rb +45 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/null.rb +18 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/page.rb +24 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/span.rb +23 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/statistic.rb +96 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/terminal.rb +179 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/text.rb +46 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/token_kind_filter.rb +111 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/xml.rb +72 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb +50 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/for_redcloth.rb +95 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb +143 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/helpers/gzip.rb +41 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/helpers/plugin.rb +283 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/helpers/word_list.rb +72 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanner.rb +323 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/_map.rb +24 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/c.rb +189 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/clojure.rb +217 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/cpp.rb +215 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/css.rb +199 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/debug.rb +65 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/delphi.rb +144 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/diff.rb +199 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/erb.rb +81 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/groovy.rb +255 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/haml.rb +168 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/html.rb +253 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/java.rb +174 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/java/builtin_types.rb +421 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/java_script.rb +213 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/json.rb +95 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/php.rb +509 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/python.rb +287 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/raydebug.rb +66 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/ruby.rb +470 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/ruby/patterns.rb +175 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/ruby/string_state.rb +71 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/sql.rb +174 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/text.rb +26 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/xml.rb +17 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/scanners/yaml.rb +140 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/style.rb +23 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/styles/_map.rb +7 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/styles/alpha.rb +142 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/token_kinds.rb +90 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/tokens.rb +215 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/tokens_proxy.rb +55 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/version.rb +3 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/test/functional/basic.rb +320 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/test/functional/examples.rb +129 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/test/functional/for_redcloth.rb +84 -0
- data/vendor/ruby/1.9.1/gems/coderay-1.0.9/test/functional/suite.rb +15 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/.autotest +3 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/.gemtest +0 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/.hoerc +2 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/.travis.yml +22 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/Contributing.rdoc +64 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/Gemfile +20 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/History.rdoc +146 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/License.rdoc +39 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/Manifest.txt +38 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/README.rdoc +85 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/Rakefile +39 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/autotest/discover.rb +1 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/bin/htmldiff +32 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/bin/ldiff +6 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/docs/COPYING.txt +339 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/docs/artistic.txt +127 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff-lcs.rb +3 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs.rb +805 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/array.rb +7 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/block.rb +37 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb +177 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/internals.rb +301 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/ldiff.rb +195 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/lib/diff/lcs/string.rb +5 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/change_spec.rb +65 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/diff_spec.rb +47 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/hunk_spec.rb +72 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/issues_spec.rb +24 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/lcs_spec.rb +54 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/patch_spec.rb +414 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/sdiff_spec.rb +202 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/spec_helper.rb +290 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/ruby/1.9.1/gems/diff-lcs-1.2.4/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/.gitignore +2 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/AUTHORS +3 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/CHANGELOG +346 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/COPYING +340 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/INSTALL +55 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/LICENSE +7 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/README.rdoc +63 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/Rakefile +50 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/TODO +6 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/ansi_colors.rb +38 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/asking_for_arrays.rb +18 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/basic_usage.rb +75 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/color_scheme.rb +32 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/get_character.rb +12 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/limit.rb +12 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/menus.rb +65 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/overwrite.rb +19 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/page_and_wrap.rb +322 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/password.rb +7 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/repeat_entry.rb +21 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/trapping_eof.rb +22 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/examples/using_readline.rb +17 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/highline.gemspec +37 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline.rb +1012 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/color_scheme.rb +134 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/compatibility.rb +16 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/import.rb +41 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/menu.rb +398 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/question.rb +475 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/simulate.rb +48 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/string_extensions.rb +131 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/style.rb +181 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/lib/highline/system_extensions.rb +222 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/setup.rb +1360 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/site/.cvsignore +1 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/site/highline.css +65 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/site/images/logo.png +0 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/site/index.html +58 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/string_methods.rb +32 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_color_scheme.rb +96 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_highline.rb +1128 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_import.rb +52 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_menu.rb +439 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_string_extension.rb +20 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_string_highline.rb +38 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/tc_style.rb +567 -0
- data/vendor/ruby/1.9.1/gems/highline-1.6.19/test/ts_all.rb +16 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/.gemtest +0 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/.travis.yml +17 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/.yardopts +1 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/Gemfile +2 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/LICENSE +25 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/README.markdown +91 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/Rakefile +79 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/lib/method_source.rb +141 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/lib/method_source/code_helpers.rb +139 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/lib/method_source/source_location.rb +138 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/lib/method_source/version.rb +3 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/method_source.gemspec +33 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/test/test.rb +138 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/test/test_code_helpers.rb +41 -0
- data/vendor/ruby/1.9.1/gems/method_source-0.8.1/test/test_helper.rb +98 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/.document +2 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/.gitignore +16 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/.travis.yml +21 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/.yardopts +1 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/CHANGELOG +534 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/CONTRIBUTORS +55 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/Gemfile +9 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/Guardfile +62 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/LICENSE +25 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/README.markdown +400 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/Rakefile +140 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/TODO +117 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/bin/pry +16 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry.rb +271 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/cli.rb +202 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/code.rb +385 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/code/code_range.rb +70 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/code/loc.rb +92 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/code_object.rb +153 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/command.rb +689 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/command_set.rb +400 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands.rb +6 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/amend_line.rb +99 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/bang.rb +20 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/bang_pry.rb +17 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/cat.rb +53 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/cat/abstract_formatter.rb +27 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/cat/exception_formatter.rb +78 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/cat/file_formatter.rb +84 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/cat/input_expression_formatter.rb +43 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/cd.rb +30 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/code_collector.rb +165 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/disable_pry.rb +27 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/disabled_commands.rb +2 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/easter_eggs.rb +112 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/edit.rb +207 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/edit/exception_patcher.rb +25 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/edit/file_and_line_locator.rb +38 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/edit/method_patcher.rb +122 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/exit.rb +42 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/exit_all.rb +29 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/exit_program.rb +24 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/find_method.rb +199 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/fix_indent.rb +19 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/gem_cd.rb +26 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/gem_install.rb +29 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/gem_list.rb +33 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/gem_open.rb +29 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/gist.rb +102 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/help.rb +164 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/hist.rb +161 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/import_set.rb +22 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/install_command.rb +51 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/jump_to.rb +29 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/ls.rb +338 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/nesting.rb +25 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/play.rb +69 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/pry_backtrace.rb +26 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/pry_version.rb +17 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/raise_up.rb +32 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/reload_code.rb +65 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/reset.rb +18 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/ri.rb +56 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/save_file.rb +61 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/shell_command.rb +43 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/shell_mode.rb +27 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/show_doc.rb +78 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/show_info.rb +200 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/show_input.rb +17 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/show_source.rb +38 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/simple_prompt.rb +22 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/stat.rb +40 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/switch_to.rb +23 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/toggle_color.rb +20 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/whereami.rb +182 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/commands/wtf.rb +57 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/completion.rb +304 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/config.rb +244 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/core_extensions.rb +121 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/custom_completions.rb +6 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/editor.rb +129 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers.rb +5 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers/base_helpers.rb +200 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers/command_helpers.rb +154 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers/documentation_helpers.rb +76 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers/options_helpers.rb +27 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers/table.rb +109 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/helpers/text.rb +108 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/history.rb +122 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/history_array.rb +116 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/hooks.rb +250 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/indent.rb +406 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/method.rb +551 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/method/disowned.rb +53 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/method/weird_method_locator.rb +186 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/module_candidate.rb +146 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pager.rb +90 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/plugins.rb +103 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_class.rb +469 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb +763 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/rbx_method.rb +13 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/rbx_path.rb +22 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/repl_file_loader.rb +80 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/rubygem.rb +74 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/terminal.rb +78 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/test/helper.rb +185 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/version.rb +3 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/wrapped_module.rb +383 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/man/pry.1 +195 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/man/pry.1.html +204 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/man/pry.1.ronn +141 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/pry.gemspec +30 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/Procfile +3 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/cli_spec.rb +78 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/code_object_spec.rb +277 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/code_spec.rb +219 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/command_helpers_spec.rb +29 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/command_integration_spec.rb +644 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/command_set_spec.rb +627 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/command_spec.rb +821 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/amend_line_spec.rb +247 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/bang_spec.rb +19 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/cat_spec.rb +164 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/cd_spec.rb +250 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/disable_pry_spec.rb +25 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/edit_spec.rb +727 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/exit_all_spec.rb +34 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/exit_program_spec.rb +19 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/exit_spec.rb +34 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/find_method_spec.rb +70 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/gem_list_spec.rb +26 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/gist_spec.rb +79 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/help_spec.rb +56 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/hist_spec.rb +181 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/jump_to_spec.rb +15 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/ls_spec.rb +181 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/play_spec.rb +140 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/raise_up_spec.rb +56 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/save_file_spec.rb +177 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/show_doc_spec.rb +510 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/show_input_spec.rb +17 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/show_source_spec.rb +782 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/commands/whereami_spec.rb +203 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/completion_spec.rb +239 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/control_d_handler_spec.rb +58 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/documentation_helper_spec.rb +73 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/editor_spec.rb +79 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/exception_whitelist_spec.rb +21 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/candidate_helper1.rb +11 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/candidate_helper2.rb +8 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/example.erb +5 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/example_nesting.rb +33 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/show_source_doc_examples.rb +15 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/testrc +2 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/testrcbad +2 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/fixtures/whereami_helper.rb +6 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/helper.rb +34 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/helpers/bacon.rb +86 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/helpers/mock_pry.rb +43 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/helpers/table_spec.rb +105 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/history_array_spec.rb +67 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/hooks_spec.rb +522 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/indent_spec.rb +301 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/input_stack_spec.rb +90 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/method_spec.rb +482 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/prompt_spec.rb +60 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/pry_defaults_spec.rb +419 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/pry_history_spec.rb +99 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/pry_output_spec.rb +95 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/pry_spec.rb +504 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/run_command_spec.rb +25 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/sticky_locals_spec.rb +157 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/syntax_checking_spec.rb +81 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/wrapped_module_spec.rb +261 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/wiki/Customizing-pry.md +397 -0
- data/vendor/ruby/1.9.1/gems/pry-0.9.12.2/wiki/Home.md +4 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/.gemtest +0 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/CHANGES +530 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/MIT-LICENSE +21 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/README.rdoc +187 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/Rakefile +375 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/TODO +21 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/bin/rake +33 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/install.rb +90 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake.rb +71 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/alt_system.rb +109 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb +681 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/backtrace.rb +19 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/clean.rb +32 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/cloneable.rb +16 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/contrib/ftptools.rb +151 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/contrib/publisher.rb +73 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/contrib/rubyforgepublisher.rb +16 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/contrib/sshpublisher.rb +50 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/contrib/sys.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/default_loader.rb +10 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/dsl_definition.rb +156 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/early_time.rb +18 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/ext/core.rb +27 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/ext/module.rb +0 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/ext/string.rb +168 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/ext/time.rb +15 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/file_creation_task.rb +24 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/file_list.rb +410 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/file_task.rb +47 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb +114 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/file_utils_ext.rb +143 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/gempackagetask.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/invocation_chain.rb +51 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/loaders/makefile.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/multi_task.rb +13 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/name_space.rb +25 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/packagetask.rb +185 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/pathmap.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/phony.rb +15 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/private_reader.rb +20 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/promise.rb +99 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/pseudo_status.rb +24 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb +37 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rdoctask.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/ruby182_test_unit_fix.rb +25 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/runtest.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb +368 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task_argument_error.rb +7 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task_arguments.rb +78 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task_manager.rb +296 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/tasklib.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/testtask.rb +198 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/thread_history_display.rb +48 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/thread_pool.rb +155 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/trace_output.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/version.rb +13 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/lib/rake/win32.rb +55 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/file_creation.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/helper.rb +562 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_private_reader.rb +42 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_application.rb +515 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_application_options.rb +455 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_backtrace.rb +89 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_clean.rb +14 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_definitions.rb +80 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_directory_task.rb +57 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_dsl.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_early_time.rb +31 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_extension.rb +59 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_file_list.rb +628 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_file_task.rb +122 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_file_utils.rb +305 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_ftp_file.rb +59 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_functional.rb +496 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_invocation_chain.rb +52 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_makefile_loader.rb +44 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_multi_task.rb +59 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_name_space.rb +43 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_package_task.rb +79 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_path_map.rb +157 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_rake_test_loader.rb +21 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_reduce_compat.rb +30 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_require.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_rules.rb +327 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task.rb +340 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task_argument_parsing.rb +103 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task_arguments.rb +88 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task_lib.rb +9 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task_manager.rb +157 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_task_with_arguments.rb +171 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_test_task.rb +120 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_thread_pool.rb +122 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_rake_win32.rb +72 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_thread_history_display.rb +91 -0
- data/vendor/ruby/1.9.1/gems/rake-10.0.4/test/test_trace_output.rb +50 -0
- data/vendor/ruby/1.9.1/gems/rspec-2.13.0/License.txt +24 -0
- data/vendor/ruby/1.9.1/gems/rspec-2.13.0/README.md +47 -0
- data/vendor/ruby/1.9.1/gems/rspec-2.13.0/lib/rspec.rb +4 -0
- data/vendor/ruby/1.9.1/gems/rspec-2.13.0/lib/rspec/version.rb +5 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/.document +5 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/.yardopts +6 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/Changelog.md +718 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/License.txt +24 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/README.md +261 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/exe/autospec +13 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/exe/rspec +25 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/Autotest.md +38 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/README.md +17 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/Upgrade.md +364 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/README.md +28 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/example_name_option.feature +97 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/exit_status.feature +82 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/format_option.feature +81 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/init.feature +18 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/line_number_appended_to_path.feature +140 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/line_number_option.feature +58 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/order.feature +29 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/pattern_option.feature +31 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/rake_task.feature +122 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/ruby.feature +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/tag.feature +98 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/alias_example_to.feature +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/backtrace_clean_patterns.feature +102 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/custom_settings.feature +84 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/default_path.feature +38 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/fail_fast.feature +77 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/failure_exit_code.feature +36 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/order_and_seed.feature +3 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/output_stream.feature +24 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/pattern.feature +30 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/profile.feature +163 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/read_options_from_file.feature +87 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/run_all_when_everything_filtered.feature +60 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/show_failures_in_pending_blocks.feature +61 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/example_groups/basic_structure.feature +55 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/example_groups/shared_context.feature +74 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/example_groups/shared_examples.feature +222 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/filtering/exclusion_filters.feature +138 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/filtering/if_and_unless.feature +168 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/filtering/inclusion_filters.feature +105 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/filtering/run_all_when_everything_filtered.feature +46 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/formatters/configurable_colors.feature +31 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/formatters/custom_formatter.feature +36 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/formatters/json_formatter.feature +30 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/formatters/text_formatter.feature +46 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/helper_methods/arbitrary_methods.feature +40 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/helper_methods/let.feature +50 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/helper_methods/modules.feature +149 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/hooks/around_hooks.feature +343 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/hooks/before_and_after_hooks.feature +427 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/hooks/filtering.feature +234 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/metadata/current_example.feature +17 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/metadata/described_class.feature +17 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/metadata/user_defined.feature +113 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/mock_framework_integration/use_mocha.feature +97 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/mock_framework_integration/use_rr.feature +98 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/mock_framework_integration/use_rspec.feature +97 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/pending/pending_examples.feature +229 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/step_definitions/additional_cli_steps.rb +49 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/subject/attribute_of_subject.feature +124 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/subject/explicit_subject.feature +101 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/subject/implicit_receiver.feature +29 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/subject/implicit_subject.feature +63 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/support/env.rb +14 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/autotest/discover.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/autotest/rspec2.rb +73 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/autorun.rb +2 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core.rb +146 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/backward_compatibility.rb +65 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb +36 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb +1087 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration_options.rb +144 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/deprecation.rb +36 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/drb_command_line.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/drb_options.rb +87 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/dsl.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/example.rb +331 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb +478 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/extensions/kernel.rb +9 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/extensions/ordered.rb +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/filter_manager.rb +203 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters.rb +55 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/base_formatter.rb +237 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/base_text_formatter.rb +292 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/helpers.rb +103 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/html_formatter.rb +154 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/html_printer.rb +407 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/json_formatter.rb +73 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/hooks.rb +489 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/load_path.rb +3 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/memoized_helpers.rb +501 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/metadata.rb +297 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/mocking/with_mocha.rb +52 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/mocking/with_rspec.rb +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/option_parser.rb +208 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/pending.rb +108 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/project_initializer.rb +86 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/rake_task.rb +202 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/reporter.rb +102 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/ruby_project.rb +44 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb +87 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/shared_context.rb +49 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/shared_example_group.rb +144 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/version.rb +7 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/world.rb +128 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/autotest/discover_spec.rb +19 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/autotest/failed_results_re_spec.rb +45 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/autotest/rspec_spec.rb +133 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/command_line/order_spec.rb +204 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/command_line_spec.rb +108 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/configuration_options_spec.rb +398 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/configuration_spec.rb +1376 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/deprecations_spec.rb +75 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/drb_command_line_spec.rb +102 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/drb_options_spec.rb +193 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/dsl_spec.rb +25 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/example_group_spec.rb +1176 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/example_spec.rb +418 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/filter_manager_spec.rb +246 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/base_text_formatter_spec.rb +429 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/helpers_spec.rb +78 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +398 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +577 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.8.7.html +409 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.9.2.html +416 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +410 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +577 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-1.9.3.html +416 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatted-2.0.0.html +416 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/html_formatter_spec.rb +94 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/json_formatter_spec.rb +110 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +398 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +577 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +409 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +416 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +398 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +577 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +416 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatted-2.0.0.html +416 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/formatters/text_mate_formatter_spec.rb +95 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/hooks_spec.rb +267 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/memoized_helpers_spec.rb +642 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/metadata_spec.rb +486 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/option_parser_spec.rb +208 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/pending_example_spec.rb +220 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/rake_task_spec.rb +181 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/reporter_spec.rb +120 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/resources/a_bar.rb +0 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/resources/a_foo.rb +0 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/resources/a_spec.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/ruby_project_spec.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/runner_spec.rb +82 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/shared_context_spec.rb +94 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/shared_example_group_spec.rb +96 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core/world_spec.rb +144 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/rspec/core_spec.rb +35 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/spec_helper.rb +132 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/config_options_helper.rb +15 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/helper_methods.rb +18 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/isolated_directory.rb +10 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/isolated_home_directory.rb +16 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/matchers.rb +65 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/shared_example_groups.rb +41 -0
- data/vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/spec_files.rb +44 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/.document +5 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/.yardopts +6 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/Changelog.md +328 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/License.txt +23 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/README.md +228 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/README.md +49 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/Upgrade.md +53 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/README.md +90 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/be.feature +175 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/be_within.feature +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/cover.feature +47 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/end_with.feature +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/equality.feature +139 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/exist.feature +45 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/expect_change.feature +59 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/expect_error.feature +144 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/have.feature +109 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/include.feature +174 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/match.feature +52 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/operators.feature +227 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/predicates.feature +137 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/respond_to.feature +84 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/satisfy.feature +33 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/start_with.feature +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/throw_symbol.feature +91 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/types.feature +116 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/built_in_matchers/yield.feature +146 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/access_running_example.feature +53 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_matcher.feature +368 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/customized_message.feature +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/diffing.feature +85 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/implicit_docstrings.feature +52 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/step_definitions/additional_cli_steps.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/support/env.rb +5 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/syntax_configuration.feature +68 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/test_frameworks/test_unit.feature +46 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec-expectations.rb +1 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations.rb +47 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/deprecation.rb +38 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/differ.rb +115 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/errors.rb +9 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/expectation_target.rb +88 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/extensions.rb +2 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/extensions/array.rb +9 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/extensions/object.rb +39 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/fail_with.rb +69 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/handler.rb +63 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/syntax.rb +164 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/expectations/version.rb +8 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers.rb +699 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/be_close.rb +9 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in.rb +39 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/be.rb +189 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/be_within.rb +55 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/change.rb +133 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/equal.rb +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/has.rb +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/have.rb +108 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/include.rb +69 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/match.rb +12 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/match_array.rb +51 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/raise_error.rb +107 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/respond_to.rb +74 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/satisfy.rb +30 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/built_in/yield.rb +221 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/compatibility.rb +14 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/configuration.rb +108 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/dsl.rb +24 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/generated_descriptions.rb +35 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/matcher.rb +300 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/method_missing.rb +12 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/operator_matcher.rb +109 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/pretty.rb +64 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/expectations/differ_spec.rb +170 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/expectations/expectation_target_spec.rb +75 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/expectations/fail_with_spec.rb +95 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/expectations/handler_spec.rb +206 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/expectations/syntax_spec.rb +97 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/base_matcher_spec.rb +62 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/be_instance_of_spec.rb +63 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/be_kind_of_spec.rb +41 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/be_spec.rb +516 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/be_within_spec.rb +129 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/change_spec.rb +542 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/configuration_spec.rb +238 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/cover_spec.rb +69 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/description_generation_spec.rb +176 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/eq_spec.rb +60 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/eql_spec.rb +41 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/equal_spec.rb +78 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/exist_spec.rb +124 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/has_spec.rb +122 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/have_spec.rb +445 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/include_spec.rb +531 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/match_array_spec.rb +194 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/match_spec.rb +61 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/matcher_spec.rb +471 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/matchers_spec.rb +37 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/method_missing_spec.rb +28 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/operator_matcher_spec.rb +223 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/raise_error_spec.rb +395 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/satisfy_spec.rb +44 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/start_with_end_with_spec.rb +186 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/rspec/matchers/yield_spec.rb +437 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/spec_helper.rb +54 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/support/classes.rb +56 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/support/in_sub_process.rb +38 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/support/matchers.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/support/ruby_version.rb +10 -0
- data/vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/spec/support/shared_examples.rb +13 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/.document +5 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/.yardopts +6 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/Changelog.md +306 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/License.txt +23 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/README.md +315 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/README.md +67 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/Scope.md +17 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/Upgrade.md +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/argument_matchers/README.md +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/argument_matchers/explicit.feature +60 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/argument_matchers/general_matchers.feature +85 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/argument_matchers/type_matchers.feature +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/README.md +73 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/any_instance.feature +21 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/call_original.feature +24 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/expect_message.feature +94 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/receive_counts.feature +209 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/README.md +47 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/any_instance.feature +132 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/as_null_object.feature +35 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/simple_return_value.feature +64 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/stub_chain.feature +51 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/stub_implementation.feature +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/method_stubs/to_ary.feature +47 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/mutating_constants/README.md +82 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/mutating_constants/hiding_defined_constant.feature +64 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/mutating_constants/stub_defined_constant.feature +79 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/outside_rspec/configuration.feature +82 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/outside_rspec/standalone.feature +33 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/step_definitions/additional_cli_steps.rb +4 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/features/support/env.rb +13 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks.rb +82 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance.rb +81 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance/chain.rb +78 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance/expectation_chain.rb +66 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance/recorder.rb +204 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance/stub_chain.rb +37 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +25 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/argument_list_matcher.rb +93 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/configuration.rb +28 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/error_generator.rb +120 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/errors.rb +12 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/example_methods.rb +120 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/extensions/marshal.rb +23 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/extensions/psych.rb +23 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/framework.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/instance_method_stasher.rb +85 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/message_expectation.rb +567 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/method_double.rb +267 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/methods.rb +155 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/mock.rb +7 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/mutate_const.rb +415 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/order_group.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/proxy.rb +205 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/serialization.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/space.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/test_double.rb +103 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/rspec/mocks/version.rb +7 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/lib/spec/mocks.rb +6 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/and_call_original_spec.rb +235 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/and_yield_spec.rb +127 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/any_instance_spec.rb +925 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/argument_expectation_spec.rb +34 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/at_least_spec.rb +142 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/block_return_value_spec.rb +53 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/combining_implementation_instructions_spec.rb +197 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/configuration_spec.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/double_spec.rb +12 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/failing_argument_matchers_spec.rb +94 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/mock_space_spec.rb +58 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/mock_spec.rb +734 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/multiple_return_value_spec.rb +132 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/mutate_const_spec.rb +481 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/nil_expectation_warning_spec.rb +62 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/null_object_mock_spec.rb +107 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/partial_mock_spec.rb +196 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/serialization_spec.rb +110 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/stash_spec.rb +54 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/stub_chain_spec.rb +154 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/stub_spec.rb +279 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/stubbed_message_expectations_spec.rb +58 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/test_double_spec.rb +57 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/to_ary_spec.rb +40 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks_spec.rb +67 -0
- data/vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/spec_helper.rb +36 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/.gitignore +7 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/.travis.yml +12 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/CHANGES.md +290 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/Gemfile +3 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/LICENSE +20 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/README.md +182 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/Rakefile +29 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/lib/slop.rb +689 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/lib/slop/commands.rb +196 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/lib/slop/option.rb +208 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/slop.gemspec +17 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/test/commands_test.rb +26 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/test/helper.rb +12 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/test/option_test.rb +134 -0
- data/vendor/ruby/1.9.1/gems/slop-3.4.5/test/slop_test.rb +497 -0
- data/vendor/ruby/1.9.1/specifications/coderay-1.0.9.gemspec +32 -0
- data/vendor/ruby/1.9.1/specifications/diff-lcs-1.2.4.gemspec +64 -0
- data/vendor/ruby/1.9.1/specifications/highline-1.6.19.gemspec +30 -0
- data/vendor/ruby/1.9.1/specifications/method_source-0.8.1.gemspec +31 -0
- data/vendor/ruby/1.9.1/specifications/pry-0.9.12.2.gemspec +54 -0
- data/vendor/ruby/1.9.1/specifications/rake-10.0.4.gemspec +35 -0
- data/vendor/ruby/1.9.1/specifications/rspec-2.13.0.gemspec +39 -0
- data/vendor/ruby/1.9.1/specifications/rspec-core-2.13.1.gemspec +58 -0
- data/vendor/ruby/1.9.1/specifications/rspec-expectations-2.13.0.gemspec +40 -0
- data/vendor/ruby/1.9.1/specifications/rspec-mocks-2.13.1.gemspec +37 -0
- data/vendor/ruby/1.9.1/specifications/slop-3.4.5.gemspec +33 -0
- metadata +1105 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "rubygems"
|
|
4
|
+
require "highline/import"
|
|
5
|
+
|
|
6
|
+
tounge_twister = ask("... try saying that three times fast") do |q|
|
|
7
|
+
q.gather = 3
|
|
8
|
+
q.verify_match = true
|
|
9
|
+
q.responses[:mismatch] = "Nope, those don't match. Try again."
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
puts "Ok, you did it."
|
|
13
|
+
|
|
14
|
+
pass = ask("Enter your password: ") do |q|
|
|
15
|
+
q.echo = '*'
|
|
16
|
+
q.verify_match = true
|
|
17
|
+
q.gather = {"Enter a password" => '',
|
|
18
|
+
"Please type it again for verification" => ''}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
puts "Your password is now #{pass}!"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# trapping_eof.rb
|
|
4
|
+
#
|
|
5
|
+
# Created by James Edward Gray II on 2006-02-20.
|
|
6
|
+
# Copyright 2006 Gray Productions. All rights reserved.
|
|
7
|
+
|
|
8
|
+
require "rubygems"
|
|
9
|
+
require "highline/import"
|
|
10
|
+
|
|
11
|
+
loop do
|
|
12
|
+
begin
|
|
13
|
+
name = ask("What's your name?")
|
|
14
|
+
break if name == "exit"
|
|
15
|
+
puts "Hello, #{name}!"
|
|
16
|
+
rescue EOFError # HighLine throws this if @input.eof?
|
|
17
|
+
break
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
puts "Goodbye, dear friend."
|
|
22
|
+
exit
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# using_readline.rb
|
|
4
|
+
#
|
|
5
|
+
# Created by James Edward Gray II on 2005-07-06.
|
|
6
|
+
# Copyright 2005 Gray Productions. All rights reserved.
|
|
7
|
+
|
|
8
|
+
require "rubygems"
|
|
9
|
+
require "highline/import"
|
|
10
|
+
|
|
11
|
+
loop do
|
|
12
|
+
cmd = ask("Enter command: ", %w{save sample load reset quit}) do |q|
|
|
13
|
+
q.readline = true
|
|
14
|
+
end
|
|
15
|
+
say("Executing \"#{cmd}\"...")
|
|
16
|
+
break if cmd == "quit"
|
|
17
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
DIR = File.dirname(__FILE__)
|
|
2
|
+
LIB = File.join(DIR, *%w[lib highline.rb])
|
|
3
|
+
GEM_VERSION = open(LIB) { |lib|
|
|
4
|
+
lib.each { |line|
|
|
5
|
+
if v = line[/^\s*VERSION\s*=\s*(['"])(\d+\.\d+\.\d+)\1/, 2]
|
|
6
|
+
break v
|
|
7
|
+
end
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
SPEC = Gem::Specification.new do |spec|
|
|
12
|
+
spec.name = "highline"
|
|
13
|
+
spec.version = GEM_VERSION
|
|
14
|
+
spec.platform = Gem::Platform::RUBY
|
|
15
|
+
spec.summary = "HighLine is a high-level command-line IO library."
|
|
16
|
+
spec.files = `git ls-files`.split("\n")
|
|
17
|
+
|
|
18
|
+
spec.test_files = `git ls-files -- test/*.rb`.split("\n")
|
|
19
|
+
spec.has_rdoc = true
|
|
20
|
+
spec.extra_rdoc_files = %w[README.rdoc INSTALL TODO CHANGELOG LICENSE]
|
|
21
|
+
spec.rdoc_options << '--title' << 'HighLine Documentation' <<
|
|
22
|
+
'--main' << 'README'
|
|
23
|
+
|
|
24
|
+
spec.require_path = 'lib'
|
|
25
|
+
|
|
26
|
+
spec.author = "James Edward Gray II"
|
|
27
|
+
spec.email = "james@graysoftinc.com"
|
|
28
|
+
spec.rubyforge_project = "highline"
|
|
29
|
+
spec.homepage = "http://highline.rubyforge.org"
|
|
30
|
+
spec.license = "Ruby"
|
|
31
|
+
spec.description = <<END_DESC
|
|
32
|
+
A high-level IO library that provides validation, type conversion, and more for
|
|
33
|
+
command-line interfaces. HighLine also includes a complete menu system that can
|
|
34
|
+
crank out anything from simple list selection to complete shells with just
|
|
35
|
+
minutes of work.
|
|
36
|
+
END_DESC
|
|
37
|
+
end
|
|
@@ -0,0 +1,1012 @@
|
|
|
1
|
+
# highline.rb
|
|
2
|
+
#
|
|
3
|
+
# Created by James Edward Gray II on 2005-04-26.
|
|
4
|
+
# Copyright 2005 Gray Productions. All rights reserved.
|
|
5
|
+
#
|
|
6
|
+
# See HighLine for documentation.
|
|
7
|
+
#
|
|
8
|
+
# This is Free Software. See LICENSE and COPYING for details.
|
|
9
|
+
|
|
10
|
+
require "erb"
|
|
11
|
+
require "optparse"
|
|
12
|
+
require "stringio"
|
|
13
|
+
require "abbrev"
|
|
14
|
+
require "highline/system_extensions"
|
|
15
|
+
require "highline/question"
|
|
16
|
+
require "highline/menu"
|
|
17
|
+
require "highline/color_scheme"
|
|
18
|
+
require "highline/style"
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# A HighLine object is a "high-level line oriented" shell over an input and an
|
|
22
|
+
# output stream. HighLine simplifies common console interaction, effectively
|
|
23
|
+
# replacing puts() and gets(). User code can simply specify the question to ask
|
|
24
|
+
# and any details about user interaction, then leave the rest of the work to
|
|
25
|
+
# HighLine. When HighLine.ask() returns, you'll have the answer you requested,
|
|
26
|
+
# even if HighLine had to ask many times, validate results, perform range
|
|
27
|
+
# checking, convert types, etc.
|
|
28
|
+
#
|
|
29
|
+
class HighLine
|
|
30
|
+
# The version of the installed library.
|
|
31
|
+
VERSION = "1.6.19".freeze
|
|
32
|
+
|
|
33
|
+
# An internal HighLine error. User code does not need to trap this.
|
|
34
|
+
class QuestionError < StandardError
|
|
35
|
+
# do nothing, just creating a unique error type
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# The setting used to disable color output.
|
|
39
|
+
@@use_color = true
|
|
40
|
+
|
|
41
|
+
# Pass +false+ to _setting_ to turn off HighLine's color escapes.
|
|
42
|
+
def self.use_color=( setting )
|
|
43
|
+
@@use_color = setting
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns true if HighLine is currently using color escapes.
|
|
47
|
+
def self.use_color?
|
|
48
|
+
@@use_color
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# For checking if the current version of HighLine supports RGB colors
|
|
52
|
+
# Usage: HighLine.supports_rgb_color? rescue false # rescue for compatibility with older versions
|
|
53
|
+
# Note: color usage also depends on HighLine.use_color being set
|
|
54
|
+
def self.supports_rgb_color?
|
|
55
|
+
true
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# The setting used to disable EOF tracking.
|
|
59
|
+
@@track_eof = true
|
|
60
|
+
|
|
61
|
+
# Pass +false+ to _setting_ to turn off HighLine's EOF tracking.
|
|
62
|
+
def self.track_eof=( setting )
|
|
63
|
+
@@track_eof = setting
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns true if HighLine is currently tracking EOF for input.
|
|
67
|
+
def self.track_eof?
|
|
68
|
+
@@track_eof
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# The setting used to control color schemes.
|
|
72
|
+
@@color_scheme = nil
|
|
73
|
+
|
|
74
|
+
# Pass ColorScheme to _setting_ to set a HighLine color scheme.
|
|
75
|
+
def self.color_scheme=( setting )
|
|
76
|
+
@@color_scheme = setting
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns the current color scheme.
|
|
80
|
+
def self.color_scheme
|
|
81
|
+
@@color_scheme
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns +true+ if HighLine is currently using a color scheme.
|
|
85
|
+
def self.using_color_scheme?
|
|
86
|
+
not @@color_scheme.nil?
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
#
|
|
90
|
+
# Embed in a String to clear all previous ANSI sequences. This *MUST* be
|
|
91
|
+
# done before the program exits!
|
|
92
|
+
#
|
|
93
|
+
|
|
94
|
+
ERASE_LINE_STYLE = Style.new(:name=>:erase_line, :builtin=>true, :code=>"\e[K") # Erase the current line of terminal output
|
|
95
|
+
ERASE_CHAR_STYLE = Style.new(:name=>:erase_char, :builtin=>true, :code=>"\e[P") # Erase the character under the cursor.
|
|
96
|
+
CLEAR_STYLE = Style.new(:name=>:clear, :builtin=>true, :code=>"\e[0m") # Clear color settings
|
|
97
|
+
RESET_STYLE = Style.new(:name=>:reset, :builtin=>true, :code=>"\e[0m") # Alias for CLEAR.
|
|
98
|
+
BOLD_STYLE = Style.new(:name=>:bold, :builtin=>true, :code=>"\e[1m") # Bold; Note: bold + a color works as you'd expect,
|
|
99
|
+
# for example bold black. Bold without a color displays
|
|
100
|
+
# the system-defined bold color (e.g. red on Mac iTerm)
|
|
101
|
+
DARK_STYLE = Style.new(:name=>:dark, :builtin=>true, :code=>"\e[2m") # Dark; support uncommon
|
|
102
|
+
UNDERLINE_STYLE = Style.new(:name=>:underline, :builtin=>true, :code=>"\e[4m") # Underline
|
|
103
|
+
UNDERSCORE_STYLE = Style.new(:name=>:underscore, :builtin=>true, :code=>"\e[4m") # Alias for UNDERLINE
|
|
104
|
+
BLINK_STYLE = Style.new(:name=>:blink, :builtin=>true, :code=>"\e[5m") # Blink; support uncommon
|
|
105
|
+
REVERSE_STYLE = Style.new(:name=>:reverse, :builtin=>true, :code=>"\e[7m") # Reverse foreground and background
|
|
106
|
+
CONCEALED_STYLE = Style.new(:name=>:concealed, :builtin=>true, :code=>"\e[8m") # Concealed; support uncommon
|
|
107
|
+
|
|
108
|
+
STYLES = %w{CLEAR RESET BOLD DARK UNDERLINE UNDERSCORE BLINK REVERSE CONCEALED}
|
|
109
|
+
|
|
110
|
+
# These RGB colors are approximate; see http://en.wikipedia.org/wiki/ANSI_escape_code
|
|
111
|
+
BLACK_STYLE = Style.new(:name=>:black, :builtin=>true, :code=>"\e[30m", :rgb=>[ 0, 0, 0])
|
|
112
|
+
RED_STYLE = Style.new(:name=>:red, :builtin=>true, :code=>"\e[31m", :rgb=>[128, 0, 0])
|
|
113
|
+
GREEN_STYLE = Style.new(:name=>:green, :builtin=>true, :code=>"\e[32m", :rgb=>[ 0,128, 0])
|
|
114
|
+
BLUE_STYLE = Style.new(:name=>:blue, :builtin=>true, :code=>"\e[34m", :rgb=>[ 0, 0,128])
|
|
115
|
+
YELLOW_STYLE = Style.new(:name=>:yellow, :builtin=>true, :code=>"\e[33m", :rgb=>[128,128, 0])
|
|
116
|
+
MAGENTA_STYLE = Style.new(:name=>:magenta, :builtin=>true, :code=>"\e[35m", :rgb=>[128, 0,128])
|
|
117
|
+
CYAN_STYLE = Style.new(:name=>:cyan, :builtin=>true, :code=>"\e[36m", :rgb=>[ 0,128,128])
|
|
118
|
+
# On Mac OSX Terminal, white is actually gray
|
|
119
|
+
WHITE_STYLE = Style.new(:name=>:white, :builtin=>true, :code=>"\e[37m", :rgb=>[192,192,192])
|
|
120
|
+
# Alias for WHITE, since WHITE is actually a light gray on Macs
|
|
121
|
+
GRAY_STYLE = Style.new(:name=>:gray, :builtin=>true, :code=>"\e[37m", :rgb=>[192,192,192])
|
|
122
|
+
# On Mac OSX Terminal, this is black foreground, or bright white background.
|
|
123
|
+
# Also used as base for RGB colors, if available
|
|
124
|
+
NONE_STYLE = Style.new(:name=>:none, :builtin=>true, :code=>"\e[38m", :rgb=>[ 0, 0, 0])
|
|
125
|
+
|
|
126
|
+
BASIC_COLORS = %w{BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GRAY NONE}
|
|
127
|
+
|
|
128
|
+
colors = BASIC_COLORS.dup
|
|
129
|
+
BASIC_COLORS.each do |color|
|
|
130
|
+
bright_color = "BRIGHT_#{color}"
|
|
131
|
+
colors << bright_color
|
|
132
|
+
const_set bright_color+'_STYLE', const_get(color + '_STYLE').bright
|
|
133
|
+
end
|
|
134
|
+
COLORS = colors
|
|
135
|
+
|
|
136
|
+
colors.each do |color|
|
|
137
|
+
const_set color, const_get("#{color}_STYLE").code
|
|
138
|
+
const_set "ON_#{color}_STYLE", const_get("#{color}_STYLE").on
|
|
139
|
+
const_set "ON_#{color}", const_get("ON_#{color}_STYLE").code
|
|
140
|
+
end
|
|
141
|
+
ON_NONE_STYLE.rgb = [255,255,255] # Override; white background
|
|
142
|
+
|
|
143
|
+
STYLES.each do |style|
|
|
144
|
+
const_set style, const_get("#{style}_STYLE").code
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# For RGB colors:
|
|
148
|
+
def self.const_missing(name)
|
|
149
|
+
if name.to_s =~ /^(ON_)?(RGB_)([A-F0-9]{6})(_STYLE)?$/ # RGB color
|
|
150
|
+
on = $1
|
|
151
|
+
suffix = $4
|
|
152
|
+
if suffix
|
|
153
|
+
code_name = $1.to_s + $2 + $3
|
|
154
|
+
else
|
|
155
|
+
code_name = name.to_s
|
|
156
|
+
end
|
|
157
|
+
style_name = code_name + '_STYLE'
|
|
158
|
+
style = Style.rgb($3)
|
|
159
|
+
style = style.on if on
|
|
160
|
+
const_set(style_name, style)
|
|
161
|
+
const_set(code_name, style.code)
|
|
162
|
+
if suffix
|
|
163
|
+
style
|
|
164
|
+
else
|
|
165
|
+
style.code
|
|
166
|
+
end
|
|
167
|
+
else
|
|
168
|
+
raise NameError, "Bad color or uninitialized constant #{name}"
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
#
|
|
173
|
+
# Create an instance of HighLine, connected to the streams _input_
|
|
174
|
+
# and _output_.
|
|
175
|
+
#
|
|
176
|
+
def initialize( input = $stdin, output = $stdout,
|
|
177
|
+
wrap_at = nil, page_at = nil, indent_size=3, indent_level=0 )
|
|
178
|
+
@input = input
|
|
179
|
+
@output = output
|
|
180
|
+
|
|
181
|
+
@multi_indent = true
|
|
182
|
+
@indent_size = indent_size
|
|
183
|
+
@indent_level = indent_level
|
|
184
|
+
|
|
185
|
+
self.wrap_at = wrap_at
|
|
186
|
+
self.page_at = page_at
|
|
187
|
+
|
|
188
|
+
@question = nil
|
|
189
|
+
@answer = nil
|
|
190
|
+
@menu = nil
|
|
191
|
+
@header = nil
|
|
192
|
+
@prompt = nil
|
|
193
|
+
@gather = nil
|
|
194
|
+
@answers = nil
|
|
195
|
+
@key = nil
|
|
196
|
+
|
|
197
|
+
initialize_system_extensions if respond_to?(:initialize_system_extensions)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
include HighLine::SystemExtensions
|
|
201
|
+
|
|
202
|
+
# The current column setting for wrapping output.
|
|
203
|
+
attr_reader :wrap_at
|
|
204
|
+
# The current row setting for paging output.
|
|
205
|
+
attr_reader :page_at
|
|
206
|
+
# Indentation over multiple lines
|
|
207
|
+
attr_accessor :multi_indent
|
|
208
|
+
# The indentation size
|
|
209
|
+
attr_accessor :indent_size
|
|
210
|
+
# The indentation level
|
|
211
|
+
attr_accessor :indent_level
|
|
212
|
+
|
|
213
|
+
#
|
|
214
|
+
# A shortcut to HighLine.ask() a question that only accepts "yes" or "no"
|
|
215
|
+
# answers ("y" and "n" are allowed) and returns +true+ or +false+
|
|
216
|
+
# (+true+ for "yes"). If provided a +true+ value, _character_ will cause
|
|
217
|
+
# HighLine to fetch a single character response. A block can be provided
|
|
218
|
+
# to further configure the question as in HighLine.ask()
|
|
219
|
+
#
|
|
220
|
+
# Raises EOFError if input is exhausted.
|
|
221
|
+
#
|
|
222
|
+
def agree( yes_or_no_question, character = nil )
|
|
223
|
+
ask(yes_or_no_question, lambda { |yn| yn.downcase[0] == ?y}) do |q|
|
|
224
|
+
q.validate = /\Ay(?:es)?|no?\Z/i
|
|
225
|
+
q.responses[:not_valid] = 'Please enter "yes" or "no".'
|
|
226
|
+
q.responses[:ask_on_error] = :question
|
|
227
|
+
q.character = character
|
|
228
|
+
|
|
229
|
+
yield q if block_given?
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
#
|
|
234
|
+
# This method is the primary interface for user input. Just provide a
|
|
235
|
+
# _question_ to ask the user, the _answer_type_ you want returned, and
|
|
236
|
+
# optionally a code block setting up details of how you want the question
|
|
237
|
+
# handled. See HighLine.say() for details on the format of _question_, and
|
|
238
|
+
# HighLine::Question for more information about _answer_type_ and what's
|
|
239
|
+
# valid in the code block.
|
|
240
|
+
#
|
|
241
|
+
# If <tt>@question</tt> is set before ask() is called, parameters are
|
|
242
|
+
# ignored and that object (must be a HighLine::Question) is used to drive
|
|
243
|
+
# the process instead.
|
|
244
|
+
#
|
|
245
|
+
# Raises EOFError if input is exhausted.
|
|
246
|
+
#
|
|
247
|
+
def ask( question, answer_type = String, &details ) # :yields: question
|
|
248
|
+
@question ||= Question.new(question, answer_type, &details)
|
|
249
|
+
|
|
250
|
+
return gather if @question.gather
|
|
251
|
+
|
|
252
|
+
# readline() needs to handle its own output, but readline only supports
|
|
253
|
+
# full line reading. Therefore if @question.echo is anything but true,
|
|
254
|
+
# the prompt will not be issued. And we have to account for that now.
|
|
255
|
+
# Also, JRuby-1.7's ConsoleReader.readLine() needs to be passed the prompt
|
|
256
|
+
# to handle line editing properly.
|
|
257
|
+
say(@question) unless ((JRUBY or @question.readline) and @question.echo == true)
|
|
258
|
+
begin
|
|
259
|
+
@answer = @question.answer_or_default(get_response)
|
|
260
|
+
unless @question.valid_answer?(@answer)
|
|
261
|
+
explain_error(:not_valid)
|
|
262
|
+
raise QuestionError
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
@answer = @question.convert(@answer)
|
|
266
|
+
|
|
267
|
+
if @question.in_range?(@answer)
|
|
268
|
+
if @question.confirm
|
|
269
|
+
# need to add a layer of scope to ask a question inside a
|
|
270
|
+
# question, without destroying instance data
|
|
271
|
+
context_change = self.class.new(@input, @output, @wrap_at, @page_at, @indent_size, @indent_level)
|
|
272
|
+
if @question.confirm == true
|
|
273
|
+
confirm_question = "Are you sure? "
|
|
274
|
+
else
|
|
275
|
+
# evaluate ERb under initial scope, so it will have
|
|
276
|
+
# access to @question and @answer
|
|
277
|
+
template = ERB.new(@question.confirm, nil, "%")
|
|
278
|
+
confirm_question = template.result(binding)
|
|
279
|
+
end
|
|
280
|
+
unless context_change.agree(confirm_question)
|
|
281
|
+
explain_error(nil)
|
|
282
|
+
raise QuestionError
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
@answer
|
|
287
|
+
else
|
|
288
|
+
explain_error(:not_in_range)
|
|
289
|
+
raise QuestionError
|
|
290
|
+
end
|
|
291
|
+
rescue QuestionError
|
|
292
|
+
retry
|
|
293
|
+
rescue ArgumentError, NameError => error
|
|
294
|
+
raise if error.is_a?(NoMethodError)
|
|
295
|
+
if error.message =~ /ambiguous/
|
|
296
|
+
# the assumption here is that OptionParser::Completion#complete
|
|
297
|
+
# (used for ambiguity resolution) throws exceptions containing
|
|
298
|
+
# the word 'ambiguous' whenever resolution fails
|
|
299
|
+
explain_error(:ambiguous_completion)
|
|
300
|
+
else
|
|
301
|
+
explain_error(:invalid_type)
|
|
302
|
+
end
|
|
303
|
+
retry
|
|
304
|
+
rescue Question::NoAutoCompleteMatch
|
|
305
|
+
explain_error(:no_completion)
|
|
306
|
+
retry
|
|
307
|
+
ensure
|
|
308
|
+
@question = nil # Reset Question object.
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
#
|
|
313
|
+
# This method is HighLine's menu handler. For simple usage, you can just
|
|
314
|
+
# pass all the menu items you wish to display. At that point, choose() will
|
|
315
|
+
# build and display a menu, walk the user through selection, and return
|
|
316
|
+
# their choice among the provided items. You might use this in a case
|
|
317
|
+
# statement for quick and dirty menus.
|
|
318
|
+
#
|
|
319
|
+
# However, choose() is capable of much more. If provided, a block will be
|
|
320
|
+
# passed a HighLine::Menu object to configure. Using this method, you can
|
|
321
|
+
# customize all the details of menu handling from index display, to building
|
|
322
|
+
# a complete shell-like menuing system. See HighLine::Menu for all the
|
|
323
|
+
# methods it responds to.
|
|
324
|
+
#
|
|
325
|
+
# Raises EOFError if input is exhausted.
|
|
326
|
+
#
|
|
327
|
+
def choose( *items, &details )
|
|
328
|
+
@menu = @question = Menu.new(&details)
|
|
329
|
+
@menu.choices(*items) unless items.empty?
|
|
330
|
+
|
|
331
|
+
# Set auto-completion
|
|
332
|
+
@menu.completion = @menu.options
|
|
333
|
+
# Set _answer_type_ so we can double as the Question for ask().
|
|
334
|
+
@menu.answer_type = if @menu.shell
|
|
335
|
+
lambda do |command| # shell-style selection
|
|
336
|
+
first_word = command.to_s.split.first || ""
|
|
337
|
+
|
|
338
|
+
options = @menu.options
|
|
339
|
+
options.extend(OptionParser::Completion)
|
|
340
|
+
answer = options.complete(first_word)
|
|
341
|
+
|
|
342
|
+
if answer.nil?
|
|
343
|
+
raise Question::NoAutoCompleteMatch
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
[answer.last, command.sub(/^\s*#{first_word}\s*/, "")]
|
|
347
|
+
end
|
|
348
|
+
else
|
|
349
|
+
@menu.options # normal menu selection, by index or name
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Provide hooks for ERb layouts.
|
|
353
|
+
@header = @menu.header
|
|
354
|
+
@prompt = @menu.prompt
|
|
355
|
+
|
|
356
|
+
if @menu.shell
|
|
357
|
+
selected = ask("Ignored", @menu.answer_type)
|
|
358
|
+
@menu.select(self, *selected)
|
|
359
|
+
else
|
|
360
|
+
selected = ask("Ignored", @menu.answer_type)
|
|
361
|
+
@menu.select(self, selected)
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
#
|
|
366
|
+
# This method provides easy access to ANSI color sequences, without the user
|
|
367
|
+
# needing to remember to CLEAR at the end of each sequence. Just pass the
|
|
368
|
+
# _string_ to color, followed by a list of _colors_ you would like it to be
|
|
369
|
+
# affected by. The _colors_ can be HighLine class constants, or symbols
|
|
370
|
+
# (:blue for BLUE, for example). A CLEAR will automatically be embedded to
|
|
371
|
+
# the end of the returned String.
|
|
372
|
+
#
|
|
373
|
+
# This method returns the original _string_ unchanged if HighLine::use_color?
|
|
374
|
+
# is +false+.
|
|
375
|
+
#
|
|
376
|
+
def self.color( string, *colors )
|
|
377
|
+
return string unless self.use_color?
|
|
378
|
+
Style(*colors).color(string)
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# In case you just want the color code, without the embedding and the CLEAR
|
|
382
|
+
def self.color_code(*colors)
|
|
383
|
+
Style(*colors).code
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Works as an instance method, same as the class method
|
|
387
|
+
def color_code(*colors)
|
|
388
|
+
self.class.color_code(*colors)
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Works as an instance method, same as the class method
|
|
392
|
+
def color(*args)
|
|
393
|
+
self.class.color(*args)
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Remove color codes from a string
|
|
397
|
+
def self.uncolor(string)
|
|
398
|
+
Style.uncolor(string)
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Works as an instance method, same as the class method
|
|
402
|
+
def uncolor(string)
|
|
403
|
+
self.class.uncolor(string)
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
#
|
|
407
|
+
# This method is a utility for quickly and easily laying out lists. It can
|
|
408
|
+
# be accessed within ERb replacements of any text that will be sent to the
|
|
409
|
+
# user.
|
|
410
|
+
#
|
|
411
|
+
# The only required parameter is _items_, which should be the Array of items
|
|
412
|
+
# to list. A specified _mode_ controls how that list is formed and _option_
|
|
413
|
+
# has different effects, depending on the _mode_. Recognized modes are:
|
|
414
|
+
#
|
|
415
|
+
# <tt>:columns_across</tt>:: _items_ will be placed in columns,
|
|
416
|
+
# flowing from left to right. If given,
|
|
417
|
+
# _option_ is the number of columns to be
|
|
418
|
+
# used. When absent, columns will be
|
|
419
|
+
# determined based on _wrap_at_ or a
|
|
420
|
+
# default of 80 characters.
|
|
421
|
+
# <tt>:columns_down</tt>:: Identical to <tt>:columns_across</tt>,
|
|
422
|
+
# save flow goes down.
|
|
423
|
+
# <tt>:uneven_columns_across</tt>:: Like <tt>:columns_across</tt> but each
|
|
424
|
+
# column is sized independently.
|
|
425
|
+
# <tt>:uneven_columns_down</tt>:: Like <tt>:columns_down</tt> but each
|
|
426
|
+
# column is sized independently.
|
|
427
|
+
# <tt>:inline</tt>:: All _items_ are placed on a single line.
|
|
428
|
+
# The last two _items_ are separated by
|
|
429
|
+
# _option_ or a default of " or ". All
|
|
430
|
+
# other _items_ are separated by ", ".
|
|
431
|
+
# <tt>:rows</tt>:: The default mode. Each of the _items_ is
|
|
432
|
+
# placed on its own line. The _option_
|
|
433
|
+
# parameter is ignored in this mode.
|
|
434
|
+
#
|
|
435
|
+
# Each member of the _items_ Array is passed through ERb and thus can contain
|
|
436
|
+
# their own expansions. Color escape expansions do not contribute to the
|
|
437
|
+
# final field width.
|
|
438
|
+
#
|
|
439
|
+
def list( items, mode = :rows, option = nil )
|
|
440
|
+
items = items.to_ary.map do |item|
|
|
441
|
+
if item.nil?
|
|
442
|
+
""
|
|
443
|
+
else
|
|
444
|
+
ERB.new(item, nil, "%").result(binding)
|
|
445
|
+
end
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
if items.empty?
|
|
449
|
+
""
|
|
450
|
+
else
|
|
451
|
+
case mode
|
|
452
|
+
when :inline
|
|
453
|
+
option = " or " if option.nil?
|
|
454
|
+
|
|
455
|
+
if items.size == 1
|
|
456
|
+
items.first
|
|
457
|
+
else
|
|
458
|
+
items[0..-2].join(", ") + "#{option}#{items.last}"
|
|
459
|
+
end
|
|
460
|
+
when :columns_across, :columns_down
|
|
461
|
+
max_length = actual_length(
|
|
462
|
+
items.max { |a, b| actual_length(a) <=> actual_length(b) }
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
if option.nil?
|
|
466
|
+
limit = @wrap_at || 80
|
|
467
|
+
option = (limit + 2) / (max_length + 2)
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
items = items.map do |item|
|
|
471
|
+
pad = max_length + (item.to_s.length - actual_length(item))
|
|
472
|
+
"%-#{pad}s" % item
|
|
473
|
+
end
|
|
474
|
+
row_count = (items.size / option.to_f).ceil
|
|
475
|
+
|
|
476
|
+
if mode == :columns_across
|
|
477
|
+
rows = Array.new(row_count) { Array.new }
|
|
478
|
+
items.each_with_index do |item, index|
|
|
479
|
+
rows[index / option] << item
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
rows.map { |row| row.join(" ") + "\n" }.join
|
|
483
|
+
else
|
|
484
|
+
columns = Array.new(option) { Array.new }
|
|
485
|
+
items.each_with_index do |item, index|
|
|
486
|
+
columns[index / row_count] << item
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
list = ""
|
|
490
|
+
columns.first.size.times do |index|
|
|
491
|
+
list << columns.map { |column| column[index] }.
|
|
492
|
+
compact.join(" ") + "\n"
|
|
493
|
+
end
|
|
494
|
+
list
|
|
495
|
+
end
|
|
496
|
+
when :uneven_columns_across
|
|
497
|
+
if option.nil?
|
|
498
|
+
limit = @wrap_at || 80
|
|
499
|
+
items.size.downto(1) do |column_count|
|
|
500
|
+
row_count = (items.size / column_count.to_f).ceil
|
|
501
|
+
rows = Array.new(row_count) { Array.new }
|
|
502
|
+
items.each_with_index do |item, index|
|
|
503
|
+
rows[index / column_count] << item
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
widths = Array.new(column_count, 0)
|
|
507
|
+
rows.each do |row|
|
|
508
|
+
row.each_with_index do |field, column|
|
|
509
|
+
size = actual_length(field)
|
|
510
|
+
widths[column] = size if size > widths[column]
|
|
511
|
+
end
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
if column_count == 1 or
|
|
515
|
+
widths.inject(0) { |sum, n| sum + n + 2 } <= limit + 2
|
|
516
|
+
return rows.map { |row|
|
|
517
|
+
row.zip(widths).map { |field, i|
|
|
518
|
+
"%-#{i + (field.to_s.length - actual_length(field))}s" % field
|
|
519
|
+
}.join(" ") + "\n"
|
|
520
|
+
}.join
|
|
521
|
+
end
|
|
522
|
+
end
|
|
523
|
+
else
|
|
524
|
+
row_count = (items.size / option.to_f).ceil
|
|
525
|
+
rows = Array.new(row_count) { Array.new }
|
|
526
|
+
items.each_with_index do |item, index|
|
|
527
|
+
rows[index / option] << item
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
widths = Array.new(option, 0)
|
|
531
|
+
rows.each do |row|
|
|
532
|
+
row.each_with_index do |field, column|
|
|
533
|
+
size = actual_length(field)
|
|
534
|
+
widths[column] = size if size > widths[column]
|
|
535
|
+
end
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
return rows.map { |row|
|
|
539
|
+
row.zip(widths).map { |field, i|
|
|
540
|
+
"%-#{i + (field.to_s.length - actual_length(field))}s" % field
|
|
541
|
+
}.join(" ") + "\n"
|
|
542
|
+
}.join
|
|
543
|
+
end
|
|
544
|
+
when :uneven_columns_down
|
|
545
|
+
if option.nil?
|
|
546
|
+
limit = @wrap_at || 80
|
|
547
|
+
items.size.downto(1) do |column_count|
|
|
548
|
+
row_count = (items.size / column_count.to_f).ceil
|
|
549
|
+
columns = Array.new(column_count) { Array.new }
|
|
550
|
+
items.each_with_index do |item, index|
|
|
551
|
+
columns[index / row_count] << item
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
widths = Array.new(column_count, 0)
|
|
555
|
+
columns.each_with_index do |column, i|
|
|
556
|
+
column.each do |field|
|
|
557
|
+
size = actual_length(field)
|
|
558
|
+
widths[i] = size if size > widths[i]
|
|
559
|
+
end
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
if column_count == 1 or
|
|
563
|
+
widths.inject(0) { |sum, n| sum + n + 2 } <= limit + 2
|
|
564
|
+
list = ""
|
|
565
|
+
columns.first.size.times do |index|
|
|
566
|
+
list << columns.zip(widths).map { |column, width|
|
|
567
|
+
field = column[index]
|
|
568
|
+
"%-#{width + (field.to_s.length - actual_length(field))}s" %
|
|
569
|
+
field
|
|
570
|
+
}.compact.join(" ").strip + "\n"
|
|
571
|
+
end
|
|
572
|
+
return list
|
|
573
|
+
end
|
|
574
|
+
end
|
|
575
|
+
else
|
|
576
|
+
row_count = (items.size / option.to_f).ceil
|
|
577
|
+
columns = Array.new(option) { Array.new }
|
|
578
|
+
items.each_with_index do |item, index|
|
|
579
|
+
columns[index / row_count] << item
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
widths = Array.new(option, 0)
|
|
583
|
+
columns.each_with_index do |column, i|
|
|
584
|
+
column.each do |field|
|
|
585
|
+
size = actual_length(field)
|
|
586
|
+
widths[i] = size if size > widths[i]
|
|
587
|
+
end
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
list = ""
|
|
591
|
+
columns.first.size.times do |index|
|
|
592
|
+
list << columns.zip(widths).map { |column, width|
|
|
593
|
+
field = column[index]
|
|
594
|
+
"%-#{width + (field.to_s.length - actual_length(field))}s" % field
|
|
595
|
+
}.compact.join(" ").strip + "\n"
|
|
596
|
+
end
|
|
597
|
+
return list
|
|
598
|
+
end
|
|
599
|
+
else
|
|
600
|
+
items.map { |i| "#{i}\n" }.join
|
|
601
|
+
end
|
|
602
|
+
end
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
#
|
|
606
|
+
# The basic output method for HighLine objects. If the provided _statement_
|
|
607
|
+
# ends with a space or tab character, a newline will not be appended (output
|
|
608
|
+
# will be flush()ed). All other cases are passed straight to Kernel.puts().
|
|
609
|
+
#
|
|
610
|
+
# The _statement_ parameter is processed as an ERb template, supporting
|
|
611
|
+
# embedded Ruby code. The template is evaluated with a binding inside
|
|
612
|
+
# the HighLine instance, providing easy access to the ANSI color constants
|
|
613
|
+
# and the HighLine.color() method.
|
|
614
|
+
#
|
|
615
|
+
def say( statement )
|
|
616
|
+
statement = statement.to_str
|
|
617
|
+
return unless statement.length > 0
|
|
618
|
+
|
|
619
|
+
# Allow non-ascii menu prompts in ruby > 1.9.2. ERB eval the menu statement
|
|
620
|
+
# with the environment's default encoding(usually utf8)
|
|
621
|
+
statement.force_encoding(Encoding.default_external) if defined?(Encoding) && Encoding.default_external
|
|
622
|
+
|
|
623
|
+
template = ERB.new(statement, nil, "%")
|
|
624
|
+
statement = template.result(binding)
|
|
625
|
+
|
|
626
|
+
statement = wrap(statement) unless @wrap_at.nil?
|
|
627
|
+
statement = page_print(statement) unless @page_at.nil?
|
|
628
|
+
|
|
629
|
+
statement = statement.gsub(/\n(?!$)/,"\n#{indentation}") if @multi_indent
|
|
630
|
+
|
|
631
|
+
# Don't add a newline if statement ends with whitespace, OR
|
|
632
|
+
# if statement ends with whitespace before a color escape code.
|
|
633
|
+
if /[ \t](\e\[\d+(;\d+)*m)?\Z/ =~ statement
|
|
634
|
+
@output.print(indentation+statement)
|
|
635
|
+
@output.flush
|
|
636
|
+
else
|
|
637
|
+
@output.puts(indentation+statement)
|
|
638
|
+
end
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
#
|
|
642
|
+
# Set to an integer value to cause HighLine to wrap output lines at the
|
|
643
|
+
# indicated character limit. When +nil+, the default, no wrapping occurs. If
|
|
644
|
+
# set to <tt>:auto</tt>, HighLine will attempt to determine the columns
|
|
645
|
+
# available for the <tt>@output</tt> or use a sensible default.
|
|
646
|
+
#
|
|
647
|
+
def wrap_at=( setting )
|
|
648
|
+
@wrap_at = setting == :auto ? output_cols : setting
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
#
|
|
652
|
+
# Set to an integer value to cause HighLine to page output lines over the
|
|
653
|
+
# indicated line limit. When +nil+, the default, no paging occurs. If
|
|
654
|
+
# set to <tt>:auto</tt>, HighLine will attempt to determine the rows available
|
|
655
|
+
# for the <tt>@output</tt> or use a sensible default.
|
|
656
|
+
#
|
|
657
|
+
def page_at=( setting )
|
|
658
|
+
@page_at = setting == :auto ? output_rows - 2 : setting
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
#
|
|
662
|
+
# Outputs indentation with current settings
|
|
663
|
+
#
|
|
664
|
+
def indentation
|
|
665
|
+
return ' '*@indent_size*@indent_level
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
#
|
|
669
|
+
# Executes block or outputs statement with indentation
|
|
670
|
+
#
|
|
671
|
+
def indent(increase=1, statement=nil, multiline=nil)
|
|
672
|
+
@indent_level += increase
|
|
673
|
+
multi = @multi_indent
|
|
674
|
+
@multi_indent = multiline unless multiline.nil?
|
|
675
|
+
if block_given?
|
|
676
|
+
yield self
|
|
677
|
+
else
|
|
678
|
+
say(statement)
|
|
679
|
+
end
|
|
680
|
+
@multi_indent = multi
|
|
681
|
+
@indent_level -= increase
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
#
|
|
685
|
+
# Outputs newline
|
|
686
|
+
#
|
|
687
|
+
def newline
|
|
688
|
+
@output.puts
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
#
|
|
692
|
+
# Returns the number of columns for the console, or a default it they cannot
|
|
693
|
+
# be determined.
|
|
694
|
+
#
|
|
695
|
+
def output_cols
|
|
696
|
+
return 80 unless @output.tty?
|
|
697
|
+
terminal_size.first
|
|
698
|
+
rescue
|
|
699
|
+
return 80
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
#
|
|
703
|
+
# Returns the number of rows for the console, or a default if they cannot be
|
|
704
|
+
# determined.
|
|
705
|
+
#
|
|
706
|
+
def output_rows
|
|
707
|
+
return 24 unless @output.tty?
|
|
708
|
+
terminal_size.last
|
|
709
|
+
rescue
|
|
710
|
+
return 24
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
private
|
|
714
|
+
|
|
715
|
+
#
|
|
716
|
+
# A helper method for sending the output stream and error and repeat
|
|
717
|
+
# of the question.
|
|
718
|
+
#
|
|
719
|
+
def explain_error( error )
|
|
720
|
+
say(@question.responses[error]) unless error.nil?
|
|
721
|
+
if @question.responses[:ask_on_error] == :question
|
|
722
|
+
say(@question)
|
|
723
|
+
elsif @question.responses[:ask_on_error]
|
|
724
|
+
say(@question.responses[:ask_on_error])
|
|
725
|
+
end
|
|
726
|
+
end
|
|
727
|
+
|
|
728
|
+
#
|
|
729
|
+
# Collects an Array/Hash full of answers as described in
|
|
730
|
+
# HighLine::Question.gather().
|
|
731
|
+
#
|
|
732
|
+
# Raises EOFError if input is exhausted.
|
|
733
|
+
#
|
|
734
|
+
def gather( )
|
|
735
|
+
original_question = @question
|
|
736
|
+
original_question_string = @question.question
|
|
737
|
+
original_gather = @question.gather
|
|
738
|
+
|
|
739
|
+
verify_match = @question.verify_match
|
|
740
|
+
@question.gather = false
|
|
741
|
+
|
|
742
|
+
begin # when verify_match is set this loop will repeat until unique_answers == 1
|
|
743
|
+
@answers = [ ]
|
|
744
|
+
@gather = original_gather
|
|
745
|
+
original_question.question = original_question_string
|
|
746
|
+
|
|
747
|
+
case @gather
|
|
748
|
+
when Integer
|
|
749
|
+
@answers << ask(@question)
|
|
750
|
+
@gather -= 1
|
|
751
|
+
|
|
752
|
+
original_question.question = ""
|
|
753
|
+
until @gather.zero?
|
|
754
|
+
@question = original_question
|
|
755
|
+
@answers << ask(@question)
|
|
756
|
+
@gather -= 1
|
|
757
|
+
end
|
|
758
|
+
when ::String, Regexp
|
|
759
|
+
@answers << ask(@question)
|
|
760
|
+
|
|
761
|
+
original_question.question = ""
|
|
762
|
+
until (@gather.is_a?(::String) and @answers.last.to_s == @gather) or
|
|
763
|
+
(@gather.is_a?(Regexp) and @answers.last.to_s =~ @gather)
|
|
764
|
+
@question = original_question
|
|
765
|
+
@answers << ask(@question)
|
|
766
|
+
end
|
|
767
|
+
|
|
768
|
+
@answers.pop
|
|
769
|
+
when Hash
|
|
770
|
+
@answers = { }
|
|
771
|
+
@gather.keys.sort.each do |key|
|
|
772
|
+
@question = original_question
|
|
773
|
+
@key = key
|
|
774
|
+
@answers[key] = ask(@question)
|
|
775
|
+
end
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
if verify_match && (unique_answers(@answers).size > 1)
|
|
779
|
+
@question = original_question
|
|
780
|
+
explain_error(:mismatch)
|
|
781
|
+
else
|
|
782
|
+
verify_match = false
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
end while verify_match
|
|
786
|
+
|
|
787
|
+
original_question.verify_match ? @answer : @answers
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
#
|
|
791
|
+
# A helper method used by HighLine::Question.verify_match
|
|
792
|
+
# for finding whether a list of answers match or differ
|
|
793
|
+
# from each other.
|
|
794
|
+
#
|
|
795
|
+
def unique_answers(list = @answers)
|
|
796
|
+
(list.respond_to?(:values) ? list.values : list).uniq
|
|
797
|
+
end
|
|
798
|
+
|
|
799
|
+
#
|
|
800
|
+
# Read a line of input from the input stream and process whitespace as
|
|
801
|
+
# requested by the Question object.
|
|
802
|
+
#
|
|
803
|
+
# If Question's _readline_ property is set, that library will be used to
|
|
804
|
+
# fetch input. *WARNING*: This ignores the currently set input stream.
|
|
805
|
+
#
|
|
806
|
+
# Raises EOFError if input is exhausted.
|
|
807
|
+
#
|
|
808
|
+
def get_line( )
|
|
809
|
+
if @question.readline
|
|
810
|
+
require "readline" # load only if needed
|
|
811
|
+
|
|
812
|
+
# capture say()'s work in a String to feed to readline()
|
|
813
|
+
old_output = @output
|
|
814
|
+
@output = StringIO.new
|
|
815
|
+
say(@question)
|
|
816
|
+
question = @output.string
|
|
817
|
+
@output = old_output
|
|
818
|
+
|
|
819
|
+
# prep auto-completion
|
|
820
|
+
Readline.completion_proc = lambda do |string|
|
|
821
|
+
@question.selection.grep(/\A#{Regexp.escape(string)}/)
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
# work-around ugly readline() warnings
|
|
825
|
+
old_verbose = $VERBOSE
|
|
826
|
+
$VERBOSE = nil
|
|
827
|
+
raw_answer = Readline.readline(question, true)
|
|
828
|
+
if raw_answer.nil?
|
|
829
|
+
if @@track_eof
|
|
830
|
+
raise EOFError, "The input stream is exhausted."
|
|
831
|
+
else
|
|
832
|
+
raw_answer = String.new # Never return nil
|
|
833
|
+
end
|
|
834
|
+
end
|
|
835
|
+
answer = @question.change_case(
|
|
836
|
+
@question.remove_whitespace(raw_answer))
|
|
837
|
+
$VERBOSE = old_verbose
|
|
838
|
+
|
|
839
|
+
answer
|
|
840
|
+
else
|
|
841
|
+
if JRUBY
|
|
842
|
+
raw_answer = @java_console.readLine(@question.question, nil)
|
|
843
|
+
else
|
|
844
|
+
raise EOFError, "The input stream is exhausted." if @@track_eof and
|
|
845
|
+
@input.eof?
|
|
846
|
+
raw_answer = @input.gets
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
@question.change_case(@question.remove_whitespace(raw_answer))
|
|
850
|
+
end
|
|
851
|
+
end
|
|
852
|
+
|
|
853
|
+
#
|
|
854
|
+
# Return a line or character of input, as requested for this question.
|
|
855
|
+
# Character input will be returned as a single character String,
|
|
856
|
+
# not an Integer.
|
|
857
|
+
#
|
|
858
|
+
# This question's _first_answer_ will be returned instead of input, if set.
|
|
859
|
+
#
|
|
860
|
+
# Raises EOFError if input is exhausted.
|
|
861
|
+
#
|
|
862
|
+
def get_response( )
|
|
863
|
+
return @question.first_answer if @question.first_answer?
|
|
864
|
+
|
|
865
|
+
if @question.character.nil?
|
|
866
|
+
if @question.echo == true and @question.limit.nil?
|
|
867
|
+
get_line
|
|
868
|
+
else
|
|
869
|
+
raw_no_echo_mode
|
|
870
|
+
|
|
871
|
+
line = ""
|
|
872
|
+
backspace_limit = 0
|
|
873
|
+
begin
|
|
874
|
+
|
|
875
|
+
while character = get_character(@input)
|
|
876
|
+
# honor backspace and delete
|
|
877
|
+
if character == 127 or character == 8
|
|
878
|
+
line.slice!(-1, 1)
|
|
879
|
+
backspace_limit -= 1
|
|
880
|
+
else
|
|
881
|
+
line << character.chr
|
|
882
|
+
backspace_limit = line.size
|
|
883
|
+
end
|
|
884
|
+
# looking for carriage return (decimal 13) or
|
|
885
|
+
# newline (decimal 10) in raw input
|
|
886
|
+
break if character == 13 or character == 10
|
|
887
|
+
if @question.echo != false
|
|
888
|
+
if character == 127 or character == 8
|
|
889
|
+
# only backspace if we have characters on the line to
|
|
890
|
+
# eliminate, otherwise we'll tromp over the prompt
|
|
891
|
+
if backspace_limit >= 0 then
|
|
892
|
+
@output.print("\b#{HighLine.Style(:erase_char).code}")
|
|
893
|
+
else
|
|
894
|
+
# do nothing
|
|
895
|
+
end
|
|
896
|
+
else
|
|
897
|
+
if @question.echo == true
|
|
898
|
+
@output.print(character.chr)
|
|
899
|
+
else
|
|
900
|
+
@output.print(@question.echo)
|
|
901
|
+
end
|
|
902
|
+
end
|
|
903
|
+
@output.flush
|
|
904
|
+
end
|
|
905
|
+
break if @question.limit and line.size == @question.limit
|
|
906
|
+
end
|
|
907
|
+
ensure
|
|
908
|
+
restore_mode
|
|
909
|
+
end
|
|
910
|
+
if @question.overwrite
|
|
911
|
+
@output.print("\r#{HighLine.Style(:erase_line).code}")
|
|
912
|
+
@output.flush
|
|
913
|
+
else
|
|
914
|
+
say("\n")
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
@question.change_case(@question.remove_whitespace(line))
|
|
918
|
+
end
|
|
919
|
+
else
|
|
920
|
+
raw_no_echo_mode
|
|
921
|
+
begin
|
|
922
|
+
if @question.character == :getc
|
|
923
|
+
response = @input.getbyte.chr
|
|
924
|
+
else
|
|
925
|
+
response = get_character(@input).chr
|
|
926
|
+
if @question.overwrite
|
|
927
|
+
@output.print("\r#{HighLine.Style(:erase_line).code}")
|
|
928
|
+
@output.flush
|
|
929
|
+
else
|
|
930
|
+
echo = if @question.echo == true
|
|
931
|
+
response
|
|
932
|
+
elsif @question.echo != false
|
|
933
|
+
@question.echo
|
|
934
|
+
else
|
|
935
|
+
""
|
|
936
|
+
end
|
|
937
|
+
say("#{echo}\n")
|
|
938
|
+
end
|
|
939
|
+
end
|
|
940
|
+
ensure
|
|
941
|
+
restore_mode
|
|
942
|
+
end
|
|
943
|
+
@question.change_case(response)
|
|
944
|
+
end
|
|
945
|
+
end
|
|
946
|
+
|
|
947
|
+
#
|
|
948
|
+
# Page print a series of at most _page_at_ lines for _output_. After each
|
|
949
|
+
# page is printed, HighLine will pause until the user presses enter/return
|
|
950
|
+
# then display the next page of data.
|
|
951
|
+
#
|
|
952
|
+
# Note that the final page of _output_ is *not* printed, but returned
|
|
953
|
+
# instead. This is to support any special handling for the final sequence.
|
|
954
|
+
#
|
|
955
|
+
def page_print( output )
|
|
956
|
+
lines = output.scan(/[^\n]*\n?/)
|
|
957
|
+
while lines.size > @page_at
|
|
958
|
+
@output.puts lines.slice!(0...@page_at).join
|
|
959
|
+
@output.puts
|
|
960
|
+
# Return last line if user wants to abort paging
|
|
961
|
+
return (["...\n"] + lines.slice(-2,1)).join unless continue_paging?
|
|
962
|
+
end
|
|
963
|
+
return lines.join
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
#
|
|
967
|
+
# Ask user if they wish to continue paging output. Allows them to type "q" to
|
|
968
|
+
# cancel the paging process.
|
|
969
|
+
#
|
|
970
|
+
def continue_paging?
|
|
971
|
+
command = HighLine.new(@input, @output).ask(
|
|
972
|
+
"-- press enter/return to continue or q to stop -- "
|
|
973
|
+
) { |q| q.character = true }
|
|
974
|
+
command !~ /\A[qQ]\Z/ # Only continue paging if Q was not hit.
|
|
975
|
+
end
|
|
976
|
+
|
|
977
|
+
#
|
|
978
|
+
# Wrap a sequence of _lines_ at _wrap_at_ characters per line. Existing
|
|
979
|
+
# newlines will not be affected by this process, but additional newlines
|
|
980
|
+
# may be added.
|
|
981
|
+
#
|
|
982
|
+
def wrap( text )
|
|
983
|
+
wrapped = [ ]
|
|
984
|
+
text.each_line do |line|
|
|
985
|
+
# take into account color escape sequences when wrapping
|
|
986
|
+
wrap_at = @wrap_at + (line.length - actual_length(line))
|
|
987
|
+
while line =~ /([^\n]{#{wrap_at + 1},})/
|
|
988
|
+
search = $1.dup
|
|
989
|
+
replace = $1.dup
|
|
990
|
+
if index = replace.rindex(" ", wrap_at)
|
|
991
|
+
replace[index, 1] = "\n"
|
|
992
|
+
replace.sub!(/\n[ \t]+/, "\n")
|
|
993
|
+
line.sub!(search, replace)
|
|
994
|
+
else
|
|
995
|
+
line[$~.begin(1) + wrap_at, 0] = "\n"
|
|
996
|
+
end
|
|
997
|
+
end
|
|
998
|
+
wrapped << line
|
|
999
|
+
end
|
|
1000
|
+
return wrapped.join
|
|
1001
|
+
end
|
|
1002
|
+
|
|
1003
|
+
#
|
|
1004
|
+
# Returns the length of the passed +string_with_escapes+, minus and color
|
|
1005
|
+
# sequence escapes.
|
|
1006
|
+
#
|
|
1007
|
+
def actual_length( string_with_escapes )
|
|
1008
|
+
string_with_escapes.to_s.gsub(/\e\[\d{1,2}m/, "").length
|
|
1009
|
+
end
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
require "highline/string_extensions"
|