pad_character 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.
Files changed (374) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +5 -0
  5. data/CODE_OF_CONDUCT.md +84 -0
  6. data/Gemfile +10 -0
  7. data/Gemfile.lock +35 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +46 -0
  10. data/Rakefile +8 -0
  11. data/lib/pad_character/format_pad_character.rb +6 -0
  12. data/lib/pad_character/version.rb +5 -0
  13. data/lib/pad_character.rb +9 -0
  14. data/pad_character.gemspec +39 -0
  15. data/sig/pad_character.rbs +4 -0
  16. data/vendor/bundle/ruby/2.6.0/bin/htmldiff +29 -0
  17. data/vendor/bundle/ruby/2.6.0/bin/ldiff +29 -0
  18. data/vendor/bundle/ruby/2.6.0/bin/rake +29 -0
  19. data/vendor/bundle/ruby/2.6.0/bin/rspec +29 -0
  20. data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.5.0.gem +0 -0
  21. data/vendor/bundle/ruby/2.6.0/cache/rake-13.0.6.gem +0 -0
  22. data/vendor/bundle/ruby/2.6.0/cache/rspec-3.12.0.gem +0 -0
  23. data/vendor/bundle/ruby/2.6.0/cache/rspec-core-3.12.0.gem +0 -0
  24. data/vendor/bundle/ruby/2.6.0/cache/rspec-expectations-3.12.0.gem +0 -0
  25. data/vendor/bundle/ruby/2.6.0/cache/rspec-mocks-3.12.0.gem +0 -0
  26. data/vendor/bundle/ruby/2.6.0/cache/rspec-support-3.12.0.gem +0 -0
  27. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/.rspec +1 -0
  28. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/Code-of-Conduct.md +74 -0
  29. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/Contributing.md +119 -0
  30. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/History.md +400 -0
  31. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/License.md +39 -0
  32. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/Manifest.txt +59 -0
  33. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/README.rdoc +84 -0
  34. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/Rakefile +121 -0
  35. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/bin/htmldiff +35 -0
  36. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/bin/ldiff +9 -0
  37. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/docs/COPYING.txt +339 -0
  38. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/docs/artistic.txt +127 -0
  39. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/array.rb +7 -0
  40. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/backports.rb +9 -0
  41. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/block.rb +37 -0
  42. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/callbacks.rb +325 -0
  43. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/change.rb +174 -0
  44. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/htmldiff.rb +150 -0
  45. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/hunk.rb +358 -0
  46. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/internals.rb +308 -0
  47. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/ldiff.rb +171 -0
  48. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs/string.rb +5 -0
  49. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff/lcs.rb +739 -0
  50. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/lib/diff-lcs.rb +3 -0
  51. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/change_spec.rb +89 -0
  52. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/diff_spec.rb +51 -0
  53. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/aX +1 -0
  54. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/bXaX +1 -0
  55. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ds1.csv +50 -0
  56. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ds2.csv +51 -0
  57. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff +4 -0
  58. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-c +7 -0
  59. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-e +3 -0
  60. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-f +3 -0
  61. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-u +5 -0
  62. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef +4 -0
  63. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-c +15 -0
  64. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-e +3 -0
  65. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-f +3 -0
  66. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-u +9 -0
  67. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2 +7 -0
  68. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
  69. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
  70. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
  71. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
  72. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
  73. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/new-chef +4 -0
  74. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/new-chef2 +17 -0
  75. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/old-chef +4 -0
  76. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/fixtures/old-chef2 +14 -0
  77. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/hunk_spec.rb +83 -0
  78. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/issues_spec.rb +154 -0
  79. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/lcs_spec.rb +56 -0
  80. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/ldiff_spec.rb +87 -0
  81. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/patch_spec.rb +416 -0
  82. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/sdiff_spec.rb +214 -0
  83. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/spec_helper.rb +374 -0
  84. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/traverse_balanced_spec.rb +310 -0
  85. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.5.0/spec/traverse_sequences_spec.rb +137 -0
  86. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/History.rdoc +2403 -0
  87. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/MIT-LICENSE +21 -0
  88. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/README.rdoc +155 -0
  89. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/command_line_usage.rdoc +158 -0
  90. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/example/Rakefile1 +38 -0
  91. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/example/Rakefile2 +35 -0
  92. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/example/a.c +6 -0
  93. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/example/b.c +6 -0
  94. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/example/main.c +11 -0
  95. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/glossary.rdoc +42 -0
  96. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/jamis.rb +592 -0
  97. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/proto_rake.rdoc +127 -0
  98. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/rake.1 +156 -0
  99. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/rakefile.rdoc +622 -0
  100. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/doc/rational.rdoc +151 -0
  101. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/exe/rake +27 -0
  102. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/application.rb +831 -0
  103. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/backtrace.rb +24 -0
  104. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/clean.rb +78 -0
  105. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/cloneable.rb +17 -0
  106. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/cpu_counter.rb +107 -0
  107. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/default_loader.rb +15 -0
  108. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/dsl_definition.rb +195 -0
  109. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/early_time.rb +22 -0
  110. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/ext/core.rb +26 -0
  111. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/ext/string.rb +176 -0
  112. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/file_creation_task.rb +25 -0
  113. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/file_list.rb +435 -0
  114. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/file_task.rb +54 -0
  115. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/file_utils.rb +134 -0
  116. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/file_utils_ext.rb +134 -0
  117. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/invocation_chain.rb +57 -0
  118. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb +17 -0
  119. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/late_time.rb +18 -0
  120. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/linked_list.rb +112 -0
  121. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/loaders/makefile.rb +54 -0
  122. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/multi_task.rb +14 -0
  123. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/name_space.rb +38 -0
  124. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/packagetask.rb +222 -0
  125. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/phony.rb +16 -0
  126. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/private_reader.rb +21 -0
  127. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/promise.rb +100 -0
  128. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/pseudo_status.rb +30 -0
  129. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/rake_module.rb +67 -0
  130. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb +27 -0
  131. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/rule_recursion_overflow_error.rb +20 -0
  132. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/scope.rb +43 -0
  133. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/task.rb +434 -0
  134. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/task_argument_error.rb +8 -0
  135. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/task_arguments.rb +109 -0
  136. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/task_manager.rb +331 -0
  137. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/tasklib.rb +12 -0
  138. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/testtask.rb +189 -0
  139. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/thread_history_display.rb +49 -0
  140. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/thread_pool.rb +163 -0
  141. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/trace_output.rb +23 -0
  142. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/version.rb +10 -0
  143. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake/win32.rb +51 -0
  144. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/lib/rake.rb +71 -0
  145. data/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/rake.gemspec +100 -0
  146. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.12.0/LICENSE.md +27 -0
  147. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.12.0/README.md +47 -0
  148. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.12.0/lib/rspec/version.rb +5 -0
  149. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.12.0/lib/rspec.rb +3 -0
  150. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/.document +5 -0
  151. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/.yardopts +8 -0
  152. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/Changelog.md +2360 -0
  153. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/LICENSE.md +26 -0
  154. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/README.md +384 -0
  155. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/exe/rspec +4 -0
  156. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/autorun.rb +3 -0
  157. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  158. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/coordinator.rb +62 -0
  159. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  160. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/fork_runner.rb +138 -0
  161. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/server.rb +61 -0
  162. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/shell_command.rb +126 -0
  163. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
  164. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/utilities.rb +69 -0
  165. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb +2385 -0
  166. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration_options.rb +233 -0
  167. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/did_you_mean.rb +46 -0
  168. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb +120 -0
  169. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/dsl.rb +98 -0
  170. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb +666 -0
  171. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb +905 -0
  172. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/example_status_persister.rb +235 -0
  173. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/filter_manager.rb +231 -0
  174. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/flat_map.rb +20 -0
  175. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  176. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  177. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  178. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  179. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  180. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/console_codes.rb +76 -0
  181. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  182. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
  183. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/exception_presenter.rb +525 -0
  184. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
  185. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  186. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/helpers.rb +118 -0
  187. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  188. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_printer.rb +412 -0
  189. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  190. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  191. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  192. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  193. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/protocol.rb +182 -0
  194. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  195. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  196. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters.rb +279 -0
  197. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb +646 -0
  198. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/invocations.rb +87 -0
  199. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb +580 -0
  200. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/metadata.rb +498 -0
  201. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/metadata_filter.rb +255 -0
  202. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  203. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  204. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  205. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  206. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  207. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  208. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/notifications.rb +521 -0
  209. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/option_parser.rb +323 -0
  210. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/ordering.rb +169 -0
  211. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/output_wrapper.rb +29 -0
  212. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/pending.rb +157 -0
  213. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/profiler.rb +34 -0
  214. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/project_initializer/.rspec +1 -0
  215. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +98 -0
  216. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/project_initializer.rb +48 -0
  217. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/rake_task.rb +188 -0
  218. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb +265 -0
  219. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/ruby_project.rb +53 -0
  220. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb +212 -0
  221. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/sandbox.rb +37 -0
  222. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/set.rb +54 -0
  223. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/shared_context.rb +55 -0
  224. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/shared_example_group.rb +271 -0
  225. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/shell_escape.rb +49 -0
  226. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  227. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/version.rb +9 -0
  228. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/warnings.rb +40 -0
  229. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core/world.rb +287 -0
  230. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.12.0/lib/rspec/core.rb +212 -0
  231. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/.document +5 -0
  232. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/.yardopts +6 -0
  233. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/Changelog.md +1285 -0
  234. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/LICENSE.md +25 -0
  235. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/README.md +320 -0
  236. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  237. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/configuration.rb +230 -0
  238. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/expectation_target.rb +163 -0
  239. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/fail_with.rb +39 -0
  240. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/failure_aggregator.rb +212 -0
  241. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/handler.rb +182 -0
  242. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/minitest_integration.rb +58 -0
  243. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/syntax.rb +132 -0
  244. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations/version.rb +8 -0
  245. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/expectations.rb +82 -0
  246. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/aliased_matcher.rb +116 -0
  247. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/all.rb +86 -0
  248. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/base_matcher.rb +198 -0
  249. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/be.rb +191 -0
  250. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/be_between.rb +77 -0
  251. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
  252. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
  253. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/be_within.rb +72 -0
  254. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/change.rb +450 -0
  255. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/compound.rb +290 -0
  256. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/contain_exactly.rb +310 -0
  257. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/count_expectation.rb +169 -0
  258. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/cover.rb +24 -0
  259. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/eq.rb +40 -0
  260. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/eql.rb +34 -0
  261. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/equal.rb +81 -0
  262. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/exist.rb +90 -0
  263. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/has.rb +167 -0
  264. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  265. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/include.rb +206 -0
  266. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/match.rb +106 -0
  267. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/operators.rb +128 -0
  268. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/output.rb +207 -0
  269. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/raise_error.rb +271 -0
  270. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/respond_to.rb +200 -0
  271. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  272. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  273. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/throw_symbol.rb +138 -0
  274. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in/yield.rb +375 -0
  275. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/built_in.rb +53 -0
  276. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/composable.rb +171 -0
  277. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/dsl.rb +544 -0
  278. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/english_phrasing.rb +58 -0
  279. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
  280. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/fail_matchers.rb +42 -0
  281. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/generated_descriptions.rb +41 -0
  282. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/matcher_delegator.rb +35 -0
  283. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers/matcher_protocol.rb +105 -0
  284. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.12.0/lib/rspec/matchers.rb +1044 -0
  285. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/.document +5 -0
  286. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/.yardopts +6 -0
  287. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/Changelog.md +1212 -0
  288. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/LICENSE.md +25 -0
  289. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/README.md +463 -0
  290. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/chain.rb +111 -0
  291. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  292. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  293. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  294. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  295. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  296. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/recorder.rb +295 -0
  297. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  298. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  299. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/any_instance.rb +11 -0
  300. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/argument_list_matcher.rb +115 -0
  301. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/argument_matchers.rb +322 -0
  302. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/configuration.rb +212 -0
  303. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/error_generator.rb +380 -0
  304. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/example_methods.rb +434 -0
  305. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  306. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  307. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  308. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
  309. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/matchers/receive.rb +133 -0
  310. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  311. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  312. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/message_chain.rb +87 -0
  313. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/message_expectation.rb +820 -0
  314. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/method_double.rb +291 -0
  315. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/method_reference.rb +214 -0
  316. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/minitest_integration.rb +68 -0
  317. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/mutate_const.rb +339 -0
  318. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/object_reference.rb +149 -0
  319. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/order_group.rb +81 -0
  320. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/proxy.rb +525 -0
  321. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/space.rb +238 -0
  322. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/standalone.rb +3 -0
  323. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/syntax.rb +325 -0
  324. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/targets.rb +124 -0
  325. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/test_double.rb +171 -0
  326. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/verifying_double.rb +121 -0
  327. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/verifying_message_expectation.rb +55 -0
  328. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
  329. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks/version.rb +9 -0
  330. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.12.0/lib/rspec/mocks.rb +133 -0
  331. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/Changelog.md +364 -0
  332. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/LICENSE.md +23 -0
  333. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/README.md +40 -0
  334. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/caller_filter.rb +83 -0
  335. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/comparable_version.rb +46 -0
  336. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/differ.rb +215 -0
  337. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/directory_maker.rb +63 -0
  338. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/encoded_string.rb +161 -0
  339. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  340. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/hunk_generator.rb +47 -0
  341. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/matcher_definition.rb +42 -0
  342. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb +438 -0
  343. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/mutex.rb +73 -0
  344. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb +275 -0
  345. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  346. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/reentrant_mutex.rb +78 -0
  347. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb +198 -0
  348. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/source/location.rb +21 -0
  349. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/source/node.rb +110 -0
  350. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/source/token.rb +94 -0
  351. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/source.rb +85 -0
  352. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/deprecation_helpers.rb +48 -0
  353. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/diff_helpers.rb +31 -0
  354. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  355. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/in_sub_process.rb +67 -0
  356. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  357. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/shell_out.rb +105 -0
  358. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/stderr_splitter.rb +75 -0
  359. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/string_matcher.rb +45 -0
  360. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  361. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  362. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/spec.rb +82 -0
  363. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/version.rb +7 -0
  364. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/warnings.rb +39 -0
  365. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support/with_keywords_when_needed.rb +33 -0
  366. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.12.0/lib/rspec/support.rb +154 -0
  367. data/vendor/bundle/ruby/2.6.0/specifications/diff-lcs-1.5.0.gemspec +50 -0
  368. data/vendor/bundle/ruby/2.6.0/specifications/rake-13.0.6.gemspec +26 -0
  369. data/vendor/bundle/ruby/2.6.0/specifications/rspec-3.12.0.gemspec +39 -0
  370. data/vendor/bundle/ruby/2.6.0/specifications/rspec-core-3.12.0.gemspec +53 -0
  371. data/vendor/bundle/ruby/2.6.0/specifications/rspec-expectations-3.12.0.gemspec +44 -0
  372. data/vendor/bundle/ruby/2.6.0/specifications/rspec-mocks-3.12.0.gemspec +44 -0
  373. data/vendor/bundle/ruby/2.6.0/specifications/rspec-support-3.12.0.gemspec +36 -0
  374. metadata +419 -0
@@ -0,0 +1,646 @@
1
+ module RSpec
2
+ module Core
3
+ # Provides `before`, `after` and `around` hooks as a means of
4
+ # supporting common setup and teardown. This module is extended
5
+ # onto {ExampleGroup}, making the methods available from any `describe`
6
+ # or `context` block and included in {Configuration}, making them
7
+ # available off of the configuration object to define global setup
8
+ # or teardown logic.
9
+ module Hooks
10
+ # @api public
11
+ #
12
+ # @overload before(&block)
13
+ # @overload before(scope, &block)
14
+ # @param scope [Symbol] `:example`, `:context`, or `:suite`
15
+ # (defaults to `:example`)
16
+ # @overload before(scope, *conditions, &block)
17
+ # @param scope [Symbol] `:example`, `:context`, or `:suite`
18
+ # (defaults to `:example`)
19
+ # @param conditions [Array<Symbol>, Hash] constrains this hook to
20
+ # examples matching these conditions e.g.
21
+ # `before(:example, :ui => true) { ... }` will only run with examples
22
+ # or groups declared with `:ui => true`. Symbols will be transformed
23
+ # into hash entries with `true` values.
24
+ # @overload before(conditions, &block)
25
+ # @param conditions [Hash]
26
+ # constrains this hook to examples matching these conditions e.g.
27
+ # `before(:example, :ui => true) { ... }` will only run with examples
28
+ # or groups declared with `:ui => true`.
29
+ #
30
+ # @see #after
31
+ # @see #around
32
+ # @see ExampleGroup
33
+ # @see SharedContext
34
+ # @see SharedExampleGroup
35
+ # @see Configuration
36
+ #
37
+ # Declare a block of code to be run before each example (using `:example`)
38
+ # or once before any example (using `:context`). These are usually
39
+ # declared directly in the {ExampleGroup} to which they apply, but they
40
+ # can also be shared across multiple groups.
41
+ #
42
+ # You can also use `before(:suite)` to run a block of code before any
43
+ # example groups are run. This should be declared in {RSpec.configure}.
44
+ #
45
+ # Instance variables declared in `before(:example)` or `before(:context)`
46
+ # are accessible within each example.
47
+ #
48
+ # ### Order
49
+ #
50
+ # `before` hooks are stored in three scopes, which are run in order:
51
+ # `:suite`, `:context`, and `:example`. They can also be declared in
52
+ # several different places: `RSpec.configure`, a parent group, the current
53
+ # group. They are run in the following order:
54
+ #
55
+ # before(:suite) # Declared in RSpec.configure.
56
+ # before(:context) # Declared in RSpec.configure.
57
+ # before(:context) # Declared in a parent group.
58
+ # before(:context) # Declared in the current group.
59
+ # before(:example) # Declared in RSpec.configure.
60
+ # before(:example) # Declared in a parent group.
61
+ # before(:example) # Declared in the current group.
62
+ #
63
+ # If more than one `before` is declared within any one example group, they
64
+ # are run in the order in which they are declared. Any `around` hooks will
65
+ # execute after `before` context hooks but before any `before` example
66
+ # hook regardless of where they are declared.
67
+ #
68
+ # ### Conditions
69
+ #
70
+ # When you add a conditions hash to `before(:example)` or
71
+ # `before(:context)`, RSpec will only apply that hook to groups or
72
+ # examples that match the conditions. e.g.
73
+ #
74
+ # RSpec.configure do |config|
75
+ # config.before(:example, :authorized => true) do
76
+ # log_in_as :authorized_user
77
+ # end
78
+ # end
79
+ #
80
+ # RSpec.describe Something, :authorized => true do
81
+ # # The before hook will run in before each example in this group.
82
+ # end
83
+ #
84
+ # RSpec.describe SomethingElse do
85
+ # it "does something", :authorized => true do
86
+ # # The before hook will run before this example.
87
+ # end
88
+ #
89
+ # it "does something else" do
90
+ # # The hook will not run before this example.
91
+ # end
92
+ # end
93
+ #
94
+ # Note that filtered config `:context` hooks can still be applied
95
+ # to individual examples that have matching metadata. Just like
96
+ # Ruby's object model is that every object has a singleton class
97
+ # which has only a single instance, RSpec's model is that every
98
+ # example has a singleton example group containing just the one
99
+ # example.
100
+ #
101
+ # ### Warning: `before(:suite, :with => :conditions)`
102
+ #
103
+ # The conditions hash is used to match against specific examples. Since
104
+ # `before(:suite)` is not run in relation to any specific example or
105
+ # group, conditions passed along with `:suite` are effectively ignored.
106
+ #
107
+ # ### Exceptions
108
+ #
109
+ # When an exception is raised in a `before` block, RSpec skips any
110
+ # subsequent `before` blocks and the example, but runs all of the
111
+ # `after(:example)` and `after(:context)` hooks.
112
+ #
113
+ # ### Warning: implicit before blocks
114
+ #
115
+ # `before` hooks can also be declared in shared contexts which get
116
+ # included implicitly either by you or by extension libraries. Since
117
+ # RSpec runs these in the order in which they are declared within each
118
+ # scope, load order matters, and can lead to confusing results when one
119
+ # before block depends on state that is prepared in another before block
120
+ # that gets run later.
121
+ #
122
+ # ### Warning: `before(:context)`
123
+ #
124
+ # It is very tempting to use `before(:context)` to speed things up, but we
125
+ # recommend that you avoid this as there are a number of gotchas, as well
126
+ # as things that simply don't work.
127
+ #
128
+ # #### Context
129
+ #
130
+ # `before(:context)` is run in an example that is generated to provide
131
+ # group context for the block.
132
+ #
133
+ # #### Instance variables
134
+ #
135
+ # Instance variables declared in `before(:context)` are shared across all
136
+ # the examples in the group. This means that each example can change the
137
+ # state of a shared object, resulting in an ordering dependency that can
138
+ # make it difficult to reason about failures.
139
+ #
140
+ # #### Unsupported RSpec constructs
141
+ #
142
+ # RSpec has several constructs that reset state between each example
143
+ # automatically. These are not intended for use from within
144
+ # `before(:context)`:
145
+ #
146
+ # * `let` declarations
147
+ # * `subject` declarations
148
+ # * Any mocking, stubbing or test double declaration
149
+ #
150
+ # ### other frameworks
151
+ #
152
+ # Mock object frameworks and database transaction managers (like
153
+ # ActiveRecord) are typically designed around the idea of setting up
154
+ # before an example, running that one example, and then tearing down. This
155
+ # means that mocks and stubs can (sometimes) be declared in
156
+ # `before(:context)`, but get torn down before the first real example is
157
+ # ever run.
158
+ #
159
+ # You _can_ create database-backed model objects in a `before(:context)`
160
+ # in rspec-rails, but it will not be wrapped in a transaction for you, so
161
+ # you are on your own to clean up in an `after(:context)` block.
162
+ #
163
+ # @example before(:example) declared in an {ExampleGroup}
164
+ #
165
+ # RSpec.describe Thing do
166
+ # before(:example) do
167
+ # @thing = Thing.new
168
+ # end
169
+ #
170
+ # it "does something" do
171
+ # # Here you can access @thing.
172
+ # end
173
+ # end
174
+ #
175
+ # @example before(:context) declared in an {ExampleGroup}
176
+ #
177
+ # RSpec.describe Parser do
178
+ # before(:context) do
179
+ # File.open(file_to_parse, 'w') do |f|
180
+ # f.write <<-CONTENT
181
+ # stuff in the file
182
+ # CONTENT
183
+ # end
184
+ # end
185
+ #
186
+ # it "parses the file" do
187
+ # Parser.parse(file_to_parse)
188
+ # end
189
+ #
190
+ # after(:context) do
191
+ # File.delete(file_to_parse)
192
+ # end
193
+ # end
194
+ #
195
+ # @note The `:example` and `:context` scopes are also available as
196
+ # `:each` and `:all`, respectively. Use whichever you prefer.
197
+ # @note The `:suite` scope is only supported for hooks registered on
198
+ # `RSpec.configuration` since they exist independently of any
199
+ # example or example group.
200
+ def before(*args, &block)
201
+ hooks.register :append, :before, *args, &block
202
+ end
203
+
204
+ alias_method :append_before, :before
205
+
206
+ # Adds `block` to the front of the list of `before` blocks in the same
207
+ # scope (`:example`, `:context`, or `:suite`).
208
+ #
209
+ # See {#before} for scoping semantics.
210
+ def prepend_before(*args, &block)
211
+ hooks.register :prepend, :before, *args, &block
212
+ end
213
+
214
+ # @api public
215
+ # @overload after(&block)
216
+ # @overload after(scope, &block)
217
+ # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to
218
+ # `:example`)
219
+ # @overload after(scope, *conditions, &block)
220
+ # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to
221
+ # `:example`)
222
+ # @param conditions [Array<Symbol>, Hash] constrains this hook to
223
+ # examples matching these conditions e.g.
224
+ # `after(:example, :ui => true) { ... }` will only run with examples
225
+ # or groups declared with `:ui => true`. Symbols will be transformed
226
+ # into hash entries with `true` values.
227
+ # @overload after(conditions, &block)
228
+ # @param conditions [Hash]
229
+ # constrains this hook to examples matching these conditions e.g.
230
+ # `after(:example, :ui => true) { ... }` will only run with examples
231
+ # or groups declared with `:ui => true`.
232
+ #
233
+ # @see #before
234
+ # @see #around
235
+ # @see ExampleGroup
236
+ # @see SharedContext
237
+ # @see SharedExampleGroup
238
+ # @see Configuration
239
+ #
240
+ # Declare a block of code to be run after each example (using `:example`)
241
+ # or once after all examples n the context (using `:context`). See
242
+ # {#before} for more information about ordering.
243
+ #
244
+ # ### Exceptions
245
+ #
246
+ # `after` hooks are guaranteed to run even when there are exceptions in
247
+ # `before` hooks or examples. When an exception is raised in an after
248
+ # block, the exception is captured for later reporting, and subsequent
249
+ # `after` blocks are run.
250
+ #
251
+ # ### Order
252
+ #
253
+ # `after` hooks are stored in three scopes, which are run in order:
254
+ # `:example`, `:context`, and `:suite`. They can also be declared in
255
+ # several different places: `RSpec.configure`, a parent group, the current
256
+ # group. They are run in the following order:
257
+ #
258
+ # after(:example) # Declared in the current group.
259
+ # after(:example) # Declared in a parent group.
260
+ # after(:example) # Declared in RSpec.configure.
261
+ # after(:context) # Declared in the current group.
262
+ # after(:context) # Declared in a parent group.
263
+ # after(:context) # Declared in RSpec.configure.
264
+ # after(:suite) # Declared in RSpec.configure.
265
+ #
266
+ # This is the reverse of the order in which `before` hooks are run.
267
+ # Similarly, if more than one `after` is declared within any example
268
+ # group, they are run in reverse order of that in which they are declared.
269
+ # Also `around` hooks will run after any `after` example hooks are
270
+ # invoked but before any `after` context hooks.
271
+ #
272
+ # @note The `:example` and `:context` scopes are also available as
273
+ # `:each` and `:all`, respectively. Use whichever you prefer.
274
+ # @note The `:suite` scope is only supported for hooks registered on
275
+ # `RSpec.configuration` since they exist independently of any
276
+ # example or example group.
277
+ def after(*args, &block)
278
+ hooks.register :prepend, :after, *args, &block
279
+ end
280
+
281
+ alias_method :prepend_after, :after
282
+
283
+ # Adds `block` to the back of the list of `after` blocks in the same
284
+ # scope (`:example`, `:context`, or `:suite`).
285
+ #
286
+ # See {#after} for scoping semantics.
287
+ def append_after(*args, &block)
288
+ hooks.register :append, :after, *args, &block
289
+ end
290
+
291
+ # @api public
292
+ # @overload around(&block)
293
+ # @overload around(scope, &block)
294
+ # @param scope [Symbol] `:example` (defaults to `:example`)
295
+ # present for syntax parity with `before` and `after`, but
296
+ # `:example`/`:each` is the only supported value.
297
+ # @overload around(scope, *conditions, &block)
298
+ # @param scope [Symbol] `:example` (defaults to `:example`)
299
+ # present for syntax parity with `before` and `after`, but
300
+ # `:example`/`:each` is the only supported value.
301
+ # @param conditions [Array<Symbol>, Hash] constrains this hook to
302
+ # examples matching these conditions e.g.
303
+ # `around(:example, :ui => true) { ... }` will only run with examples
304
+ # or groups declared with `:ui => true`. Symbols will be transformed
305
+ # into hash entries with `true` values.
306
+ # @overload around(conditions, &block)
307
+ # @param conditions [Hash] constrains this hook to examples matching
308
+ # these conditions e.g. `around(:example, :ui => true) { ... }` will
309
+ # only run with examples or groups declared with `:ui => true`.
310
+ #
311
+ # @yield [Example] the example to run
312
+ #
313
+ # @note the syntax of `around` is similar to that of `before` and `after`
314
+ # but the semantics are quite different. `before` and `after` hooks are
315
+ # run in the context of the examples with which they are associated,
316
+ # whereas `around` hooks are actually responsible for running the
317
+ # examples. Consequently, `around` hooks do not have direct access to
318
+ # resources that are made available within the examples and their
319
+ # associated `before` and `after` hooks.
320
+ #
321
+ # @note `:example`/`:each` is the only supported scope.
322
+ #
323
+ # Declare a block of code, parts of which will be run before and parts
324
+ # after the example. It is your responsibility to run the example:
325
+ #
326
+ # around(:example) do |ex|
327
+ # # Do some stuff before.
328
+ # ex.run
329
+ # # Do some stuff after.
330
+ # end
331
+ #
332
+ # The yielded example aliases `run` with `call`, which lets you treat it
333
+ # like a `Proc`. This is especially handy when working with libraries
334
+ # that manage their own setup and teardown using a block or proc syntax,
335
+ # e.g.
336
+ #
337
+ # around(:example) {|ex| Database.transaction(&ex)}
338
+ # around(:example) {|ex| FakeFS(&ex)}
339
+ #
340
+ # ### Order
341
+ #
342
+ # The `around` hooks execute surrounding an example and its hooks.
343
+ #
344
+ # This means after any `before` context hooks, but before any `before`
345
+ # example hooks, and similarly after any `after` example hooks but before
346
+ # any `after` context hooks.
347
+ #
348
+ # They are not a synonym for `before`/`after`.
349
+ def around(*args, &block)
350
+ hooks.register :prepend, :around, *args, &block
351
+ end
352
+
353
+ # @private
354
+ # Holds the various registered hooks.
355
+ def hooks
356
+ @hooks ||= HookCollections.new(self, FilterableItemRepository::UpdateOptimized)
357
+ end
358
+
359
+ # @private
360
+ Hook = Struct.new(:block, :options)
361
+
362
+ # @private
363
+ class BeforeHook < Hook
364
+ def run(example)
365
+ example.instance_exec(example, &block)
366
+ end
367
+ end
368
+
369
+ # @private
370
+ class AfterHook < Hook
371
+ def run(example)
372
+ example.instance_exec(example, &block)
373
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => ex
374
+ example.set_exception(ex)
375
+ end
376
+ end
377
+
378
+ # @private
379
+ class AfterContextHook < Hook
380
+ def run(example)
381
+ example.instance_exec(example, &block)
382
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => e
383
+ RSpec.configuration.reporter.notify_non_example_exception(e, "An error occurred in an `after(:context)` hook.")
384
+ end
385
+ end
386
+
387
+ # @private
388
+ class AroundHook < Hook
389
+ def execute_with(example, procsy)
390
+ example.instance_exec(procsy, &block)
391
+ return if procsy.executed?
392
+ Pending.mark_skipped!(example,
393
+ "#{hook_description} did not execute the example")
394
+ end
395
+
396
+ if Proc.method_defined?(:source_location)
397
+ def hook_description
398
+ "around hook at #{Metadata.relative_path(block.source_location.join(':'))}"
399
+ end
400
+ else # for 1.8.7
401
+ # :nocov:
402
+ def hook_description
403
+ "around hook"
404
+ end
405
+ # :nocov:
406
+ end
407
+ end
408
+
409
+ # @private
410
+ #
411
+ # This provides the primary API used by other parts of rspec-core. By hiding all
412
+ # implementation details behind this facade, it's allowed us to heavily optimize
413
+ # this, so that, for example, hook collection objects are only instantiated when
414
+ # a hook is added. This allows us to avoid many object allocations for the common
415
+ # case of a group having no hooks.
416
+ #
417
+ # This is only possible because this interface provides a "tell, don't ask"-style
418
+ # API, so that callers _tell_ this class what to do with the hooks, rather than
419
+ # asking this class for a list of hooks, and then doing something with them.
420
+ class HookCollections
421
+ def initialize(owner, filterable_item_repo_class)
422
+ @owner = owner
423
+ @filterable_item_repo_class = filterable_item_repo_class
424
+ @before_example_hooks = nil
425
+ @after_example_hooks = nil
426
+ @before_context_hooks = nil
427
+ @after_context_hooks = nil
428
+ @around_example_hooks = nil
429
+ end
430
+
431
+ def register_globals(host, globals)
432
+ parent_groups = host.parent_groups
433
+
434
+ process(host, parent_groups, globals, :before, :example, &:options)
435
+ process(host, parent_groups, globals, :after, :example, &:options)
436
+ process(host, parent_groups, globals, :around, :example, &:options)
437
+
438
+ process(host, parent_groups, globals, :before, :context, &:options)
439
+ process(host, parent_groups, globals, :after, :context, &:options)
440
+ end
441
+
442
+ def register_global_singleton_context_hooks(example, globals)
443
+ parent_groups = example.example_group.parent_groups
444
+
445
+ process(example, parent_groups, globals, :before, :context) { {} }
446
+ process(example, parent_groups, globals, :after, :context) { {} }
447
+ end
448
+
449
+ def register(prepend_or_append, position, *args, &block)
450
+ scope, options = scope_and_options_from(*args)
451
+
452
+ if scope == :suite
453
+ # TODO: consider making this an error in RSpec 4. For SemVer reasons,
454
+ # we are only warning in RSpec 3.
455
+ RSpec.warn_with "WARNING: `#{position}(:suite)` hooks are only supported on " \
456
+ "the RSpec configuration object. This " \
457
+ "`#{position}(:suite)` hook, registered on an example " \
458
+ "group, will be ignored."
459
+ return
460
+ elsif scope == :context && position == :around
461
+ # TODO: consider making this an error in RSpec 4. For SemVer reasons,
462
+ # we are only warning in RSpec 3.
463
+ RSpec.warn_with "WARNING: `around(:context)` hooks are not supported and " \
464
+ "behave like `around(:example)."
465
+ end
466
+
467
+ hook = HOOK_TYPES[position][scope].new(block, options)
468
+ ensure_hooks_initialized_for(position, scope).__send__(prepend_or_append, hook, options)
469
+ end
470
+
471
+ # @private
472
+ #
473
+ # Runs all of the blocks stored with the hook in the context of the
474
+ # example. If no example is provided, just calls the hook directly.
475
+ def run(position, scope, example_or_group)
476
+ return if RSpec.configuration.dry_run?
477
+
478
+ if scope == :context
479
+ unless example_or_group.class.metadata[:skip]
480
+ run_owned_hooks_for(position, :context, example_or_group)
481
+ end
482
+ else
483
+ case position
484
+ when :before then run_example_hooks_for(example_or_group, :before, :reverse_each)
485
+ when :after then run_example_hooks_for(example_or_group, :after, :each)
486
+ when :around then run_around_example_hooks_for(example_or_group) { yield }
487
+ end
488
+ end
489
+ end
490
+
491
+ SCOPES = [:example, :context]
492
+
493
+ SCOPE_ALIASES = { :each => :example, :all => :context }
494
+
495
+ HOOK_TYPES = {
496
+ :before => Hash.new { BeforeHook },
497
+ :after => Hash.new { AfterHook },
498
+ :around => Hash.new { AroundHook }
499
+ }
500
+
501
+ HOOK_TYPES[:after][:context] = AfterContextHook
502
+
503
+ protected
504
+
505
+ EMPTY_HOOK_ARRAY = [].freeze
506
+
507
+ def matching_hooks_for(position, scope, example_or_group)
508
+ repository = hooks_for(position, scope) { return EMPTY_HOOK_ARRAY }
509
+
510
+ # It would be nice to not have to switch on type here, but
511
+ # we don't want to define `ExampleGroup#metadata` because then
512
+ # `metadata` from within an individual example would return the
513
+ # group's metadata but the user would probably expect it to be
514
+ # the example's metadata.
515
+ metadata = case example_or_group
516
+ when ExampleGroup then example_or_group.class.metadata
517
+ else example_or_group.metadata
518
+ end
519
+
520
+ repository.items_for(metadata)
521
+ end
522
+
523
+ def all_hooks_for(position, scope)
524
+ hooks_for(position, scope) { return EMPTY_HOOK_ARRAY }.items_and_filters.map(&:first)
525
+ end
526
+
527
+ def run_owned_hooks_for(position, scope, example_or_group)
528
+ matching_hooks_for(position, scope, example_or_group).each do |hook|
529
+ hook.run(example_or_group)
530
+ end
531
+ end
532
+
533
+ def processable_hooks_for(position, scope, host)
534
+ if scope == :example
535
+ all_hooks_for(position, scope)
536
+ else
537
+ matching_hooks_for(position, scope, host)
538
+ end
539
+ end
540
+
541
+ private
542
+
543
+ def hooks_for(position, scope)
544
+ if position == :before
545
+ scope == :example ? @before_example_hooks : @before_context_hooks
546
+ elsif position == :after
547
+ scope == :example ? @after_example_hooks : @after_context_hooks
548
+ else # around
549
+ @around_example_hooks
550
+ end || yield
551
+ end
552
+
553
+ def ensure_hooks_initialized_for(position, scope)
554
+ if position == :before
555
+ if scope == :example
556
+ @before_example_hooks ||= @filterable_item_repo_class.new(:all?)
557
+ else
558
+ @before_context_hooks ||= @filterable_item_repo_class.new(:all?)
559
+ end
560
+ elsif position == :after
561
+ if scope == :example
562
+ @after_example_hooks ||= @filterable_item_repo_class.new(:all?)
563
+ else
564
+ @after_context_hooks ||= @filterable_item_repo_class.new(:all?)
565
+ end
566
+ else # around
567
+ @around_example_hooks ||= @filterable_item_repo_class.new(:all?)
568
+ end
569
+ end
570
+
571
+ def process(host, parent_groups, globals, position, scope)
572
+ hooks_to_process = globals.processable_hooks_for(position, scope, host)
573
+ return if hooks_to_process.empty?
574
+
575
+ hooks_to_process -= FlatMap.flat_map(parent_groups) do |group|
576
+ group.hooks.all_hooks_for(position, scope)
577
+ end
578
+ return if hooks_to_process.empty?
579
+
580
+ repository = ensure_hooks_initialized_for(position, scope)
581
+ hooks_to_process.each { |hook| repository.append hook, (yield hook) }
582
+ end
583
+
584
+ def scope_and_options_from(*args)
585
+ return :suite if args.first == :suite
586
+ scope = extract_scope_from(args)
587
+ meta = Metadata.build_hash_from(args, :warn_about_example_group_filtering)
588
+ return scope, meta
589
+ end
590
+
591
+ def extract_scope_from(args)
592
+ if known_scope?(args.first)
593
+ normalized_scope_for(args.shift)
594
+ elsif args.any? { |a| a.is_a?(Symbol) }
595
+ error_message = "You must explicitly give a scope " \
596
+ "(#{SCOPES.join(", ")}) or scope alias " \
597
+ "(#{SCOPE_ALIASES.keys.join(", ")}) when using symbols as " \
598
+ "metadata for a hook."
599
+ raise ArgumentError.new error_message
600
+ else
601
+ :example
602
+ end
603
+ end
604
+
605
+ def known_scope?(scope)
606
+ SCOPES.include?(scope) || SCOPE_ALIASES.keys.include?(scope)
607
+ end
608
+
609
+ def normalized_scope_for(scope)
610
+ SCOPE_ALIASES[scope] || scope
611
+ end
612
+
613
+ def run_example_hooks_for(example, position, each_method)
614
+ owner_parent_groups.__send__(each_method) do |group|
615
+ group.hooks.run_owned_hooks_for(position, :example, example)
616
+ end
617
+ end
618
+
619
+ def run_around_example_hooks_for(example)
620
+ hooks = FlatMap.flat_map(owner_parent_groups) do |group|
621
+ group.hooks.matching_hooks_for(:around, :example, example)
622
+ end
623
+
624
+ return yield if hooks.empty? # exit early to avoid the extra allocation cost of `Example::Procsy`
625
+
626
+ initial_procsy = Example::Procsy.new(example) { yield }
627
+ hooks.inject(initial_procsy) do |procsy, around_hook|
628
+ procsy.wrap { around_hook.execute_with(example, procsy) }
629
+ end.call
630
+ end
631
+
632
+ if respond_to?(:singleton_class) && singleton_class.ancestors.include?(singleton_class)
633
+ def owner_parent_groups
634
+ @owner.parent_groups
635
+ end
636
+ else # Ruby < 2.1 (see https://bugs.ruby-lang.org/issues/8035)
637
+ # :nocov:
638
+ def owner_parent_groups
639
+ @owner_parent_groups ||= [@owner] + @owner.parent_groups
640
+ end
641
+ # :nocov:
642
+ end
643
+ end
644
+ end
645
+ end
646
+ end