dirwatch 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dirwatch/templates/mac/latex.yml +1 -1
- data/lib/dirwatch/version.rb +1 -1
- data/vendor/bundle/ruby/2.5.0/cache/ast-2.4.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/parser-2.5.1.2.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/powerpack-0.1.2.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rake-12.3.1.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.8.1.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/ruby-progressbar-1.10.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/unicode-display_width-1.4.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/CHANGELOG.md +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/Gemfile +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/LICENSE.MIT +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/README.YARD.md +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/README.md +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/Rakefile +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/ast.gemspec +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/node.rb +258 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/processor.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/processor/mixin.rb +288 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/sexp.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/test/helper.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/test/test_ast.rb +271 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/CHANGELOG.md +927 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/CONTRIBUTING.md +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/Gemfile +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/LICENSE.txt +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/README.md +301 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/Rakefile +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/bin/ruby-parse +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/bin/ruby-rewrite +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/AST_FORMAT.md +1735 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/CUSTOMIZATION.md +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/INTERNALS.md +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/css/common.css +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/gauntlet_parser.rb +123 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/all.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ast/node.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ast/processor.rb +241 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/base.rb +267 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/builders/default.rb +1677 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/clobbering_error.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/color.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/context.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/current.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/deprecation.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/diagnostic.rb +163 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/diagnostic/engine.rb +105 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer.rb +23093 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer.rl +2382 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/dedenter.rb +79 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/explanation.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/literal.rb +265 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/stack_state.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/macruby.rb +6122 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/macruby.y +2198 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/messages.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/meta.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/rewriter.rb +105 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby18.rb +5654 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby18.y +1934 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby19.rb +6077 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby19.y +2175 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby20.rb +6512 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby20.y +2353 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby21.rb +6572 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby21.y +2357 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby22.rb +6600 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby22.y +2364 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby23.rb +6628 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby23.y +2370 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby24.rb +6695 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby24.y +2408 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby25.rb +6661 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby25.y +2405 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby26.rb +6674 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby26.y +2413 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/rubymotion.rb +6083 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/rubymotion.y +2182 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/runner.rb +248 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/runner/ruby_parse.rb +157 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/runner/ruby_rewrite.rb +101 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/buffer.rb +330 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/comment.rb +121 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/comment/associator.rb +210 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map.rb +186 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/collection.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/condition.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/constant.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/definition.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/for.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/heredoc.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/index.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/keyword.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/objc_kwarg.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/operator.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/rescue_body.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/send.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/ternary.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/variable.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/range.rb +310 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/rewriter.rb +513 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/rewriter/action.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/tree_rewriter.rb +301 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/tree_rewriter/action.rb +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/static_environment.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/syntax_error.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/tree_rewriter.rb +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/parser.gemspec +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/bug_163/fixtures/input.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/bug_163/fixtures/output.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/bug_163/rewriter.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/helper.rb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/parse_helper.rb +315 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/racc_coverage_helper.rb +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_base.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_current.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_diagnostic.rb +96 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_diagnostic_engine.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_encoding.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_lexer.rb +3537 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_lexer_stack_state.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_parse_helper.rb +80 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_parser.rb +7038 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_runner_rewrite.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_buffer.rb +162 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_comment.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_comment_associator.rb +367 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_map.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_range.rb +172 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_rewriter.rb +541 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_rewriter_action.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_tree_rewriter.rb +173 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_static_environment.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/using_tree_rewriter/fixtures/input.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/using_tree_rewriter/fixtures/output.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/using_tree_rewriter/using_tree_rewriter.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/CHANGELOG.md +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/CONTRIBUTING.md +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/Gemfile +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/README.md +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/Rakefile +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/array.rb +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/array/butfirst.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/array/butlast.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/average.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/drop_last.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/drop_last_while.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/exactly.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/frequencies.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/several.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/sum.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/take_last.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/take_last_while.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/hash.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/hash/symbolize_keys.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric/neg.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric/pos.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric/scale.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/ascii_only.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/blank.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/format.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/remove.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/remove_prefix.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/remove_suffix.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/squish.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/strip_indent.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/strip_margin.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/powerpack.gemspec +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/array/butfirst_spec.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/array/butlast_spec.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/average_spec.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/drop_last_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/drop_last_while_spec.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/exactly_spec.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/frequencies_spec.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/several_spec.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/sum_spec.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/take_last_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/take_last_while_spec.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/hash/symbolize_keys_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/numeric/neg_spec.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/numeric/pos_spec.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/numeric/scale_spec.rb +139 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/ascii_only_spec.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/format_spec.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/remove_prefix_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/remove_spec.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/remove_suffix_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/squish_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/strip_indent_spec.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/strip_margin_spec.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/spec_helper.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/CONTRIBUTING.rdoc +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/Gemfile +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/History.rdoc +2317 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/README.rdoc +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/Rakefile +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/bin/console +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/bin/setup +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb +824 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_task.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_utils.rb +137 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_utils_ext.rb +145 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/packagetask.rb +211 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb +411 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task_manager.rb +323 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/testtask.rb +224 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/rake.gemspec +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/README.md +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/Changelog.md +2221 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/LICENSE.md +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/README.md +384 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/exe/rspec +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core.rb +185 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/utilities.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb +2289 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration_options.rb +233 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/drb.rb +113 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/dsl.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb +653 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb +885 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb +269 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/console_codes.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/exception_presenter.rb +497 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_printer.rb +414 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/protocol.rb +182 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb +624 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/invocations.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb +535 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata.rb +499 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata_filter.rb +255 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/notifications.rb +521 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/option_parser.rb +309 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ordering.rb +158 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/pending.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/profiler.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/rake_task.rb +168 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb +257 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb +199 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/set.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_example_group.rb +269 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/world.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/Changelog.md +1110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/README.md +305 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/configuration.rb +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/fail_with.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb +170 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers.rb +1034 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in.rb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/all.rb +85 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be.rb +288 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb +426 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/compound.rb +271 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/has.rb +103 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/include.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/match.rb +106 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/output.rb +200 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb +230 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/respond_to.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/yield.rb +432 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/composable.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/dsl.rb +527 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/generated_descriptions.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/Changelog.md +1100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/README.md +460 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks.rb +130 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/configuration.rb +212 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/error_generator.rb +369 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/example_methods.rb +434 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb +741 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_double.rb +287 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_reference.rb +202 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/mutate_const.rb +339 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/proxy.rb +485 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/targets.rb +124 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/test_double.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_double.rb +129 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/Changelog.md +242 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/LICENSE.md +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/README.md +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/comparable_version.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/encoded_string.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/method_signature_verifier.rb +426 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/mutex.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/object_formatter.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/reentrant_mutex.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/ruby_features.rb +176 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/location.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/node.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/token.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/shell_out.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/LICENSE.txt +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/README.md +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/Rakefile +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/base.rb +183 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/calculators/length.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/calculators/running_average.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/bar.rb +102 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/percentage.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/rate.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/time.rb +107 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/title.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/errors/invalid_progress_error.rb +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format/formatter.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format/molecule.rb +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format/string.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/output.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/outputs/non_tty.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/outputs/null.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/outputs/tty.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/progress.rb +118 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/refinements.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/refinements/enumerator.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/throttle.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/time.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/timer.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/CHANGELOG.md +113 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/MIT-LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/README.md +124 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/data/display_width.marshal.gz +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/constants.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/index.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/no_string_ext.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/string_ext.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/spec/display_width_spec.rb +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/unicode-display_width.gemspec +18 -0
- data/vendor/bundle/ruby/2.5.0/specifications/ast-2.4.0.gemspec +59 -0
- data/vendor/bundle/ruby/2.5.0/specifications/parser-2.5.1.2.gemspec +62 -0
- data/vendor/bundle/ruby/2.5.0/specifications/powerpack-0.1.2.gemspec +41 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rake-12.3.1.gemspec +49 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.8.0.gemspec +42 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.8.0.gemspec +62 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.8.1.gemspec +50 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.8.0.gemspec +50 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.8.0.gemspec +41 -0
- data/vendor/bundle/ruby/2.5.0/specifications/ruby-progressbar-1.10.0.gemspec +46 -0
- data/vendor/bundle/ruby/2.5.0/specifications/unicode-display_width-1.4.0.gemspec +38 -0
- metadata +532 -2
@@ -0,0 +1,82 @@
|
|
1
|
+
RSpec::Support.require_rspec_mocks 'matchers/expectation_customization'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Mocks
|
5
|
+
module Matchers
|
6
|
+
# @private
|
7
|
+
class ReceiveMessageChain
|
8
|
+
include Matcher
|
9
|
+
|
10
|
+
def initialize(chain, &block)
|
11
|
+
@chain = chain
|
12
|
+
@block = block
|
13
|
+
@recorded_customizations = []
|
14
|
+
end
|
15
|
+
|
16
|
+
[:with, :and_return, :and_throw, :and_raise, :and_yield, :and_call_original].each do |msg|
|
17
|
+
define_method(msg) do |*args, &block|
|
18
|
+
@recorded_customizations << ExpectationCustomization.new(msg, args, block)
|
19
|
+
self
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def name
|
24
|
+
"receive_message_chain"
|
25
|
+
end
|
26
|
+
|
27
|
+
def description
|
28
|
+
"receive message chain #{formatted_chain}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def setup_allowance(subject, &block)
|
32
|
+
chain = StubChain.stub_chain_on(subject, *@chain, &(@block || block))
|
33
|
+
replay_customizations(chain)
|
34
|
+
end
|
35
|
+
|
36
|
+
def setup_any_instance_allowance(subject, &block)
|
37
|
+
proxy = ::RSpec::Mocks.space.any_instance_proxy_for(subject)
|
38
|
+
chain = proxy.stub_chain(*@chain, &(@block || block))
|
39
|
+
replay_customizations(chain)
|
40
|
+
end
|
41
|
+
|
42
|
+
def setup_any_instance_expectation(subject, &block)
|
43
|
+
proxy = ::RSpec::Mocks.space.any_instance_proxy_for(subject)
|
44
|
+
chain = proxy.expect_chain(*@chain, &(@block || block))
|
45
|
+
replay_customizations(chain)
|
46
|
+
end
|
47
|
+
|
48
|
+
def setup_expectation(subject, &block)
|
49
|
+
chain = ExpectChain.expect_chain_on(subject, *@chain, &(@block || block))
|
50
|
+
replay_customizations(chain)
|
51
|
+
end
|
52
|
+
|
53
|
+
def setup_negative_expectation(*_args)
|
54
|
+
raise NegationUnsupportedError,
|
55
|
+
"`expect(...).not_to receive_message_chain` is not supported " \
|
56
|
+
"since it doesn't really make sense. What would it even mean?"
|
57
|
+
end
|
58
|
+
|
59
|
+
alias matches? setup_expectation
|
60
|
+
alias does_not_match? setup_negative_expectation
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
def replay_customizations(chain)
|
65
|
+
@recorded_customizations.each do |customization|
|
66
|
+
customization.playback_onto(chain)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def formatted_chain
|
71
|
+
@formatted_chain ||= @chain.map do |part|
|
72
|
+
if Hash === part
|
73
|
+
part.keys.first.to_s
|
74
|
+
else
|
75
|
+
part.to_s
|
76
|
+
end
|
77
|
+
end.join(".")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Mocks
|
3
|
+
module Matchers
|
4
|
+
# @private
|
5
|
+
class ReceiveMessages
|
6
|
+
include Matcher
|
7
|
+
|
8
|
+
def initialize(message_return_value_hash)
|
9
|
+
@message_return_value_hash = message_return_value_hash
|
10
|
+
@backtrace_line = CallerFilter.first_non_rspec_line
|
11
|
+
end
|
12
|
+
|
13
|
+
def name
|
14
|
+
"receive_messages"
|
15
|
+
end
|
16
|
+
|
17
|
+
def description
|
18
|
+
"receive messages: #{@message_return_value_hash.inspect}"
|
19
|
+
end
|
20
|
+
|
21
|
+
def setup_expectation(subject)
|
22
|
+
warn_about_block if block_given?
|
23
|
+
each_message_on(proxy_on(subject)) do |host, message, return_value|
|
24
|
+
host.add_simple_expectation(message, return_value, @backtrace_line)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
alias matches? setup_expectation
|
28
|
+
|
29
|
+
def setup_negative_expectation(_subject)
|
30
|
+
raise NegationUnsupportedError,
|
31
|
+
"`expect(...).to_not receive_messages` is not supported since it " \
|
32
|
+
"doesn't really make sense. What would it even mean?"
|
33
|
+
end
|
34
|
+
alias does_not_match? setup_negative_expectation
|
35
|
+
|
36
|
+
def setup_allowance(subject)
|
37
|
+
warn_about_block if block_given?
|
38
|
+
each_message_on(proxy_on(subject)) do |host, message, return_value|
|
39
|
+
host.add_simple_stub(message, return_value)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def setup_any_instance_expectation(subject)
|
44
|
+
warn_about_block if block_given?
|
45
|
+
each_message_on(any_instance_of(subject)) do |host, message, return_value|
|
46
|
+
host.should_receive(message).and_return(return_value)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def setup_any_instance_allowance(subject)
|
51
|
+
warn_about_block if block_given?
|
52
|
+
any_instance_of(subject).stub(@message_return_value_hash)
|
53
|
+
end
|
54
|
+
|
55
|
+
def warn_about_block
|
56
|
+
raise "Implementation blocks aren't supported with `receive_messages`"
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def proxy_on(subject)
|
62
|
+
::RSpec::Mocks.space.proxy_for(subject)
|
63
|
+
end
|
64
|
+
|
65
|
+
def any_instance_of(subject)
|
66
|
+
::RSpec::Mocks.space.any_instance_proxy_for(subject)
|
67
|
+
end
|
68
|
+
|
69
|
+
def each_message_on(host)
|
70
|
+
@message_return_value_hash.each do |message, value|
|
71
|
+
yield host, message, value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Mocks
|
3
|
+
# @private
|
4
|
+
class MessageChain
|
5
|
+
attr_reader :object, :chain, :block
|
6
|
+
|
7
|
+
def initialize(object, *chain, &blk)
|
8
|
+
@object = object
|
9
|
+
@chain, @block = format_chain(*chain, &blk)
|
10
|
+
end
|
11
|
+
|
12
|
+
# @api private
|
13
|
+
def setup_chain
|
14
|
+
if chain.length > 1
|
15
|
+
if (matching_stub = find_matching_stub)
|
16
|
+
chain.shift
|
17
|
+
chain_on(matching_stub.invoke(nil), *chain, &@block)
|
18
|
+
elsif (matching_expectation = find_matching_expectation)
|
19
|
+
chain.shift
|
20
|
+
chain_on(matching_expectation.invoke_without_incrementing_received_count(nil), *chain, &@block)
|
21
|
+
else
|
22
|
+
next_in_chain = Double.new
|
23
|
+
expectation(object, chain.shift) { next_in_chain }
|
24
|
+
chain_on(next_in_chain, *chain, &@block)
|
25
|
+
end
|
26
|
+
else
|
27
|
+
expectation(object, chain.shift, &@block)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def chain_on(object, *chain, &block)
|
34
|
+
initialize(object, *chain, &block)
|
35
|
+
setup_chain
|
36
|
+
end
|
37
|
+
|
38
|
+
def format_chain(*chain, &blk)
|
39
|
+
if Hash === chain.last
|
40
|
+
hash = chain.pop
|
41
|
+
hash.each do |k, v|
|
42
|
+
chain << k
|
43
|
+
blk = Proc.new { v }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
return chain.join('.').split('.'), blk
|
47
|
+
end
|
48
|
+
|
49
|
+
def find_matching_stub
|
50
|
+
::RSpec::Mocks.space.proxy_for(object).
|
51
|
+
__send__(:find_matching_method_stub, chain.first.to_sym)
|
52
|
+
end
|
53
|
+
|
54
|
+
def find_matching_expectation
|
55
|
+
::RSpec::Mocks.space.proxy_for(object).
|
56
|
+
__send__(:find_matching_expectation, chain.first.to_sym)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# @private
|
61
|
+
class ExpectChain < MessageChain
|
62
|
+
# @api private
|
63
|
+
def self.expect_chain_on(object, *chain, &blk)
|
64
|
+
new(object, *chain, &blk).setup_chain
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
|
69
|
+
def expectation(object, message, &return_block)
|
70
|
+
::RSpec::Mocks.expect_message(object, message, {}, &return_block)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# @private
|
75
|
+
class StubChain < MessageChain
|
76
|
+
def self.stub_chain_on(object, *chain, &blk)
|
77
|
+
new(object, *chain, &blk).setup_chain
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
def expectation(object, message, &return_block)
|
83
|
+
::RSpec::Mocks.allow_message(object, message, {}, &return_block)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,741 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Mocks
|
3
|
+
# A message expectation that only allows concrete return values to be set
|
4
|
+
# for a message. While this same effect can be achieved using a standard
|
5
|
+
# MessageExpectation, this version is much faster and so can be used as an
|
6
|
+
# optimization.
|
7
|
+
#
|
8
|
+
# @private
|
9
|
+
class SimpleMessageExpectation
|
10
|
+
def initialize(message, response, error_generator, backtrace_line=nil)
|
11
|
+
@message, @response, @error_generator, @backtrace_line = message.to_sym, response, error_generator, backtrace_line
|
12
|
+
@received = false
|
13
|
+
end
|
14
|
+
|
15
|
+
def invoke(*_)
|
16
|
+
@received = true
|
17
|
+
@response
|
18
|
+
end
|
19
|
+
|
20
|
+
def matches?(message, *_)
|
21
|
+
@message == message.to_sym
|
22
|
+
end
|
23
|
+
|
24
|
+
def called_max_times?
|
25
|
+
false
|
26
|
+
end
|
27
|
+
|
28
|
+
def verify_messages_received
|
29
|
+
return if @received
|
30
|
+
@error_generator.raise_expectation_error(
|
31
|
+
@message, 1, ArgumentListMatcher::MATCH_ALL, 0, nil, [], @backtrace_line
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def unadvise(_)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Represents an individual method stub or message expectation. The methods
|
40
|
+
# defined here can be used to configure how it behaves. The methods return
|
41
|
+
# `self` so that they can be chained together to form a fluent interface.
|
42
|
+
class MessageExpectation
|
43
|
+
# @!group Configuring Responses
|
44
|
+
|
45
|
+
# @overload and_return(value)
|
46
|
+
# @overload and_return(first_value, second_value)
|
47
|
+
#
|
48
|
+
# Tells the object to return a value when it receives the message. Given
|
49
|
+
# more than one value, the first value is returned the first time the
|
50
|
+
# message is received, the second value is returned the next time, etc,
|
51
|
+
# etc.
|
52
|
+
#
|
53
|
+
# If the message is received more times than there are values, the last
|
54
|
+
# value is received for every subsequent call.
|
55
|
+
#
|
56
|
+
# @return [nil] No further chaining is supported after this.
|
57
|
+
# @example
|
58
|
+
# allow(counter).to receive(:count).and_return(1)
|
59
|
+
# counter.count # => 1
|
60
|
+
# counter.count # => 1
|
61
|
+
#
|
62
|
+
# allow(counter).to receive(:count).and_return(1,2,3)
|
63
|
+
# counter.count # => 1
|
64
|
+
# counter.count # => 2
|
65
|
+
# counter.count # => 3
|
66
|
+
# counter.count # => 3
|
67
|
+
# counter.count # => 3
|
68
|
+
# # etc
|
69
|
+
def and_return(first_value, *values)
|
70
|
+
raise_already_invoked_error_if_necessary(__method__)
|
71
|
+
if negative?
|
72
|
+
raise "`and_return` is not supported with negative message expectations"
|
73
|
+
end
|
74
|
+
|
75
|
+
if block_given?
|
76
|
+
raise ArgumentError, "Implementation blocks aren't supported with `and_return`"
|
77
|
+
end
|
78
|
+
|
79
|
+
values.unshift(first_value)
|
80
|
+
@expected_received_count = [@expected_received_count, values.size].max unless ignoring_args? || (@expected_received_count == 0 && @at_least)
|
81
|
+
self.terminal_implementation_action = AndReturnImplementation.new(values)
|
82
|
+
|
83
|
+
nil
|
84
|
+
end
|
85
|
+
|
86
|
+
# Tells the object to delegate to the original unmodified method
|
87
|
+
# when it receives the message.
|
88
|
+
#
|
89
|
+
# @note This is only available on partial doubles.
|
90
|
+
#
|
91
|
+
# @return [nil] No further chaining is supported after this.
|
92
|
+
# @example
|
93
|
+
# expect(counter).to receive(:increment).and_call_original
|
94
|
+
# original_count = counter.count
|
95
|
+
# counter.increment
|
96
|
+
# expect(counter.count).to eq(original_count + 1)
|
97
|
+
def and_call_original
|
98
|
+
wrap_original(__method__) do |original, *args, &block|
|
99
|
+
original.call(*args, &block)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# Decorates the stubbed method with the supplied block. The original
|
104
|
+
# unmodified method is passed to the block along with any method call
|
105
|
+
# arguments so you can delegate to it, whilst still being able to
|
106
|
+
# change what args are passed to it and/or change the return value.
|
107
|
+
#
|
108
|
+
# @note This is only available on partial doubles.
|
109
|
+
#
|
110
|
+
# @return [nil] No further chaining is supported after this.
|
111
|
+
# @example
|
112
|
+
# expect(api).to receive(:large_list).and_wrap_original do |original_method, *args, &block|
|
113
|
+
# original_method.call(*args, &block).first(10)
|
114
|
+
# end
|
115
|
+
def and_wrap_original(&block)
|
116
|
+
wrap_original(__method__, &block)
|
117
|
+
end
|
118
|
+
|
119
|
+
# @overload and_raise
|
120
|
+
# @overload and_raise(ExceptionClass)
|
121
|
+
# @overload and_raise(ExceptionClass, message)
|
122
|
+
# @overload and_raise(exception_instance)
|
123
|
+
#
|
124
|
+
# Tells the object to raise an exception when the message is received.
|
125
|
+
#
|
126
|
+
# @return [nil] No further chaining is supported after this.
|
127
|
+
# @note
|
128
|
+
# When you pass an exception class, the MessageExpectation will raise
|
129
|
+
# an instance of it, creating it with `exception` and passing `message`
|
130
|
+
# if specified. If the exception class initializer requires more than
|
131
|
+
# one parameters, you must pass in an instance and not the class,
|
132
|
+
# otherwise this method will raise an ArgumentError exception.
|
133
|
+
#
|
134
|
+
# @example
|
135
|
+
# allow(car).to receive(:go).and_raise
|
136
|
+
# allow(car).to receive(:go).and_raise(OutOfGas)
|
137
|
+
# allow(car).to receive(:go).and_raise(OutOfGas, "At least 2 oz of gas needed to drive")
|
138
|
+
# allow(car).to receive(:go).and_raise(OutOfGas.new(2, :oz))
|
139
|
+
def and_raise(*args)
|
140
|
+
raise_already_invoked_error_if_necessary(__method__)
|
141
|
+
self.terminal_implementation_action = Proc.new { raise(*args) }
|
142
|
+
nil
|
143
|
+
end
|
144
|
+
|
145
|
+
# @overload and_throw(symbol)
|
146
|
+
# @overload and_throw(symbol, object)
|
147
|
+
#
|
148
|
+
# Tells the object to throw a symbol (with the object if that form is
|
149
|
+
# used) when the message is received.
|
150
|
+
#
|
151
|
+
# @return [nil] No further chaining is supported after this.
|
152
|
+
# @example
|
153
|
+
# allow(car).to receive(:go).and_throw(:out_of_gas)
|
154
|
+
# allow(car).to receive(:go).and_throw(:out_of_gas, :level => 0.1)
|
155
|
+
def and_throw(*args)
|
156
|
+
raise_already_invoked_error_if_necessary(__method__)
|
157
|
+
self.terminal_implementation_action = Proc.new { throw(*args) }
|
158
|
+
nil
|
159
|
+
end
|
160
|
+
|
161
|
+
# Tells the object to yield one or more args to a block when the message
|
162
|
+
# is received.
|
163
|
+
#
|
164
|
+
# @return [MessageExpectation] self, to support further chaining.
|
165
|
+
# @example
|
166
|
+
# stream.stub(:open).and_yield(StringIO.new)
|
167
|
+
def and_yield(*args, &block)
|
168
|
+
raise_already_invoked_error_if_necessary(__method__)
|
169
|
+
yield @eval_context = Object.new if block
|
170
|
+
|
171
|
+
# Initialize args to yield now that it's being used, see also: comment
|
172
|
+
# in constructor.
|
173
|
+
@args_to_yield ||= []
|
174
|
+
|
175
|
+
@args_to_yield << args
|
176
|
+
self.initial_implementation_action = AndYieldImplementation.new(@args_to_yield, @eval_context, @error_generator)
|
177
|
+
self
|
178
|
+
end
|
179
|
+
# @!endgroup
|
180
|
+
|
181
|
+
# @!group Constraining Receive Counts
|
182
|
+
|
183
|
+
# Constrain a message expectation to be received a specific number of
|
184
|
+
# times.
|
185
|
+
#
|
186
|
+
# @return [MessageExpectation] self, to support further chaining.
|
187
|
+
# @example
|
188
|
+
# expect(dealer).to receive(:deal_card).exactly(10).times
|
189
|
+
def exactly(n, &block)
|
190
|
+
raise_already_invoked_error_if_necessary(__method__)
|
191
|
+
self.inner_implementation_action = block
|
192
|
+
set_expected_received_count :exactly, n
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
# Constrain a message expectation to be received at least a specific
|
197
|
+
# number of times.
|
198
|
+
#
|
199
|
+
# @return [MessageExpectation] self, to support further chaining.
|
200
|
+
# @example
|
201
|
+
# expect(dealer).to receive(:deal_card).at_least(9).times
|
202
|
+
def at_least(n, &block)
|
203
|
+
raise_already_invoked_error_if_necessary(__method__)
|
204
|
+
set_expected_received_count :at_least, n
|
205
|
+
|
206
|
+
if n == 0
|
207
|
+
raise "at_least(0) has been removed, use allow(...).to receive(:message) instead"
|
208
|
+
end
|
209
|
+
|
210
|
+
self.inner_implementation_action = block
|
211
|
+
|
212
|
+
self
|
213
|
+
end
|
214
|
+
|
215
|
+
# Constrain a message expectation to be received at most a specific
|
216
|
+
# number of times.
|
217
|
+
#
|
218
|
+
# @return [MessageExpectation] self, to support further chaining.
|
219
|
+
# @example
|
220
|
+
# expect(dealer).to receive(:deal_card).at_most(10).times
|
221
|
+
def at_most(n, &block)
|
222
|
+
raise_already_invoked_error_if_necessary(__method__)
|
223
|
+
self.inner_implementation_action = block
|
224
|
+
set_expected_received_count :at_most, n
|
225
|
+
self
|
226
|
+
end
|
227
|
+
|
228
|
+
# Syntactic sugar for `exactly`, `at_least` and `at_most`
|
229
|
+
#
|
230
|
+
# @return [MessageExpectation] self, to support further chaining.
|
231
|
+
# @example
|
232
|
+
# expect(dealer).to receive(:deal_card).exactly(10).times
|
233
|
+
# expect(dealer).to receive(:deal_card).at_least(10).times
|
234
|
+
# expect(dealer).to receive(:deal_card).at_most(10).times
|
235
|
+
def times(&block)
|
236
|
+
self.inner_implementation_action = block
|
237
|
+
self
|
238
|
+
end
|
239
|
+
|
240
|
+
# Expect a message not to be received at all.
|
241
|
+
#
|
242
|
+
# @return [MessageExpectation] self, to support further chaining.
|
243
|
+
# @example
|
244
|
+
# expect(car).to receive(:stop).never
|
245
|
+
def never
|
246
|
+
error_generator.raise_double_negation_error("expect(obj)") if negative?
|
247
|
+
@expected_received_count = 0
|
248
|
+
self
|
249
|
+
end
|
250
|
+
|
251
|
+
# Expect a message to be received exactly one time.
|
252
|
+
#
|
253
|
+
# @return [MessageExpectation] self, to support further chaining.
|
254
|
+
# @example
|
255
|
+
# expect(car).to receive(:go).once
|
256
|
+
def once(&block)
|
257
|
+
self.inner_implementation_action = block
|
258
|
+
set_expected_received_count :exactly, 1
|
259
|
+
self
|
260
|
+
end
|
261
|
+
|
262
|
+
# Expect a message to be received exactly two times.
|
263
|
+
#
|
264
|
+
# @return [MessageExpectation] self, to support further chaining.
|
265
|
+
# @example
|
266
|
+
# expect(car).to receive(:go).twice
|
267
|
+
def twice(&block)
|
268
|
+
self.inner_implementation_action = block
|
269
|
+
set_expected_received_count :exactly, 2
|
270
|
+
self
|
271
|
+
end
|
272
|
+
|
273
|
+
# Expect a message to be received exactly three times.
|
274
|
+
#
|
275
|
+
# @return [MessageExpectation] self, to support further chaining.
|
276
|
+
# @example
|
277
|
+
# expect(car).to receive(:go).thrice
|
278
|
+
def thrice(&block)
|
279
|
+
self.inner_implementation_action = block
|
280
|
+
set_expected_received_count :exactly, 3
|
281
|
+
self
|
282
|
+
end
|
283
|
+
# @!endgroup
|
284
|
+
|
285
|
+
# @!group Other Constraints
|
286
|
+
|
287
|
+
# Constrains a stub or message expectation to invocations with specific
|
288
|
+
# arguments.
|
289
|
+
#
|
290
|
+
# With a stub, if the message might be received with other args as well,
|
291
|
+
# you should stub a default value first, and then stub or mock the same
|
292
|
+
# message using `with` to constrain to specific arguments.
|
293
|
+
#
|
294
|
+
# A message expectation will fail if the message is received with different
|
295
|
+
# arguments.
|
296
|
+
#
|
297
|
+
# @return [MessageExpectation] self, to support further chaining.
|
298
|
+
# @example
|
299
|
+
# allow(cart).to receive(:add) { :failure }
|
300
|
+
# allow(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success }
|
301
|
+
# cart.add(Book.new(:isbn => 1234567890))
|
302
|
+
# # => :failure
|
303
|
+
# cart.add(Book.new(:isbn => 1934356379))
|
304
|
+
# # => :success
|
305
|
+
#
|
306
|
+
# expect(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success }
|
307
|
+
# cart.add(Book.new(:isbn => 1234567890))
|
308
|
+
# # => failed expectation
|
309
|
+
# cart.add(Book.new(:isbn => 1934356379))
|
310
|
+
# # => passes
|
311
|
+
def with(*args, &block)
|
312
|
+
raise_already_invoked_error_if_necessary(__method__)
|
313
|
+
if args.empty?
|
314
|
+
raise ArgumentError,
|
315
|
+
"`with` must have at least one argument. Use `no_args` matcher to set the expectation of receiving no arguments."
|
316
|
+
end
|
317
|
+
|
318
|
+
self.inner_implementation_action = block
|
319
|
+
@argument_list_matcher = ArgumentListMatcher.new(*args)
|
320
|
+
self
|
321
|
+
end
|
322
|
+
|
323
|
+
# Expect messages to be received in a specific order.
|
324
|
+
#
|
325
|
+
# @return [MessageExpectation] self, to support further chaining.
|
326
|
+
# @example
|
327
|
+
# expect(api).to receive(:prepare).ordered
|
328
|
+
# expect(api).to receive(:run).ordered
|
329
|
+
# expect(api).to receive(:finish).ordered
|
330
|
+
def ordered(&block)
|
331
|
+
if type == :stub
|
332
|
+
RSpec.warning(
|
333
|
+
"`allow(...).to receive(..).ordered` is not supported and will " \
|
334
|
+
"have no effect, use `and_return(*ordered_values)` instead."
|
335
|
+
)
|
336
|
+
end
|
337
|
+
|
338
|
+
self.inner_implementation_action = block
|
339
|
+
additional_expected_calls.times do
|
340
|
+
@order_group.register(self)
|
341
|
+
end
|
342
|
+
@ordered = true
|
343
|
+
self
|
344
|
+
end
|
345
|
+
|
346
|
+
# @return [String] a nice representation of the message expectation
|
347
|
+
def to_s
|
348
|
+
args_description = error_generator.method_call_args_description(@argument_list_matcher.expected_args, "", "") { true }
|
349
|
+
args_description = "(#{args_description})" unless args_description.start_with?("(")
|
350
|
+
"#<#{self.class} #{error_generator.intro}.#{message}#{args_description}>"
|
351
|
+
end
|
352
|
+
alias inspect to_s
|
353
|
+
|
354
|
+
# @private
|
355
|
+
# Contains the parts of `MessageExpectation` that aren't part of
|
356
|
+
# rspec-mocks' public API. The class is very big and could really use
|
357
|
+
# some collaborators it delegates to for this stuff but for now this was
|
358
|
+
# the simplest way to split the public from private stuff to make it
|
359
|
+
# easier to publish the docs for the APIs we want published.
|
360
|
+
module ImplementationDetails
|
361
|
+
attr_accessor :error_generator, :implementation
|
362
|
+
attr_reader :message
|
363
|
+
attr_reader :orig_object
|
364
|
+
attr_writer :expected_received_count, :expected_from, :argument_list_matcher
|
365
|
+
protected :expected_received_count=, :expected_from=, :error_generator, :error_generator=, :implementation=
|
366
|
+
|
367
|
+
# @private
|
368
|
+
attr_reader :type
|
369
|
+
|
370
|
+
# rubocop:disable Metrics/ParameterLists
|
371
|
+
def initialize(error_generator, expectation_ordering, expected_from, method_double,
|
372
|
+
type=:expectation, opts={}, &implementation_block)
|
373
|
+
@type = type
|
374
|
+
@error_generator = error_generator
|
375
|
+
@error_generator.opts = opts
|
376
|
+
@expected_from = expected_from
|
377
|
+
@method_double = method_double
|
378
|
+
@orig_object = @method_double.object
|
379
|
+
@message = @method_double.method_name
|
380
|
+
@actual_received_count = 0
|
381
|
+
@expected_received_count = type == :expectation ? 1 : :any
|
382
|
+
@argument_list_matcher = ArgumentListMatcher::MATCH_ALL
|
383
|
+
@order_group = expectation_ordering
|
384
|
+
@order_group.register(self) unless type == :stub
|
385
|
+
@expectation_type = type
|
386
|
+
@ordered = false
|
387
|
+
@at_least = @at_most = @exactly = nil
|
388
|
+
|
389
|
+
# Initialized to nil so that we don't allocate an array for every
|
390
|
+
# mock or stub. See also comment in `and_yield`.
|
391
|
+
@args_to_yield = nil
|
392
|
+
@eval_context = nil
|
393
|
+
@yield_receiver_to_implementation_block = false
|
394
|
+
|
395
|
+
@implementation = Implementation.new
|
396
|
+
self.inner_implementation_action = implementation_block
|
397
|
+
end
|
398
|
+
# rubocop:enable Metrics/ParameterLists
|
399
|
+
|
400
|
+
def expected_args
|
401
|
+
@argument_list_matcher.expected_args
|
402
|
+
end
|
403
|
+
|
404
|
+
def and_yield_receiver_to_implementation
|
405
|
+
@yield_receiver_to_implementation_block = true
|
406
|
+
self
|
407
|
+
end
|
408
|
+
|
409
|
+
def yield_receiver_to_implementation_block?
|
410
|
+
@yield_receiver_to_implementation_block
|
411
|
+
end
|
412
|
+
|
413
|
+
def matches?(message, *args)
|
414
|
+
@message == message && @argument_list_matcher.args_match?(*args)
|
415
|
+
end
|
416
|
+
|
417
|
+
def safe_invoke(parent_stub, *args, &block)
|
418
|
+
invoke_incrementing_actual_calls_by(1, false, parent_stub, *args, &block)
|
419
|
+
end
|
420
|
+
|
421
|
+
def invoke(parent_stub, *args, &block)
|
422
|
+
invoke_incrementing_actual_calls_by(1, true, parent_stub, *args, &block)
|
423
|
+
end
|
424
|
+
|
425
|
+
def invoke_without_incrementing_received_count(parent_stub, *args, &block)
|
426
|
+
invoke_incrementing_actual_calls_by(0, true, parent_stub, *args, &block)
|
427
|
+
end
|
428
|
+
|
429
|
+
def negative?
|
430
|
+
@expected_received_count == 0 && !@at_least
|
431
|
+
end
|
432
|
+
|
433
|
+
def called_max_times?
|
434
|
+
@expected_received_count != :any &&
|
435
|
+
!@at_least &&
|
436
|
+
@expected_received_count > 0 &&
|
437
|
+
@actual_received_count >= @expected_received_count
|
438
|
+
end
|
439
|
+
|
440
|
+
def matches_name_but_not_args(message, *args)
|
441
|
+
@message == message && !@argument_list_matcher.args_match?(*args)
|
442
|
+
end
|
443
|
+
|
444
|
+
def verify_messages_received
|
445
|
+
return if expected_messages_received?
|
446
|
+
generate_error
|
447
|
+
end
|
448
|
+
|
449
|
+
def expected_messages_received?
|
450
|
+
ignoring_args? || matches_exact_count? || matches_at_least_count? || matches_at_most_count?
|
451
|
+
end
|
452
|
+
|
453
|
+
def ensure_expected_ordering_received!
|
454
|
+
@order_group.verify_invocation_order(self) if @ordered
|
455
|
+
true
|
456
|
+
end
|
457
|
+
|
458
|
+
def ignoring_args?
|
459
|
+
@expected_received_count == :any
|
460
|
+
end
|
461
|
+
|
462
|
+
def matches_at_least_count?
|
463
|
+
@at_least && @actual_received_count >= @expected_received_count
|
464
|
+
end
|
465
|
+
|
466
|
+
def matches_at_most_count?
|
467
|
+
@at_most && @actual_received_count <= @expected_received_count
|
468
|
+
end
|
469
|
+
|
470
|
+
def matches_exact_count?
|
471
|
+
@expected_received_count == @actual_received_count
|
472
|
+
end
|
473
|
+
|
474
|
+
def similar_messages
|
475
|
+
@similar_messages ||= []
|
476
|
+
end
|
477
|
+
|
478
|
+
def advise(*args)
|
479
|
+
similar_messages << args
|
480
|
+
end
|
481
|
+
|
482
|
+
def unadvise(args)
|
483
|
+
similar_messages.delete_if { |message| args.include?(message) }
|
484
|
+
end
|
485
|
+
|
486
|
+
def generate_error
|
487
|
+
if similar_messages.empty?
|
488
|
+
@error_generator.raise_expectation_error(
|
489
|
+
@message, @expected_received_count, @argument_list_matcher,
|
490
|
+
@actual_received_count, expectation_count_type, expected_args,
|
491
|
+
@expected_from, exception_source_id
|
492
|
+
)
|
493
|
+
else
|
494
|
+
@error_generator.raise_similar_message_args_error(
|
495
|
+
self, @similar_messages, @expected_from
|
496
|
+
)
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
def raise_unexpected_message_args_error(args_for_multiple_calls)
|
501
|
+
@error_generator.raise_unexpected_message_args_error(self, args_for_multiple_calls, exception_source_id)
|
502
|
+
end
|
503
|
+
|
504
|
+
def expectation_count_type
|
505
|
+
return :at_least if @at_least
|
506
|
+
return :at_most if @at_most
|
507
|
+
nil
|
508
|
+
end
|
509
|
+
|
510
|
+
def description_for(verb)
|
511
|
+
@error_generator.describe_expectation(
|
512
|
+
verb, @message, @expected_received_count,
|
513
|
+
@actual_received_count, expected_args
|
514
|
+
)
|
515
|
+
end
|
516
|
+
|
517
|
+
def raise_out_of_order_error
|
518
|
+
@error_generator.raise_out_of_order_error @message
|
519
|
+
end
|
520
|
+
|
521
|
+
def additional_expected_calls
|
522
|
+
return 0 if @expectation_type == :stub || !@exactly
|
523
|
+
@expected_received_count - 1
|
524
|
+
end
|
525
|
+
|
526
|
+
def ordered?
|
527
|
+
@ordered
|
528
|
+
end
|
529
|
+
|
530
|
+
def negative_expectation_for?(message)
|
531
|
+
@message == message && negative?
|
532
|
+
end
|
533
|
+
|
534
|
+
def actual_received_count_matters?
|
535
|
+
@at_least || @at_most || @exactly
|
536
|
+
end
|
537
|
+
|
538
|
+
def increase_actual_received_count!
|
539
|
+
@actual_received_count += 1
|
540
|
+
end
|
541
|
+
|
542
|
+
private
|
543
|
+
|
544
|
+
def exception_source_id
|
545
|
+
@exception_source_id ||= "#{self.class.name} #{__id__}"
|
546
|
+
end
|
547
|
+
|
548
|
+
def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, &block)
|
549
|
+
args.unshift(orig_object) if yield_receiver_to_implementation_block?
|
550
|
+
|
551
|
+
if negative? || (allowed_to_fail && (@exactly || @at_most) && (@actual_received_count == @expected_received_count))
|
552
|
+
# args are the args we actually received, @argument_list_matcher is the
|
553
|
+
# list of args we were expecting
|
554
|
+
@error_generator.raise_expectation_error(
|
555
|
+
@message, @expected_received_count,
|
556
|
+
@argument_list_matcher,
|
557
|
+
@actual_received_count + increment,
|
558
|
+
expectation_count_type, args, nil, exception_source_id
|
559
|
+
)
|
560
|
+
end
|
561
|
+
|
562
|
+
@order_group.handle_order_constraint self
|
563
|
+
|
564
|
+
if implementation.present?
|
565
|
+
implementation.call(*args, &block)
|
566
|
+
elsif parent_stub
|
567
|
+
parent_stub.invoke(nil, *args, &block)
|
568
|
+
end
|
569
|
+
ensure
|
570
|
+
@actual_received_count += increment
|
571
|
+
end
|
572
|
+
|
573
|
+
def has_been_invoked?
|
574
|
+
@actual_received_count > 0
|
575
|
+
end
|
576
|
+
|
577
|
+
def raise_already_invoked_error_if_necessary(calling_customization)
|
578
|
+
return unless has_been_invoked?
|
579
|
+
|
580
|
+
error_generator.raise_already_invoked_error(message, calling_customization)
|
581
|
+
end
|
582
|
+
|
583
|
+
def set_expected_received_count(relativity, n)
|
584
|
+
raise "`count` is not supported with negative message expectations" if negative?
|
585
|
+
@at_least = (relativity == :at_least)
|
586
|
+
@at_most = (relativity == :at_most)
|
587
|
+
@exactly = (relativity == :exactly)
|
588
|
+
@expected_received_count = case n
|
589
|
+
when Numeric then n
|
590
|
+
when :once then 1
|
591
|
+
when :twice then 2
|
592
|
+
when :thrice then 3
|
593
|
+
end
|
594
|
+
end
|
595
|
+
|
596
|
+
def initial_implementation_action=(action)
|
597
|
+
implementation.initial_action = action
|
598
|
+
end
|
599
|
+
|
600
|
+
def inner_implementation_action=(action)
|
601
|
+
return unless action
|
602
|
+
warn_about_stub_override if implementation.inner_action
|
603
|
+
implementation.inner_action = action
|
604
|
+
end
|
605
|
+
|
606
|
+
def terminal_implementation_action=(action)
|
607
|
+
implementation.terminal_action = action
|
608
|
+
end
|
609
|
+
|
610
|
+
def warn_about_stub_override
|
611
|
+
RSpec.warning(
|
612
|
+
"You're overriding a previous stub implementation of `#{@message}`. " \
|
613
|
+
"Called from #{CallerFilter.first_non_rspec_line}."
|
614
|
+
)
|
615
|
+
end
|
616
|
+
|
617
|
+
def wrap_original(method_name, &block)
|
618
|
+
if RSpec::Mocks::TestDouble === @method_double.object
|
619
|
+
@error_generator.raise_only_valid_on_a_partial_double(method_name)
|
620
|
+
else
|
621
|
+
warn_about_stub_override if implementation.inner_action
|
622
|
+
@implementation = AndWrapOriginalImplementation.new(@method_double.original_implementation_callable, block)
|
623
|
+
@yield_receiver_to_implementation_block = false
|
624
|
+
end
|
625
|
+
|
626
|
+
nil
|
627
|
+
end
|
628
|
+
end
|
629
|
+
|
630
|
+
include ImplementationDetails
|
631
|
+
end
|
632
|
+
|
633
|
+
# Handles the implementation of an `and_yield` declaration.
|
634
|
+
# @private
|
635
|
+
class AndYieldImplementation
|
636
|
+
def initialize(args_to_yield, eval_context, error_generator)
|
637
|
+
@args_to_yield = args_to_yield
|
638
|
+
@eval_context = eval_context
|
639
|
+
@error_generator = error_generator
|
640
|
+
end
|
641
|
+
|
642
|
+
def call(*_args_to_ignore, &block)
|
643
|
+
return if @args_to_yield.empty? && @eval_context.nil?
|
644
|
+
|
645
|
+
@error_generator.raise_missing_block_error @args_to_yield unless block
|
646
|
+
value = nil
|
647
|
+
block_signature = Support::BlockSignature.new(block)
|
648
|
+
|
649
|
+
@args_to_yield.each do |args|
|
650
|
+
unless Support::StrictSignatureVerifier.new(block_signature, args).valid?
|
651
|
+
@error_generator.raise_wrong_arity_error(args, block_signature)
|
652
|
+
end
|
653
|
+
|
654
|
+
value = @eval_context ? @eval_context.instance_exec(*args, &block) : yield(*args)
|
655
|
+
end
|
656
|
+
value
|
657
|
+
end
|
658
|
+
end
|
659
|
+
|
660
|
+
# Handles the implementation of an `and_return` implementation.
|
661
|
+
# @private
|
662
|
+
class AndReturnImplementation
|
663
|
+
def initialize(values_to_return)
|
664
|
+
@values_to_return = values_to_return
|
665
|
+
end
|
666
|
+
|
667
|
+
def call(*_args_to_ignore, &_block)
|
668
|
+
if @values_to_return.size > 1
|
669
|
+
@values_to_return.shift
|
670
|
+
else
|
671
|
+
@values_to_return.first
|
672
|
+
end
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
676
|
+
# Represents a configured implementation. Takes into account
|
677
|
+
# any number of sub-implementations.
|
678
|
+
# @private
|
679
|
+
class Implementation
|
680
|
+
attr_accessor :initial_action, :inner_action, :terminal_action
|
681
|
+
|
682
|
+
def call(*args, &block)
|
683
|
+
actions.map do |action|
|
684
|
+
action.call(*args, &block)
|
685
|
+
end.last
|
686
|
+
end
|
687
|
+
|
688
|
+
def present?
|
689
|
+
actions.any?
|
690
|
+
end
|
691
|
+
|
692
|
+
private
|
693
|
+
|
694
|
+
def actions
|
695
|
+
[initial_action, inner_action, terminal_action].compact
|
696
|
+
end
|
697
|
+
end
|
698
|
+
|
699
|
+
# Represents an `and_call_original` implementation.
|
700
|
+
# @private
|
701
|
+
class AndWrapOriginalImplementation
|
702
|
+
def initialize(method, block)
|
703
|
+
@method = method
|
704
|
+
@block = block
|
705
|
+
end
|
706
|
+
|
707
|
+
CannotModifyFurtherError = Class.new(StandardError)
|
708
|
+
|
709
|
+
def initial_action=(_value)
|
710
|
+
raise cannot_modify_further_error
|
711
|
+
end
|
712
|
+
|
713
|
+
def inner_action=(_value)
|
714
|
+
raise cannot_modify_further_error
|
715
|
+
end
|
716
|
+
|
717
|
+
def terminal_action=(_value)
|
718
|
+
raise cannot_modify_further_error
|
719
|
+
end
|
720
|
+
|
721
|
+
def present?
|
722
|
+
true
|
723
|
+
end
|
724
|
+
|
725
|
+
def inner_action
|
726
|
+
true
|
727
|
+
end
|
728
|
+
|
729
|
+
def call(*args, &block)
|
730
|
+
@block.call(@method, *args, &block)
|
731
|
+
end
|
732
|
+
|
733
|
+
private
|
734
|
+
|
735
|
+
def cannot_modify_further_error
|
736
|
+
CannotModifyFurtherError.new "This method has already been configured " \
|
737
|
+
"to call the original implementation, and cannot be modified further."
|
738
|
+
end
|
739
|
+
end
|
740
|
+
end
|
741
|
+
end
|