syllable_counter 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/README.md +5 -2
- data/lib/syllable_counter.rb +7 -19
- data/lib/syllable_counter/calculate.rb +28 -0
- data/lib/syllable_counter/english_exceptions.rb +11 -0
- data/lib/syllable_counter/rules.rb +71 -0
- data/lib/syllable_counter/version.rb +1 -1
- data/spec/calculator_spec.rb +27 -0
- data/spec/rules_spec.rb +39 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/syllable_counter_spec.rb +6 -75
- data/syllable_counter.gemspec +2 -2
- data/vendor/bundle/bin/autospec +23 -0
- data/vendor/bundle/bin/htmldiff +25 -0
- data/vendor/bundle/bin/ldiff +25 -0
- data/vendor/bundle/bin/rake +23 -0
- data/vendor/bundle/bin/rspec +23 -0
- data/vendor/bundle/build_info/diff-lcs-1.2.4.info +1 -0
- data/vendor/bundle/build_info/rake-10.1.0.info +1 -0
- data/vendor/bundle/build_info/rspec-2.14.1.info +1 -0
- data/vendor/bundle/build_info/rspec-core-2.14.5.info +1 -0
- data/vendor/bundle/build_info/rspec-expectations-2.14.2.info +1 -0
- data/vendor/bundle/build_info/rspec-mocks-2.14.3.info +1 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.autotest +3 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.gemtest +0 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.hoerc +2 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.rspec +2 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/.travis.yml +22 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Contributing.rdoc +64 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Gemfile +20 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/History.rdoc +146 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/License.rdoc +39 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Manifest.txt +38 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/README.rdoc +85 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/Rakefile +39 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/autotest/discover.rb +1 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/bin/htmldiff +32 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/bin/ldiff +6 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/docs/COPYING.txt +339 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/docs/artistic.txt +127 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs.rb +805 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/change.rb +177 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/internals.rb +301 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/ldiff.rb +195 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/change_spec.rb +65 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/diff_spec.rb +47 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/issues_spec.rb +24 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/lcs_spec.rb +54 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/patch_spec.rb +414 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/sdiff_spec.rb +202 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/spec_helper.rb +290 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/gems/diff-lcs-1.2.4/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/gems/rake-10.1.0/.gemtest +0 -0
- data/vendor/bundle/gems/rake-10.1.0/CHANGES +530 -0
- data/vendor/bundle/gems/rake-10.1.0/MIT-LICENSE +21 -0
- data/vendor/bundle/gems/rake-10.1.0/README.rdoc +187 -0
- data/vendor/bundle/gems/rake-10.1.0/Rakefile +375 -0
- data/vendor/bundle/gems/rake-10.1.0/TODO +21 -0
- data/vendor/bundle/gems/rake-10.1.0/bin/rake +33 -0
- data/vendor/bundle/gems/rake-10.1.0/install.rb +80 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake.rb +73 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/alt_system.rb +108 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/application.rb +728 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/backtrace.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/clean.rb +55 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/ftptools.rb +139 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/publisher.rb +73 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/rubyforgepublisher.rb +16 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/sshpublisher.rb +50 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/contrib/sys.rb +2 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/default_loader.rb +10 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/dsl_definition.rb +157 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/early_time.rb +18 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/core.rb +28 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/module.rb +0 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/string.rb +166 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ext/time.rb +15 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_list.rb +416 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_utils.rb +116 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/gempackagetask.rb +2 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/linked_list.rb +103 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/loaders/makefile.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/name_space.rb +25 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/packagetask.rb +190 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/pathmap.rb +1 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rake_module.rb +37 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rdoctask.rb +2 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/ruby182_test_unit_fix.rb +27 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/runtest.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task.rb +378 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_arguments.rb +89 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/task_manager.rb +297 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/tasklib.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/testtask.rb +201 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/thread_pool.rb +161 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/version.rb +9 -0
- data/vendor/bundle/gems/rake-10.1.0/lib/rake/win32.rb +56 -0
- data/vendor/bundle/gems/rake-10.1.0/test/file_creation.rb +34 -0
- data/vendor/bundle/gems/rake-10.1.0/test/helper.rb +128 -0
- data/vendor/bundle/gems/rake-10.1.0/test/support/rakefile_definitions.rb +444 -0
- data/vendor/bundle/gems/rake-10.1.0/test/support/ruby_runner.rb +33 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_private_reader.rb +42 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_application.rb +517 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_application_options.rb +457 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_backtrace.rb +113 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_clean.rb +46 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_definitions.rb +79 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_directory_task.rb +57 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_list.rb +627 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_task.rb +122 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_file_utils.rb +309 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_functional.rb +466 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_multi_task.rb +58 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_name_space.rb +43 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_require.rb +40 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_rules.rb +362 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task.rb +376 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_argument_parsing.rb +103 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_arguments.rb +121 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_manager.rb +158 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_task_with_arguments.rb +171 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_test_task.rb +119 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_thread_pool.rb +142 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/gems/rake-10.1.0/test/test_trace_output.rb +52 -0
- data/vendor/bundle/gems/rspec-2.14.1/License.txt +24 -0
- data/vendor/bundle/gems/rspec-2.14.1/README.md +47 -0
- data/vendor/bundle/gems/rspec-2.14.1/lib/rspec.rb +3 -0
- data/vendor/bundle/gems/rspec-2.14.1/lib/rspec/version.rb +5 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/.document +5 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/.yardopts +6 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/Changelog.md +881 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/License.txt +24 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/README.md +261 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/exe/autospec +13 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/exe/rspec +25 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/Autotest.md +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/README.md +17 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/Upgrade.md +364 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/README.md +28 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/example_name_option.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/exit_status.feature +82 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/format_option.feature +75 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/init.feature +18 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/line_number_appended_to_path.feature +140 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/line_number_option.feature +58 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/order.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/pattern_option.feature +49 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/rake_task.feature +122 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/require_option.feature +43 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/ruby.feature +22 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/tag.feature +98 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/command_line/warnings_option.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/alias_example_to.feature +48 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/backtrace_clean_patterns.feature +102 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/custom_settings.feature +84 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/default_path.feature +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/deprecation_stream.feature +58 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/fail_fast.feature +77 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/failure_exit_code.feature +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/order_and_seed.feature +3 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/output_stream.feature +24 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/pattern.feature +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/profile.feature +220 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/read_options_from_file.feature +90 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/run_all_when_everything_filtered.feature +76 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/show_failures_in_pending_blocks.feature +61 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/basic_structure.feature +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/shared_context.feature +74 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/example_groups/shared_examples.feature +294 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/exclusion_filters.feature +138 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/if_and_unless.feature +168 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/filtering/inclusion_filters.feature +105 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/configurable_colors.feature +31 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/custom_formatter.feature +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/json_formatter.feature +30 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/formatters/text_formatter.feature +46 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/arbitrary_methods.feature +40 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/let.feature +50 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/helper_methods/modules.feature +149 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/around_hooks.feature +343 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/before_and_after_hooks.feature +427 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/hooks/filtering.feature +234 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/current_example.feature +17 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/described_class.feature +17 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/metadata/user_defined.feature +113 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_mocha.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_rr.feature +98 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/mock_framework_integration/use_rspec.feature +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/pending/pending_examples.feature +229 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/step_definitions/additional_cli_steps.rb +49 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/attribute_of_subject.feature +124 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/explicit_subject.feature +101 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/implicit_receiver.feature +29 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/subject/implicit_subject.feature +63 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/support/env.rb +14 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/features/support/rubinius.rb +6 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/autotest/discover.rb +1 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/autotest/rspec2.rb +73 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/autorun.rb +2 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core.rb +169 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backtrace_cleaner.rb +46 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backward_compatibility.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb +1174 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/configuration_options.rb +156 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/deprecation.rb +31 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/drb_command_line.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/drb_options.rb +87 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/dsl.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/example.rb +331 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb +479 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/kernel.rb +9 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/extensions/ordered.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/filter_manager.rb +203 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/base_formatter.rb +246 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/base_text_formatter.rb +329 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/deprecation_formatter.rb +39 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/html_formatter.rb +155 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/html_printer.rb +408 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/json_formatter.rb +70 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb +519 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/memoized_helpers.rb +514 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/metadata.rb +299 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_mocha.rb +52 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/mocking/with_rspec.rb +27 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/option_parser.rb +219 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/pending.rb +109 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/project_initializer.rb +86 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/rake_task.rb +206 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/reporter.rb +132 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/ruby_project.rb +44 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb +87 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_example_group.rb +185 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/shared_example_group/collection.rb +43 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/version.rb +8 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/world.rb +127 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/discover_spec.rb +19 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/failed_results_re_spec.rb +45 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/autotest/rspec_spec.rb +133 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/command_line/order_spec.rb +204 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/backtrace_cleaner_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/command_line_spec.rb +108 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/configuration_options_spec.rb +417 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/configuration_spec.rb +1561 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/deprecation_spec.rb +46 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/deprecations_spec.rb +73 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/drb_command_line_spec.rb +102 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/drb_options_spec.rb +193 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/dsl_spec.rb +25 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/example_group_spec.rb +1187 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/example_spec.rb +439 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/filter_manager_spec.rb +246 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/base_text_formatter_spec.rb +494 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/deprecation_formatter_spec.rb +96 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/helpers_spec.rb +94 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +404 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.8.7.html +414 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.2.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +404 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-1.9.3.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatted-2.0.0.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/html_formatter_spec.rb +95 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/json_formatter_spec.rb +115 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +395 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +414 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +404 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +477 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatted-2.0.0.html +425 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/formatters/text_mate_formatter_spec.rb +96 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/hooks_spec.rb +267 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/memoized_helpers_spec.rb +688 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/metadata_spec.rb +491 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/option_parser_spec.rb +242 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/pending_example_spec.rb +220 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/rake_task_spec.rb +181 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/reporter_spec.rb +141 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_bar.rb +0 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_foo.rb +0 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/a_spec.rb +1 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/ruby_project_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/runner_spec.rb +82 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_context_spec.rb +114 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_example_group/collection_spec.rb +70 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/shared_example_group_spec.rb +120 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core/world_spec.rb +142 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/rspec/core_spec.rb +74 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/spec_helper.rb +132 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/config_options_helper.rb +15 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/helper_methods.rb +36 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolate_load_path_mutation.rb +6 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolated_directory.rb +10 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/isolated_home_directory.rb +16 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/matchers.rb +65 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/sandboxed_mock_space.rb +100 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/shared_example_groups.rb +41 -0
- data/vendor/bundle/gems/rspec-core-2.14.5/spec/support/spec_files.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/.document +5 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/.yardopts +6 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/Changelog.md +399 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/License.txt +23 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/README.md +184 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/README.md +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/Upgrade.md +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/README.md +90 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/be.feature +175 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/be_within.feature +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/cover.feature +47 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/end_with.feature +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/equality.feature +139 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/exist.feature +45 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/expect_change.feature +59 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/expect_error.feature +144 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/have.feature +109 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/include.feature +174 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/match.feature +52 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/operators.feature +227 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/predicates.feature +137 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/respond_to.feature +84 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/satisfy.feature +33 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/start_with.feature +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/throw_symbol.feature +91 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/types.feature +116 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/built_in_matchers/yield.feature +161 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/access_running_example.feature +53 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher.feature +368 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/customized_message.feature +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/diffing.feature +85 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/implicit_docstrings.feature +52 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/step_definitions/additional_cli_steps.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/support/env.rb +14 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/support/rubinius.rb +6 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/syntax_configuration.feature +71 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/features/test_frameworks/test_unit.feature +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec-expectations.rb +1 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations.rb +47 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/deprecation.rb +17 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/differ.rb +140 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/errors.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/expectation_target.rb +87 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions.rb +2 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions/array.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/extensions/object.rb +29 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/fail_with.rb +79 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/handler.rb +68 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/syntax.rb +164 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/version.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers.rb +697 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/be_close.rb +9 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be.rb +197 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/be_within.rb +55 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/change.rb +141 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/equal.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/has.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/have.rb +124 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/include.rb +61 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/match.rb +12 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/match_array.rb +51 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/raise_error.rb +123 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/respond_to.rb +74 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/satisfy.rb +30 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/built_in/yield.rb +296 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/compatibility.rb +14 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/configuration.rb +108 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/dsl.rb +24 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/generated_descriptions.rb +35 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/matcher.rb +300 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/method_missing.rb +12 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/operator_matcher.rb +109 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/pretty.rb +70 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/matchers/test_unit_integration.rb +11 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/differ_spec.rb +203 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/expectation_target_spec.rb +82 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/fail_with_spec.rb +114 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/handler_spec.rb +227 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/expectations/syntax_spec.rb +139 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/base_matcher_spec.rb +62 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_instance_of_spec.rb +63 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_kind_of_spec.rb +41 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_spec.rb +522 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/be_within_spec.rb +137 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/change_spec.rb +567 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/configuration_spec.rb +206 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/cover_spec.rb +69 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/description_generation_spec.rb +190 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/eq_spec.rb +60 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/eql_spec.rb +41 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/equal_spec.rb +78 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/exist_spec.rb +124 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/has_spec.rb +122 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/have_spec.rb +455 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/include_spec.rb +531 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/match_array_spec.rb +194 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/match_spec.rb +61 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/matcher_spec.rb +471 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/matchers_spec.rb +37 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/method_missing_spec.rb +28 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/operator_matcher_spec.rb +223 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/raise_error_spec.rb +485 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/satisfy_spec.rb +44 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/start_with_end_with_spec.rb +186 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/rspec/matchers/yield_spec.rb +514 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/spec_helper.rb +54 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/classes.rb +56 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/in_sub_process.rb +38 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/matchers.rb +22 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/ruby_version.rb +10 -0
- data/vendor/bundle/gems/rspec-expectations-2.14.2/spec/support/shared_examples.rb +13 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/.document +5 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/.yardopts +6 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/Changelog.md +410 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/License.txt +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/README.md +315 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/README.md +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/Scope.md +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/Upgrade.md +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/README.md +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/explicit.feature +59 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/general_matchers.feature +85 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/argument_matchers/type_matchers.feature +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/README.md +73 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/allow_any_instance_of.feature +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/any_instance.feature +21 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/call_original.feature +24 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_any_instance_of.feature +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_message_using_expect.feature +107 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/expect_message_using_should_receive.feature +118 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/receive_counts.feature +209 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/README.md +73 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/any_instance.feature +136 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/as_null_object.feature +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/simple_return_value_with_allow.feature +44 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/simple_return_value_with_stub.feature +64 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/stub_chain.feature +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/stub_implementation.feature +48 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/method_stubs/to_ary.feature +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/README.md +82 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/hiding_defined_constant.feature +64 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/stub_defined_constant.feature +79 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/outside_rspec/configuration.feature +62 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/outside_rspec/standalone.feature +33 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_partial_mock_method.feature +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_pure_mock_method.feature +76 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/spies/spy_unstubbed_method.feature +18 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/step_definitions/additional_cli_steps.rb +11 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/support/env.rb +13 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/support/rubinius.rb +6 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/features/test_frameworks/test_unit.feature +43 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks.rb +92 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/chain.rb +93 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/expectation_chain.rb +42 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/recorder.rb +206 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/stub_chain.rb +38 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/argument_list_matcher.rb +97 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/configuration.rb +55 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/deprecation.rb +18 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/error_generator.rb +179 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/errors.rb +12 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/example_methods.rb +156 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/extensions/marshal.rb +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/framework.rb +34 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/instance_method_stasher.rb +94 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/matchers/have_received.rb +93 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/matchers/receive.rb +96 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/message_expectation.rb +583 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/method_double.rb +265 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/mock.rb +7 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/mutate_const.rb +403 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/order_group.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/proxy.rb +216 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/proxy_for_nil.rb +37 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/space.rb +87 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/stub_chain.rb +51 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/syntax.rb +349 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/targets.rb +69 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/test_double.rb +135 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/rspec/mocks/version.rb +7 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/lib/spec/mocks.rb +4 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/and_call_original_spec.rb +243 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/and_yield_spec.rb +127 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_instance_spec.rb +963 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/argument_expectation_spec.rb +32 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/at_least_spec.rb +151 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/block_return_value_spec.rb +88 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/combining_implementation_instructions_spec.rb +205 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/configuration_spec.rb +150 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/double_spec.rb +24 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/extensions/marshal_spec.rb +54 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/failing_argument_matchers_spec.rb +110 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/matchers/have_received_spec.rb +266 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/matchers/receive_spec.rb +328 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/methods_spec.rb +27 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_space_spec.rb +113 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mock_spec.rb +798 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/multiple_return_value_spec.rb +132 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/mutate_const_spec.rb +501 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/nil_expectation_warning_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/null_object_mock_spec.rb +123 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/partial_mock_spec.rb +205 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/serialization_spec.rb +89 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stash_spec.rb +46 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_chain_spec.rb +154 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stub_spec.rb +353 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/stubbed_message_expectations_spec.rb +58 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb +81 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/test_double_spec.rb +67 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/to_ary_spec.rb +54 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/rspec/mocks_spec.rb +65 -0
- data/vendor/bundle/gems/rspec-mocks-2.14.3/spec/spec_helper.rb +60 -0
- data/vendor/bundle/specifications/diff-lcs-1.2.4.gemspec +64 -0
- data/vendor/bundle/specifications/rake-10.1.0.gemspec +35 -0
- data/vendor/bundle/specifications/rspec-2.14.1.gemspec +39 -0
- data/vendor/bundle/specifications/rspec-core-2.14.5.gemspec +58 -0
- data/vendor/bundle/specifications/rspec-expectations-2.14.2.gemspec +40 -0
- data/vendor/bundle/specifications/rspec-mocks-2.14.3.gemspec +37 -0
- metadata +657 -11
@@ -0,0 +1,805 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
module Diff; end unless defined? Diff
|
4
|
+
# = Diff::LCS 1.2.4
|
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.4'
|
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
|