hatena_bookmark_client_for_ruby 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 +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +35 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/hatena_bookmark_client_for_ruby.gemspec +30 -0
- data/lib/hatena_bookmark_client_for_ruby.rb +10 -0
- data/lib/hatena_bookmark_client_for_ruby/version.rb +3 -0
- data/shell/exe/sample +5 -0
- data/vendor/bundle/ruby/2.6.0/bin/htmldiff +29 -0
- data/vendor/bundle/ruby/2.6.0/bin/ldiff +29 -0
- data/vendor/bundle/ruby/2.6.0/bin/rake +27 -0
- data/vendor/bundle/ruby/2.6.0/bin/rspec +27 -0
- data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.3.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rake-10.5.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rspec-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rspec-core-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rspec-expectations-3.8.2.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rspec-mocks-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/rspec-support-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/.rspec +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Contributing.md +83 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/History.md +220 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/License.md +39 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/README.rdoc +84 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Rakefile +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/.autotest +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/.rubocop.yml +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/.togglerc +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/History.rdoc +659 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/Manifest.txt +166 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/README.rdoc +139 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/Rakefile +81 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/bin/rake +33 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/rake.1 +141 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake.rb +79 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/application.rb +790 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task.rb +383 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/version.rb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/rakelib/publish.rake +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/file_creation.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/helper.rb +129 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-3.8.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-3.8.0/README.md +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-3.8.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-3.8.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/.document +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/.yardopts +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/Changelog.md +2221 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/LICENSE.md +26 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/README.md +384 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/exe/rspec +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core.rb +185 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/utilities.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb +2289 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration_options.rb +233 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/drb.rb +113 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/dsl.rb +98 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb +653 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb +885 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb +269 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/console_codes.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/exception_presenter.rb +497 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_printer.rb +414 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/protocol.rb +182 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb +624 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/invocations.rb +87 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb +535 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata.rb +499 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata_filter.rb +255 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/notifications.rb +521 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/option_parser.rb +309 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/ordering.rb +158 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/pending.rb +165 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/profiler.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/.rspec +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/rake_task.rb +168 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb +257 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb +199 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/set.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_example_group.rb +269 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.8.0/lib/rspec/core/world.rb +275 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/.document +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/.yardopts +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/Changelog.md +1120 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/README.md +305 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations.rb +82 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/configuration.rb +215 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/expectation_target.rb +127 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/fail_with.rb +39 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/handler.rb +170 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers.rb +1034 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in.rb +52 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/all.rb +85 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/be.rb +288 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/change.rb +426 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/compound.rb +271 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/has.rb +103 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/include.rb +149 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/match.rb +106 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/output.rb +200 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/raise_error.rb +230 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/respond_to.rb +165 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/built_in/yield.rb +432 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/composable.rb +171 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/dsl.rb +527 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/generated_descriptions.rb +41 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.8.2/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/.document +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/.yardopts +6 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/Changelog.md +1100 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/README.md +460 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks.rb +130 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/configuration.rb +212 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/error_generator.rb +369 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/example_methods.rb +434 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive.rb +132 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb +741 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_double.rb +287 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_reference.rb +202 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/mutate_const.rb +339 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/proxy.rb +485 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/targets.rb +124 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/test_double.rb +171 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_double.rb +129 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/Changelog.md +242 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/LICENSE.md +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/README.md +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support.rb +149 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/comparable_version.rb +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/encoded_string.rb +165 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/method_signature_verifier.rb +426 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/mutex.rb +73 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/object_formatter.rb +275 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/reentrant_mutex.rb +53 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/ruby_features.rb +176 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/source.rb +75 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/source/location.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/source/node.rb +110 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/source/token.rb +87 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec.rb +81 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/shell_out.rb +84 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.8.0/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/2.6.0/specifications/diff-lcs-1.3.gemspec +61 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rake-10.5.0.gemspec +43 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-3.8.0.gemspec +42 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-core-3.8.0.gemspec +62 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-expectations-3.8.2.gemspec +50 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-mocks-3.8.0.gemspec +50 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-support-3.8.0.gemspec +41 -0
- metadata +536 -0
@@ -0,0 +1,238 @@
|
|
1
|
+
RSpec::Support.require_rspec_support 'reentrant_mutex'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Mocks
|
5
|
+
# @private
|
6
|
+
# Provides a default space implementation for outside
|
7
|
+
# the scope of an example. Called "root" because it serves
|
8
|
+
# as the root of the space stack.
|
9
|
+
class RootSpace
|
10
|
+
def proxy_for(*_args)
|
11
|
+
raise_lifecycle_message
|
12
|
+
end
|
13
|
+
|
14
|
+
def any_instance_recorder_for(*_args)
|
15
|
+
raise_lifecycle_message
|
16
|
+
end
|
17
|
+
|
18
|
+
def any_instance_proxy_for(*_args)
|
19
|
+
raise_lifecycle_message
|
20
|
+
end
|
21
|
+
|
22
|
+
def register_constant_mutator(_mutator)
|
23
|
+
raise_lifecycle_message
|
24
|
+
end
|
25
|
+
|
26
|
+
def any_instance_recorders_from_ancestry_of(_object)
|
27
|
+
raise_lifecycle_message
|
28
|
+
end
|
29
|
+
|
30
|
+
def reset_all
|
31
|
+
end
|
32
|
+
|
33
|
+
def verify_all
|
34
|
+
end
|
35
|
+
|
36
|
+
def registered?(_object)
|
37
|
+
false
|
38
|
+
end
|
39
|
+
|
40
|
+
def superclass_proxy_for(*_args)
|
41
|
+
raise_lifecycle_message
|
42
|
+
end
|
43
|
+
|
44
|
+
def new_scope
|
45
|
+
Space.new
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def raise_lifecycle_message
|
51
|
+
raise OutsideOfExampleError,
|
52
|
+
"The use of doubles or partial doubles from rspec-mocks outside of the per-test lifecycle is not supported."
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# @private
|
57
|
+
class Space
|
58
|
+
attr_reader :proxies, :any_instance_recorders, :proxy_mutex, :any_instance_mutex
|
59
|
+
|
60
|
+
def initialize
|
61
|
+
@proxies = {}
|
62
|
+
@any_instance_recorders = {}
|
63
|
+
@constant_mutators = []
|
64
|
+
@expectation_ordering = OrderGroup.new
|
65
|
+
@proxy_mutex = new_mutex
|
66
|
+
@any_instance_mutex = new_mutex
|
67
|
+
end
|
68
|
+
|
69
|
+
def new_scope
|
70
|
+
NestedSpace.new(self)
|
71
|
+
end
|
72
|
+
|
73
|
+
def verify_all
|
74
|
+
proxies.values.each { |proxy| proxy.verify }
|
75
|
+
any_instance_recorders.each_value { |recorder| recorder.verify }
|
76
|
+
end
|
77
|
+
|
78
|
+
def reset_all
|
79
|
+
proxies.each_value { |proxy| proxy.reset }
|
80
|
+
@constant_mutators.reverse.each { |mut| mut.idempotently_reset }
|
81
|
+
any_instance_recorders.each_value { |recorder| recorder.stop_all_observation! }
|
82
|
+
any_instance_recorders.clear
|
83
|
+
end
|
84
|
+
|
85
|
+
def register_constant_mutator(mutator)
|
86
|
+
@constant_mutators << mutator
|
87
|
+
end
|
88
|
+
|
89
|
+
def constant_mutator_for(name)
|
90
|
+
@constant_mutators.find { |m| m.full_constant_name == name }
|
91
|
+
end
|
92
|
+
|
93
|
+
def any_instance_recorder_for(klass, only_return_existing=false)
|
94
|
+
any_instance_mutex.synchronize do
|
95
|
+
id = klass.__id__
|
96
|
+
any_instance_recorders.fetch(id) do
|
97
|
+
return nil if only_return_existing
|
98
|
+
any_instance_recorder_not_found_for(id, klass)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def any_instance_proxy_for(klass)
|
104
|
+
AnyInstance::Proxy.new(any_instance_recorder_for(klass), proxies_of(klass))
|
105
|
+
end
|
106
|
+
|
107
|
+
def proxies_of(klass)
|
108
|
+
proxies.values.select { |proxy| klass === proxy.object }
|
109
|
+
end
|
110
|
+
|
111
|
+
def proxy_for(object)
|
112
|
+
proxy_mutex.synchronize do
|
113
|
+
id = id_for(object)
|
114
|
+
proxies.fetch(id) { proxy_not_found_for(id, object) }
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def superclass_proxy_for(klass)
|
119
|
+
proxy_mutex.synchronize do
|
120
|
+
id = id_for(klass)
|
121
|
+
proxies.fetch(id) { superclass_proxy_not_found_for(id, klass) }
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
alias ensure_registered proxy_for
|
126
|
+
|
127
|
+
def registered?(object)
|
128
|
+
proxies.key?(id_for object)
|
129
|
+
end
|
130
|
+
|
131
|
+
def any_instance_recorders_from_ancestry_of(object)
|
132
|
+
# Optimization: `any_instance` is a feature we generally
|
133
|
+
# recommend not using, so we can often early exit here
|
134
|
+
# without doing an O(N) linear search over the number of
|
135
|
+
# ancestors in the object's class hierarchy.
|
136
|
+
return [] if any_instance_recorders.empty?
|
137
|
+
|
138
|
+
# We access the ancestors through the singleton class, to avoid calling
|
139
|
+
# `class` in case `class` has been stubbed.
|
140
|
+
(class << object; ancestors; end).map do |klass|
|
141
|
+
any_instance_recorders[klass.__id__]
|
142
|
+
end.compact
|
143
|
+
end
|
144
|
+
|
145
|
+
private
|
146
|
+
|
147
|
+
def new_mutex
|
148
|
+
Support::ReentrantMutex.new
|
149
|
+
end
|
150
|
+
|
151
|
+
def proxy_not_found_for(id, object)
|
152
|
+
proxies[id] = case object
|
153
|
+
when NilClass then ProxyForNil.new(@expectation_ordering)
|
154
|
+
when TestDouble then object.__build_mock_proxy_unless_expired(@expectation_ordering)
|
155
|
+
when Class
|
156
|
+
class_proxy_with_callback_verification_strategy(object, CallbackInvocationStrategy.new)
|
157
|
+
else
|
158
|
+
if RSpec::Mocks.configuration.verify_partial_doubles?
|
159
|
+
VerifyingPartialDoubleProxy.new(object, @expectation_ordering)
|
160
|
+
else
|
161
|
+
PartialDoubleProxy.new(object, @expectation_ordering)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
def superclass_proxy_not_found_for(id, object)
|
167
|
+
raise "superclass_proxy_not_found_for called with something that is not a class" unless Class === object
|
168
|
+
proxies[id] = class_proxy_with_callback_verification_strategy(object, NoCallbackInvocationStrategy.new)
|
169
|
+
end
|
170
|
+
|
171
|
+
def class_proxy_with_callback_verification_strategy(object, strategy)
|
172
|
+
if RSpec::Mocks.configuration.verify_partial_doubles?
|
173
|
+
VerifyingPartialClassDoubleProxy.new(
|
174
|
+
self,
|
175
|
+
object,
|
176
|
+
@expectation_ordering,
|
177
|
+
strategy
|
178
|
+
)
|
179
|
+
else
|
180
|
+
PartialClassDoubleProxy.new(self, object, @expectation_ordering)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
def any_instance_recorder_not_found_for(id, klass)
|
185
|
+
any_instance_recorders[id] = AnyInstance::Recorder.new(klass)
|
186
|
+
end
|
187
|
+
|
188
|
+
if defined?(::BasicObject) && !::BasicObject.method_defined?(:__id__) # for 1.9.2
|
189
|
+
require 'securerandom'
|
190
|
+
|
191
|
+
def id_for(object)
|
192
|
+
id = object.__id__
|
193
|
+
|
194
|
+
return id if object.equal?(::ObjectSpace._id2ref(id))
|
195
|
+
# this suggests that object.__id__ is proxying through to some wrapped object
|
196
|
+
|
197
|
+
object.instance_exec do
|
198
|
+
@__id_for_rspec_mocks_space ||= ::SecureRandom.uuid
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else
|
202
|
+
def id_for(object)
|
203
|
+
object.__id__
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# @private
|
209
|
+
class NestedSpace < Space
|
210
|
+
def initialize(parent)
|
211
|
+
@parent = parent
|
212
|
+
super()
|
213
|
+
end
|
214
|
+
|
215
|
+
def proxies_of(klass)
|
216
|
+
super + @parent.proxies_of(klass)
|
217
|
+
end
|
218
|
+
|
219
|
+
def constant_mutator_for(name)
|
220
|
+
super || @parent.constant_mutator_for(name)
|
221
|
+
end
|
222
|
+
|
223
|
+
def registered?(object)
|
224
|
+
super || @parent.registered?(object)
|
225
|
+
end
|
226
|
+
|
227
|
+
private
|
228
|
+
|
229
|
+
def proxy_not_found_for(id, object)
|
230
|
+
@parent.proxies[id] || super
|
231
|
+
end
|
232
|
+
|
233
|
+
def any_instance_recorder_not_found_for(id, klass)
|
234
|
+
@parent.any_instance_recorders[id] || super
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
@@ -0,0 +1,325 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Mocks
|
3
|
+
# @api private
|
4
|
+
# Provides methods for enabling and disabling the available syntaxes
|
5
|
+
# provided by rspec-mocks.
|
6
|
+
module Syntax
|
7
|
+
# @private
|
8
|
+
def self.warn_about_should!
|
9
|
+
@warn_about_should = true
|
10
|
+
end
|
11
|
+
|
12
|
+
# @private
|
13
|
+
def self.warn_unless_should_configured(method_name , replacement="the new `:expect` syntax or explicitly enable `:should`")
|
14
|
+
if @warn_about_should
|
15
|
+
RSpec.deprecate(
|
16
|
+
"Using `#{method_name}` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax",
|
17
|
+
:replacement => replacement
|
18
|
+
)
|
19
|
+
|
20
|
+
@warn_about_should = false
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# @api private
|
25
|
+
# Enables the should syntax (`dbl.stub`, `dbl.should_receive`, etc).
|
26
|
+
def self.enable_should(syntax_host=default_should_syntax_host)
|
27
|
+
@warn_about_should = false if syntax_host == default_should_syntax_host
|
28
|
+
return if should_enabled?(syntax_host)
|
29
|
+
|
30
|
+
syntax_host.class_exec do
|
31
|
+
def should_receive(message, opts={}, &block)
|
32
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
33
|
+
::RSpec::Mocks.expect_message(self, message, opts, &block)
|
34
|
+
end
|
35
|
+
|
36
|
+
def should_not_receive(message, &block)
|
37
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
38
|
+
::RSpec::Mocks.expect_message(self, message, {}, &block).never
|
39
|
+
end
|
40
|
+
|
41
|
+
def stub(message_or_hash, opts={}, &block)
|
42
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
43
|
+
if ::Hash === message_or_hash
|
44
|
+
message_or_hash.each { |message, value| stub(message).and_return value }
|
45
|
+
else
|
46
|
+
::RSpec::Mocks.allow_message(self, message_or_hash, opts, &block)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def unstub(message)
|
51
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__, "`allow(...).to receive(...).and_call_original` or explicitly enable `:should`")
|
52
|
+
::RSpec::Mocks.space.proxy_for(self).remove_stub(message)
|
53
|
+
end
|
54
|
+
|
55
|
+
def stub_chain(*chain, &blk)
|
56
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
57
|
+
::RSpec::Mocks::StubChain.stub_chain_on(self, *chain, &blk)
|
58
|
+
end
|
59
|
+
|
60
|
+
def as_null_object
|
61
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
62
|
+
@_null_object = true
|
63
|
+
::RSpec::Mocks.space.proxy_for(self).as_null_object
|
64
|
+
end
|
65
|
+
|
66
|
+
def null_object?
|
67
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
68
|
+
defined?(@_null_object)
|
69
|
+
end
|
70
|
+
|
71
|
+
def received_message?(message, *args, &block)
|
72
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
73
|
+
::RSpec::Mocks.space.proxy_for(self).received_message?(message, *args, &block)
|
74
|
+
end
|
75
|
+
|
76
|
+
unless Class.respond_to? :any_instance
|
77
|
+
Class.class_exec do
|
78
|
+
def any_instance
|
79
|
+
::RSpec::Mocks::Syntax.warn_unless_should_configured(__method__)
|
80
|
+
::RSpec::Mocks.space.any_instance_proxy_for(self)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# @api private
|
88
|
+
# Disables the should syntax (`dbl.stub`, `dbl.should_receive`, etc).
|
89
|
+
def self.disable_should(syntax_host=default_should_syntax_host)
|
90
|
+
return unless should_enabled?(syntax_host)
|
91
|
+
|
92
|
+
syntax_host.class_exec do
|
93
|
+
undef should_receive
|
94
|
+
undef should_not_receive
|
95
|
+
undef stub
|
96
|
+
undef unstub
|
97
|
+
undef stub_chain
|
98
|
+
undef as_null_object
|
99
|
+
undef null_object?
|
100
|
+
undef received_message?
|
101
|
+
end
|
102
|
+
|
103
|
+
Class.class_exec do
|
104
|
+
undef any_instance
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# @api private
|
109
|
+
# Enables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc).
|
110
|
+
def self.enable_expect(syntax_host=::RSpec::Mocks::ExampleMethods)
|
111
|
+
return if expect_enabled?(syntax_host)
|
112
|
+
|
113
|
+
syntax_host.class_exec do
|
114
|
+
def receive(method_name, &block)
|
115
|
+
Matchers::Receive.new(method_name, block)
|
116
|
+
end
|
117
|
+
|
118
|
+
def receive_messages(message_return_value_hash)
|
119
|
+
matcher = Matchers::ReceiveMessages.new(message_return_value_hash)
|
120
|
+
matcher.warn_about_block if block_given?
|
121
|
+
matcher
|
122
|
+
end
|
123
|
+
|
124
|
+
def receive_message_chain(*messages, &block)
|
125
|
+
Matchers::ReceiveMessageChain.new(messages, &block)
|
126
|
+
end
|
127
|
+
|
128
|
+
def allow(target)
|
129
|
+
AllowanceTarget.new(target)
|
130
|
+
end
|
131
|
+
|
132
|
+
def expect_any_instance_of(klass)
|
133
|
+
AnyInstanceExpectationTarget.new(klass)
|
134
|
+
end
|
135
|
+
|
136
|
+
def allow_any_instance_of(klass)
|
137
|
+
AnyInstanceAllowanceTarget.new(klass)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
RSpec::Mocks::ExampleMethods::ExpectHost.class_exec do
|
142
|
+
def expect(target)
|
143
|
+
ExpectationTarget.new(target)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# @api private
|
149
|
+
# Disables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc).
|
150
|
+
def self.disable_expect(syntax_host=::RSpec::Mocks::ExampleMethods)
|
151
|
+
return unless expect_enabled?(syntax_host)
|
152
|
+
|
153
|
+
syntax_host.class_exec do
|
154
|
+
undef receive
|
155
|
+
undef receive_messages
|
156
|
+
undef receive_message_chain
|
157
|
+
undef allow
|
158
|
+
undef expect_any_instance_of
|
159
|
+
undef allow_any_instance_of
|
160
|
+
end
|
161
|
+
|
162
|
+
RSpec::Mocks::ExampleMethods::ExpectHost.class_exec do
|
163
|
+
undef expect
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# @api private
|
168
|
+
# Indicates whether or not the should syntax is enabled.
|
169
|
+
def self.should_enabled?(syntax_host=default_should_syntax_host)
|
170
|
+
syntax_host.method_defined?(:should_receive)
|
171
|
+
end
|
172
|
+
|
173
|
+
# @api private
|
174
|
+
# Indicates whether or not the expect syntax is enabled.
|
175
|
+
def self.expect_enabled?(syntax_host=::RSpec::Mocks::ExampleMethods)
|
176
|
+
syntax_host.method_defined?(:allow)
|
177
|
+
end
|
178
|
+
|
179
|
+
# @api private
|
180
|
+
# Determines where the methods like `should_receive`, and `stub` are added.
|
181
|
+
def self.default_should_syntax_host
|
182
|
+
# JRuby 1.7.4 introduces a regression whereby `defined?(::BasicObject) => nil`
|
183
|
+
# yet `BasicObject` still exists and patching onto ::Object breaks things
|
184
|
+
# e.g. SimpleDelegator expectations won't work
|
185
|
+
#
|
186
|
+
# See: https://github.com/jruby/jruby/issues/814
|
187
|
+
if defined?(JRUBY_VERSION) && JRUBY_VERSION == '1.7.4' && RUBY_VERSION.to_f > 1.8
|
188
|
+
return ::BasicObject
|
189
|
+
end
|
190
|
+
|
191
|
+
# On 1.8.7, Object.ancestors.last == Kernel but
|
192
|
+
# things blow up if we include `RSpec::Mocks::Methods`
|
193
|
+
# into Kernel...not sure why.
|
194
|
+
return Object unless defined?(::BasicObject)
|
195
|
+
|
196
|
+
# MacRuby has BasicObject but it's not the root class.
|
197
|
+
return Object unless Object.ancestors.last == ::BasicObject
|
198
|
+
|
199
|
+
::BasicObject
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
if defined?(BasicObject)
|
206
|
+
# The legacy `:should` syntax adds the following methods directly to
|
207
|
+
# `BasicObject` so that they are available off of any object. Note, however,
|
208
|
+
# that this syntax does not always play nice with delegate/proxy objects.
|
209
|
+
# We recommend you use the non-monkeypatching `:expect` syntax instead.
|
210
|
+
# @see Class
|
211
|
+
class BasicObject
|
212
|
+
# @method should_receive
|
213
|
+
# Sets an expectation that this object should receive a message before
|
214
|
+
# the end of the example.
|
215
|
+
#
|
216
|
+
# @example
|
217
|
+
# logger = double('logger')
|
218
|
+
# thing_that_logs = ThingThatLogs.new(logger)
|
219
|
+
# logger.should_receive(:log)
|
220
|
+
# thing_that_logs.do_something_that_logs_a_message
|
221
|
+
#
|
222
|
+
# @note This is only available when you have enabled the `should` syntax.
|
223
|
+
# @see RSpec::Mocks::ExampleMethods#expect
|
224
|
+
|
225
|
+
# @method should_not_receive
|
226
|
+
# Sets and expectation that this object should _not_ receive a message
|
227
|
+
# during this example.
|
228
|
+
# @see RSpec::Mocks::ExampleMethods#expect
|
229
|
+
|
230
|
+
# @method stub
|
231
|
+
# Tells the object to respond to the message with the specified value.
|
232
|
+
#
|
233
|
+
# @example
|
234
|
+
# counter.stub(:count).and_return(37)
|
235
|
+
# counter.stub(:count => 37)
|
236
|
+
# counter.stub(:count) { 37 }
|
237
|
+
#
|
238
|
+
# @note This is only available when you have enabled the `should` syntax.
|
239
|
+
# @see RSpec::Mocks::ExampleMethods#allow
|
240
|
+
|
241
|
+
# @method unstub
|
242
|
+
# Removes a stub. On a double, the object will no longer respond to
|
243
|
+
# `message`. On a real object, the original method (if it exists) is
|
244
|
+
# restored.
|
245
|
+
#
|
246
|
+
# This is rarely used, but can be useful when a stub is set up during a
|
247
|
+
# shared `before` hook for the common case, but you want to replace it
|
248
|
+
# for a special case.
|
249
|
+
#
|
250
|
+
# @note This is only available when you have enabled the `should` syntax.
|
251
|
+
|
252
|
+
# @method stub_chain
|
253
|
+
# @overload stub_chain(method1, method2)
|
254
|
+
# @overload stub_chain("method1.method2")
|
255
|
+
# @overload stub_chain(method1, method_to_value_hash)
|
256
|
+
#
|
257
|
+
# Stubs a chain of methods.
|
258
|
+
#
|
259
|
+
# ## Warning:
|
260
|
+
#
|
261
|
+
# Chains can be arbitrarily long, which makes it quite painless to
|
262
|
+
# violate the Law of Demeter in violent ways, so you should consider any
|
263
|
+
# use of `stub_chain` a code smell. Even though not all code smells
|
264
|
+
# indicate real problems (think fluent interfaces), `stub_chain` still
|
265
|
+
# results in brittle examples. For example, if you write
|
266
|
+
# `foo.stub_chain(:bar, :baz => 37)` in a spec and then the
|
267
|
+
# implementation calls `foo.baz.bar`, the stub will not work.
|
268
|
+
#
|
269
|
+
# @example
|
270
|
+
# double.stub_chain("foo.bar") { :baz }
|
271
|
+
# double.stub_chain(:foo, :bar => :baz)
|
272
|
+
# double.stub_chain(:foo, :bar) { :baz }
|
273
|
+
#
|
274
|
+
# # Given any of ^^ these three forms ^^:
|
275
|
+
# double.foo.bar # => :baz
|
276
|
+
#
|
277
|
+
# # Common use in Rails/ActiveRecord:
|
278
|
+
# Article.stub_chain("recent.published") { [Article.new] }
|
279
|
+
#
|
280
|
+
# @note This is only available when you have enabled the `should` syntax.
|
281
|
+
# @see RSpec::Mocks::ExampleMethods#receive_message_chain
|
282
|
+
|
283
|
+
# @method as_null_object
|
284
|
+
# Tells the object to respond to all messages. If specific stub values
|
285
|
+
# are declared, they'll work as expected. If not, the receiver is
|
286
|
+
# returned.
|
287
|
+
#
|
288
|
+
# @note This is only available when you have enabled the `should` syntax.
|
289
|
+
|
290
|
+
# @method null_object?
|
291
|
+
# Returns true if this object has received `as_null_object`
|
292
|
+
#
|
293
|
+
# @note This is only available when you have enabled the `should` syntax.
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# The legacy `:should` syntax adds the `any_instance` to `Class`.
|
298
|
+
# We generally recommend you use the newer `:expect` syntax instead,
|
299
|
+
# which allows you to stub any instance of a class using
|
300
|
+
# `allow_any_instance_of(klass)` or mock any instance using
|
301
|
+
# `expect_any_instance_of(klass)`.
|
302
|
+
# @see BasicObject
|
303
|
+
class Class
|
304
|
+
# @method any_instance
|
305
|
+
# Used to set stubs and message expectations on any instance of a given
|
306
|
+
# class. Returns a [Recorder](Recorder), which records messages like
|
307
|
+
# `stub` and `should_receive` for later playback on instances of the
|
308
|
+
# class.
|
309
|
+
#
|
310
|
+
# @example
|
311
|
+
# Car.any_instance.should_receive(:go)
|
312
|
+
# race = Race.new
|
313
|
+
# race.cars << Car.new
|
314
|
+
# race.go # assuming this delegates to all of its cars
|
315
|
+
# # this example would pass
|
316
|
+
#
|
317
|
+
# Account.any_instance.stub(:balance) { Money.new(:USD, 25) }
|
318
|
+
# Account.new.balance # => Money.new(:USD, 25))
|
319
|
+
#
|
320
|
+
# @return [Recorder]
|
321
|
+
#
|
322
|
+
# @note This is only available when you have enabled the `should` syntax.
|
323
|
+
# @see RSpec::Mocks::ExampleMethods#expect_any_instance_of
|
324
|
+
# @see RSpec::Mocks::ExampleMethods#allow_any_instance_of
|
325
|
+
end
|