devil_fruit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +4 -0
- data/lib/devil_fruit/format_devil_fruit.rb +12 -0
- data/lib/devil_fruit/version.rb +5 -0
- data/lib/devil_fruit.rb +9 -0
- data/sig/devil_fruit.rbs +4 -0
- data/vendor/bin/bundle +109 -0
- data/vendor/bin/htmldiff +27 -0
- data/vendor/bin/ldiff +27 -0
- data/vendor/bin/rake +27 -0
- data/vendor/bin/rspec +27 -0
- data/vendor/bundle/ruby/3.2.0/bin/htmldiff +29 -0
- data/vendor/bundle/ruby/3.2.0/bin/ldiff +29 -0
- data/vendor/bundle/ruby/3.2.0/bin/rake +29 -0
- data/vendor/bundle/ruby/3.2.0/bin/rspec +29 -0
- data/vendor/bundle/ruby/3.2.0/cache/diff-lcs-1.5.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rake-13.0.6.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rspec-3.12.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rspec-core-3.12.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rspec-expectations-3.12.3.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rspec-mocks-3.12.6.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rspec-support-3.12.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/.rspec +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/Code-of-Conduct.md +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/Contributing.md +119 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/History.md +400 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/License.md +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/Manifest.txt +59 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/README.rdoc +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/Rakefile +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/bin/htmldiff +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/bin/ldiff +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/docs/COPYING.txt +339 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/docs/artistic.txt +127 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/backports.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/callbacks.rb +325 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/change.rb +174 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/htmldiff.rb +150 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/hunk.rb +358 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/internals.rb +308 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/ldiff.rb +171 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/change_spec.rb +89 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/diff_spec.rb +51 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/aX +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/bXaX +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ds1.csv +50 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ds2.csv +51 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-c +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-e +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-f +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-u +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-c +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-e +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-f +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-u +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2 +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/new-chef +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/new-chef2 +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/old-chef +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/fixtures/old-chef2 +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/hunk_spec.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/issues_spec.rb +154 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/lcs_spec.rb +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/ldiff_spec.rb +87 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/patch_spec.rb +416 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/spec_helper.rb +374 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/traverse_sequences_spec.rb +137 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/History.rdoc +2403 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb +831 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/file_task.rb +54 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/file_utils.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/file_utils_ext.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/packagetask.rb +222 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb +434 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task_manager.rb +331 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/testtask.rb +189 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/rake.gemspec +100 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-3.12.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-3.12.0/README.md +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-3.12.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-3.12.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/.document +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/.yardopts +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/Changelog.md +2375 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/LICENSE.md +26 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/README.md +384 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/exe/rspec +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/fork_runner.rb +138 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/bisect/utilities.rb +69 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/configuration.rb +2385 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/configuration_options.rb +233 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/did_you_mean.rb +46 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/drb.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/dsl.rb +98 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb +666 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb +905 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/console_codes.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/exception_presenter.rb +525 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/helpers.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/html_printer.rb +412 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/json_formatter.rb +102 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/protocol.rb +182 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/formatters.rb +279 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb +646 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/invocations.rb +87 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/memoized_helpers.rb +580 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/metadata.rb +498 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/metadata_filter.rb +255 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/notifications.rb +521 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/option_parser.rb +323 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/ordering.rb +169 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/output_wrapper.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/pending.rb +157 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/profiler.rb +34 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/project_initializer/.rspec +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +98 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/rake_task.rb +188 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/reporter.rb +265 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb +212 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/set.rb +54 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/shared_example_group.rb +271 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/world.rb +287 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core.rb +212 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/.document +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/.yardopts +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/Changelog.md +1309 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/LICENSE.md +25 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/README.md +320 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/configuration.rb +230 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/expectation_target.rb +163 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/fail_with.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/failure_aggregator.rb +229 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/handler.rb +182 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/expectations.rb +82 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/all.rb +86 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/base_matcher.rb +198 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/be.rb +191 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/change.rb +450 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/compound.rb +290 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/contain_exactly.rb +310 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/count_expectation.rb +169 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/has.rb +167 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/include.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/match.rb +106 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/output.rb +207 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/raise_error.rb +271 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/respond_to.rb +200 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/throw_symbol.rb +138 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in/yield.rb +375 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/built_in.rb +53 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/composable.rb +171 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/dsl.rb +545 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/generated_descriptions.rb +41 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_protocol.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers.rb +1044 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/.document +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/.yardopts +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/Changelog.md +1270 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/LICENSE.md +25 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/README.md +463 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/chain.rb +111 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/proxy.rb +125 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/recorder.rb +295 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/argument_list_matcher.rb +117 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/argument_matchers.rb +322 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/configuration.rb +212 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/error_generator.rb +390 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/example_methods.rb +434 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/matchers/have_received.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/matchers/receive.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/message_expectation.rb +820 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/method_double.rb +316 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/method_reference.rb +214 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/mutate_const.rb +339 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/proxy.rb +520 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/targets.rb +124 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/test_double.rb +171 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/verifying_double.rb +123 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/verifying_message_expectation.rb +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/verifying_proxy.rb +221 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.12.6/lib/rspec/mocks.rb +133 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/Changelog.md +372 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/LICENSE.md +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/README.md +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/comparable_version.rb +46 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/encoded_string.rb +161 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/method_signature_verifier.rb +438 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/mutex.rb +73 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/object_formatter.rb +275 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/reentrant_mutex.rb +78 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/ruby_features.rb +198 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/source/location.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/source/node.rb +110 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/source/token.rb +94 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/source.rb +85 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/deprecation_helpers.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/diff_helpers.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/in_sub_process.rb +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/shell_out.rb +108 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/stderr_splitter.rb +75 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/string_matcher.rb +45 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/spec.rb +82 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support/with_keywords_when_needed.rb +33 -0
- data/vendor/bundle/ruby/3.2.0/gems/rspec-support-3.12.1/lib/rspec/support.rb +160 -0
- data/vendor/bundle/ruby/3.2.0/specifications/diff-lcs-1.5.0.gemspec +37 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rake-13.0.6.gemspec +26 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-3.12.0.gemspec +31 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-core-3.12.2.gemspec +39 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-expectations-3.12.3.gemspec +33 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-mocks-3.12.6.gemspec +33 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-support-3.12.1.gemspec +29 -0
- metadata +420 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
module RSpec
|
|
2
|
+
module Core
|
|
3
|
+
# Provides the main entry point to run a suite of RSpec examples.
|
|
4
|
+
class Runner
|
|
5
|
+
# @attr_reader
|
|
6
|
+
# @private
|
|
7
|
+
attr_reader :options, :configuration, :world
|
|
8
|
+
|
|
9
|
+
# Register an `at_exit` hook that runs the suite when the process exits.
|
|
10
|
+
#
|
|
11
|
+
# @note This is not generally needed. The `rspec` command takes care
|
|
12
|
+
# of running examples for you without involving an `at_exit`
|
|
13
|
+
# hook. This is only needed if you are running specs using
|
|
14
|
+
# the `ruby` command, and even then, the normal way to invoke
|
|
15
|
+
# this is by requiring `rspec/autorun`.
|
|
16
|
+
def self.autorun
|
|
17
|
+
if autorun_disabled?
|
|
18
|
+
RSpec.deprecate("Requiring `rspec/autorun` when running RSpec via the `rspec` command")
|
|
19
|
+
return
|
|
20
|
+
elsif installed_at_exit? || running_in_drb?
|
|
21
|
+
return
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
at_exit { perform_at_exit }
|
|
25
|
+
@installed_at_exit = true
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @private
|
|
29
|
+
def self.perform_at_exit
|
|
30
|
+
# Don't bother running any specs and just let the program terminate
|
|
31
|
+
# if we got here due to an unrescued exception (anything other than
|
|
32
|
+
# SystemExit, which is raised when somebody calls Kernel#exit).
|
|
33
|
+
return unless $!.nil? || $!.is_a?(SystemExit)
|
|
34
|
+
|
|
35
|
+
# We got here because either the end of the program was reached or
|
|
36
|
+
# somebody called Kernel#exit. Run the specs and then override any
|
|
37
|
+
# existing exit status with RSpec's exit status if any specs failed.
|
|
38
|
+
invoke
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Runs the suite of specs and exits the process with an appropriate exit
|
|
42
|
+
# code.
|
|
43
|
+
def self.invoke
|
|
44
|
+
disable_autorun!
|
|
45
|
+
status = run(ARGV, $stderr, $stdout).to_i
|
|
46
|
+
exit(status) if status != 0
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Run a suite of RSpec examples. Does not exit.
|
|
50
|
+
#
|
|
51
|
+
# This is used internally by RSpec to run a suite, but is available
|
|
52
|
+
# for use by any other automation tool.
|
|
53
|
+
#
|
|
54
|
+
# If you want to run this multiple times in the same process, and you
|
|
55
|
+
# want files like `spec_helper.rb` to be reloaded, be sure to load `load`
|
|
56
|
+
# instead of `require`.
|
|
57
|
+
#
|
|
58
|
+
# @param args [Array] command-line-supported arguments
|
|
59
|
+
# @param err [IO] error stream
|
|
60
|
+
# @param out [IO] output stream
|
|
61
|
+
# @return [Fixnum] exit status code. 0 if all specs passed,
|
|
62
|
+
# or the configured failure exit code (1 by default) if specs
|
|
63
|
+
# failed.
|
|
64
|
+
def self.run(args, err=$stderr, out=$stdout)
|
|
65
|
+
trap_interrupt
|
|
66
|
+
options = ConfigurationOptions.new(args)
|
|
67
|
+
|
|
68
|
+
if options.options[:runner]
|
|
69
|
+
options.options[:runner].call(options, err, out)
|
|
70
|
+
else
|
|
71
|
+
new(options).run(err, out)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def initialize(options, configuration=RSpec.configuration, world=RSpec.world)
|
|
76
|
+
@options = options
|
|
77
|
+
@configuration = configuration
|
|
78
|
+
@world = world
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Configures and runs a spec suite.
|
|
82
|
+
#
|
|
83
|
+
# @param err [IO] error stream
|
|
84
|
+
# @param out [IO] output stream
|
|
85
|
+
def run(err, out)
|
|
86
|
+
setup(err, out)
|
|
87
|
+
return @configuration.reporter.exit_early(exit_code) if RSpec.world.wants_to_quit
|
|
88
|
+
|
|
89
|
+
run_specs(@world.ordered_example_groups).tap do
|
|
90
|
+
persist_example_statuses
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Wires together the various configuration objects and state holders.
|
|
95
|
+
#
|
|
96
|
+
# @param err [IO] error stream
|
|
97
|
+
# @param out [IO] output stream
|
|
98
|
+
def setup(err, out)
|
|
99
|
+
configure(err, out)
|
|
100
|
+
return if RSpec.world.wants_to_quit
|
|
101
|
+
|
|
102
|
+
@configuration.load_spec_files
|
|
103
|
+
ensure
|
|
104
|
+
@world.announce_filters
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Runs the provided example groups.
|
|
108
|
+
#
|
|
109
|
+
# @param example_groups [Array<RSpec::Core::ExampleGroup>] groups to run
|
|
110
|
+
# @return [Fixnum] exit status code. 0 if all specs passed,
|
|
111
|
+
# or the configured failure exit code (1 by default) if specs
|
|
112
|
+
# failed.
|
|
113
|
+
def run_specs(example_groups)
|
|
114
|
+
examples_count = @world.example_count(example_groups)
|
|
115
|
+
examples_passed = @configuration.reporter.report(examples_count) do |reporter|
|
|
116
|
+
@configuration.with_suite_hooks do
|
|
117
|
+
if examples_count == 0 && @configuration.fail_if_no_examples
|
|
118
|
+
return @configuration.failure_exit_code
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
example_groups.map { |g| g.run(reporter) }.all?
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
exit_code(examples_passed)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# @private
|
|
129
|
+
def configure(err, out)
|
|
130
|
+
@configuration.error_stream = err
|
|
131
|
+
@configuration.output_stream = out if @configuration.output_stream == $stdout
|
|
132
|
+
@options.configure(@configuration)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# @private
|
|
136
|
+
def self.disable_autorun!
|
|
137
|
+
@autorun_disabled = true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @private
|
|
141
|
+
def self.autorun_disabled?
|
|
142
|
+
@autorun_disabled ||= false
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @private
|
|
146
|
+
def self.installed_at_exit?
|
|
147
|
+
@installed_at_exit ||= false
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# @private
|
|
151
|
+
def self.running_in_drb?
|
|
152
|
+
return false unless defined?(DRb)
|
|
153
|
+
|
|
154
|
+
server = begin
|
|
155
|
+
DRb.current_server
|
|
156
|
+
rescue DRb::DRbServerNotFound
|
|
157
|
+
return false
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
return false unless server && server.alive?
|
|
161
|
+
|
|
162
|
+
require 'socket'
|
|
163
|
+
require 'uri'
|
|
164
|
+
|
|
165
|
+
local_ipv4 = begin
|
|
166
|
+
IPSocket.getaddress(Socket.gethostname)
|
|
167
|
+
rescue SocketError
|
|
168
|
+
return false
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
["127.0.0.1", "localhost", local_ipv4].any? { |addr| addr == URI(DRb.current_server.uri).host }
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# @private
|
|
175
|
+
def self.trap_interrupt
|
|
176
|
+
trap('INT') { handle_interrupt }
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# @private
|
|
180
|
+
def self.handle_interrupt
|
|
181
|
+
if RSpec.world.wants_to_quit
|
|
182
|
+
exit!(1)
|
|
183
|
+
else
|
|
184
|
+
RSpec.world.wants_to_quit = true
|
|
185
|
+
$stderr.puts "\nRSpec is shutting down and will print the summary report... Interrupt again to force quit."
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @private
|
|
190
|
+
def exit_code(examples_passed=false)
|
|
191
|
+
return @configuration.error_exit_code || @configuration.failure_exit_code if @world.non_example_failure
|
|
192
|
+
return @configuration.failure_exit_code unless examples_passed
|
|
193
|
+
|
|
194
|
+
0
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
private
|
|
198
|
+
|
|
199
|
+
def persist_example_statuses
|
|
200
|
+
return if @configuration.dry_run
|
|
201
|
+
return unless (path = @configuration.example_status_persistence_file_path)
|
|
202
|
+
|
|
203
|
+
ExampleStatusPersister.persist(@world.all_examples, path)
|
|
204
|
+
rescue SystemCallError => e
|
|
205
|
+
RSpec.warning "Could not write example statuses to #{path} (configured as " \
|
|
206
|
+
"`config.example_status_persistence_file_path`) due to a " \
|
|
207
|
+
"system error: #{e.inspect}. Please check that the config " \
|
|
208
|
+
"option is set to an accessible, valid file path", :call_site => nil
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module RSpec
|
|
2
|
+
module Core
|
|
3
|
+
# A sandbox isolates the enclosed code into an environment that looks 'new'
|
|
4
|
+
# meaning globally accessed objects are reset for the duration of the
|
|
5
|
+
# sandbox.
|
|
6
|
+
#
|
|
7
|
+
# @note This module is not normally available. You must require
|
|
8
|
+
# `rspec/core/sandbox` to load it.
|
|
9
|
+
module Sandbox
|
|
10
|
+
# Execute a provided block with RSpec global objects (configuration,
|
|
11
|
+
# world) reset. This is used to test RSpec with RSpec.
|
|
12
|
+
#
|
|
13
|
+
# When calling this the configuration is passed into the provided block.
|
|
14
|
+
# Use this to set custom configs for your sandboxed examples.
|
|
15
|
+
#
|
|
16
|
+
# ```
|
|
17
|
+
# Sandbox.sandboxed do |config|
|
|
18
|
+
# config.before(:context) { RSpec.current_example = nil }
|
|
19
|
+
# end
|
|
20
|
+
# ```
|
|
21
|
+
def self.sandboxed
|
|
22
|
+
orig_config = RSpec.configuration
|
|
23
|
+
orig_world = RSpec.world
|
|
24
|
+
orig_example = RSpec.current_example
|
|
25
|
+
|
|
26
|
+
RSpec.configuration = RSpec::Core::Configuration.new
|
|
27
|
+
RSpec.world = RSpec::Core::World.new(RSpec.configuration)
|
|
28
|
+
|
|
29
|
+
yield RSpec.configuration
|
|
30
|
+
ensure
|
|
31
|
+
RSpec.configuration = orig_config
|
|
32
|
+
RSpec.world = orig_world
|
|
33
|
+
RSpec.current_example = orig_example
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
module RSpec
|
|
2
|
+
module Core
|
|
3
|
+
# @private
|
|
4
|
+
#
|
|
5
|
+
# We use this to replace `::Set` so we can have the advantage of
|
|
6
|
+
# constant time key lookups for unique arrays but without the
|
|
7
|
+
# potential to pollute a developers environment with an extra
|
|
8
|
+
# piece of the stdlib. This helps to prevent false positive
|
|
9
|
+
# builds.
|
|
10
|
+
#
|
|
11
|
+
class Set
|
|
12
|
+
include Enumerable
|
|
13
|
+
|
|
14
|
+
def initialize(array=[])
|
|
15
|
+
@values = {}
|
|
16
|
+
merge(array)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def empty?
|
|
20
|
+
@values.empty?
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def <<(key)
|
|
24
|
+
@values[key] = true
|
|
25
|
+
self
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def delete(key)
|
|
29
|
+
@values.delete(key)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def each(&block)
|
|
33
|
+
@values.keys.each(&block)
|
|
34
|
+
self
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def include?(key)
|
|
38
|
+
@values.key?(key)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def merge(values)
|
|
42
|
+
values.each do |key|
|
|
43
|
+
@values[key] = true
|
|
44
|
+
end
|
|
45
|
+
self
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def clear
|
|
49
|
+
@values.clear
|
|
50
|
+
self
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module RSpec
|
|
2
|
+
module Core
|
|
3
|
+
# Exposes {ExampleGroup}-level methods to a module, so you can include that
|
|
4
|
+
# module in an {ExampleGroup}.
|
|
5
|
+
#
|
|
6
|
+
# @example
|
|
7
|
+
#
|
|
8
|
+
# module LoggedInAsAdmin
|
|
9
|
+
# extend RSpec::Core::SharedContext
|
|
10
|
+
# before(:example) do
|
|
11
|
+
# log_in_as :admin
|
|
12
|
+
# end
|
|
13
|
+
# end
|
|
14
|
+
#
|
|
15
|
+
# describe "admin section" do
|
|
16
|
+
# include LoggedInAsAdmin
|
|
17
|
+
# # ...
|
|
18
|
+
# end
|
|
19
|
+
module SharedContext
|
|
20
|
+
# @private
|
|
21
|
+
def included(group)
|
|
22
|
+
__shared_context_recordings.each do |recording|
|
|
23
|
+
recording.playback_onto(group)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @private
|
|
28
|
+
def __shared_context_recordings
|
|
29
|
+
@__shared_context_recordings ||= []
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @private
|
|
33
|
+
Recording = Struct.new(:method_name, :args, :block) do
|
|
34
|
+
def playback_onto(group)
|
|
35
|
+
group.__send__(method_name, *args, &block)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @private
|
|
40
|
+
def self.record(methods)
|
|
41
|
+
methods.each do |meth|
|
|
42
|
+
define_method(meth) do |*args, &block|
|
|
43
|
+
__shared_context_recordings << Recording.new(meth, args, block)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# @private
|
|
49
|
+
record [:describe, :context] + Hooks.instance_methods(false) +
|
|
50
|
+
MemoizedHelpers::ClassMethods.instance_methods(false)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
# @private
|
|
54
|
+
SharedContext = Core::SharedContext
|
|
55
|
+
end
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
RSpec::Support.require_rspec_support "with_keywords_when_needed"
|
|
2
|
+
|
|
3
|
+
module RSpec
|
|
4
|
+
module Core
|
|
5
|
+
# Represents some functionality that is shared with multiple example groups.
|
|
6
|
+
# The functionality is defined by the provided block, which is lazily
|
|
7
|
+
# eval'd when the `SharedExampleGroupModule` instance is included in an example
|
|
8
|
+
# group.
|
|
9
|
+
class SharedExampleGroupModule < Module
|
|
10
|
+
# @private
|
|
11
|
+
attr_reader :definition
|
|
12
|
+
|
|
13
|
+
def initialize(description, definition, metadata)
|
|
14
|
+
@description = description
|
|
15
|
+
@definition = definition
|
|
16
|
+
@metadata = metadata
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Provides a human-readable representation of this module.
|
|
20
|
+
def inspect
|
|
21
|
+
"#<#{self.class.name} #{@description.inspect}>"
|
|
22
|
+
end
|
|
23
|
+
alias to_s inspect
|
|
24
|
+
|
|
25
|
+
# Ruby callback for when a module is included in another module is class.
|
|
26
|
+
# Our definition evaluates the shared group block in the context of the
|
|
27
|
+
# including example group.
|
|
28
|
+
def included(klass)
|
|
29
|
+
inclusion_line = klass.metadata[:location]
|
|
30
|
+
include_in klass, inclusion_line, [], nil
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @private
|
|
34
|
+
def include_in(klass, inclusion_line, args, customization_block)
|
|
35
|
+
klass.update_inherited_metadata(@metadata) unless @metadata.empty?
|
|
36
|
+
|
|
37
|
+
SharedExampleGroupInclusionStackFrame.with_frame(@description, inclusion_line) do
|
|
38
|
+
RSpec::Support::WithKeywordsWhenNeeded.class_exec(klass, *args, &@definition)
|
|
39
|
+
klass.class_exec(&customization_block) if customization_block
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Shared example groups let you define common context and/or common
|
|
45
|
+
# examples that you wish to use in multiple example groups.
|
|
46
|
+
#
|
|
47
|
+
# When defined, the shared group block is stored for later evaluation.
|
|
48
|
+
# It can later be included in an example group either explicitly
|
|
49
|
+
# (using `include_examples`, `include_context` or `it_behaves_like`)
|
|
50
|
+
# or implicitly (via matching metadata).
|
|
51
|
+
#
|
|
52
|
+
# Named shared example groups are scoped based on where they are
|
|
53
|
+
# defined. Shared groups defined in an example group are available
|
|
54
|
+
# for inclusion in that example group or any child example groups,
|
|
55
|
+
# but not in any parent or sibling example groups. Shared example
|
|
56
|
+
# groups defined at the top level can be included from any example group.
|
|
57
|
+
module SharedExampleGroup
|
|
58
|
+
# @overload shared_examples(name, &block)
|
|
59
|
+
# @param name [String, Symbol, Module] identifer to use when looking up
|
|
60
|
+
# this shared group
|
|
61
|
+
# @param block The block to be eval'd
|
|
62
|
+
# @overload shared_examples(name, metadata, &block)
|
|
63
|
+
# @param name [String, Symbol, Module] identifer to use when looking up
|
|
64
|
+
# this shared group
|
|
65
|
+
# @param metadata [Array<Symbol>, Hash] metadata to attach to this
|
|
66
|
+
# group; any example group or example with matching metadata will
|
|
67
|
+
# automatically include this shared example group.
|
|
68
|
+
# @param block The block to be eval'd
|
|
69
|
+
#
|
|
70
|
+
# Stores the block for later use. The block will be evaluated
|
|
71
|
+
# in the context of an example group via `include_examples`,
|
|
72
|
+
# `include_context`, or `it_behaves_like`.
|
|
73
|
+
#
|
|
74
|
+
# @example
|
|
75
|
+
# shared_examples "auditable" do
|
|
76
|
+
# it "stores an audit record on save!" do
|
|
77
|
+
# expect { auditable.save! }.to change(Audit, :count).by(1)
|
|
78
|
+
# end
|
|
79
|
+
# end
|
|
80
|
+
#
|
|
81
|
+
# RSpec.describe Account do
|
|
82
|
+
# it_behaves_like "auditable" do
|
|
83
|
+
# let(:auditable) { Account.new }
|
|
84
|
+
# end
|
|
85
|
+
# end
|
|
86
|
+
#
|
|
87
|
+
# @see ExampleGroup.it_behaves_like
|
|
88
|
+
# @see ExampleGroup.include_examples
|
|
89
|
+
# @see ExampleGroup.include_context
|
|
90
|
+
def shared_examples(name, *args, &block)
|
|
91
|
+
top_level = self == ExampleGroup
|
|
92
|
+
if top_level && RSpec::Support.thread_local_data[:in_example_group]
|
|
93
|
+
raise "Creating isolated shared examples from within a context is " \
|
|
94
|
+
"not allowed. Remove `RSpec.` prefix or move this to a " \
|
|
95
|
+
"top-level scope."
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
RSpec.world.shared_example_group_registry.add(self, name, *args, &block)
|
|
99
|
+
end
|
|
100
|
+
alias shared_context shared_examples
|
|
101
|
+
alias shared_examples_for shared_examples
|
|
102
|
+
|
|
103
|
+
# @api private
|
|
104
|
+
#
|
|
105
|
+
# Shared examples top level DSL.
|
|
106
|
+
module TopLevelDSL
|
|
107
|
+
# @private
|
|
108
|
+
def self.definitions
|
|
109
|
+
proc do
|
|
110
|
+
def shared_examples(name, *args, &block)
|
|
111
|
+
RSpec.world.shared_example_group_registry.add(:main, name, *args, &block)
|
|
112
|
+
end
|
|
113
|
+
alias shared_context shared_examples
|
|
114
|
+
alias shared_examples_for shared_examples
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# @private
|
|
119
|
+
def self.exposed_globally?
|
|
120
|
+
@exposed_globally ||= false
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @api private
|
|
124
|
+
#
|
|
125
|
+
# Adds the top level DSL methods to Module and the top level binding.
|
|
126
|
+
def self.expose_globally!
|
|
127
|
+
return if exposed_globally?
|
|
128
|
+
Core::DSL.change_global_dsl(&definitions)
|
|
129
|
+
@exposed_globally = true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# @api private
|
|
133
|
+
#
|
|
134
|
+
# Removes the top level DSL methods to Module and the top level binding.
|
|
135
|
+
def self.remove_globally!
|
|
136
|
+
return unless exposed_globally?
|
|
137
|
+
|
|
138
|
+
Core::DSL.change_global_dsl do
|
|
139
|
+
undef shared_examples
|
|
140
|
+
undef shared_context
|
|
141
|
+
undef shared_examples_for
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@exposed_globally = false
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @private
|
|
149
|
+
class Registry
|
|
150
|
+
def add(context, name, *metadata_args, &block)
|
|
151
|
+
unless block
|
|
152
|
+
RSpec.warning "Shared example group #{name} was defined without a "\
|
|
153
|
+
"block and will have no effect. Please define a "\
|
|
154
|
+
"block or remove the definition."
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if RSpec.configuration.shared_context_metadata_behavior == :trigger_inclusion
|
|
158
|
+
return legacy_add(context, name, *metadata_args, &block)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
unless valid_name?(name)
|
|
162
|
+
raise ArgumentError, "Shared example group names can only be a string, " \
|
|
163
|
+
"symbol or module but got: #{name.inspect}"
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
ensure_block_has_source_location(block) { CallerFilter.first_non_rspec_line }
|
|
167
|
+
warn_if_key_taken context, name, block
|
|
168
|
+
|
|
169
|
+
metadata = Metadata.build_hash_from(metadata_args)
|
|
170
|
+
shared_module = SharedExampleGroupModule.new(name, block, metadata)
|
|
171
|
+
shared_example_groups[context][name] = shared_module
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def find(lookup_contexts, name)
|
|
175
|
+
lookup_contexts.each do |context|
|
|
176
|
+
found = shared_example_groups[context][name]
|
|
177
|
+
return found if found
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
shared_example_groups[:main][name]
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
private
|
|
184
|
+
|
|
185
|
+
# TODO: remove this in RSpec 4. This exists only to support
|
|
186
|
+
# `config.shared_context_metadata_behavior == :trigger_inclusion`,
|
|
187
|
+
# the legacy behavior of shared context metadata, which we do
|
|
188
|
+
# not want to support in RSpec 4.
|
|
189
|
+
def legacy_add(context, name, *metadata_args, &block)
|
|
190
|
+
ensure_block_has_source_location(block) { CallerFilter.first_non_rspec_line }
|
|
191
|
+
shared_module = SharedExampleGroupModule.new(name, block, {})
|
|
192
|
+
|
|
193
|
+
if valid_name?(name)
|
|
194
|
+
warn_if_key_taken context, name, block
|
|
195
|
+
shared_example_groups[context][name] = shared_module
|
|
196
|
+
else
|
|
197
|
+
metadata_args.unshift name
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
return if metadata_args.empty?
|
|
201
|
+
RSpec.configuration.include shared_module, *metadata_args
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
def shared_example_groups
|
|
205
|
+
@shared_example_groups ||= Hash.new { |hash, context| hash[context] = {} }
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def valid_name?(candidate)
|
|
209
|
+
case candidate
|
|
210
|
+
when String, Symbol, Module then true
|
|
211
|
+
else false
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def warn_if_key_taken(context, key, new_block)
|
|
216
|
+
existing_module = shared_example_groups[context][key]
|
|
217
|
+
return unless existing_module
|
|
218
|
+
|
|
219
|
+
old_definition_location = formatted_location existing_module.definition
|
|
220
|
+
new_definition_location = formatted_location new_block
|
|
221
|
+
loaded_spec_files = RSpec.configuration.loaded_spec_files
|
|
222
|
+
|
|
223
|
+
if loaded_spec_files.include?(new_definition_location) && old_definition_location == new_definition_location
|
|
224
|
+
RSpec.warn_with <<-WARNING.gsub(/^ +\|/, ''), :call_site => nil
|
|
225
|
+
|WARNING: Your shared example group, '#{key}', defined at:
|
|
226
|
+
| #{old_definition_location}
|
|
227
|
+
|was automatically loaded by RSpec because the file name
|
|
228
|
+
|matches the configured autoloading pattern (#{RSpec.configuration.pattern}),
|
|
229
|
+
|and is also being required from somewhere else. To fix this
|
|
230
|
+
|warning, either rename the file to not match the pattern, or
|
|
231
|
+
|do not explicitly require the file.
|
|
232
|
+
WARNING
|
|
233
|
+
else
|
|
234
|
+
RSpec.warn_with <<-WARNING.gsub(/^ +\|/, ''), :call_site => nil
|
|
235
|
+
|WARNING: Shared example group '#{key}' has been previously defined at:
|
|
236
|
+
| #{old_definition_location}
|
|
237
|
+
|...and you are now defining it at:
|
|
238
|
+
| #{new_definition_location}
|
|
239
|
+
|The new definition will overwrite the original one.
|
|
240
|
+
WARNING
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if RUBY_VERSION.to_f >= 1.9
|
|
245
|
+
def formatted_location(block)
|
|
246
|
+
block.source_location.join(":")
|
|
247
|
+
end
|
|
248
|
+
else # 1.8.7
|
|
249
|
+
# :nocov:
|
|
250
|
+
def formatted_location(block)
|
|
251
|
+
block.source_location.join(":").gsub(/:in.*$/, '')
|
|
252
|
+
end
|
|
253
|
+
# :nocov:
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if Proc.method_defined?(:source_location)
|
|
257
|
+
def ensure_block_has_source_location(_block); end
|
|
258
|
+
else # for 1.8.7
|
|
259
|
+
# :nocov:
|
|
260
|
+
def ensure_block_has_source_location(block)
|
|
261
|
+
source_location = yield.split(':')
|
|
262
|
+
block.extend(Module.new { define_method(:source_location) { source_location } })
|
|
263
|
+
end
|
|
264
|
+
# :nocov:
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
instance_exec(&Core::SharedExampleGroup::TopLevelDSL.definitions)
|
|
271
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module RSpec
|
|
2
|
+
module Core
|
|
3
|
+
# @private
|
|
4
|
+
# Deals with the fact that `shellwords` only works on POSIX systems.
|
|
5
|
+
module ShellEscape
|
|
6
|
+
module_function
|
|
7
|
+
|
|
8
|
+
def quote(argument)
|
|
9
|
+
"'#{argument.to_s.gsub("'", "\\\\'")}'"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
if RSpec::Support::OS.windows?
|
|
13
|
+
# :nocov:
|
|
14
|
+
alias escape quote
|
|
15
|
+
# :nocov:
|
|
16
|
+
else
|
|
17
|
+
require 'shellwords'
|
|
18
|
+
|
|
19
|
+
def escape(shell_command)
|
|
20
|
+
Shellwords.escape(shell_command.to_s)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Known shells that require quoting: zsh, csh, tcsh.
|
|
25
|
+
#
|
|
26
|
+
# Feel free to add other shells to this list that are known to
|
|
27
|
+
# allow `rspec ./some_spec.rb[1:1]` syntax without quoting the id.
|
|
28
|
+
#
|
|
29
|
+
# @private
|
|
30
|
+
SHELLS_ALLOWING_UNQUOTED_IDS = %w[ bash ksh fish ]
|
|
31
|
+
|
|
32
|
+
def conditionally_quote(id)
|
|
33
|
+
return id if shell_allows_unquoted_ids?
|
|
34
|
+
quote(id)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def shell_allows_unquoted_ids?
|
|
38
|
+
# Note: ENV['SHELL'] isn't necessarily the shell the user is currently running.
|
|
39
|
+
# According to http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html:
|
|
40
|
+
# "This variable shall represent a pathname of the user's preferred command language interpreter."
|
|
41
|
+
#
|
|
42
|
+
# It's the best we can easily do, though. We err on the side of safety (quoting
|
|
43
|
+
# the id when not actually needed) so it's not a big deal if the user is actually
|
|
44
|
+
# using a different shell.
|
|
45
|
+
SHELLS_ALLOWING_UNQUOTED_IDS.include?(ENV['SHELL'].to_s.split('/').last)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|