swift-pyrite 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/exe/pyrite +4 -0
- data/lib/swift/pyrite/cli.rb +18 -0
- data/lib/swift/pyrite/parser.rb +43 -0
- data/lib/swift/pyrite/transformer.rb +129 -0
- data/lib/swift/pyrite/version.rb +5 -0
- data/lib/swift/pyrite.rb +21 -0
- data/swift-pyrite.gemspec +30 -0
- data/vendor/bundle/ruby/2.0.0/bin/htmldiff +25 -0
- data/vendor/bundle/ruby/2.0.0/bin/ldiff +25 -0
- data/vendor/bundle/ruby/2.0.0/bin/rake +23 -0
- data/vendor/bundle/ruby/2.0.0/bin/rspec +23 -0
- data/vendor/bundle/ruby/2.0.0/bin/tt +23 -0
- data/vendor/bundle/ruby/2.0.0/cache/blankslate-3.1.3.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/diff-lcs-1.2.5.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/parslet-1.7.1.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/polyglot-0.3.5.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rake-10.4.2.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-3.3.0.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-core-3.3.2.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-expectations-3.3.1.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-mocks-3.3.2.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-support-3.3.0.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/treetop-1.6.3.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/Gemfile +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/Gemfile.lock +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/README +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/Rakefile +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/VERSION +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/blankslate.gemspec +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/lib/blankslate.rb +137 -0
- data/vendor/bundle/ruby/2.0.0/gems/blankslate-3.1.3/spec/blankslate_spec.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/.autotest +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/.gemtest +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/.hoerc +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/.rspec +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/.travis.yml +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Gemfile +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/History.rdoc +152 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/License.rdoc +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/README.rdoc +85 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Rakefile +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/HISTORY.txt +241 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/LICENSE +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/README +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/Rakefile +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/big.erb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/boolean_algebra.rb +70 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/calc.rb +153 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/capture.rb +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/comments.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/deepest_errors.rb +131 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/documentation.rb +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/email_parser.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/empty.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/erb.rb +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/ignore.rb +33 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/ip_address.rb +125 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/json.rb +128 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/local.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/mathn.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/minilisp.rb +94 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/modularity.rb +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/nested_errors.rb +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/optimized_erb.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/boolean_algebra.out +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/calc.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/capture.out +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/comments.out +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/deepest_errors.out +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/documentation.err +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/documentation.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/email_parser.out +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/empty.err +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/erb.out +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/ignore.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/ignore_whitespace.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/ip_address.out +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/json.out +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/local.out +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/mathn.out +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/minilisp.out +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/modularity.out +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/nested_errors.out +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/optimized_erb.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/parens.out +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/prec_calc.out +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/readme.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/scopes.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/seasons.out +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/sentence.out +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/simple_xml.out +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/output/string_parser.out +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/parens.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/prec_calc.rb +71 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/readme.rb +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/scopes.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/seasons.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/sentence.rb +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/simple.lit +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/simple_xml.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/string_parser.rb +77 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/example/test.lit +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/accelerator/application.rb +62 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/accelerator/engine.rb +112 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/accelerator.rb +161 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/alternative.rb +50 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/base.rb +157 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/can_flatten.rb +137 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/capture.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/context.rb +103 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/dsl.rb +109 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/dynamic.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/entity.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/infix.rb +121 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/lookahead.rb +50 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/named.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/re.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/repetition.rb +83 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/scope.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/sequence.rb +45 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/str.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms/visitor.rb +89 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/atoms.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/cause.rb +101 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/context.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/convenience.rb +33 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/error_reporter/contextual.rb +120 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/error_reporter/deepest.rb +100 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/error_reporter/tree.rb +63 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/error_reporter.rb +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/export.rb +162 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/expression/treetop.rb +92 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/expression.rb +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/graphviz.rb +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/parser.rb +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/pattern/binding.rb +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/pattern.rb +114 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/position.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/rig/rspec.rb +59 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/scope.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/slice.rb +110 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/source/line_cache.rb +98 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/source.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet/transform.rb +257 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/lib/parslet.rb +302 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/parslet.gemspec +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/acceptance/examples_spec.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/acceptance/infix_parser_spec.rb +112 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/acceptance/regression_spec.rb +314 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/acceptance/repetition_and_maybe_spec.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/acceptance/unconsumed_input_spec.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atom_results_spec.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/alternative_spec.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/base_spec.rb +126 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/capture_spec.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/combinations_spec.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/dsl_spec.rb +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/entity_spec.rb +77 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/infix_spec.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/lookahead_spec.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/named_spec.rb +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/re_spec.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/repetition_spec.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/scope_spec.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/sequence_spec.rb +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/str_spec.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms/visitor_spec.rb +80 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/atoms_spec.rb +429 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/convenience_spec.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/error_reporter/contextual_spec.rb +115 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/error_reporter/deepest_spec.rb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/error_reporter/tree_spec.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/export_spec.rb +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/expression/treetop_spec.rb +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/minilisp.citrus +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/minilisp.tt +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/parser_spec.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/parslet_spec.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/pattern_spec.rb +272 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/position_spec.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/rig/rspec_spec.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/scope_spec.rb +45 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/slice_spec.rb +144 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/source/line_cache_spec.rb +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/source_spec.rb +168 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/transform/context_spec.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/parslet/transform_spec.rb +165 -0
- data/vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/spec_helper.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/polyglot-0.3.5/History.txt +72 -0
- data/vendor/bundle/ruby/2.0.0/gems/polyglot-0.3.5/License.txt +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/polyglot-0.3.5/README.txt +87 -0
- data/vendor/bundle/ruby/2.0.0/gems/polyglot-0.3.5/Rakefile +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/polyglot-0.3.5/lib/polyglot/version.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/polyglot-0.3.5/lib/polyglot.rb +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/.autotest +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/.gemtest +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/.rubocop.yml +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/.togglerc +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/CONTRIBUTING.rdoc +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/History.rdoc +651 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/Manifest.txt +166 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/README.rdoc +140 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/Rakefile +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/bin/rake +33 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/glossary.rdoc +43 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/rake.1 +141 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/rakefile.rdoc +653 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/alt_system.rb +110 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb +790 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/clean.rb +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/.document +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/publisher.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/sshpublisher.rb +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/contrib/sys.rb +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/cpu_counter.rb +125 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/dsl_definition.rb +201 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/ext/core.rb +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/ext/module.rb +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/ext/pathname.rb +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/ext/string.rb +173 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/ext/time.rb +16 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/file_list.rb +428 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/file_utils.rb +128 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/gempackagetask.rb +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/linked_list.rb +103 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/loaders/makefile.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/packagetask.rb +199 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/pathmap.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/rdoctask.rb +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/runtest.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb +383 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task_arguments.rb +98 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task_manager.rb +310 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/tasklib.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/testtask.rb +212 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/thread_pool.rb +164 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/version.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/win32.rb +56 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake.rb +79 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/rakelib/publish.rake +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/rakelib/test_times.rake +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/file_creation.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/helper.rb +130 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/support/rakefile_definitions.rb +478 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/support/ruby_runner.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_private_reader.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_application.rb +643 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_application_options.rb +466 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_backtrace.rb +119 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_clean.rb +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_definitions.rb +84 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_directory_task.rb +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_file_list.rb +655 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_file_task.rb +197 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_file_utils.rb +309 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_functional.rb +482 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_late_time.rb +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_multi_task.rb +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_name_space.rb +57 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_pathname_extensions.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_require.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_rules.rb +388 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task.rb +393 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task_arguments.rb +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task_manager.rb +178 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_test_task.rb +146 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_thread_pool.rb +145 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/test/test_trace_output.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-3.3.0/License.txt +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-3.3.0/README.md +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-3.3.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-3.3.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/.document +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/.yardopts +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/Changelog.md +1856 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/License.txt +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/README.md +369 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/exe/rspec +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/backtrace_formatter.rb +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/bisect/coordinator.rb +66 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/bisect/example_minimizer.rb +130 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/bisect/runner.rb +139 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/bisect/subset_enumerator.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb +1807 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration_options.rb +191 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/drb.rb +111 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/dsl.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb +573 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb +796 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_text_formatter.rb +77 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +115 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/console_codes.rb +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/exception_presenter.rb +393 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/helpers.rb +109 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_formatter.rb +151 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_printer.rb +415 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/json_formatter.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/progress_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/protocol.rb +172 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters/snippet_extractor.rb +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/formatters.rb +254 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb +638 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb +532 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/metadata.rb +490 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/metadata_filter.rb +235 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/mutex.rb +63 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/notifications.rb +498 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/option_parser.rb +301 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/ordering.rb +158 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/pending.rb +165 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/profiler.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/.rspec +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/rake_task.rb +158 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/reentrant_mutex.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/reporter.rb +220 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb +179 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/set.rb +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/shared_example_group.rb +210 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core/world.rb +178 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-3.3.2/lib/rspec/core.rb +181 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/.document +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/.yardopts +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/Changelog.md +953 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/License.txt +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/README.md +289 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/configuration.rb +164 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/expectation_target.rb +113 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/fail_with.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/handler.rb +170 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/minitest_integration.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/expectations.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/all.rb +85 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/base_matcher.rb +181 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be.rb +285 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/change.rb +337 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/compound.rb +293 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/contain_exactly.rb +253 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/exist.rb +86 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/has.rb +103 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/include.rb +130 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/match.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/output.rb +200 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/raise_error.rb +216 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/respond_to.rb +90 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/satisfy.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/yield.rb +418 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/composable.rb +184 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/dsl.rb +453 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/english_phrasing.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/generated_descriptions.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-3.3.1/lib/rspec/matchers.rb +1009 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/.document +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/.yardopts +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/Changelog.md +965 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/License.txt +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/README.md +430 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expectation_chain.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/recorder.rb +264 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/configuration.rb +188 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/error_generator.rb +362 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/example_methods.rb +421 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/instance_method_stasher.rb +135 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/have_received.rb +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive.rb +130 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_message_chain.rb +80 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_messages.rb +75 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_expectation.rb +717 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_double.rb +287 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_reference.rb +192 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutate_const.rb +335 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutex.rb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/proxy.rb +439 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/reentrant_mutex.rb +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/targets.rb +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/test_double.rb +170 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_double.rb +129 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_message_expecation.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_proxy.rb +213 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-3.3.2/lib/rspec/mocks.rb +126 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/Changelog.md +125 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/README.md +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/encoded_string.rb +155 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/method_signature_verifier.rb +273 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/object_formatter.rb +93 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/ruby_features.rb +118 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/in_sub_process.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/library_wide_checks.rb +145 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/shell_out.rb +71 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_directory.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/spec.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/version_checker.rb +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-support-3.3.0/lib/rspec/support.rb +111 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/LICENSE +19 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/README.md +192 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/Rakefile +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/bin/tt +112 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/contributing_and_planned_features.markdown +102 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/grammar_composition.markdown +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/index.markdown +88 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/pitfalls_and_advanced_techniques.markdown +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/semantic_interpretation.markdown +218 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/site.rb +112 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/sitegen.rb +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/syntactic_recognition.markdown +220 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/tt.1 +83 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/doc/using_in_ruby.markdown +105 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/indented_blocks/indented_blocks.tt +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/indented_blocks/indented_blocks_test.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/inner_outer.rb +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/inner_outer.tt +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/arithmetic.rb +551 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/arithmetic.treetop +98 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/arithmetic_node_classes.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/arithmetic_test.rb +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/lambda_calculus.rb +718 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/lambda_calculus.treetop +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/lambda_calculus_node_classes.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/lambda_calculus_test.rb +89 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/lambda_calculus/test_helper.rb +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/numerals.rb +210 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/examples/numerals.tt +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/bootstrap_gen_1_metagrammar.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/grammar_compiler.rb +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/lexical_address_space.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/metagrammar.rb +4113 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/metagrammar.treetop +503 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/anything_symbol.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/atomic_expression.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/character_class.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/choice.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/declaration_sequence.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/grammar.rb +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/inline_module.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/nonterminal.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/optional.rb +19 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/parenthesized_expression.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/parsing_expression.rb +150 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/parsing_rule.rb +60 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/predicate.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/predicate_block.rb +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/repetition.rb +109 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/sequence.rb +75 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/terminal.rb +45 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/transient_prefix.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes/treetop_file.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/node_classes.rb +19 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler/ruby_builder.rb +115 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/compiler.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/polyglot.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/ruby_extensions/string.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/ruby_extensions.rb +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/compiled_parser.rb +126 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/interval_skip_list/head_node.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/interval_skip_list/interval_skip_list.rb +200 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/interval_skip_list/node.rb +164 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/interval_skip_list.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/syntax_node.rb +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/terminal_parse_failure.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime/terminal_syntax_node.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/runtime.rb +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop/version.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/lib/treetop.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/and_predicate_spec.rb +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/anything_symbol_spec.rb +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/character_class_spec.rb +304 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/choice_spec.rb +80 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/circular_compilation_spec.rb +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/failure_propagation_functional_spec.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/grammar_compiler_spec.rb +113 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/grammar_spec.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/multibyte_chars_spec.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/namespace_spec.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/nonterminal_symbol_spec.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/not_predicate_spec.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/occurrence_range_spec.rb +186 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/one_or_more_spec.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/optional_spec.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/parenthesized_expression_spec.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/parsing_rule_spec.rb +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/repeated_subrule_spec.rb +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/semantic_predicate_spec.rb +176 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/sequence_spec.rb +129 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/terminal_spec.rb +177 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/terminal_symbol_spec.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/test_grammar.treetop +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/test_grammar.tt +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/test_grammar_do.treetop +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/test_grammar_magic_coding.treetop +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/test_grammar_magic_encoding.treetop +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/tt_compiler_spec.rb +224 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/compiler/zero_or_more_spec.rb +56 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/a.treetop +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/b.treetop +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/c.treetop +10 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/d.treetop +10 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/f.treetop +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/grammar_composition_spec.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/composition/subfolder/e_includes_c.treetop +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/ruby_extensions/string_spec.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/compiled_parser_spec.rb +153 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/delete_spec.rb +147 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/expire_range_spec.rb +349 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/insert_and_delete_node_spec.rb +385 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/insert_spec.rb +660 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +6175 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/palindromic_fixture.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +163 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/interval_skip_list/spec_helper.rb +91 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/runtime/syntax_node_spec.rb +77 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/spec/spec_helper.rb +115 -0
- data/vendor/bundle/ruby/2.0.0/gems/treetop-1.6.3/treetop.gemspec +179 -0
- data/vendor/bundle/ruby/2.0.0/specifications/blankslate-3.1.3.gemspec +30 -0
- data/vendor/bundle/ruby/2.0.0/specifications/diff-lcs-1.2.5.gemspec +65 -0
- data/vendor/bundle/ruby/2.0.0/specifications/parslet-1.7.1.gemspec +31 -0
- data/vendor/bundle/ruby/2.0.0/specifications/polyglot-0.3.5.gemspec +19 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rake-10.4.2.gemspec +40 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-3.3.0.gemspec +39 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-core-3.3.2.gemspec +65 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-expectations-3.3.1.gemspec +47 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-mocks-3.3.2.gemspec +50 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-support-3.3.0.gemspec +35 -0
- data/vendor/bundle/ruby/2.0.0/specifications/treetop-1.6.3.gemspec +50 -0
- metadata +869 -0
@@ -0,0 +1,805 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
module Diff; end unless defined? Diff
|
4
|
+
# = Diff::LCS 1.2.5
|
5
|
+
#
|
6
|
+
# Computes "intelligent" differences between two sequenced Enumerables. This
|
7
|
+
# is an implementation of the McIlroy-Hunt "diff" algorithm for Enumerable
|
8
|
+
# objects that include Diffable.
|
9
|
+
#
|
10
|
+
# Based on Mario I. Wolczko's Smalltalk version (1.2, 1993) and Ned Konz's
|
11
|
+
# Perl version (Algorithm::Diff 1.15).
|
12
|
+
#
|
13
|
+
# == Synopsis
|
14
|
+
# require 'diff/lcs'
|
15
|
+
#
|
16
|
+
# seq1 = %w(a b c e h j l m n p)
|
17
|
+
# seq2 = %w(b c d e f j k l m r s t)
|
18
|
+
#
|
19
|
+
# lcs = Diff::LCS.lcs(seq1, seq2)
|
20
|
+
# diffs = Diff::LCS.diff(seq1, seq2)
|
21
|
+
# sdiff = Diff::LCS.sdiff(seq1, seq2)
|
22
|
+
# seq = Diff::LCS.traverse_sequences(seq1, seq2, callback_obj)
|
23
|
+
# bal = Diff::LCS.traverse_balanced(seq1, seq2, callback_obj)
|
24
|
+
# seq2 == Diff::LCS.patch(seq1, diffs)
|
25
|
+
# seq2 == Diff::LCS.patch!(seq1, diffs)
|
26
|
+
# seq1 == Diff::LCS.unpatch(seq2, diffs)
|
27
|
+
# seq1 == Diff::LCS.unpatch!(seq2, diffs)
|
28
|
+
# seq2 == Diff::LCS.patch(seq1, sdiff)
|
29
|
+
# seq2 == Diff::LCS.patch!(seq1, sdiff)
|
30
|
+
# seq1 == Diff::LCS.unpatch(seq2, sdiff)
|
31
|
+
# seq1 == Diff::LCS.unpatch!(seq2, sdiff)
|
32
|
+
#
|
33
|
+
# Alternatively, objects can be extended with Diff::LCS:
|
34
|
+
#
|
35
|
+
# seq1.extend(Diff::LCS)
|
36
|
+
# lcs = seq1.lcs(seq2)
|
37
|
+
# diffs = seq1.diff(seq2)
|
38
|
+
# sdiff = seq1.sdiff(seq2)
|
39
|
+
# seq = seq1.traverse_sequences(seq2, callback_obj)
|
40
|
+
# bal = seq1.traverse_balanced(seq2, callback_obj)
|
41
|
+
# seq2 == seq1.patch(diffs)
|
42
|
+
# seq2 == seq1.patch!(diffs)
|
43
|
+
# seq1 == seq2.unpatch(diffs)
|
44
|
+
# seq1 == seq2.unpatch!(diffs)
|
45
|
+
# seq2 == seq1.patch(sdiff)
|
46
|
+
# seq2 == seq1.patch!(sdiff)
|
47
|
+
# seq1 == seq2.unpatch(sdiff)
|
48
|
+
# seq1 == seq2.unpatch!(sdiff)
|
49
|
+
#
|
50
|
+
# Default extensions are provided for Array and String objects through the
|
51
|
+
# use of 'diff/lcs/array' and 'diff/lcs/string'.
|
52
|
+
#
|
53
|
+
# == Introduction (by Mark-Jason Dominus)
|
54
|
+
#
|
55
|
+
# <em>The following text is from the Perl documentation. The only changes
|
56
|
+
# have been to make the text appear better in Rdoc</em>.
|
57
|
+
#
|
58
|
+
# I once read an article written by the authors of +diff+; they said that
|
59
|
+
# they hard worked very hard on the algorithm until they found the right
|
60
|
+
# one.
|
61
|
+
#
|
62
|
+
# I think what they ended up using (and I hope someone will correct me,
|
63
|
+
# because I am not very confident about this) was the `longest common
|
64
|
+
# subsequence' method. In the LCS problem, you have two sequences of items:
|
65
|
+
#
|
66
|
+
# a b c d f g h j q z
|
67
|
+
# a b c d e f g i j k r x y z
|
68
|
+
#
|
69
|
+
# and you want to find the longest sequence of items that is present in both
|
70
|
+
# original sequences in the same order. That is, you want to find a new
|
71
|
+
# sequence *S* which can be obtained from the first sequence by deleting
|
72
|
+
# some items, and from the second sequence by deleting other items. You also
|
73
|
+
# want *S* to be as long as possible. In this case *S* is:
|
74
|
+
#
|
75
|
+
# a b c d f g j z
|
76
|
+
#
|
77
|
+
# From there it's only a small step to get diff-like output:
|
78
|
+
#
|
79
|
+
# e h i k q r x y
|
80
|
+
# + - + + - + + +
|
81
|
+
#
|
82
|
+
# This module solves the LCS problem. It also includes a canned function to
|
83
|
+
# generate +diff+-like output.
|
84
|
+
#
|
85
|
+
# It might seem from the example above that the LCS of two sequences is
|
86
|
+
# always pretty obvious, but that's not always the case, especially when the
|
87
|
+
# two sequences have many repeated elements. For example, consider
|
88
|
+
#
|
89
|
+
# a x b y c z p d q
|
90
|
+
# a b c a x b y c z
|
91
|
+
#
|
92
|
+
# A naive approach might start by matching up the +a+ and +b+ that appear at
|
93
|
+
# the beginning of each sequence, like this:
|
94
|
+
#
|
95
|
+
# a x b y c z p d q
|
96
|
+
# a b c a b y c z
|
97
|
+
#
|
98
|
+
# This finds the common subsequence +a b c z+. But actually, the LCS is +a x
|
99
|
+
# b y c z+:
|
100
|
+
#
|
101
|
+
# a x b y c z p d q
|
102
|
+
# a b c a x b y c z
|
103
|
+
#
|
104
|
+
# == Author
|
105
|
+
# This version is by Austin Ziegler <austin@rubyforge.org>.
|
106
|
+
#
|
107
|
+
# It is based on the Perl Algorithm::Diff (1.15) by Ned Konz , copyright
|
108
|
+
# © 2000–2002 and the Smalltalk diff version by Mario I.
|
109
|
+
# Wolczko, copyright © 1993. Documentation includes work by
|
110
|
+
# Mark-Jason Dominus.
|
111
|
+
#
|
112
|
+
# == Licence
|
113
|
+
# Copyright © 2004–2013 Austin Ziegler
|
114
|
+
# This program is free software; you can redistribute it and/or modify it
|
115
|
+
# under the same terms as Ruby, or alternatively under the Perl Artistic
|
116
|
+
# licence.
|
117
|
+
#
|
118
|
+
# == Credits
|
119
|
+
# Much of the documentation is taken directly from the Perl Algorithm::Diff
|
120
|
+
# implementation and was written originally by Mark-Jason Dominus and later
|
121
|
+
# by Ned Konz. The basic Ruby implementation was re-ported from the
|
122
|
+
# Smalltalk implementation, available at
|
123
|
+
# ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st
|
124
|
+
#
|
125
|
+
# #sdiff and #traverse_balanced were written for the Perl version by Mike
|
126
|
+
# Schilli <m@perlmeister.com>.
|
127
|
+
#
|
128
|
+
# "The algorithm is described in <em>A Fast Algorithm for Computing Longest
|
129
|
+
# Common Subsequences</em>, CACM, vol.20, no.5, pp.350-353, May
|
130
|
+
# 1977, with a few minor improvements to improve the speed."
|
131
|
+
module Diff::LCS
|
132
|
+
VERSION = '1.2.5'
|
133
|
+
end
|
134
|
+
|
135
|
+
require 'diff/lcs/callbacks'
|
136
|
+
require 'diff/lcs/internals'
|
137
|
+
|
138
|
+
module Diff::LCS
|
139
|
+
# Returns an Array containing the longest common subsequence(s) between
|
140
|
+
# +self+ and +other+. See Diff::LCS#LCS.
|
141
|
+
#
|
142
|
+
# lcs = seq1.lcs(seq2)
|
143
|
+
def lcs(other, &block) #:yields self[i] if there are matched subsequences:
|
144
|
+
Diff::LCS.lcs(self, other, &block)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Returns the difference set between +self+ and +other+. See
|
148
|
+
# Diff::LCS#diff.
|
149
|
+
def diff(other, callbacks = nil, &block)
|
150
|
+
Diff::LCS.diff(self, other, callbacks, &block)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the balanced ("side-by-side") difference set between +self+ and
|
154
|
+
# +other+. See Diff::LCS#sdiff.
|
155
|
+
def sdiff(other, callbacks = nil, &block)
|
156
|
+
Diff::LCS.sdiff(self, other, callbacks, &block)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Traverses the discovered longest common subsequences between +self+ and
|
160
|
+
# +other+. See Diff::LCS#traverse_sequences.
|
161
|
+
def traverse_sequences(other, callbacks = nil, &block)
|
162
|
+
traverse_sequences(self, other, callbacks ||
|
163
|
+
Diff::LCS.YieldingCallbacks, &block)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Traverses the discovered longest common subsequences between +self+ and
|
167
|
+
# +other+ using the alternate, balanced algorithm. See
|
168
|
+
# Diff::LCS#traverse_balanced.
|
169
|
+
def traverse_balanced(other, callbacks = nil, &block)
|
170
|
+
traverse_balanced(self, other, callbacks ||
|
171
|
+
Diff::LCS.YieldingCallbacks, &block)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Attempts to patch +self+ with the provided +patchset+. A new sequence
|
175
|
+
# based on +self+ and the +patchset+ will be created. See Diff::LCS#patch.
|
176
|
+
# Attempts to autodiscover the direction of the patch.
|
177
|
+
def patch(patchset)
|
178
|
+
Diff::LCS.patch(self, patchset)
|
179
|
+
end
|
180
|
+
alias_method :unpatch, :patch
|
181
|
+
|
182
|
+
# Attempts to patch +self+ with the provided +patchset+. A new sequence
|
183
|
+
# based on +self+ and the +patchset+ will be created. See Diff::LCS#patch.
|
184
|
+
# Does no patch direction autodiscovery.
|
185
|
+
def patch!(patchset)
|
186
|
+
Diff::LCS.patch!(self, patchset)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Attempts to unpatch +self+ with the provided +patchset+. A new sequence
|
190
|
+
# based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch.
|
191
|
+
# Does no patch direction autodiscovery.
|
192
|
+
def unpatch!(patchset)
|
193
|
+
Diff::LCS.unpatch!(self, patchset)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Attempts to patch +self+ with the provided +patchset+, using #patch!. If
|
197
|
+
# the sequence this is used on supports #replace, the value of +self+ will
|
198
|
+
# be replaced. See Diff::LCS#patch. Does no patch direction autodiscovery.
|
199
|
+
def patch_me(patchset)
|
200
|
+
if respond_to? :replace
|
201
|
+
replace(patch!(patchset))
|
202
|
+
else
|
203
|
+
patch!(patchset)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# Attempts to unpatch +self+ with the provided +patchset+, using
|
208
|
+
# #unpatch!. If the sequence this is used on supports #replace, the value
|
209
|
+
# of +self+ will be replaced. See Diff::LCS#unpatch. Does no patch direction
|
210
|
+
# autodiscovery.
|
211
|
+
def unpatch_me(patchset)
|
212
|
+
if respond_to? :replace
|
213
|
+
replace(unpatch!(patchset))
|
214
|
+
else
|
215
|
+
unpatch!(patchset)
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
class << Diff::LCS
|
221
|
+
def lcs(seq1, seq2, &block) #:yields seq1[i] for each matched:
|
222
|
+
matches = Diff::LCS::Internals.lcs(seq1, seq2)
|
223
|
+
ret = []
|
224
|
+
string = seq1.kind_of? String
|
225
|
+
matches.each_with_index do |e, i|
|
226
|
+
unless matches[i].nil?
|
227
|
+
v = string ? seq1[i, 1] : seq1[i]
|
228
|
+
v = block[v] if block
|
229
|
+
ret << v
|
230
|
+
end
|
231
|
+
end
|
232
|
+
ret
|
233
|
+
end
|
234
|
+
alias_method :LCS, :lcs
|
235
|
+
|
236
|
+
# #diff computes the smallest set of additions and deletions necessary to
|
237
|
+
# turn the first sequence into the second, and returns a description of
|
238
|
+
# these changes.
|
239
|
+
#
|
240
|
+
# See Diff::LCS::DiffCallbacks for the default behaviour. An alternate
|
241
|
+
# behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a
|
242
|
+
# Class argument is provided for +callbacks+, #diff will attempt to
|
243
|
+
# initialise it. If the +callbacks+ object (possibly initialised) responds
|
244
|
+
# to #finish, it will be called.
|
245
|
+
def diff(seq1, seq2, callbacks = nil, &block) # :yields diff changes:
|
246
|
+
diff_traversal(:diff, seq1, seq2, callbacks || Diff::LCS::DiffCallbacks,
|
247
|
+
&block)
|
248
|
+
end
|
249
|
+
|
250
|
+
# #sdiff computes all necessary components to show two sequences and their
|
251
|
+
# minimized differences side by side, just like the Unix utility
|
252
|
+
# <em>sdiff</em> does:
|
253
|
+
#
|
254
|
+
# old < -
|
255
|
+
# same same
|
256
|
+
# before | after
|
257
|
+
# - > new
|
258
|
+
#
|
259
|
+
# See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate
|
260
|
+
# behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a
|
261
|
+
# Class argument is provided for +callbacks+, #diff will attempt to
|
262
|
+
# initialise it. If the +callbacks+ object (possibly initialised) responds
|
263
|
+
# to #finish, it will be called.
|
264
|
+
def sdiff(seq1, seq2, callbacks = nil, &block) #:yields diff changes:
|
265
|
+
diff_traversal(:sdiff, seq1, seq2, callbacks || Diff::LCS::SDiffCallbacks,
|
266
|
+
&block)
|
267
|
+
end
|
268
|
+
|
269
|
+
# #traverse_sequences is the most general facility provided by this
|
270
|
+
# module; #diff and #lcs are implemented as calls to it.
|
271
|
+
#
|
272
|
+
# The arguments to #traverse_sequences are the two sequences to traverse,
|
273
|
+
# and a callback object, like this:
|
274
|
+
#
|
275
|
+
# traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new)
|
276
|
+
#
|
277
|
+
# == Callback Methods
|
278
|
+
#
|
279
|
+
# Optional callback methods are <em>emphasized</em>.
|
280
|
+
#
|
281
|
+
# callbacks#match:: Called when +a+ and +b+ are pointing to
|
282
|
+
# common elements in +A+ and +B+.
|
283
|
+
# callbacks#discard_a:: Called when +a+ is pointing to an
|
284
|
+
# element not in +B+.
|
285
|
+
# callbacks#discard_b:: Called when +b+ is pointing to an
|
286
|
+
# element not in +A+.
|
287
|
+
# <em>callbacks#finished_a</em>:: Called when +a+ has reached the end of
|
288
|
+
# sequence +A+.
|
289
|
+
# <em>callbacks#finished_b</em>:: Called when +b+ has reached the end of
|
290
|
+
# sequence +B+.
|
291
|
+
#
|
292
|
+
# == Algorithm
|
293
|
+
#
|
294
|
+
# a---+
|
295
|
+
# v
|
296
|
+
# A = a b c e h j l m n p
|
297
|
+
# B = b c d e f j k l m r s t
|
298
|
+
# ^
|
299
|
+
# b---+
|
300
|
+
#
|
301
|
+
# If there are two arrows (+a+ and +b+) pointing to elements of sequences
|
302
|
+
# +A+ and +B+, the arrows will initially point to the first elements of
|
303
|
+
# their respective sequences. #traverse_sequences will advance the arrows
|
304
|
+
# through the sequences one element at a time, calling a method on the
|
305
|
+
# user-specified callback object before each advance. It will advance the
|
306
|
+
# arrows in such a way that if there are elements <tt>A[i]</tt> and
|
307
|
+
# <tt>B[j]</tt> which are both equal and part of the longest common
|
308
|
+
# subsequence, there will be some moment during the execution of
|
309
|
+
# #traverse_sequences when arrow +a+ is pointing to <tt>A[i]</tt> and
|
310
|
+
# arrow +b+ is pointing to <tt>B[j]</tt>. When this happens,
|
311
|
+
# #traverse_sequences will call <tt>callbacks#match</tt> and then it will
|
312
|
+
# advance both arrows.
|
313
|
+
#
|
314
|
+
# Otherwise, one of the arrows is pointing to an element of its sequence
|
315
|
+
# that is not part of the longest common subsequence. #traverse_sequences
|
316
|
+
# will advance that arrow and will call <tt>callbacks#discard_a</tt> or
|
317
|
+
# <tt>callbacks#discard_b</tt>, depending on which arrow it advanced. If
|
318
|
+
# both arrows point to elements that are not part of the longest common
|
319
|
+
# subsequence, then #traverse_sequences will advance one of them and call
|
320
|
+
# the appropriate callback, but it is not specified which it will call.
|
321
|
+
#
|
322
|
+
# The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>,
|
323
|
+
# and <tt>callbacks#discard_b</tt> are invoked with an event comprising
|
324
|
+
# the action ("=", "+", or "-", respectively), the indicies +i+ and +j+,
|
325
|
+
# and the elements <tt>A[i]</tt> and <tt>B[j]</tt>. Return values are
|
326
|
+
# discarded by #traverse_sequences.
|
327
|
+
#
|
328
|
+
# === End of Sequences
|
329
|
+
#
|
330
|
+
# If arrow +a+ reaches the end of its sequence before arrow +b+ does,
|
331
|
+
# #traverse_sequence will try to call <tt>callbacks#finished_a</tt> with
|
332
|
+
# the last index and element of +A+ (<tt>A[-1]</tt>) and the current index
|
333
|
+
# and element of +B+ (<tt>B[j]</tt>). If <tt>callbacks#finished_a</tt>
|
334
|
+
# does not exist, then <tt>callbacks#discard_b</tt> will be called on each
|
335
|
+
# element of +B+ until the end of the sequence is reached (the call will
|
336
|
+
# be done with <tt>A[-1]</tt> and <tt>B[j]</tt> for each element).
|
337
|
+
#
|
338
|
+
# If +b+ reaches the end of +B+ before +a+ reaches the end of +A+,
|
339
|
+
# <tt>callbacks#finished_b</tt> will be called with the current index and
|
340
|
+
# element of +A+ (<tt>A[i]</tt>) and the last index and element of +B+
|
341
|
+
# (<tt>A[-1]</tt>). Again, if <tt>callbacks#finished_b</tt> does not exist
|
342
|
+
# on the callback object, then <tt>callbacks#discard_a</tt> will be called
|
343
|
+
# on each element of +A+ until the end of the sequence is reached
|
344
|
+
# (<tt>A[i]</tt> and <tt>B[-1]</tt>).
|
345
|
+
#
|
346
|
+
# There is a chance that one additional <tt>callbacks#discard_a</tt> or
|
347
|
+
# <tt>callbacks#discard_b</tt> will be called after the end of the
|
348
|
+
# sequence is reached, if +a+ has not yet reached the end of +A+ or +b+
|
349
|
+
# has not yet reached the end of +B+.
|
350
|
+
def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks, &block) #:yields change events:
|
351
|
+
callbacks ||= Diff::LCS::SequenceCallbacks
|
352
|
+
matches = Diff::LCS::Internals.lcs(seq1, seq2)
|
353
|
+
|
354
|
+
run_finished_a = run_finished_b = false
|
355
|
+
string = seq1.kind_of?(String)
|
356
|
+
|
357
|
+
a_size = seq1.size
|
358
|
+
b_size = seq2.size
|
359
|
+
ai = bj = 0
|
360
|
+
|
361
|
+
(0..matches.size).each do |i|
|
362
|
+
b_line = matches[i]
|
363
|
+
|
364
|
+
ax = string ? seq1[i, 1] : seq1[i]
|
365
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
366
|
+
|
367
|
+
if b_line.nil?
|
368
|
+
unless ax.nil? or (string and ax.empty?)
|
369
|
+
event = Diff::LCS::ContextChange.new('-', i, ax, bj, bx)
|
370
|
+
event = yield event if block_given?
|
371
|
+
callbacks.discard_a(event)
|
372
|
+
end
|
373
|
+
else
|
374
|
+
loop do
|
375
|
+
break unless bj < b_line
|
376
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
377
|
+
event = Diff::LCS::ContextChange.new('+', i, ax, bj, bx)
|
378
|
+
event = yield event if block_given?
|
379
|
+
callbacks.discard_b(event)
|
380
|
+
bj += 1
|
381
|
+
end
|
382
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
383
|
+
event = Diff::LCS::ContextChange.new('=', i, ax, bj, bx)
|
384
|
+
event = yield event if block_given?
|
385
|
+
callbacks.match(event)
|
386
|
+
bj += 1
|
387
|
+
end
|
388
|
+
ai = i
|
389
|
+
end
|
390
|
+
ai += 1
|
391
|
+
|
392
|
+
# The last entry (if any) processed was a match. +ai+ and +bj+ point
|
393
|
+
# just past the last matching lines in their sequences.
|
394
|
+
while (ai < a_size) or (bj < b_size)
|
395
|
+
# last A?
|
396
|
+
if ai == a_size and bj < b_size
|
397
|
+
if callbacks.respond_to?(:finished_a) and not run_finished_a
|
398
|
+
ax = string ? seq1[-1, 1] : seq1[-1]
|
399
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
400
|
+
event = Diff::LCS::ContextChange.new('>', (a_size - 1), ax, bj, bx)
|
401
|
+
event = yield event if block_given?
|
402
|
+
callbacks.finished_a(event)
|
403
|
+
run_finished_a = true
|
404
|
+
else
|
405
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
406
|
+
loop do
|
407
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
408
|
+
event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
|
409
|
+
event = yield event if block_given?
|
410
|
+
callbacks.discard_b(event)
|
411
|
+
bj += 1
|
412
|
+
break unless bj < b_size
|
413
|
+
end
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
# last B?
|
418
|
+
if bj == b_size and ai < a_size
|
419
|
+
if callbacks.respond_to?(:finished_b) and not run_finished_b
|
420
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
421
|
+
bx = string ? seq2[-1, 1] : seq2[-1]
|
422
|
+
event = Diff::LCS::ContextChange.new('<', ai, ax, (b_size - 1), bx)
|
423
|
+
event = yield event if block_given?
|
424
|
+
callbacks.finished_b(event)
|
425
|
+
run_finished_b = true
|
426
|
+
else
|
427
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
428
|
+
loop do
|
429
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
430
|
+
event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
|
431
|
+
event = yield event if block_given?
|
432
|
+
callbacks.discard_a(event)
|
433
|
+
ai += 1
|
434
|
+
break unless bj < b_size
|
435
|
+
end
|
436
|
+
end
|
437
|
+
end
|
438
|
+
|
439
|
+
if ai < a_size
|
440
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
441
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
442
|
+
event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
|
443
|
+
event = yield event if block_given?
|
444
|
+
callbacks.discard_a(event)
|
445
|
+
ai += 1
|
446
|
+
end
|
447
|
+
|
448
|
+
if bj < b_size
|
449
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
450
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
451
|
+
event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
|
452
|
+
event = yield event if block_given?
|
453
|
+
callbacks.discard_b(event)
|
454
|
+
bj += 1
|
455
|
+
end
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
# #traverse_balanced is an alternative to #traverse_sequences. It uses a
|
460
|
+
# different algorithm to iterate through the entries in the computed
|
461
|
+
# longest common subsequence. Instead of viewing the changes as insertions
|
462
|
+
# or deletions from one of the sequences, #traverse_balanced will report
|
463
|
+
# <em>changes</em> between the sequences.
|
464
|
+
#
|
465
|
+
# The arguments to #traverse_balanced are the two sequences to traverse
|
466
|
+
# and a callback object, like this:
|
467
|
+
#
|
468
|
+
# traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new)
|
469
|
+
#
|
470
|
+
# #sdiff is implemented with #traverse_balanced.
|
471
|
+
#
|
472
|
+
# == Callback Methods
|
473
|
+
#
|
474
|
+
# Optional callback methods are <em>emphasized</em>.
|
475
|
+
#
|
476
|
+
# callbacks#match:: Called when +a+ and +b+ are pointing to
|
477
|
+
# common elements in +A+ and +B+.
|
478
|
+
# callbacks#discard_a:: Called when +a+ is pointing to an
|
479
|
+
# element not in +B+.
|
480
|
+
# callbacks#discard_b:: Called when +b+ is pointing to an
|
481
|
+
# element not in +A+.
|
482
|
+
# <em>callbacks#change</em>:: Called when +a+ and +b+ are pointing to
|
483
|
+
# the same relative position, but
|
484
|
+
# <tt>A[a]</tt> and <tt>B[b]</tt> are not
|
485
|
+
# the same; a <em>change</em> has
|
486
|
+
# occurred.
|
487
|
+
#
|
488
|
+
# #traverse_balanced might be a bit slower than #traverse_sequences,
|
489
|
+
# noticable only while processing huge amounts of data.
|
490
|
+
#
|
491
|
+
# == Algorithm
|
492
|
+
#
|
493
|
+
# a---+
|
494
|
+
# v
|
495
|
+
# A = a b c e h j l m n p
|
496
|
+
# B = b c d e f j k l m r s t
|
497
|
+
# ^
|
498
|
+
# b---+
|
499
|
+
#
|
500
|
+
# === Matches
|
501
|
+
#
|
502
|
+
# If there are two arrows (+a+ and +b+) pointing to elements of sequences
|
503
|
+
# +A+ and +B+, the arrows will initially point to the first elements of
|
504
|
+
# their respective sequences. #traverse_sequences will advance the arrows
|
505
|
+
# through the sequences one element at a time, calling a method on the
|
506
|
+
# user-specified callback object before each advance. It will advance the
|
507
|
+
# arrows in such a way that if there are elements <tt>A[i]</tt> and
|
508
|
+
# <tt>B[j]</tt> which are both equal and part of the longest common
|
509
|
+
# subsequence, there will be some moment during the execution of
|
510
|
+
# #traverse_sequences when arrow +a+ is pointing to <tt>A[i]</tt> and
|
511
|
+
# arrow +b+ is pointing to <tt>B[j]</tt>. When this happens,
|
512
|
+
# #traverse_sequences will call <tt>callbacks#match</tt> and then it will
|
513
|
+
# advance both arrows.
|
514
|
+
#
|
515
|
+
# === Discards
|
516
|
+
#
|
517
|
+
# Otherwise, one of the arrows is pointing to an element of its sequence
|
518
|
+
# that is not part of the longest common subsequence. #traverse_sequences
|
519
|
+
# will advance that arrow and will call <tt>callbacks#discard_a</tt> or
|
520
|
+
# <tt>callbacks#discard_b</tt>, depending on which arrow it advanced.
|
521
|
+
#
|
522
|
+
# === Changes
|
523
|
+
#
|
524
|
+
# If both +a+ and +b+ point to elements that are not part of the longest
|
525
|
+
# common subsequence, then #traverse_sequences will try to call
|
526
|
+
# <tt>callbacks#change</tt> and advance both arrows. If
|
527
|
+
# <tt>callbacks#change</tt> is not implemented, then
|
528
|
+
# <tt>callbacks#discard_a</tt> and <tt>callbacks#discard_b</tt> will be
|
529
|
+
# called in turn.
|
530
|
+
#
|
531
|
+
# The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>,
|
532
|
+
# <tt>callbacks#discard_b</tt>, and <tt>callbacks#change</tt> are invoked
|
533
|
+
# with an event comprising the action ("=", "+", "-", or "!",
|
534
|
+
# respectively), the indicies +i+ and +j+, and the elements
|
535
|
+
# <tt>A[i]</tt> and <tt>B[j]</tt>. Return values are discarded by
|
536
|
+
# #traverse_balanced.
|
537
|
+
#
|
538
|
+
# === Context
|
539
|
+
# Note that +i+ and +j+ may not be the same index position, even if +a+
|
540
|
+
# and +b+ are considered to be pointing to matching or changed elements.
|
541
|
+
def traverse_balanced(seq1, seq2, callbacks = Diff::LCS::BalancedCallbacks)
|
542
|
+
matches = Diff::LCS::Internals.lcs(seq1, seq2)
|
543
|
+
a_size = seq1.size
|
544
|
+
b_size = seq2.size
|
545
|
+
ai = bj = mb = 0
|
546
|
+
ma = -1
|
547
|
+
string = seq1.kind_of?(String)
|
548
|
+
|
549
|
+
# Process all the lines in the match vector.
|
550
|
+
loop do
|
551
|
+
# Find next match indices +ma+ and +mb+
|
552
|
+
loop do
|
553
|
+
ma += 1
|
554
|
+
break unless ma < matches.size and matches[ma].nil?
|
555
|
+
end
|
556
|
+
|
557
|
+
break if ma >= matches.size # end of matches?
|
558
|
+
mb = matches[ma]
|
559
|
+
|
560
|
+
# Change(seq2)
|
561
|
+
while (ai < ma) or (bj < mb)
|
562
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
563
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
564
|
+
|
565
|
+
case [(ai < ma), (bj < mb)]
|
566
|
+
when [true, true]
|
567
|
+
if callbacks.respond_to?(:change)
|
568
|
+
event = Diff::LCS::ContextChange.new('!', ai, ax, bj, bx)
|
569
|
+
event = yield event if block_given?
|
570
|
+
callbacks.change(event)
|
571
|
+
ai += 1
|
572
|
+
bj += 1
|
573
|
+
else
|
574
|
+
event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
|
575
|
+
event = yield event if block_given?
|
576
|
+
callbacks.discard_a(event)
|
577
|
+
ai += 1
|
578
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
579
|
+
event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
|
580
|
+
event = yield event if block_given?
|
581
|
+
callbacks.discard_b(event)
|
582
|
+
bj += 1
|
583
|
+
end
|
584
|
+
when [true, false]
|
585
|
+
event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
|
586
|
+
event = yield event if block_given?
|
587
|
+
callbacks.discard_a(event)
|
588
|
+
ai += 1
|
589
|
+
when [false, true]
|
590
|
+
event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
|
591
|
+
event = yield event if block_given?
|
592
|
+
callbacks.discard_b(event)
|
593
|
+
bj += 1
|
594
|
+
end
|
595
|
+
end
|
596
|
+
|
597
|
+
# Match
|
598
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
599
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
600
|
+
event = Diff::LCS::ContextChange.new('=', ai, ax, bj, bx)
|
601
|
+
event = yield event if block_given?
|
602
|
+
callbacks.match(event)
|
603
|
+
ai += 1
|
604
|
+
bj += 1
|
605
|
+
end
|
606
|
+
|
607
|
+
while (ai < a_size) or (bj < b_size)
|
608
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
609
|
+
bx = string ? seq2[bj, 1] : seq2[bj]
|
610
|
+
|
611
|
+
case [(ai < a_size), (bj < b_size)]
|
612
|
+
when [true, true]
|
613
|
+
if callbacks.respond_to?(:change)
|
614
|
+
event = Diff::LCS::ContextChange.new('!', ai, ax, bj, bx)
|
615
|
+
event = yield event if block_given?
|
616
|
+
callbacks.change(event)
|
617
|
+
ai += 1
|
618
|
+
bj += 1
|
619
|
+
else
|
620
|
+
event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
|
621
|
+
event = yield event if block_given?
|
622
|
+
callbacks.discard_a(event)
|
623
|
+
ai += 1
|
624
|
+
ax = string ? seq1[ai, 1] : seq1[ai]
|
625
|
+
event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
|
626
|
+
event = yield event if block_given?
|
627
|
+
callbacks.discard_b(event)
|
628
|
+
bj += 1
|
629
|
+
end
|
630
|
+
when [true, false]
|
631
|
+
event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
|
632
|
+
event = yield event if block_given?
|
633
|
+
callbacks.discard_a(event)
|
634
|
+
ai += 1
|
635
|
+
when [false, true]
|
636
|
+
event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
|
637
|
+
event = yield event if block_given?
|
638
|
+
callbacks.discard_b(event)
|
639
|
+
bj += 1
|
640
|
+
end
|
641
|
+
end
|
642
|
+
end
|
643
|
+
|
644
|
+
PATCH_MAP = { #:nodoc:
|
645
|
+
:patch => { '+' => '+', '-' => '-', '!' => '!', '=' => '=' },
|
646
|
+
:unpatch => { '+' => '-', '-' => '+', '!' => '!', '=' => '=' }
|
647
|
+
}
|
648
|
+
|
649
|
+
# Applies a +patchset+ to the sequence +src+ according to the +direction+
|
650
|
+
# (<tt>:patch</tt> or <tt>:unpatch</tt>), producing a new sequence.
|
651
|
+
#
|
652
|
+
# If the +direction+ is not specified, Diff::LCS::patch will attempt to
|
653
|
+
# discover the direction of the +patchset+.
|
654
|
+
#
|
655
|
+
# A +patchset+ can be considered to apply forward (<tt>:patch</tt>) if the
|
656
|
+
# following expression is true:
|
657
|
+
#
|
658
|
+
# patch(s1, diff(s1, s2)) -> s2
|
659
|
+
#
|
660
|
+
# A +patchset+ can be considered to apply backward (<tt>:unpatch</tt>) if
|
661
|
+
# the following expression is true:
|
662
|
+
#
|
663
|
+
# patch(s2, diff(s1, s2)) -> s1
|
664
|
+
#
|
665
|
+
# If the +patchset+ contains no changes, the +src+ value will be returned
|
666
|
+
# as either <tt>src.dup</tt> or +src+. A +patchset+ can be deemed as
|
667
|
+
# having no changes if the following predicate returns true:
|
668
|
+
#
|
669
|
+
# patchset.empty? or
|
670
|
+
# patchset.flatten.all? { |change| change.unchanged? }
|
671
|
+
#
|
672
|
+
# === Patchsets
|
673
|
+
#
|
674
|
+
# A +patchset+ is always an enumerable sequence of changes, hunks of
|
675
|
+
# changes, or a mix of the two. A hunk of changes is an enumerable
|
676
|
+
# sequence of changes:
|
677
|
+
#
|
678
|
+
# [ # patchset
|
679
|
+
# # change
|
680
|
+
# [ # hunk
|
681
|
+
# # change
|
682
|
+
# ]
|
683
|
+
# ]
|
684
|
+
#
|
685
|
+
# The +patch+ method accepts <tt>patchset</tt>s that are enumerable
|
686
|
+
# sequences containing either Diff::LCS::Change objects (or a subclass) or
|
687
|
+
# the array representations of those objects. Prior to application, array
|
688
|
+
# representations of Diff::LCS::Change objects will be reified.
|
689
|
+
def patch(src, patchset, direction = nil)
|
690
|
+
# Normalize the patchset.
|
691
|
+
has_changes, patchset = Diff::LCS::Internals.analyze_patchset(patchset)
|
692
|
+
|
693
|
+
if not has_changes
|
694
|
+
return src.dup if src.respond_to? :dup
|
695
|
+
return src
|
696
|
+
end
|
697
|
+
|
698
|
+
string = src.kind_of?(String)
|
699
|
+
# Start with a new empty type of the source's class
|
700
|
+
res = src.class.new
|
701
|
+
|
702
|
+
direction ||= Diff::LCS::Internals.intuit_diff_direction(src, patchset)
|
703
|
+
|
704
|
+
ai = bj = 0
|
705
|
+
|
706
|
+
patch_map = PATCH_MAP[direction]
|
707
|
+
|
708
|
+
patchset.flatten.each do |change|
|
709
|
+
# Both Change and ContextChange support #action
|
710
|
+
action = patch_map[change.action]
|
711
|
+
|
712
|
+
case change
|
713
|
+
when Diff::LCS::ContextChange
|
714
|
+
case direction
|
715
|
+
when :patch
|
716
|
+
el = change.new_element
|
717
|
+
op = change.old_position
|
718
|
+
np = change.new_position
|
719
|
+
when :unpatch
|
720
|
+
el = change.old_element
|
721
|
+
op = change.new_position
|
722
|
+
np = change.old_position
|
723
|
+
end
|
724
|
+
|
725
|
+
case action
|
726
|
+
when '-' # Remove details from the old string
|
727
|
+
while ai < op
|
728
|
+
res << (string ? src[ai, 1] : src[ai])
|
729
|
+
ai += 1
|
730
|
+
bj += 1
|
731
|
+
end
|
732
|
+
ai += 1
|
733
|
+
when '+'
|
734
|
+
while bj < np
|
735
|
+
res << (string ? src[ai, 1] : src[ai])
|
736
|
+
ai += 1
|
737
|
+
bj += 1
|
738
|
+
end
|
739
|
+
|
740
|
+
res << el
|
741
|
+
bj += 1
|
742
|
+
when '='
|
743
|
+
# This only appears in sdiff output with the SDiff callback.
|
744
|
+
# Therefore, we only need to worry about dealing with a single
|
745
|
+
# element.
|
746
|
+
res << el
|
747
|
+
|
748
|
+
ai += 1
|
749
|
+
bj += 1
|
750
|
+
when '!'
|
751
|
+
while ai < op
|
752
|
+
res << (string ? src[ai, 1] : src[ai])
|
753
|
+
ai += 1
|
754
|
+
bj += 1
|
755
|
+
end
|
756
|
+
|
757
|
+
bj += 1
|
758
|
+
ai += 1
|
759
|
+
|
760
|
+
res << el
|
761
|
+
end
|
762
|
+
when Diff::LCS::Change
|
763
|
+
case action
|
764
|
+
when '-'
|
765
|
+
while ai < change.position
|
766
|
+
res << (string ? src[ai, 1] : src[ai])
|
767
|
+
ai += 1
|
768
|
+
bj += 1
|
769
|
+
end
|
770
|
+
ai += 1
|
771
|
+
when '+'
|
772
|
+
while bj < change.position
|
773
|
+
res << (string ? src[ai, 1] : src[ai])
|
774
|
+
ai += 1
|
775
|
+
bj += 1
|
776
|
+
end
|
777
|
+
|
778
|
+
bj += 1
|
779
|
+
|
780
|
+
res << change.element
|
781
|
+
end
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
while ai < src.size
|
786
|
+
res << (string ? src[ai, 1] : src[ai])
|
787
|
+
ai += 1
|
788
|
+
bj += 1
|
789
|
+
end
|
790
|
+
|
791
|
+
res
|
792
|
+
end
|
793
|
+
|
794
|
+
# Given a set of patchset, convert the current version to the prior
|
795
|
+
# version. Does no auto-discovery.
|
796
|
+
def unpatch!(src, patchset)
|
797
|
+
patch(src, patchset, :unpatch)
|
798
|
+
end
|
799
|
+
|
800
|
+
# Given a set of patchset, convert the current version to the next
|
801
|
+
# version. Does no auto-discovery.
|
802
|
+
def patch!(src, patchset)
|
803
|
+
patch(src, patchset, :patch)
|
804
|
+
end
|
805
|
+
end
|