xaiml 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (780) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.reek.yml +95 -0
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +21 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +4 -0
  8. data/CODE_OF_CONDUCT.md +49 -0
  9. data/Gemfile +4 -0
  10. data/README.md +35 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/lib/xaiml/document.rb +87 -0
  15. data/lib/xaiml/element/base.rb +19 -0
  16. data/lib/xaiml/element/category.rb +12 -0
  17. data/lib/xaiml/element/condition.rb +7 -0
  18. data/lib/xaiml/element/conditional_random.rb +7 -0
  19. data/lib/xaiml/element/ext.rb +7 -0
  20. data/lib/xaiml/element/topic.rb +7 -0
  21. data/lib/xaiml/element.rb +28 -0
  22. data/lib/xaiml/exceptions.rb +4 -0
  23. data/lib/xaiml/version.rb +3 -0
  24. data/lib/xaiml.rb +9 -0
  25. data/vendor/bundle/ruby/2.5.0/bin/coderay +27 -0
  26. data/vendor/bundle/ruby/2.5.0/bin/htmldiff +29 -0
  27. data/vendor/bundle/ruby/2.5.0/bin/ldiff +29 -0
  28. data/vendor/bundle/ruby/2.5.0/bin/pry +27 -0
  29. data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
  30. data/vendor/bundle/ruby/2.5.0/bin/rspec +27 -0
  31. data/vendor/bundle/ruby/2.5.0/cache/coderay-1.1.2.gem +0 -0
  32. data/vendor/bundle/ruby/2.5.0/cache/diff-lcs-1.3.gem +0 -0
  33. data/vendor/bundle/ruby/2.5.0/cache/method_source-0.9.0.gem +0 -0
  34. data/vendor/bundle/ruby/2.5.0/cache/ox-2.10.0.gem +0 -0
  35. data/vendor/bundle/ruby/2.5.0/cache/pry-0.11.3.gem +0 -0
  36. data/vendor/bundle/ruby/2.5.0/cache/rake-10.5.0.gem +0 -0
  37. data/vendor/bundle/ruby/2.5.0/cache/rspec-3.8.0.gem +0 -0
  38. data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.8.0.gem +0 -0
  39. data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.8.1.gem +0 -0
  40. data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.8.0.gem +0 -0
  41. data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.8.0.gem +0 -0
  42. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/gem.build_complete +0 -0
  43. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/gem_make.out +93 -0
  44. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/ox.bundle +0 -0
  45. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/MIT-LICENSE +22 -0
  46. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/README_INDEX.rdoc +123 -0
  47. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/bin/coderay +215 -0
  48. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/duo.rb +81 -0
  49. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +17 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +25 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +39 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +49 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +63 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +23 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +190 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +58 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +65 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +108 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +166 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +333 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +83 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +45 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +59 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +18 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +24 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +23 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +95 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +195 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +46 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +111 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +72 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +50 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders.rb +18 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +95 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +151 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +55 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +221 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +72 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +24 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +189 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +217 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +217 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +196 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +75 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +144 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +221 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +81 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +208 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +268 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +168 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +275 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +421 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +174 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +237 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +98 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +280 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +527 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +287 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +75 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +178 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +79 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +477 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +232 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +337 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +169 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +36 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +26 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +17 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +140 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners.rb +27 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +7 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +153 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/style.rb +18 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles.rb +15 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +85 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/tokens.rb +161 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +55 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/version.rb +3 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay.rb +284 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/.rspec +1 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Contributing.md +83 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/History.md +220 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/License.md +39 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/README.rdoc +84 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Rakefile +57 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.gemtest +0 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.travis.yml +30 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.yardopts +1 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/Gemfile +2 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/LICENSE +25 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/README.markdown +91 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/Rakefile +80 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/code_helpers.rb +154 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/source_location.rb +138 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/version.rb +3 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source.rb +141 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/method_source.gemspec +34 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/method_source/code_helpers_spec.rb +43 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/method_source_spec.rb +143 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/spec_helper.rb +101 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/CHANGELOG.md +455 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/LICENSE +21 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/README.md +307 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/.sitearchdir.time +0 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/Makefile +264 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/attr.h +84 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.c +99 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.h +18 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.o +0 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/buf.h +160 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/builder.c +937 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/builder.o +0 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.c +160 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.h +19 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.o +0 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.c +109 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.h +23 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.o +0 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/dump.c +1321 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/dump.o +0 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.c +43 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h +36 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.o +0 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/extconf.rb +67 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/gen_load.c +492 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/gen_load.o +0 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/hash_load.c +228 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/hash_load.o +0 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/helper.h +91 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/obj_load.c +986 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/obj_load.o +0 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.bundle +0 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.c +1562 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.h +279 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.o +0 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/parse.c +1177 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/parse.o +0 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.c +1750 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.h +55 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.o +0 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_as.c +276 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_as.o +0 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.c +228 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.h +222 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.o +0 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_has.h +53 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.c +216 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.h +40 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.o +0 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_stack.h +85 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.c +51 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.h +13 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.o +0 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/type.h +39 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/bag.rb +99 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/cdata.rb +12 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/comment.rb +13 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/doctype.rb +13 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/document.rb +30 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/element.rb +319 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/error.rb +24 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/hasattrs.rb +48 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/instruct.rb +36 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/node.rb +24 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/raw.rb +14 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/sax.rb +113 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/version.rb +5 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/xmlrpc_adapter.rb +34 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox.bundle +0 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox.rb +79 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/CHANGELOG.md +797 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/LICENSE +25 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/README.md +407 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/bin/pry +12 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/basic_object.rb +6 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/cli.rb +225 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/code_file.rb +109 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/code_range.rb +71 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/loc.rb +92 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code.rb +353 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code_object.rb +195 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/color_printer.rb +64 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/command.rb +716 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/command_set.rb +450 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/amend_line.rb +99 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/bang.rb +20 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/bang_pry.rb +17 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/abstract_formatter.rb +27 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/exception_formatter.rb +78 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/file_formatter.rb +71 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/input_expression_formatter.rb +43 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat.rb +62 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cd.rb +41 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/change_inspector.rb +27 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/change_prompt.rb +26 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/code_collector.rb +167 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/disable_pry.rb +27 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/disabled_commands.rb +2 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/easter_eggs.rb +112 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit/exception_patcher.rb +25 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit/file_and_line_locator.rb +36 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit.rb +199 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit.rb +42 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit_all.rb +29 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit_program.rb +23 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/find_method.rb +193 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/fix_indent.rb +19 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_cd.rb +26 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_install.rb +32 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_list.rb +33 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb +29 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_readme.rb +25 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_search.rb +40 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gist.rb +101 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/help.rb +164 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/hist.rb +180 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/import_set.rb +22 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/install_command.rb +53 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/jump_to.rb +29 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/list_inspectors.rb +35 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/list_prompts.rb +35 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/constants.rb +58 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/formatter.rb +50 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/globals.rb +48 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/grep.rb +21 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/instance_vars.rb +39 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/interrogatable.rb +18 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/jruby_hacks.rb +49 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/local_names.rb +35 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/local_vars.rb +39 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/ls_entity.rb +70 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/methods.rb +57 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/methods_helper.rb +46 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb +34 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls.rb +116 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/nesting.rb +25 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/play.rb +103 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/pry_backtrace.rb +25 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/pry_version.rb +17 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/raise_up.rb +32 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/reload_code.rb +62 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/reset.rb +18 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ri.rb +64 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/save_file.rb +61 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/shell_command.rb +74 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/shell_mode.rb +25 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_doc.rb +83 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_info.rb +209 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_input.rb +17 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_source.rb +50 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/simple_prompt.rb +22 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/stat.rb +40 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/switch_to.rb +23 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/toggle_color.rb +24 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/watch_expression/expression.rb +38 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/watch_expression.rb +105 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/whereami.rb +197 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/wtf.rb +57 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands.rb +6 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/behavior.rb +231 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/convenience.rb +25 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/default.rb +149 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/memoization.rb +44 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config.rb +11 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/core_extensions.rb +141 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/editor.rb +135 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/exceptions.rb +78 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/forwardable.rb +23 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/base_helpers.rb +71 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/command_helpers.rb +156 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/documentation_helpers.rb +76 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/options_helpers.rb +27 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/table.rb +109 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/text.rb +116 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers.rb +5 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/history.rb +148 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/history_array.rb +121 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/hooks.rb +171 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/indent.rb +410 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/input_completer.rb +260 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/input_lock.rb +132 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/inspector.rb +27 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/last_exception.rb +61 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/disowned.rb +54 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/patcher.rb +122 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/weird_method_locator.rb +199 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method.rb +546 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/object_path.rb +82 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/output.rb +49 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pager.rb +242 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/platform.rb +93 -0
  363. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/plugins.rb +118 -0
  364. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/prompt.rb +26 -0
  365. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb +401 -0
  366. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pry_instance.rb +666 -0
  367. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/rbx_path.rb +22 -0
  368. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/repl.rb +232 -0
  369. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/repl_file_loader.rb +74 -0
  370. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/rubygem.rb +84 -0
  371. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/LICENSE +20 -0
  372. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/commands.rb +196 -0
  373. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/option.rb +208 -0
  374. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop.rb +661 -0
  375. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/terminal.rb +90 -0
  376. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb +15 -0
  377. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/mockable.rb +14 -0
  378. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/pry_tester.rb +73 -0
  379. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/utility.rb +26 -0
  380. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/variables.rb +46 -0
  381. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable.rb +70 -0
  382. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/version.rb +3 -0
  383. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/wrapped_module/candidate.rb +131 -0
  384. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/wrapped_module.rb +378 -0
  385. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry.rb +162 -0
  386. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.autotest +7 -0
  387. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.rubocop.yml +27 -0
  388. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.togglerc +7 -0
  389. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
  390. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/History.rdoc +659 -0
  391. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/MIT-LICENSE +21 -0
  392. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Manifest.txt +166 -0
  393. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/README.rdoc +139 -0
  394. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Rakefile +81 -0
  395. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/bin/rake +33 -0
  396. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
  397. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
  398. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
  399. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/a.c +6 -0
  400. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/b.c +6 -0
  401. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/main.c +11 -0
  402. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
  403. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/jamis.rb +591 -0
  404. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
  405. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rake.1 +141 -0
  406. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
  407. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rational.rdoc +151 -0
  408. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
  409. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
  410. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
  411. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
  412. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
  413. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
  414. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
  415. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
  416. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
  417. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
  418. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
  419. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
  420. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
  421. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
  422. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
  423. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
  424. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
  425. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/application.rb +790 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
  460. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
  461. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
  462. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
  463. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
  464. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
  465. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
  466. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
  468. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
  476. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
  477. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
  478. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
  479. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
  480. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
  481. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
  482. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  483. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
  484. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
  485. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task.rb +383 -0
  486. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
  487. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
  488. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
  489. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
  490. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
  491. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
  492. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
  493. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
  494. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/version.rb +7 -0
  495. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake.rb +79 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/publish.rake +20 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
  499. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/file_creation.rb +34 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/helper.rb +129 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
  502. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
  503. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
  504. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake.rb +40 -0
  505. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
  506. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
  507. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
  508. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
  509. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
  510. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
  511. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
  512. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
  513. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
  514. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
  515. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
  516. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
  517. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
  518. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
  536. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
  537. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
  538. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
  539. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
  540. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
  541. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
  542. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
  543. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
  544. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
  545. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
  546. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
  547. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
  548. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
  549. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
  550. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
  551. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
  552. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/LICENSE.md +27 -0
  553. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/README.md +43 -0
  554. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec/version.rb +5 -0
  555. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec.rb +3 -0
  556. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/.document +5 -0
  557. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/.yardopts +8 -0
  558. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/Changelog.md +2221 -0
  559. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/LICENSE.md +26 -0
  560. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/README.md +384 -0
  561. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/exe/rspec +4 -0
  562. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/autorun.rb +3 -0
  563. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  564. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/coordinator.rb +62 -0
  565. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  566. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
  567. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/server.rb +61 -0
  568. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_command.rb +126 -0
  569. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
  570. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/utilities.rb +58 -0
  571. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb +2289 -0
  572. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration_options.rb +233 -0
  573. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/drb.rb +113 -0
  574. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/dsl.rb +98 -0
  575. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb +653 -0
  576. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb +885 -0
  577. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_status_persister.rb +235 -0
  578. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/filter_manager.rb +231 -0
  579. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/flat_map.rb +20 -0
  580. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  581. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  582. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  583. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  584. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  585. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/console_codes.rb +68 -0
  586. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  587. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
  588. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/exception_presenter.rb +497 -0
  589. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  590. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/helpers.rb +110 -0
  591. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  592. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_printer.rb +414 -0
  593. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  594. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  595. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  596. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  597. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/protocol.rb +182 -0
  598. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  599. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  600. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb +269 -0
  601. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb +624 -0
  602. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/invocations.rb +87 -0
  603. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb +535 -0
  604. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata.rb +499 -0
  605. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata_filter.rb +255 -0
  606. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  607. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  608. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  609. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  610. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  611. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  612. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/notifications.rb +521 -0
  613. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/option_parser.rb +309 -0
  614. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ordering.rb +158 -0
  615. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb +29 -0
  616. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/pending.rb +165 -0
  617. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/profiler.rb +34 -0
  618. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/.rspec +1 -0
  619. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
  620. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer.rb +48 -0
  621. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/rake_task.rb +168 -0
  622. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb +257 -0
  623. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ruby_project.rb +53 -0
  624. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb +199 -0
  625. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/sandbox.rb +37 -0
  626. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/set.rb +54 -0
  627. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_context.rb +55 -0
  628. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_example_group.rb +269 -0
  629. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shell_escape.rb +49 -0
  630. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  631. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/version.rb +9 -0
  632. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/warnings.rb +40 -0
  633. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/world.rb +275 -0
  634. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core.rb +185 -0
  635. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/.document +5 -0
  636. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/.yardopts +6 -0
  637. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/Changelog.md +1110 -0
  638. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/LICENSE.md +25 -0
  639. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/README.md +305 -0
  640. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  641. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/configuration.rb +215 -0
  642. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb +127 -0
  643. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/fail_with.rb +39 -0
  644. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
  645. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb +170 -0
  646. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/minitest_integration.rb +58 -0
  647. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/syntax.rb +132 -0
  648. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/version.rb +8 -0
  649. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations.rb +82 -0
  650. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
  651. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/all.rb +85 -0
  652. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  653. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be.rb +288 -0
  654. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
  655. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
  656. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
  657. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
  658. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb +426 -0
  659. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/compound.rb +271 -0
  660. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  661. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/cover.rb +24 -0
  662. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eq.rb +40 -0
  663. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eql.rb +34 -0
  664. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/equal.rb +81 -0
  665. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/exist.rb +90 -0
  666. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/has.rb +103 -0
  667. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  668. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/include.rb +149 -0
  669. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/match.rb +106 -0
  670. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/operators.rb +128 -0
  671. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/output.rb +200 -0
  672. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  673. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/respond_to.rb +165 -0
  674. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  675. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  676. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  677. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/yield.rb +432 -0
  678. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in.rb +52 -0
  679. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/composable.rb +171 -0
  680. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/dsl.rb +527 -0
  681. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/english_phrasing.rb +58 -0
  682. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  683. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/fail_matchers.rb +42 -0
  684. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/generated_descriptions.rb +41 -0
  685. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
  686. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
  687. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers.rb +1034 -0
  688. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/.document +5 -0
  689. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/.yardopts +6 -0
  690. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/Changelog.md +1100 -0
  691. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/LICENSE.md +25 -0
  692. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/README.md +460 -0
  693. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
  694. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  695. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  696. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  697. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  698. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  699. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
  700. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  701. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  702. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance.rb +11 -0
  703. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  704. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_matchers.rb +320 -0
  705. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/configuration.rb +212 -0
  706. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/error_generator.rb +369 -0
  707. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/example_methods.rb +434 -0
  708. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  709. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  710. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  711. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
  712. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive.rb +132 -0
  713. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  714. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  715. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_chain.rb +87 -0
  716. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb +741 -0
  717. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_double.rb +287 -0
  718. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_reference.rb +202 -0
  719. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/minitest_integration.rb +68 -0
  720. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/mutate_const.rb +339 -0
  721. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/object_reference.rb +149 -0
  722. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/order_group.rb +81 -0
  723. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/proxy.rb +485 -0
  724. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/space.rb +238 -0
  725. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/standalone.rb +3 -0
  726. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/syntax.rb +325 -0
  727. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/targets.rb +124 -0
  728. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/test_double.rb +171 -0
  729. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_double.rb +129 -0
  730. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  731. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
  732. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/version.rb +9 -0
  733. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks.rb +130 -0
  734. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/Changelog.md +242 -0
  735. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/LICENSE.md +23 -0
  736. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/README.md +40 -0
  737. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/caller_filter.rb +83 -0
  738. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/comparable_version.rb +46 -0
  739. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/differ.rb +215 -0
  740. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/directory_maker.rb +63 -0
  741. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/encoded_string.rb +165 -0
  742. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  743. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/hunk_generator.rb +47 -0
  744. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/matcher_definition.rb +42 -0
  745. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/method_signature_verifier.rb +426 -0
  746. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/mutex.rb +73 -0
  747. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/object_formatter.rb +275 -0
  748. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  749. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/reentrant_mutex.rb +53 -0
  750. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/ruby_features.rb +176 -0
  751. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/location.rb +21 -0
  752. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/node.rb +110 -0
  753. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/token.rb +87 -0
  754. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source.rb +75 -0
  755. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  756. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  757. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
  758. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  759. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/shell_out.rb +84 -0
  760. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  761. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  762. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  763. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  764. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec.rb +81 -0
  765. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/version.rb +7 -0
  766. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/warnings.rb +39 -0
  767. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support.rb +149 -0
  768. data/vendor/bundle/ruby/2.5.0/specifications/coderay-1.1.2.gemspec +26 -0
  769. data/vendor/bundle/ruby/2.5.0/specifications/diff-lcs-1.3.gemspec +61 -0
  770. data/vendor/bundle/ruby/2.5.0/specifications/method_source-0.9.0.gemspec +34 -0
  771. data/vendor/bundle/ruby/2.5.0/specifications/ox-2.10.0.gemspec +0 -0
  772. data/vendor/bundle/ruby/2.5.0/specifications/pry-0.11.3.gemspec +41 -0
  773. data/vendor/bundle/ruby/2.5.0/specifications/rake-10.5.0.gemspec +43 -0
  774. data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.8.0.gemspec +42 -0
  775. data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.8.0.gemspec +62 -0
  776. data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.8.1.gemspec +50 -0
  777. data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.8.0.gemspec +50 -0
  778. data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.8.0.gemspec +41 -0
  779. data/xaiml.gemspec +25 -0
  780. metadata +891 -0
@@ -0,0 +1,2289 @@
1
+ RSpec::Support.require_rspec_core "backtrace_formatter"
2
+ RSpec::Support.require_rspec_core "ruby_project"
3
+ RSpec::Support.require_rspec_core "formatters/deprecation_formatter"
4
+ RSpec::Support.require_rspec_core "output_wrapper"
5
+
6
+ module RSpec
7
+ module Core
8
+ # rubocop:disable Metrics/ClassLength
9
+
10
+ # Stores runtime configuration information.
11
+ #
12
+ # Configuration options are loaded from multiple files and joined together
13
+ # with command-line switches and the `SPEC_OPTS` environment variable.
14
+ #
15
+ # Precedence order (where later entries overwrite earlier entries on
16
+ # conflicts):
17
+ #
18
+ # * Global (`$XDG_CONFIG_HOME/rspec/options`, or `~/.rspec` if it does
19
+ # not exist)
20
+ # * Project-specific (`./.rspec`)
21
+ # * Local (`./.rspec-local`)
22
+ # * Command-line options
23
+ # * `SPEC_OPTS`
24
+ #
25
+ # For example, an option set in the local file will override an option set
26
+ # in your global file.
27
+ #
28
+ # The global, project-specific and local files can all be overridden with a
29
+ # separate custom file using the --options command-line parameter.
30
+ #
31
+ # @example Standard settings
32
+ # RSpec.configure do |c|
33
+ # c.drb = true
34
+ # c.drb_port = 1234
35
+ # c.default_path = 'behavior'
36
+ # end
37
+ #
38
+ # @example Hooks
39
+ # RSpec.configure do |c|
40
+ # c.before(:suite) { establish_connection }
41
+ # c.before(:example) { log_in_as :authorized }
42
+ # c.around(:example) { |ex| Database.transaction(&ex) }
43
+ # end
44
+ #
45
+ # @see RSpec.configure
46
+ # @see Hooks
47
+ class Configuration
48
+ include RSpec::Core::Hooks
49
+
50
+ # Module that holds `attr_reader` declarations. It's in a separate
51
+ # module to allow us to override those methods and use `super`.
52
+ # @private
53
+ Readers = Module.new
54
+ include Readers
55
+
56
+ # @private
57
+ class MustBeConfiguredBeforeExampleGroupsError < StandardError; end
58
+
59
+ # @private
60
+ def self.define_reader(name)
61
+ Readers.class_eval do
62
+ remove_method name if method_defined?(name)
63
+ attr_reader name
64
+ end
65
+
66
+ define_method(name) { value_for(name) { super() } }
67
+ end
68
+
69
+ # @private
70
+ def self.define_aliases(name, alias_name)
71
+ alias_method alias_name, name
72
+ alias_method "#{alias_name}=", "#{name}="
73
+ define_predicate_for alias_name
74
+ end
75
+
76
+ # @private
77
+ def self.define_predicate_for(*names)
78
+ names.each { |name| alias_method "#{name}?", name }
79
+ end
80
+
81
+ # @private
82
+ #
83
+ # Invoked by the `add_setting` instance method. Use that method on a
84
+ # `Configuration` instance rather than this class method.
85
+ def self.add_setting(name, opts={})
86
+ raise "Use the instance add_setting method if you want to set a default" if opts.key?(:default)
87
+ attr_writer name
88
+ add_read_only_setting name
89
+
90
+ Array(opts[:alias_with]).each do |alias_name|
91
+ define_aliases(name, alias_name)
92
+ end
93
+ end
94
+
95
+ # @private
96
+ #
97
+ # As `add_setting` but only add the reader.
98
+ def self.add_read_only_setting(name, opts={})
99
+ raise "Use the instance add_setting method if you want to set a default" if opts.key?(:default)
100
+ define_reader name
101
+ define_predicate_for name
102
+ end
103
+
104
+ # @macro [attach] add_setting
105
+ # @!attribute [rw] $1
106
+ #
107
+ # @macro [attach] define_reader
108
+ # @!attribute [r] $1
109
+
110
+ # @macro add_setting
111
+ # Path to use if no path is provided to the `rspec` command (default:
112
+ # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to
113
+ # run all the examples in the `spec` directory.
114
+ #
115
+ # @note Other scripts invoking `rspec` indirectly will ignore this
116
+ # setting.
117
+ # @return [String]
118
+ add_read_only_setting :default_path
119
+ def default_path=(path)
120
+ project_source_dirs << path
121
+ @default_path = path
122
+ end
123
+
124
+ # @macro add_setting
125
+ # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb
126
+ # server, but you can use tools like spork.
127
+ # @return [Boolean]
128
+ add_setting :drb
129
+
130
+ # @macro add_setting
131
+ # The drb_port (default: nil).
132
+ add_setting :drb_port
133
+
134
+ # @macro add_setting
135
+ # Default: `$stderr`.
136
+ add_setting :error_stream
137
+
138
+ # Indicates if the DSL has been exposed off of modules and `main`.
139
+ # Default: true
140
+ # @return [Boolean]
141
+ def expose_dsl_globally?
142
+ Core::DSL.exposed_globally?
143
+ end
144
+
145
+ # Use this to expose the core RSpec DSL via `Module` and the `main`
146
+ # object. It will be set automatically but you can override it to
147
+ # remove the DSL.
148
+ # Default: true
149
+ def expose_dsl_globally=(value)
150
+ if value
151
+ Core::DSL.expose_globally!
152
+ Core::SharedExampleGroup::TopLevelDSL.expose_globally!
153
+ else
154
+ Core::DSL.remove_globally!
155
+ Core::SharedExampleGroup::TopLevelDSL.remove_globally!
156
+ end
157
+ end
158
+
159
+ # Determines where deprecation warnings are printed.
160
+ # Defaults to `$stderr`.
161
+ # @return [IO, String] IO or filename to write to
162
+ define_reader :deprecation_stream
163
+
164
+ # Determines where deprecation warnings are printed.
165
+ # @param value [IO, String] IO to write to or filename to write to
166
+ def deprecation_stream=(value)
167
+ if @reporter && !value.equal?(@deprecation_stream)
168
+ warn "RSpec's reporter has already been initialized with " \
169
+ "#{deprecation_stream.inspect} as the deprecation stream, so your change to "\
170
+ "`deprecation_stream` will be ignored. You should configure it earlier for " \
171
+ "it to take effect, or use the `--deprecation-out` CLI option. " \
172
+ "(Called from #{CallerFilter.first_non_rspec_line})"
173
+ else
174
+ @deprecation_stream = value
175
+ end
176
+ end
177
+
178
+ # @macro define_reader
179
+ # The file path to use for persisting example statuses. Necessary for the
180
+ # `--only-failures` and `--next-failure` CLI options.
181
+ #
182
+ # @overload example_status_persistence_file_path
183
+ # @return [String] the file path
184
+ # @overload example_status_persistence_file_path=(value)
185
+ # @param value [String] the file path
186
+ define_reader :example_status_persistence_file_path
187
+
188
+ # Sets the file path to use for persisting example statuses. Necessary for the
189
+ # `--only-failures` and `--next-failure` CLI options.
190
+ def example_status_persistence_file_path=(value)
191
+ @example_status_persistence_file_path = value
192
+ clear_values_derived_from_example_status_persistence_file_path
193
+ end
194
+
195
+ # @macro define_reader
196
+ # Indicates if the `--only-failures` (or `--next-failure`) flag is being used.
197
+ define_reader :only_failures
198
+ alias_method :only_failures?, :only_failures
199
+
200
+ # @private
201
+ def only_failures_but_not_configured?
202
+ only_failures? && !example_status_persistence_file_path
203
+ end
204
+
205
+ # @macro add_setting
206
+ # If specified, indicates the number of failures required before cleaning
207
+ # up and exit (default: `nil`).
208
+ add_setting :fail_fast
209
+
210
+ # @macro add_setting
211
+ # Prints the formatter output of your suite without running any
212
+ # examples or hooks.
213
+ add_setting :dry_run
214
+
215
+ # @macro add_setting
216
+ # The exit code to return if there are any failures (default: 1).
217
+ # @return [Integer]
218
+ add_setting :failure_exit_code
219
+
220
+ # @macro add_setting
221
+ # Whether or not to fail when there are no RSpec examples (default: false).
222
+ # @return [Boolean]
223
+ add_setting :fail_if_no_examples
224
+
225
+ # @macro define_reader
226
+ # Indicates files configured to be required.
227
+ # @return [Array<String>]
228
+ define_reader :requires
229
+
230
+ # @macro define_reader
231
+ # Returns dirs that have been prepended to the load path by the `-I`
232
+ # command line option.
233
+ # @return [Array<String>]
234
+ define_reader :libs
235
+
236
+ # @macro add_setting
237
+ # Determines where RSpec will send its output.
238
+ # Default: `$stdout`.
239
+ # @return [IO, String]
240
+ define_reader :output_stream
241
+
242
+ # Set the output stream for reporter.
243
+ # @attr value [IO, String] IO to write to or filename to write to, defaults to $stdout
244
+ def output_stream=(value)
245
+ if @reporter && !value.equal?(@output_stream)
246
+ warn "RSpec's reporter has already been initialized with " \
247
+ "#{output_stream.inspect} as the output stream, so your change to "\
248
+ "`output_stream` will be ignored. You should configure it earlier for " \
249
+ "it to take effect. (Called from #{CallerFilter.first_non_rspec_line})"
250
+ else
251
+ @output_stream = value
252
+ output_wrapper.output = @output_stream
253
+ end
254
+ end
255
+
256
+ # @macro define_reader
257
+ # Load files matching this pattern (default: `'**{,/*/**}/*_spec.rb'`).
258
+ # @return [String]
259
+ define_reader :pattern
260
+
261
+ # Set pattern to match files to load.
262
+ # @attr value [String] the filename pattern to filter spec files by
263
+ def pattern=(value)
264
+ update_pattern_attr :pattern, value
265
+ end
266
+
267
+ # @macro define_reader
268
+ # Exclude files matching this pattern.
269
+ # @return [String]
270
+ define_reader :exclude_pattern
271
+
272
+ # Set pattern to match files to exclude.
273
+ # @attr value [String] the filename pattern to exclude spec files by
274
+ def exclude_pattern=(value)
275
+ update_pattern_attr :exclude_pattern, value
276
+ end
277
+
278
+ # @macro add_setting
279
+ # Specifies which directories contain the source code for your project.
280
+ # When a failure occurs, RSpec looks through the backtrace to find a
281
+ # a line of source to print. It first looks for a line coming from
282
+ # one of the project source directories so that, for example, it prints
283
+ # the expectation or assertion call rather than the source code from
284
+ # the expectation or assertion framework.
285
+ # @return [Array<String>]
286
+ add_setting :project_source_dirs
287
+
288
+ # @macro add_setting
289
+ # Report the times for the slowest examples (default: `false`).
290
+ # Use this to specify the number of examples to include in the profile.
291
+ # @return [Boolean]
292
+ add_setting :profile_examples
293
+
294
+ # @macro add_setting
295
+ # Run all examples if none match the configured filters
296
+ # (default: `false`).
297
+ # @deprecated Use {#filter_run_when_matching} instead for the specific
298
+ # filters that you want to be ignored if none match.
299
+ add_setting :run_all_when_everything_filtered
300
+
301
+ # @macro add_setting
302
+ # Color to use to indicate success. Defaults to `:green` but can be set
303
+ # to one of the following: `[:black, :white, :red, :green, :yellow,
304
+ # :blue, :magenta, :cyan]`
305
+ # @return [Symbol]
306
+ add_setting :success_color
307
+
308
+ # @macro add_setting
309
+ # Color to use to print pending examples. Defaults to `:yellow` but can
310
+ # be set to one of the following: `[:black, :white, :red, :green,
311
+ # :yellow, :blue, :magenta, :cyan]`
312
+ # @return [Symbol]
313
+ add_setting :pending_color
314
+
315
+ # @macro add_setting
316
+ # Color to use to indicate failure. Defaults to `:red` but can be set to
317
+ # one of the following: `[:black, :white, :red, :green, :yellow, :blue,
318
+ # :magenta, :cyan]`
319
+ # @return [Symbol]
320
+ add_setting :failure_color
321
+
322
+ # @macro add_setting
323
+ # The default output color. Defaults to `:white` but can be set to one of
324
+ # the following: `[:black, :white, :red, :green, :yellow, :blue,
325
+ # :magenta, :cyan]`
326
+ # @return [Symbol]
327
+ add_setting :default_color
328
+
329
+ # @macro add_setting
330
+ # Color used when a pending example is fixed. Defaults to `:blue` but can
331
+ # be set to one of the following: `[:black, :white, :red, :green,
332
+ # :yellow, :blue, :magenta, :cyan]`
333
+ # @return [Symbol]
334
+ add_setting :fixed_color
335
+
336
+ # @macro add_setting
337
+ # Color used to print details. Defaults to `:cyan` but can be set to one
338
+ # of the following: `[:black, :white, :red, :green, :yellow, :blue,
339
+ # :magenta, :cyan]`
340
+ # @return [Symbol]
341
+ add_setting :detail_color
342
+
343
+ # @macro add_setting
344
+ # Don't print filter info i.e. "Run options: include {:focus=>true}"
345
+ # (default `false`).
346
+ # return [Boolean]
347
+ add_setting :silence_filter_announcements
348
+
349
+ # @deprecated This config option was added in RSpec 2 to pave the way
350
+ # for this being the default behavior in RSpec 3. Now this option is
351
+ # a no-op.
352
+ def treat_symbols_as_metadata_keys_with_true_values=(_value)
353
+ RSpec.deprecate(
354
+ "RSpec::Core::Configuration#treat_symbols_as_metadata_keys_with_true_values=",
355
+ :message => "RSpec::Core::Configuration#treat_symbols_as_metadata_keys_with_true_values= " \
356
+ "is deprecated, it is now set to true as default and " \
357
+ "setting it to false has no effect."
358
+ )
359
+ end
360
+
361
+ # @macro define_reader
362
+ # Configures how RSpec treats metadata passed as part of a shared example
363
+ # group definition. For example, given this shared example group definition:
364
+ #
365
+ # RSpec.shared_context "uses DB", :db => true do
366
+ # around(:example) do |ex|
367
+ # MyORM.transaction(:rollback => true, &ex)
368
+ # end
369
+ # end
370
+ #
371
+ # ...there are two ways RSpec can treat the `:db => true` metadata, each
372
+ # of which has a corresponding config option:
373
+ #
374
+ # 1. `:trigger_inclusion`: this shared context will be implicitly included
375
+ # in any groups (or examples) that have `:db => true` metadata.
376
+ # 2. `:apply_to_host_groups`: the metadata will be inherited by the metadata
377
+ # hash of all host groups and examples.
378
+ #
379
+ # `:trigger_inclusion` is the legacy behavior from before RSpec 3.5 but should
380
+ # be considered deprecated. Instead, you can explicitly include a group with
381
+ # `include_context`:
382
+ #
383
+ # RSpec.describe "My model" do
384
+ # include_context "uses DB"
385
+ # end
386
+ #
387
+ # ...or you can configure RSpec to include the context based on matching metadata
388
+ # using an API that mirrors configured module inclusion:
389
+ #
390
+ # RSpec.configure do |rspec|
391
+ # rspec.include_context "uses DB", :db => true
392
+ # end
393
+ #
394
+ # `:apply_to_host_groups` is a new feature of RSpec 3.5 and will be the only
395
+ # supported behavior in RSpec 4.
396
+ #
397
+ # @overload shared_context_metadata_behavior
398
+ # @return [:trigger_inclusion, :apply_to_host_groups] the configured behavior
399
+ # @overload shared_context_metadata_behavior=(value)
400
+ # @param value [:trigger_inclusion, :apply_to_host_groups] sets the configured behavior
401
+ define_reader :shared_context_metadata_behavior
402
+ # @see shared_context_metadata_behavior
403
+ def shared_context_metadata_behavior=(value)
404
+ case value
405
+ when :trigger_inclusion, :apply_to_host_groups
406
+ @shared_context_metadata_behavior = value
407
+ else
408
+ raise ArgumentError, "Cannot set `RSpec.configuration." \
409
+ "shared_context_metadata_behavior` to `#{value.inspect}`. Only " \
410
+ "`:trigger_inclusion` and `:apply_to_host_groups` are valid values."
411
+ end
412
+ end
413
+
414
+ # Record the start time of the spec suite to measure load time.
415
+ # return [Time]
416
+ add_setting :start_time
417
+
418
+ # @macro add_setting
419
+ # Use threadsafe options where available.
420
+ # Currently this will place a mutex around memoized values such as let blocks.
421
+ # return [Boolean]
422
+ add_setting :threadsafe
423
+
424
+ # @macro add_setting
425
+ # Maximum count of failed source lines to display in the failure reports.
426
+ # (default `10`).
427
+ # return [Integer]
428
+ add_setting :max_displayed_failure_line_count
429
+
430
+ # Determines which bisect runner implementation gets used to run subsets
431
+ # of the suite during a bisection. Your choices are:
432
+ #
433
+ # - `:shell`: Performs a spec run by shelling out, booting RSpec and your
434
+ # application environment each time. This runner is the most widely
435
+ # compatible runner, but is not as fast. On platforms that do not
436
+ # support forking, this is the default.
437
+ # - `:fork`: Pre-boots RSpec and your application environment in a parent
438
+ # process, and then forks a child process for each spec run. This runner
439
+ # tends to be significantly faster than the `:shell` runner but cannot
440
+ # be used in some situations. On platforms that support forking, this
441
+ # is the default. If you use this runner, you should ensure that all
442
+ # of your one-time setup logic goes in a `before(:suite)` hook instead
443
+ # of getting run at the top-level of a file loaded by `--require`.
444
+ #
445
+ # @note This option will only be used by `--bisect` if you set it in a file
446
+ # loaded via `--require`.
447
+ #
448
+ # @return [Symbol]
449
+ attr_reader :bisect_runner
450
+ def bisect_runner=(value)
451
+ if @bisect_runner_class && value != @bisect_runner
452
+ raise "`config.bisect_runner = #{value.inspect}` can no longer take " \
453
+ "effect as the #{@bisect_runner.inspect} bisect runnner is already " \
454
+ "in use. This config setting must be set in a file loaded by a " \
455
+ "`--require` option (passed at the CLI or in a `.rspec` file) for " \
456
+ "it to have any effect."
457
+ end
458
+
459
+ @bisect_runner = value
460
+ end
461
+
462
+ # @private
463
+ # @deprecated Use {#color_mode} = :on, instead of {#color} with {#tty}
464
+ add_setting :tty
465
+ # @private
466
+ attr_writer :files_to_run
467
+ # @private
468
+ attr_accessor :filter_manager, :world
469
+ # @private
470
+ attr_accessor :static_config_filter_manager
471
+ # @private
472
+ attr_reader :backtrace_formatter, :ordering_manager, :loaded_spec_files
473
+
474
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
475
+
476
+ # Build an object to store runtime configuration options and set defaults
477
+ def initialize
478
+ # rubocop:disable Style/GlobalVars
479
+ @start_time = $_rspec_core_load_started_at || ::RSpec::Core::Time.now
480
+ # rubocop:enable Style/GlobalVars
481
+ @expectation_frameworks = []
482
+ @include_modules = FilterableItemRepository::QueryOptimized.new(:any?)
483
+ @extend_modules = FilterableItemRepository::QueryOptimized.new(:any?)
484
+ @prepend_modules = FilterableItemRepository::QueryOptimized.new(:any?)
485
+
486
+ @bisect_runner = RSpec::Support::RubyFeatures.fork_supported? ? :fork : :shell
487
+ @bisect_runner_class = nil
488
+
489
+ @before_suite_hooks = []
490
+ @after_suite_hooks = []
491
+
492
+ @mock_framework = nil
493
+ @files_or_directories_to_run = []
494
+ @loaded_spec_files = Set.new
495
+ @color = false
496
+ @color_mode = :automatic
497
+ @pattern = '**{,/*/**}/*_spec.rb'
498
+ @exclude_pattern = ''
499
+ @failure_exit_code = 1
500
+ @fail_if_no_examples = false
501
+ @spec_files_loaded = false
502
+
503
+ @backtrace_formatter = BacktraceFormatter.new
504
+
505
+ @default_path = 'spec'
506
+ @project_source_dirs = %w[ spec lib app ]
507
+ @deprecation_stream = $stderr
508
+ @output_stream = $stdout
509
+ @reporter = nil
510
+ @reporter_buffer = nil
511
+ @filter_manager = FilterManager.new
512
+ @static_config_filter_manager = FilterManager.new
513
+ @ordering_manager = Ordering::ConfigurationManager.new
514
+ @preferred_options = {}
515
+ @failure_color = :red
516
+ @success_color = :green
517
+ @pending_color = :yellow
518
+ @default_color = :white
519
+ @fixed_color = :blue
520
+ @detail_color = :cyan
521
+ @profile_examples = false
522
+ @requires = []
523
+ @libs = []
524
+ @derived_metadata_blocks = FilterableItemRepository::QueryOptimized.new(:any?)
525
+ @threadsafe = true
526
+ @max_displayed_failure_line_count = 10
527
+ @world = World::Null
528
+ @shared_context_metadata_behavior = :trigger_inclusion
529
+
530
+ define_built_in_hooks
531
+ end
532
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
533
+
534
+ # @private
535
+ #
536
+ # Used to set higher priority option values from the command line.
537
+ def force(hash)
538
+ ordering_manager.force(hash)
539
+ @preferred_options.merge!(hash)
540
+
541
+ return unless hash.key?(:example_status_persistence_file_path)
542
+ clear_values_derived_from_example_status_persistence_file_path
543
+ end
544
+
545
+ # @private
546
+ def reset
547
+ @spec_files_loaded = false
548
+ reset_reporter
549
+ end
550
+
551
+ # @private
552
+ def reset_reporter
553
+ @reporter = nil
554
+ @formatter_loader = nil
555
+ @output_wrapper = nil
556
+ end
557
+
558
+ # @private
559
+ def reset_filters
560
+ self.filter_manager = FilterManager.new
561
+ filter_manager.include_only(
562
+ Metadata.deep_hash_dup(static_config_filter_manager.inclusions.rules)
563
+ )
564
+ filter_manager.exclude_only(
565
+ Metadata.deep_hash_dup(static_config_filter_manager.exclusions.rules)
566
+ )
567
+ end
568
+
569
+ # @overload add_setting(name)
570
+ # @overload add_setting(name, opts)
571
+ # @option opts [Symbol] :default
572
+ #
573
+ # Set a default value for the generated getter and predicate methods:
574
+ #
575
+ # add_setting(:foo, :default => "default value")
576
+ #
577
+ # @option opts [Symbol] :alias_with
578
+ #
579
+ # Use `:alias_with` to alias the setter, getter, and predicate to
580
+ # another name, or names:
581
+ #
582
+ # add_setting(:foo, :alias_with => :bar)
583
+ # add_setting(:foo, :alias_with => [:bar, :baz])
584
+ #
585
+ # Adds a custom setting to the RSpec.configuration object.
586
+ #
587
+ # RSpec.configuration.add_setting :foo
588
+ #
589
+ # Used internally and by extension frameworks like rspec-rails, so they
590
+ # can add config settings that are domain specific. For example:
591
+ #
592
+ # RSpec.configure do |c|
593
+ # c.add_setting :use_transactional_fixtures,
594
+ # :default => true,
595
+ # :alias_with => :use_transactional_examples
596
+ # end
597
+ #
598
+ # `add_setting` creates three methods on the configuration object, a
599
+ # setter, a getter, and a predicate:
600
+ #
601
+ # RSpec.configuration.foo=(value)
602
+ # RSpec.configuration.foo
603
+ # RSpec.configuration.foo? # Returns true if foo returns anything but nil or false.
604
+ def add_setting(name, opts={})
605
+ default = opts.delete(:default)
606
+ (class << self; self; end).class_exec do
607
+ add_setting(name, opts)
608
+ end
609
+ __send__("#{name}=", default) if default
610
+ end
611
+
612
+ # Returns the configured mock framework adapter module.
613
+ # @return [Symbol]
614
+ def mock_framework
615
+ if @mock_framework.nil?
616
+ begin
617
+ mock_with :rspec
618
+ rescue LoadError
619
+ mock_with :nothing
620
+ end
621
+ end
622
+ @mock_framework
623
+ end
624
+
625
+ # Delegates to mock_framework=(framework).
626
+ def mock_framework=(framework)
627
+ mock_with framework
628
+ end
629
+
630
+ # Regexps used to exclude lines from backtraces.
631
+ #
632
+ # Excludes lines from ruby (and jruby) source, installed gems, anything
633
+ # in any "bin" directory, and any of the RSpec libs (outside gem
634
+ # installs) by default.
635
+ #
636
+ # You can modify the list via the getter, or replace it with the setter.
637
+ #
638
+ # To override this behaviour and display a full backtrace, use
639
+ # `--backtrace` on the command line, in a `.rspec` file, or in the
640
+ # `rspec_options` attribute of RSpec's rake task.
641
+ # @return [Array<Regexp>]
642
+ def backtrace_exclusion_patterns
643
+ @backtrace_formatter.exclusion_patterns
644
+ end
645
+
646
+ # Set regular expressions used to exclude lines in backtrace.
647
+ # @param patterns [Array<Regexp>] set backtrace_formatter exlusion_patterns
648
+ def backtrace_exclusion_patterns=(patterns)
649
+ @backtrace_formatter.exclusion_patterns = patterns
650
+ end
651
+
652
+ # Regexps used to include lines in backtraces.
653
+ #
654
+ # Defaults to [Regexp.new Dir.getwd].
655
+ #
656
+ # Lines that match an exclusion _and_ an inclusion pattern
657
+ # will be included.
658
+ #
659
+ # You can modify the list via the getter, or replace it with the setter.
660
+ # @return [Array<Regexp>]
661
+ def backtrace_inclusion_patterns
662
+ @backtrace_formatter.inclusion_patterns
663
+ end
664
+
665
+ # Set regular expressions used to include lines in backtrace.
666
+ # @attr patterns [Array<Regexp>] set backtrace_formatter inclusion_patterns
667
+ def backtrace_inclusion_patterns=(patterns)
668
+ @backtrace_formatter.inclusion_patterns = patterns
669
+ end
670
+
671
+ # Adds {#backtrace_exclusion_patterns} that will filter lines from
672
+ # the named gems from backtraces.
673
+ #
674
+ # @param gem_names [Array<String>] Names of the gems to filter
675
+ #
676
+ # @example
677
+ # RSpec.configure do |config|
678
+ # config.filter_gems_from_backtrace "rack", "rake"
679
+ # end
680
+ #
681
+ # @note The patterns this adds will match the named gems in their common
682
+ # locations (e.g. system gems, vendored with bundler, installed as a
683
+ # :git dependency with bundler, etc) but is not guaranteed to work for
684
+ # all possible gem locations. For example, if you have the gem source
685
+ # in a directory with a completely unrelated name, and use bundler's
686
+ # :path option, this will not filter it.
687
+ def filter_gems_from_backtrace(*gem_names)
688
+ gem_names.each do |name|
689
+ @backtrace_formatter.filter_gem(name)
690
+ end
691
+ end
692
+
693
+ # @private
694
+ MOCKING_ADAPTERS = {
695
+ :rspec => :RSpec,
696
+ :flexmock => :Flexmock,
697
+ :rr => :RR,
698
+ :mocha => :Mocha,
699
+ :nothing => :Null
700
+ }
701
+
702
+ # Sets the mock framework adapter module.
703
+ #
704
+ # `framework` can be a Symbol or a Module.
705
+ #
706
+ # Given any of `:rspec`, `:mocha`, `:flexmock`, or `:rr`, configures the
707
+ # named framework.
708
+ #
709
+ # Given `:nothing`, configures no framework. Use this if you don't use
710
+ # any mocking framework to save a little bit of overhead.
711
+ #
712
+ # Given a Module, includes that module in every example group. The module
713
+ # should adhere to RSpec's mock framework adapter API:
714
+ #
715
+ # setup_mocks_for_rspec
716
+ # - called before each example
717
+ #
718
+ # verify_mocks_for_rspec
719
+ # - called after each example if the example hasn't yet failed.
720
+ # Framework should raise an exception when expectations fail
721
+ #
722
+ # teardown_mocks_for_rspec
723
+ # - called after verify_mocks_for_rspec (even if there are errors)
724
+ #
725
+ # If the module responds to `configuration` and `mock_with` receives a
726
+ # block, it will yield the configuration object to the block e.g.
727
+ #
728
+ # config.mock_with OtherMockFrameworkAdapter do |mod_config|
729
+ # mod_config.custom_setting = true
730
+ # end
731
+ def mock_with(framework)
732
+ framework_module =
733
+ if framework.is_a?(Module)
734
+ framework
735
+ else
736
+ const_name = MOCKING_ADAPTERS.fetch(framework) do
737
+ raise ArgumentError,
738
+ "Unknown mocking framework: #{framework.inspect}. " \
739
+ "Pass a module or one of #{MOCKING_ADAPTERS.keys.inspect}"
740
+ end
741
+
742
+ RSpec::Support.require_rspec_core "mocking_adapters/#{const_name.to_s.downcase}"
743
+ RSpec::Core::MockingAdapters.const_get(const_name)
744
+ end
745
+
746
+ new_name, old_name = [framework_module, @mock_framework].map do |mod|
747
+ mod.respond_to?(:framework_name) ? mod.framework_name : :unnamed
748
+ end
749
+
750
+ unless new_name == old_name
751
+ assert_no_example_groups_defined(:mock_framework)
752
+ end
753
+
754
+ if block_given?
755
+ raise "#{framework_module} must respond to `configuration` so that " \
756
+ "mock_with can yield it." unless framework_module.respond_to?(:configuration)
757
+ yield framework_module.configuration
758
+ end
759
+
760
+ @mock_framework = framework_module
761
+ end
762
+
763
+ # Returns the configured expectation framework adapter module(s)
764
+ def expectation_frameworks
765
+ if @expectation_frameworks.empty?
766
+ begin
767
+ expect_with :rspec
768
+ rescue LoadError
769
+ expect_with Module.new
770
+ end
771
+ end
772
+ @expectation_frameworks
773
+ end
774
+
775
+ # Delegates to expect_with(framework).
776
+ def expectation_framework=(framework)
777
+ expect_with(framework)
778
+ end
779
+
780
+ # Sets the expectation framework module(s) to be included in each example
781
+ # group.
782
+ #
783
+ # `frameworks` can be `:rspec`, `:test_unit`, `:minitest`, a custom
784
+ # module, or any combination thereof:
785
+ #
786
+ # config.expect_with :rspec
787
+ # config.expect_with :test_unit
788
+ # config.expect_with :minitest
789
+ # config.expect_with :rspec, :minitest
790
+ # config.expect_with OtherExpectationFramework
791
+ #
792
+ # RSpec will translate `:rspec`, `:minitest`, and `:test_unit` into the
793
+ # appropriate modules.
794
+ #
795
+ # ## Configuration
796
+ #
797
+ # If the module responds to `configuration`, `expect_with` will
798
+ # yield the `configuration` object if given a block:
799
+ #
800
+ # config.expect_with OtherExpectationFramework do |custom_config|
801
+ # custom_config.custom_setting = true
802
+ # end
803
+ def expect_with(*frameworks)
804
+ modules = frameworks.map do |framework|
805
+ case framework
806
+ when Module
807
+ framework
808
+ when :rspec
809
+ require 'rspec/expectations'
810
+
811
+ # Tag this exception class so our exception formatting logic knows
812
+ # that it satisfies the `MultipleExceptionError` interface.
813
+ ::RSpec::Expectations::MultipleExpectationsNotMetError.__send__(
814
+ :include, MultipleExceptionError::InterfaceTag
815
+ )
816
+
817
+ ::RSpec::Matchers
818
+ when :test_unit
819
+ require 'rspec/core/test_unit_assertions_adapter'
820
+ ::RSpec::Core::TestUnitAssertionsAdapter
821
+ when :minitest
822
+ require 'rspec/core/minitest_assertions_adapter'
823
+ ::RSpec::Core::MinitestAssertionsAdapter
824
+ else
825
+ raise ArgumentError, "#{framework.inspect} is not supported"
826
+ end
827
+ end
828
+
829
+ if (modules - @expectation_frameworks).any?
830
+ assert_no_example_groups_defined(:expect_with)
831
+ end
832
+
833
+ if block_given?
834
+ raise "expect_with only accepts a block with a single argument. " \
835
+ "Call expect_with #{modules.length} times, " \
836
+ "once with each argument, instead." if modules.length > 1
837
+ raise "#{modules.first} must respond to `configuration` so that " \
838
+ "expect_with can yield it." unless modules.first.respond_to?(:configuration)
839
+ yield modules.first.configuration
840
+ end
841
+
842
+ @expectation_frameworks.push(*modules)
843
+ end
844
+
845
+ # Check if full backtrace is enabled.
846
+ # @return [Boolean] is full backtrace enabled
847
+ def full_backtrace?
848
+ @backtrace_formatter.full_backtrace?
849
+ end
850
+
851
+ # Toggle full backtrace.
852
+ # @attr true_or_false [Boolean] toggle full backtrace display
853
+ def full_backtrace=(true_or_false)
854
+ @backtrace_formatter.full_backtrace = true_or_false
855
+ end
856
+
857
+ # Enables color output if the output is a TTY. As of RSpec 3.6, this is
858
+ # the default behavior and this option is retained only for backwards
859
+ # compatibility.
860
+ #
861
+ # @deprecated No longer recommended because of complex behavior. Instead,
862
+ # rely on the fact that TTYs will display color by default, or set
863
+ # {#color_mode} to :on to display color on a non-TTY output.
864
+ # @see color_mode
865
+ # @see color_enabled?
866
+ # @return [Boolean]
867
+ def color
868
+ value_for(:color) { @color }
869
+ end
870
+
871
+ # The mode for determining whether to display output in color. One of:
872
+ #
873
+ # - :automatic - the output will be in color if the output is a TTY (the
874
+ # default)
875
+ # - :on - the output will be in color, whether or not the output is a TTY
876
+ # - :off - the output will not be in color
877
+ #
878
+ # @see color_enabled?
879
+ # @return [Boolean]
880
+ def color_mode
881
+ value_for(:color_mode) { @color_mode }
882
+ end
883
+
884
+ # Check if color is enabled for a particular output.
885
+ # @param output [IO] an output stream to use, defaults to the current
886
+ # `output_stream`
887
+ # @return [Boolean]
888
+ def color_enabled?(output=output_stream)
889
+ case color_mode
890
+ when :on then true
891
+ when :off then false
892
+ else # automatic
893
+ output_to_tty?(output) || (color && tty?)
894
+ end
895
+ end
896
+
897
+ # Set the color mode.
898
+ attr_writer :color_mode
899
+
900
+ # Toggle output color.
901
+ #
902
+ # @deprecated No longer recommended because of complex behavior. Instead,
903
+ # rely on the fact that TTYs will display color by default, or set
904
+ # {:color_mode} to :on to display color on a non-TTY output.
905
+ attr_writer :color
906
+
907
+ # @private
908
+ def libs=(libs)
909
+ libs.map do |lib|
910
+ @libs.unshift lib
911
+ $LOAD_PATH.unshift lib
912
+ end
913
+ end
914
+
915
+ # Run examples matching on `description` in all files to run.
916
+ # @param description [String, Regexp] the pattern to filter on
917
+ def full_description=(description)
918
+ filter_run :full_description => Regexp.union(*Array(description).map { |d| Regexp.new(d) })
919
+ end
920
+
921
+ # @return [Array] full description filter
922
+ def full_description
923
+ filter.fetch :full_description, nil
924
+ end
925
+
926
+ # @overload add_formatter(formatter)
927
+ # @overload add_formatter(formatter, output)
928
+ #
929
+ # @param formatter [Class, String, Object] formatter to use. Can be any of the
930
+ # string values supported from the CLI (`p`/`progress`,
931
+ # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any
932
+ # class that implements the formatter protocol and has registered
933
+ # itself with RSpec as a formatter, or a formatter instance.
934
+ # @param output [String, IO] where the formatter will write its output.
935
+ # Can be an IO object or a string path to a file. If not provided,
936
+ # the configured `output_stream` (`$stdout`, by default) will be used.
937
+ #
938
+ # Adds a formatter to the set RSpec will use for this run.
939
+ #
940
+ # @see RSpec::Core::Formatters::Protocol
941
+ def add_formatter(formatter, output=output_wrapper)
942
+ formatter_loader.add(formatter, output)
943
+ end
944
+ alias_method :formatter=, :add_formatter
945
+
946
+ # The formatter that will be used if no formatter has been set.
947
+ # Defaults to 'progress'.
948
+ def default_formatter
949
+ formatter_loader.default_formatter
950
+ end
951
+
952
+ # Sets a fallback formatter to use if none other has been set.
953
+ #
954
+ # @example
955
+ #
956
+ # RSpec.configure do |rspec|
957
+ # rspec.default_formatter = 'doc'
958
+ # end
959
+ def default_formatter=(value)
960
+ formatter_loader.default_formatter = value
961
+ end
962
+
963
+ # Returns a duplicate of the formatters currently loaded in
964
+ # the `FormatterLoader` for introspection.
965
+ #
966
+ # Note as this is a duplicate, any mutations will be disregarded.
967
+ #
968
+ # @return [Array] the formatters currently loaded
969
+ def formatters
970
+ formatter_loader.formatters.dup
971
+ end
972
+
973
+ # @private
974
+ def formatter_loader
975
+ @formatter_loader ||= Formatters::Loader.new(Reporter.new(self))
976
+ end
977
+
978
+ # @private
979
+ #
980
+ # This buffer is used to capture all messages sent to the reporter during
981
+ # reporter initialization. It can then replay those messages after the
982
+ # formatter is correctly initialized. Otherwise, deprecation warnings
983
+ # during formatter initialization can cause an infinite loop.
984
+ class DeprecationReporterBuffer
985
+ def initialize
986
+ @calls = []
987
+ end
988
+
989
+ def deprecation(*args)
990
+ @calls << args
991
+ end
992
+
993
+ def play_onto(reporter)
994
+ @calls.each do |args|
995
+ reporter.deprecation(*args)
996
+ end
997
+ end
998
+ end
999
+
1000
+ # @return [RSpec::Core::Reporter] the currently configured reporter
1001
+ def reporter
1002
+ # @reporter_buffer should only ever be set in this method to cover
1003
+ # initialization of @reporter.
1004
+ @reporter_buffer || @reporter ||=
1005
+ begin
1006
+ @reporter_buffer = DeprecationReporterBuffer.new
1007
+ formatter_loader.prepare_default output_wrapper, deprecation_stream
1008
+ @reporter_buffer.play_onto(formatter_loader.reporter)
1009
+ @reporter_buffer = nil
1010
+ formatter_loader.reporter
1011
+ end
1012
+ end
1013
+
1014
+ # @api private
1015
+ #
1016
+ # Defaults `profile_examples` to 10 examples when `@profile_examples` is
1017
+ # `true`.
1018
+ def profile_examples
1019
+ profile = value_for(:profile_examples) { @profile_examples }
1020
+ if profile && !profile.is_a?(Integer)
1021
+ 10
1022
+ else
1023
+ profile
1024
+ end
1025
+ end
1026
+
1027
+ # @private
1028
+ def files_or_directories_to_run=(*files)
1029
+ files = files.flatten
1030
+
1031
+ if (command == 'rspec' || Runner.running_in_drb?) && default_path && files.empty?
1032
+ files << default_path
1033
+ end
1034
+
1035
+ @files_or_directories_to_run = files
1036
+ @files_to_run = nil
1037
+ end
1038
+
1039
+ # The spec files RSpec will run.
1040
+ # @return [Array] specified files about to run
1041
+ def files_to_run
1042
+ @files_to_run ||= get_files_to_run(@files_or_directories_to_run)
1043
+ end
1044
+
1045
+ # @private
1046
+ def last_run_statuses
1047
+ @last_run_statuses ||= Hash.new(UNKNOWN_STATUS).tap do |statuses|
1048
+ if (path = example_status_persistence_file_path)
1049
+ begin
1050
+ ExampleStatusPersister.load_from(path).inject(statuses) do |hash, example|
1051
+ status = example[:status]
1052
+ status = UNKNOWN_STATUS unless VALID_STATUSES.include?(status)
1053
+ hash[example.fetch(:example_id)] = status
1054
+ hash
1055
+ end
1056
+ rescue SystemCallError => e
1057
+ RSpec.warning "Could not read from #{path.inspect} (configured as " \
1058
+ "`config.example_status_persistence_file_path`) due " \
1059
+ "to a system error: #{e.inspect}. Please check that " \
1060
+ "the config option is set to an accessible, valid " \
1061
+ "file path", :call_site => nil
1062
+ end
1063
+ end
1064
+ end
1065
+ end
1066
+
1067
+ # @private
1068
+ UNKNOWN_STATUS = "unknown".freeze
1069
+
1070
+ # @private
1071
+ FAILED_STATUS = "failed".freeze
1072
+
1073
+ # @private
1074
+ PASSED_STATUS = "passed".freeze
1075
+
1076
+ # @private
1077
+ PENDING_STATUS = "pending".freeze
1078
+
1079
+ # @private
1080
+ VALID_STATUSES = [UNKNOWN_STATUS, FAILED_STATUS, PASSED_STATUS, PENDING_STATUS]
1081
+
1082
+ # @private
1083
+ def spec_files_with_failures
1084
+ @spec_files_with_failures ||= last_run_statuses.inject(Set.new) do |files, (id, status)|
1085
+ files << Example.parse_id(id).first if status == FAILED_STATUS
1086
+ files
1087
+ end.to_a
1088
+ end
1089
+
1090
+ # Creates a method that delegates to `example` including the submitted
1091
+ # `args`. Used internally to add variants of `example` like `pending`:
1092
+ # @param name [String] example name alias
1093
+ # @param args [Array<Symbol>, Hash] metadata for the generated example
1094
+ #
1095
+ # @note The specific example alias below (`pending`) is already
1096
+ # defined for you.
1097
+ # @note Use with caution. This extends the language used in your
1098
+ # specs, but does not add any additional documentation. We use this
1099
+ # in RSpec to define methods like `focus` and `xit`, but we also add
1100
+ # docs for those methods.
1101
+ #
1102
+ # @example
1103
+ # RSpec.configure do |config|
1104
+ # config.alias_example_to :pending, :pending => true
1105
+ # end
1106
+ #
1107
+ # # This lets you do this:
1108
+ #
1109
+ # describe Thing do
1110
+ # pending "does something" do
1111
+ # thing = Thing.new
1112
+ # end
1113
+ # end
1114
+ #
1115
+ # # ... which is the equivalent of
1116
+ #
1117
+ # describe Thing do
1118
+ # it "does something", :pending => true do
1119
+ # thing = Thing.new
1120
+ # end
1121
+ # end
1122
+ def alias_example_to(name, *args)
1123
+ extra_options = Metadata.build_hash_from(args)
1124
+ RSpec::Core::ExampleGroup.define_example_method(name, extra_options)
1125
+ end
1126
+
1127
+ # Creates a method that defines an example group with the provided
1128
+ # metadata. Can be used to define example group/metadata shortcuts.
1129
+ #
1130
+ # @example
1131
+ # RSpec.configure do |config|
1132
+ # config.alias_example_group_to :describe_model, :type => :model
1133
+ # end
1134
+ #
1135
+ # shared_context_for "model tests", :type => :model do
1136
+ # # define common model test helper methods, `let` declarations, etc
1137
+ # end
1138
+ #
1139
+ # # This lets you do this:
1140
+ #
1141
+ # RSpec.describe_model User do
1142
+ # end
1143
+ #
1144
+ # # ... which is the equivalent of
1145
+ #
1146
+ # RSpec.describe User, :type => :model do
1147
+ # end
1148
+ #
1149
+ # @note The defined aliased will also be added to the top level
1150
+ # (e.g. `main` and from within modules) if
1151
+ # `expose_dsl_globally` is set to true.
1152
+ # @see #alias_example_to
1153
+ # @see #expose_dsl_globally=
1154
+ def alias_example_group_to(new_name, *args)
1155
+ extra_options = Metadata.build_hash_from(args)
1156
+ RSpec::Core::ExampleGroup.define_example_group_method(new_name, extra_options)
1157
+ end
1158
+
1159
+ # Define an alias for it_should_behave_like that allows different
1160
+ # language (like "it_has_behavior" or "it_behaves_like") to be
1161
+ # employed when including shared examples.
1162
+ #
1163
+ # @example
1164
+ # RSpec.configure do |config|
1165
+ # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:')
1166
+ # end
1167
+ #
1168
+ # # allows the user to include a shared example group like:
1169
+ #
1170
+ # describe Entity do
1171
+ # it_has_behavior 'sortability' do
1172
+ # let(:sortable) { Entity.new }
1173
+ # end
1174
+ # end
1175
+ #
1176
+ # # which is reported in the output as:
1177
+ # # Entity
1178
+ # # has behavior: sortability
1179
+ # # ...sortability examples here
1180
+ #
1181
+ # @note Use with caution. This extends the language used in your
1182
+ # specs, but does not add any additional documentation. We use this
1183
+ # in RSpec to define `it_should_behave_like` (for backward
1184
+ # compatibility), but we also add docs for that method.
1185
+ def alias_it_behaves_like_to(new_name, report_label='')
1186
+ RSpec::Core::ExampleGroup.define_nested_shared_group_method(new_name, report_label)
1187
+ end
1188
+ alias_method :alias_it_should_behave_like_to, :alias_it_behaves_like_to
1189
+
1190
+ # Adds key/value pairs to the `inclusion_filter`. If `args`
1191
+ # includes any symbols that are not part of the hash, each symbol
1192
+ # is treated as a key in the hash with the value `true`.
1193
+ #
1194
+ # ### Note
1195
+ #
1196
+ # Filters set using this method can be overridden from the command line
1197
+ # or config files (e.g. `.rspec`).
1198
+ #
1199
+ # @example
1200
+ # # Given this declaration.
1201
+ # describe "something", :foo => 'bar' do
1202
+ # # ...
1203
+ # end
1204
+ #
1205
+ # # Any of the following will include that group.
1206
+ # config.filter_run_including :foo => 'bar'
1207
+ # config.filter_run_including :foo => /^ba/
1208
+ # config.filter_run_including :foo => lambda {|v| v == 'bar'}
1209
+ # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'}
1210
+ #
1211
+ # # Given a proc with an arity of 1, the lambda is passed the value
1212
+ # # related to the key, e.g.
1213
+ # config.filter_run_including :foo => lambda {|v| v == 'bar'}
1214
+ #
1215
+ # # Given a proc with an arity of 2, the lambda is passed the value
1216
+ # # related to the key, and the metadata itself e.g.
1217
+ # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'}
1218
+ #
1219
+ # filter_run_including :foo # same as filter_run_including :foo => true
1220
+ def filter_run_including(*args)
1221
+ meta = Metadata.build_hash_from(args, :warn_about_example_group_filtering)
1222
+ filter_manager.include_with_low_priority meta
1223
+ static_config_filter_manager.include_with_low_priority Metadata.deep_hash_dup(meta)
1224
+ end
1225
+ alias_method :filter_run, :filter_run_including
1226
+
1227
+ # Applies the provided filter only if any of examples match, in constrast
1228
+ # to {#filter_run}, which always applies even if no examples match, in
1229
+ # which case no examples will be run. This allows you to leave configured
1230
+ # filters in place that are intended only for temporary use. The most common
1231
+ # example is focus filtering: `config.filter_run_when_matching :focus`.
1232
+ # With that configured, you can temporarily focus an example or group
1233
+ # by tagging it with `:focus` metadata, or prefixing it with an `f`
1234
+ # (as in `fdescribe`, `fcontext` and `fit`) since those are aliases for
1235
+ # `describe`/`context`/`it` with `:focus` metadata.
1236
+ def filter_run_when_matching(*args)
1237
+ when_first_matching_example_defined(*args) do
1238
+ filter_run(*args)
1239
+ end
1240
+ end
1241
+
1242
+ # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't
1243
+ # want any inclusion filter at all.
1244
+ #
1245
+ # ### Warning
1246
+ #
1247
+ # This overrides any inclusion filters/tags set on the command line or in
1248
+ # configuration files.
1249
+ def inclusion_filter=(filter)
1250
+ meta = Metadata.build_hash_from([filter], :warn_about_example_group_filtering)
1251
+ filter_manager.include_only meta
1252
+ end
1253
+
1254
+ alias_method :filter=, :inclusion_filter=
1255
+
1256
+ # Returns the `inclusion_filter`. If none has been set, returns an empty
1257
+ # hash.
1258
+ def inclusion_filter
1259
+ filter_manager.inclusions
1260
+ end
1261
+
1262
+ alias_method :filter, :inclusion_filter
1263
+
1264
+ # Adds key/value pairs to the `exclusion_filter`. If `args`
1265
+ # includes any symbols that are not part of the hash, each symbol
1266
+ # is treated as a key in the hash with the value `true`.
1267
+ #
1268
+ # ### Note
1269
+ #
1270
+ # Filters set using this method can be overridden from the command line
1271
+ # or config files (e.g. `.rspec`).
1272
+ #
1273
+ # @example
1274
+ # # Given this declaration.
1275
+ # describe "something", :foo => 'bar' do
1276
+ # # ...
1277
+ # end
1278
+ #
1279
+ # # Any of the following will exclude that group.
1280
+ # config.filter_run_excluding :foo => 'bar'
1281
+ # config.filter_run_excluding :foo => /^ba/
1282
+ # config.filter_run_excluding :foo => lambda {|v| v == 'bar'}
1283
+ # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'}
1284
+ #
1285
+ # # Given a proc with an arity of 1, the lambda is passed the value
1286
+ # # related to the key, e.g.
1287
+ # config.filter_run_excluding :foo => lambda {|v| v == 'bar'}
1288
+ #
1289
+ # # Given a proc with an arity of 2, the lambda is passed the value
1290
+ # # related to the key, and the metadata itself e.g.
1291
+ # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'}
1292
+ #
1293
+ # filter_run_excluding :foo # same as filter_run_excluding :foo => true
1294
+ def filter_run_excluding(*args)
1295
+ meta = Metadata.build_hash_from(args, :warn_about_example_group_filtering)
1296
+ filter_manager.exclude_with_low_priority meta
1297
+ static_config_filter_manager.exclude_with_low_priority Metadata.deep_hash_dup(meta)
1298
+ end
1299
+
1300
+ # Clears and reassigns the `exclusion_filter`. Set to `nil` if you don't
1301
+ # want any exclusion filter at all.
1302
+ #
1303
+ # ### Warning
1304
+ #
1305
+ # This overrides any exclusion filters/tags set on the command line or in
1306
+ # configuration files.
1307
+ def exclusion_filter=(filter)
1308
+ meta = Metadata.build_hash_from([filter], :warn_about_example_group_filtering)
1309
+ filter_manager.exclude_only meta
1310
+ end
1311
+
1312
+ # Returns the `exclusion_filter`. If none has been set, returns an empty
1313
+ # hash.
1314
+ def exclusion_filter
1315
+ filter_manager.exclusions
1316
+ end
1317
+
1318
+ # Tells RSpec to include `mod` in example groups. Methods defined in
1319
+ # `mod` are exposed to examples (not example groups). Use `filters` to
1320
+ # constrain the groups or examples in which to include the module.
1321
+ #
1322
+ # @example
1323
+ #
1324
+ # module AuthenticationHelpers
1325
+ # def login_as(user)
1326
+ # # ...
1327
+ # end
1328
+ # end
1329
+ #
1330
+ # module UserHelpers
1331
+ # def users(username)
1332
+ # # ...
1333
+ # end
1334
+ # end
1335
+ #
1336
+ # RSpec.configure do |config|
1337
+ # config.include(UserHelpers) # included in all groups
1338
+ # config.include(AuthenticationHelpers, :type => :request)
1339
+ # end
1340
+ #
1341
+ # describe "edit profile", :type => :request do
1342
+ # it "can be viewed by owning user" do
1343
+ # login_as users(:jdoe)
1344
+ # get "/profiles/jdoe"
1345
+ # assert_select ".username", :text => 'jdoe'
1346
+ # end
1347
+ # end
1348
+ #
1349
+ # @note Filtered module inclusions can also be applied to
1350
+ # individual examples that have matching metadata. Just like
1351
+ # Ruby's object model is that every object has a singleton class
1352
+ # which has only a single instance, RSpec's model is that every
1353
+ # example has a singleton example group containing just the one
1354
+ # example.
1355
+ #
1356
+ # @see #include_context
1357
+ # @see #extend
1358
+ # @see #prepend
1359
+ def include(mod, *filters)
1360
+ define_mixed_in_module(mod, filters, @include_modules, :include) do |group|
1361
+ safe_include(mod, group)
1362
+ end
1363
+ end
1364
+
1365
+ # Tells RSpec to include the named shared example group in example groups.
1366
+ # Use `filters` to constrain the groups or examples in which to include
1367
+ # the example group.
1368
+ #
1369
+ # @example
1370
+ #
1371
+ # RSpec.shared_context "example users" do
1372
+ # let(:admin_user) { create_user(:admin) }
1373
+ # let(:guest_user) { create_user(:guest) }
1374
+ # end
1375
+ #
1376
+ # RSpec.configure do |config|
1377
+ # config.include_context "example users", :type => :request
1378
+ # end
1379
+ #
1380
+ # RSpec.describe "The admin page", :type => :request do
1381
+ # it "can be viewed by admins" do
1382
+ # login_with admin_user
1383
+ # get "/admin"
1384
+ # expect(response).to be_ok
1385
+ # end
1386
+ #
1387
+ # it "cannot be viewed by guests" do
1388
+ # login_with guest_user
1389
+ # get "/admin"
1390
+ # expect(response).to be_forbidden
1391
+ # end
1392
+ # end
1393
+ #
1394
+ # @note Filtered context inclusions can also be applied to
1395
+ # individual examples that have matching metadata. Just like
1396
+ # Ruby's object model is that every object has a singleton class
1397
+ # which has only a single instance, RSpec's model is that every
1398
+ # example has a singleton example group containing just the one
1399
+ # example.
1400
+ #
1401
+ # @see #include
1402
+ def include_context(shared_group_name, *filters)
1403
+ shared_module = world.shared_example_group_registry.find([:main], shared_group_name)
1404
+ include shared_module, *filters
1405
+ end
1406
+
1407
+ # Tells RSpec to extend example groups with `mod`. Methods defined in
1408
+ # `mod` are exposed to example groups (not examples). Use `filters` to
1409
+ # constrain the groups to extend.
1410
+ #
1411
+ # Similar to `include`, but behavior is added to example groups, which
1412
+ # are classes, rather than the examples, which are instances of those
1413
+ # classes.
1414
+ #
1415
+ # @example
1416
+ #
1417
+ # module UiHelpers
1418
+ # def run_in_browser
1419
+ # # ...
1420
+ # end
1421
+ # end
1422
+ #
1423
+ # RSpec.configure do |config|
1424
+ # config.extend(UiHelpers, :type => :request)
1425
+ # end
1426
+ #
1427
+ # describe "edit profile", :type => :request do
1428
+ # run_in_browser
1429
+ #
1430
+ # it "does stuff in the client" do
1431
+ # # ...
1432
+ # end
1433
+ # end
1434
+ #
1435
+ # @see #include
1436
+ # @see #prepend
1437
+ def extend(mod, *filters)
1438
+ define_mixed_in_module(mod, filters, @extend_modules, :extend) do |group|
1439
+ safe_extend(mod, group)
1440
+ end
1441
+ end
1442
+
1443
+ if RSpec::Support::RubyFeatures.module_prepends_supported?
1444
+ # Tells RSpec to prepend example groups with `mod`. Methods defined in
1445
+ # `mod` are exposed to examples (not example groups). Use `filters` to
1446
+ # constrain the groups in which to prepend the module.
1447
+ #
1448
+ # Similar to `include`, but module is included before the example group's class
1449
+ # in the ancestor chain.
1450
+ #
1451
+ # @example
1452
+ #
1453
+ # module OverrideMod
1454
+ # def override_me
1455
+ # "overridden"
1456
+ # end
1457
+ # end
1458
+ #
1459
+ # RSpec.configure do |config|
1460
+ # config.prepend(OverrideMod, :method => :prepend)
1461
+ # end
1462
+ #
1463
+ # describe "overriding example's class", :method => :prepend do
1464
+ # it "finds the user" do
1465
+ # self.class.class_eval do
1466
+ # def override_me
1467
+ # end
1468
+ # end
1469
+ # override_me # => "overridden"
1470
+ # # ...
1471
+ # end
1472
+ # end
1473
+ #
1474
+ # @see #include
1475
+ # @see #extend
1476
+ def prepend(mod, *filters)
1477
+ define_mixed_in_module(mod, filters, @prepend_modules, :prepend) do |group|
1478
+ safe_prepend(mod, group)
1479
+ end
1480
+ end
1481
+ end
1482
+
1483
+ # @private
1484
+ #
1485
+ # Used internally to extend a group with modules using `include`, `prepend` and/or
1486
+ # `extend`.
1487
+ def configure_group(group)
1488
+ group.hooks.register_globals(group, hooks)
1489
+
1490
+ configure_group_with group, @include_modules, :safe_include
1491
+ configure_group_with group, @extend_modules, :safe_extend
1492
+ configure_group_with group, @prepend_modules, :safe_prepend
1493
+ end
1494
+
1495
+ # @private
1496
+ #
1497
+ # Used internally to extend the singleton class of a single example's
1498
+ # example group instance with modules using `include` and/or `extend`.
1499
+ def configure_example(example, example_hooks)
1500
+ example_hooks.register_global_singleton_context_hooks(example, hooks)
1501
+ singleton_group = example.example_group_instance.singleton_class
1502
+
1503
+ # We replace the metadata so that SharedExampleGroupModule#included
1504
+ # has access to the example's metadata[:location].
1505
+ singleton_group.with_replaced_metadata(example.metadata) do
1506
+ modules = @include_modules.items_for(example.metadata)
1507
+ modules.each do |mod|
1508
+ safe_include(mod, example.example_group_instance.singleton_class)
1509
+ end
1510
+
1511
+ MemoizedHelpers.define_helpers_on(singleton_group) unless modules.empty?
1512
+ end
1513
+ end
1514
+
1515
+ # @private
1516
+ def requires=(paths)
1517
+ directories = ['lib', default_path].select { |p| File.directory? p }
1518
+ RSpec::Core::RubyProject.add_to_load_path(*directories)
1519
+ paths.each { |path| load_file_handling_errors(:require, path) }
1520
+ @requires += paths
1521
+ end
1522
+
1523
+ # @private
1524
+ def in_project_source_dir_regex
1525
+ regexes = project_source_dirs.map do |dir|
1526
+ /\A#{Regexp.escape(File.expand_path(dir))}\//
1527
+ end
1528
+
1529
+ Regexp.union(regexes)
1530
+ end
1531
+
1532
+ # @private
1533
+ def configure_mock_framework
1534
+ RSpec::Core::ExampleGroup.__send__(:include, mock_framework)
1535
+ conditionally_disable_mocks_monkey_patching
1536
+ end
1537
+
1538
+ # @private
1539
+ def configure_expectation_framework
1540
+ expectation_frameworks.each do |framework|
1541
+ RSpec::Core::ExampleGroup.__send__(:include, framework)
1542
+ end
1543
+ conditionally_disable_expectations_monkey_patching
1544
+ end
1545
+
1546
+ # @private
1547
+ def load_spec_files
1548
+ # Note which spec files world is already aware of.
1549
+ # This is generally only needed for when the user runs
1550
+ # `ruby path/to/spec.rb` (and loads `rspec/autorun`) --
1551
+ # in that case, the spec file was loaded by `ruby` and
1552
+ # isn't loaded by us here so we only know about it because
1553
+ # of an example group being registered in it.
1554
+ world.registered_example_group_files.each do |f|
1555
+ loaded_spec_files << f # the registered files are already expended absolute paths
1556
+ end
1557
+
1558
+ files_to_run.uniq.each do |f|
1559
+ file = File.expand_path(f)
1560
+ load_file_handling_errors(:load, file)
1561
+ loaded_spec_files << file
1562
+ end
1563
+
1564
+ @spec_files_loaded = true
1565
+ end
1566
+
1567
+ # @private
1568
+ DEFAULT_FORMATTER = lambda { |string| string }
1569
+
1570
+ # Formats the docstring output using the block provided.
1571
+ #
1572
+ # @example
1573
+ # # This will strip the descriptions of both examples and example
1574
+ # # groups.
1575
+ # RSpec.configure do |config|
1576
+ # config.format_docstrings { |s| s.strip }
1577
+ # end
1578
+ def format_docstrings(&block)
1579
+ @format_docstrings_block = block_given? ? block : DEFAULT_FORMATTER
1580
+ end
1581
+
1582
+ # @private
1583
+ def format_docstrings_block
1584
+ @format_docstrings_block ||= DEFAULT_FORMATTER
1585
+ end
1586
+
1587
+ # @private
1588
+ def self.delegate_to_ordering_manager(*methods)
1589
+ methods.each do |method|
1590
+ define_method method do |*args, &block|
1591
+ ordering_manager.__send__(method, *args, &block)
1592
+ end
1593
+ end
1594
+ end
1595
+
1596
+ # @!method seed=(value)
1597
+ #
1598
+ # Sets the seed value and sets the default global ordering to random.
1599
+ delegate_to_ordering_manager :seed=
1600
+
1601
+ # @!method seed
1602
+ # Seed for random ordering (default: generated randomly each run).
1603
+ #
1604
+ # When you run specs with `--order random`, RSpec generates a random seed
1605
+ # for the randomization and prints it to the `output_stream` (assuming
1606
+ # you're using RSpec's built-in formatters). If you discover an ordering
1607
+ # dependency (i.e. examples fail intermittently depending on order), set
1608
+ # this (on Configuration or on the command line with `--seed`) to run
1609
+ # using the same seed while you debug the issue.
1610
+ #
1611
+ # We recommend, actually, that you use the command line approach so you
1612
+ # don't accidentally leave the seed encoded.
1613
+ delegate_to_ordering_manager :seed
1614
+
1615
+ # @!method order=(value)
1616
+ #
1617
+ # Sets the default global ordering strategy. By default this can be one
1618
+ # of `:defined`, `:random`, but is customizable through the
1619
+ # `register_ordering` API. If order is set to `'rand:<seed>'`,
1620
+ # the seed will also be set.
1621
+ #
1622
+ # @see #register_ordering
1623
+ delegate_to_ordering_manager :order=
1624
+
1625
+ # @!method register_ordering(name)
1626
+ #
1627
+ # Registers a named ordering strategy that can later be
1628
+ # used to order an example group's subgroups by adding
1629
+ # `:order => <name>` metadata to the example group.
1630
+ #
1631
+ # @param name [Symbol] The name of the ordering.
1632
+ # @yield Block that will order the given examples or example groups
1633
+ # @yieldparam list [Array<RSpec::Core::Example>,
1634
+ # Array<RSpec::Core::ExampleGroup>] The examples or groups to order
1635
+ # @yieldreturn [Array<RSpec::Core::Example>,
1636
+ # Array<RSpec::Core::ExampleGroup>] The re-ordered examples or groups
1637
+ #
1638
+ # @example
1639
+ # RSpec.configure do |rspec|
1640
+ # rspec.register_ordering :reverse do |list|
1641
+ # list.reverse
1642
+ # end
1643
+ # end
1644
+ #
1645
+ # RSpec.describe 'MyClass', :order => :reverse do
1646
+ # # ...
1647
+ # end
1648
+ #
1649
+ # @note Pass the symbol `:global` to set the ordering strategy that
1650
+ # will be used to order the top-level example groups and any example
1651
+ # groups that do not have declared `:order` metadata.
1652
+ #
1653
+ # @example
1654
+ # RSpec.configure do |rspec|
1655
+ # rspec.register_ordering :global do |examples|
1656
+ # acceptance, other = examples.partition do |example|
1657
+ # example.metadata[:type] == :acceptance
1658
+ # end
1659
+ # other + acceptance
1660
+ # end
1661
+ # end
1662
+ #
1663
+ # RSpec.describe 'MyClass', :type => :acceptance do
1664
+ # # will run last
1665
+ # end
1666
+ #
1667
+ # RSpec.describe 'MyClass' do
1668
+ # # will run first
1669
+ # end
1670
+ #
1671
+ delegate_to_ordering_manager :register_ordering
1672
+
1673
+ # @private
1674
+ delegate_to_ordering_manager :seed_used?, :ordering_registry
1675
+
1676
+ # Set Ruby warnings on or off.
1677
+ def warnings=(value)
1678
+ $VERBOSE = !!value
1679
+ end
1680
+
1681
+ # @return [Boolean] Whether or not ruby warnings are enabled.
1682
+ def warnings?
1683
+ $VERBOSE
1684
+ end
1685
+
1686
+ # @private
1687
+ RAISE_ERROR_WARNING_NOTIFIER = lambda { |message| raise message }
1688
+
1689
+ # Turns warnings into errors. This can be useful when
1690
+ # you want RSpec to run in a 'strict' no warning situation.
1691
+ #
1692
+ # @example
1693
+ #
1694
+ # RSpec.configure do |rspec|
1695
+ # rspec.raise_on_warning = true
1696
+ # end
1697
+ def raise_on_warning=(value)
1698
+ if value
1699
+ RSpec::Support.warning_notifier = RAISE_ERROR_WARNING_NOTIFIER
1700
+ else
1701
+ RSpec::Support.warning_notifier = RSpec::Support::DEFAULT_WARNING_NOTIFIER
1702
+ end
1703
+ end
1704
+
1705
+ # Exposes the current running example via the named
1706
+ # helper method. RSpec 2.x exposed this via `example`,
1707
+ # but in RSpec 3.0, the example is instead exposed via
1708
+ # an arg yielded to `it`, `before`, `let`, etc. However,
1709
+ # some extension gems (such as Capybara) depend on the
1710
+ # RSpec 2.x's `example` method, so this config option
1711
+ # can be used to maintain compatibility.
1712
+ #
1713
+ # @param method_name [Symbol] the name of the helper method
1714
+ #
1715
+ # @example
1716
+ #
1717
+ # RSpec.configure do |rspec|
1718
+ # rspec.expose_current_running_example_as :example
1719
+ # end
1720
+ #
1721
+ # describe MyClass do
1722
+ # before do
1723
+ # # `example` can be used here because of the above config.
1724
+ # do_something if example.metadata[:type] == "foo"
1725
+ # end
1726
+ # end
1727
+ def expose_current_running_example_as(method_name)
1728
+ ExposeCurrentExample.module_exec do
1729
+ extend RSpec::SharedContext
1730
+ let(method_name) { |ex| ex }
1731
+ end
1732
+
1733
+ include ExposeCurrentExample
1734
+ end
1735
+
1736
+ # @private
1737
+ module ExposeCurrentExample; end
1738
+
1739
+ # Turns deprecation warnings into errors, in order to surface
1740
+ # the full backtrace of the call site. This can be useful when
1741
+ # you need more context to address a deprecation than the
1742
+ # single-line call site normally provided.
1743
+ #
1744
+ # @example
1745
+ #
1746
+ # RSpec.configure do |rspec|
1747
+ # rspec.raise_errors_for_deprecations!
1748
+ # end
1749
+ def raise_errors_for_deprecations!
1750
+ self.deprecation_stream = Formatters::DeprecationFormatter::RaiseErrorStream.new
1751
+ end
1752
+
1753
+ # Enables zero monkey patching mode for RSpec. It removes monkey
1754
+ # patching of the top-level DSL methods (`describe`,
1755
+ # `shared_examples_for`, etc) onto `main` and `Module`, instead
1756
+ # requiring you to prefix these methods with `RSpec.`. It enables
1757
+ # expect-only syntax for rspec-mocks and rspec-expectations. It
1758
+ # simply disables monkey patching on whatever pieces of RSpec
1759
+ # the user is using.
1760
+ #
1761
+ # @note It configures rspec-mocks and rspec-expectations only
1762
+ # if the user is using those (either explicitly or implicitly
1763
+ # by not setting `mock_with` or `expect_with` to anything else).
1764
+ #
1765
+ # @note If the user uses this options with `mock_with :mocha`
1766
+ # (or similiar) they will still have monkey patching active
1767
+ # in their test environment from mocha.
1768
+ #
1769
+ # @example
1770
+ #
1771
+ # # It disables all monkey patching.
1772
+ # RSpec.configure do |config|
1773
+ # config.disable_monkey_patching!
1774
+ # end
1775
+ #
1776
+ # # Is an equivalent to
1777
+ # RSpec.configure do |config|
1778
+ # config.expose_dsl_globally = false
1779
+ #
1780
+ # config.mock_with :rspec do |mocks|
1781
+ # mocks.syntax = :expect
1782
+ # mocks.patch_marshal_to_support_partial_doubles = false
1783
+ # end
1784
+ #
1785
+ # config.expect_with :rspec do |expectations|
1786
+ # expectations.syntax = :expect
1787
+ # end
1788
+ # end
1789
+ def disable_monkey_patching!
1790
+ self.expose_dsl_globally = false
1791
+ self.disable_monkey_patching = true
1792
+ conditionally_disable_mocks_monkey_patching
1793
+ conditionally_disable_expectations_monkey_patching
1794
+ end
1795
+
1796
+ # @private
1797
+ attr_accessor :disable_monkey_patching
1798
+
1799
+ # Defines a callback that can assign derived metadata values.
1800
+ #
1801
+ # @param filters [Array<Symbol>, Hash] metadata filters that determine
1802
+ # which example or group metadata hashes the callback will be triggered
1803
+ # for. If none are given, the callback will be run against the metadata
1804
+ # hashes of all groups and examples.
1805
+ # @yieldparam metadata [Hash] original metadata hash from an example or
1806
+ # group. Mutate this in your block as needed.
1807
+ #
1808
+ # @example
1809
+ # RSpec.configure do |config|
1810
+ # # Tag all groups and examples in the spec/unit directory with
1811
+ # # :type => :unit
1812
+ # config.define_derived_metadata(:file_path => %r{/spec/unit/}) do |metadata|
1813
+ # metadata[:type] = :unit
1814
+ # end
1815
+ # end
1816
+ def define_derived_metadata(*filters, &block)
1817
+ meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
1818
+ @derived_metadata_blocks.append(block, meta)
1819
+ end
1820
+
1821
+ # Defines a callback that runs after the first example with matching
1822
+ # metadata is defined. If no examples are defined with matching metadata,
1823
+ # it will not get called at all.
1824
+ #
1825
+ # This can be used to ensure some setup is performed (such as bootstrapping
1826
+ # a DB or loading a specific file that adds significantly to the boot time)
1827
+ # if needed (as indicated by the presence of an example with matching metadata)
1828
+ # but avoided otherwise.
1829
+ #
1830
+ # @example
1831
+ # RSpec.configure do |config|
1832
+ # config.when_first_matching_example_defined(:db) do
1833
+ # # Load a support file that does some heavyweight setup,
1834
+ # # including bootstrapping the DB, but only if we have loaded
1835
+ # # any examples tagged with `:db`.
1836
+ # require 'support/db'
1837
+ # end
1838
+ # end
1839
+ def when_first_matching_example_defined(*filters)
1840
+ specified_meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
1841
+
1842
+ callback = lambda do |example_or_group_meta|
1843
+ # Example groups do not have `:example_group` metadata
1844
+ # (instead they have `:parent_example_group` metadata).
1845
+ return unless example_or_group_meta.key?(:example_group)
1846
+
1847
+ # Ensure the callback only fires once.
1848
+ @derived_metadata_blocks.delete(callback, specified_meta)
1849
+
1850
+ yield
1851
+ end
1852
+
1853
+ @derived_metadata_blocks.append(callback, specified_meta)
1854
+ end
1855
+
1856
+ # @private
1857
+ def apply_derived_metadata_to(metadata)
1858
+ @derived_metadata_blocks.items_for(metadata).each do |block|
1859
+ block.call(metadata)
1860
+ end
1861
+ end
1862
+
1863
+ # Defines a `before` hook. See {Hooks#before} for full docs.
1864
+ #
1865
+ # This method differs from {Hooks#before} in only one way: it supports
1866
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once before
1867
+ # the first example of the entire suite is executed.
1868
+ #
1869
+ # @see #prepend_before
1870
+ # @see #after
1871
+ # @see #append_after
1872
+ def before(scope=nil, *meta, &block)
1873
+ handle_suite_hook(scope, meta) do
1874
+ @before_suite_hooks << Hooks::BeforeHook.new(block, {})
1875
+ end || begin
1876
+ # defeat Ruby 2.5 lazy proc allocation to ensure
1877
+ # the methods below are passed the same proc instances
1878
+ # so `Hook` equality is preserved. For more info, see:
1879
+ # https://bugs.ruby-lang.org/issues/14045#note-5
1880
+ block.__id__
1881
+
1882
+ add_hook_to_existing_matching_groups(meta, scope) { |g| g.before(scope, *meta, &block) }
1883
+ super(scope, *meta, &block)
1884
+ end
1885
+ end
1886
+ alias_method :append_before, :before
1887
+
1888
+ # Adds `block` to the start of the list of `before` blocks in the same
1889
+ # scope (`:example`, `:context`, or `:suite`), in contrast to {#before},
1890
+ # which adds the hook to the end of the list.
1891
+ #
1892
+ # See {Hooks#before} for full `before` hook docs.
1893
+ #
1894
+ # This method differs from {Hooks#prepend_before} in only one way: it supports
1895
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once before
1896
+ # the first example of the entire suite is executed.
1897
+ #
1898
+ # @see #before
1899
+ # @see #after
1900
+ # @see #append_after
1901
+ def prepend_before(scope=nil, *meta, &block)
1902
+ handle_suite_hook(scope, meta) do
1903
+ @before_suite_hooks.unshift Hooks::BeforeHook.new(block, {})
1904
+ end || begin
1905
+ # defeat Ruby 2.5 lazy proc allocation to ensure
1906
+ # the methods below are passed the same proc instances
1907
+ # so `Hook` equality is preserved. For more info, see:
1908
+ # https://bugs.ruby-lang.org/issues/14045#note-5
1909
+ block.__id__
1910
+
1911
+ add_hook_to_existing_matching_groups(meta, scope) { |g| g.prepend_before(scope, *meta, &block) }
1912
+ super(scope, *meta, &block)
1913
+ end
1914
+ end
1915
+
1916
+ # Defines a `after` hook. See {Hooks#after} for full docs.
1917
+ #
1918
+ # This method differs from {Hooks#after} in only one way: it supports
1919
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once after
1920
+ # the last example of the entire suite is executed.
1921
+ #
1922
+ # @see #append_after
1923
+ # @see #before
1924
+ # @see #prepend_before
1925
+ def after(scope=nil, *meta, &block)
1926
+ handle_suite_hook(scope, meta) do
1927
+ @after_suite_hooks.unshift Hooks::AfterHook.new(block, {})
1928
+ end || begin
1929
+ # defeat Ruby 2.5 lazy proc allocation to ensure
1930
+ # the methods below are passed the same proc instances
1931
+ # so `Hook` equality is preserved. For more info, see:
1932
+ # https://bugs.ruby-lang.org/issues/14045#note-5
1933
+ block.__id__
1934
+
1935
+ add_hook_to_existing_matching_groups(meta, scope) { |g| g.after(scope, *meta, &block) }
1936
+ super(scope, *meta, &block)
1937
+ end
1938
+ end
1939
+ alias_method :prepend_after, :after
1940
+
1941
+ # Adds `block` to the end of the list of `after` blocks in the same
1942
+ # scope (`:example`, `:context`, or `:suite`), in contrast to {#after},
1943
+ # which adds the hook to the start of the list.
1944
+ #
1945
+ # See {Hooks#after} for full `after` hook docs.
1946
+ #
1947
+ # This method differs from {Hooks#append_after} in only one way: it supports
1948
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once after
1949
+ # the last example of the entire suite is executed.
1950
+ #
1951
+ # @see #append_after
1952
+ # @see #before
1953
+ # @see #prepend_before
1954
+ def append_after(scope=nil, *meta, &block)
1955
+ handle_suite_hook(scope, meta) do
1956
+ @after_suite_hooks << Hooks::AfterHook.new(block, {})
1957
+ end || begin
1958
+ # defeat Ruby 2.5 lazy proc allocation to ensure
1959
+ # the methods below are passed the same proc instances
1960
+ # so `Hook` equality is preserved. For more info, see:
1961
+ # https://bugs.ruby-lang.org/issues/14045#note-5
1962
+ block.__id__
1963
+
1964
+ add_hook_to_existing_matching_groups(meta, scope) { |g| g.append_after(scope, *meta, &block) }
1965
+ super(scope, *meta, &block)
1966
+ end
1967
+ end
1968
+
1969
+ # Registers `block` as an `around` hook.
1970
+ #
1971
+ # See {Hooks#around} for full `around` hook docs.
1972
+ def around(scope=nil, *meta, &block)
1973
+ # defeat Ruby 2.5 lazy proc allocation to ensure
1974
+ # the methods below are passed the same proc instances
1975
+ # so `Hook` equality is preserved. For more info, see:
1976
+ # https://bugs.ruby-lang.org/issues/14045#note-5
1977
+ block.__id__
1978
+
1979
+ add_hook_to_existing_matching_groups(meta, scope) { |g| g.around(scope, *meta, &block) }
1980
+ super(scope, *meta, &block)
1981
+ end
1982
+
1983
+ # @private
1984
+ def with_suite_hooks
1985
+ return yield if dry_run?
1986
+
1987
+ begin
1988
+ run_suite_hooks("a `before(:suite)` hook", @before_suite_hooks)
1989
+ yield
1990
+ ensure
1991
+ run_suite_hooks("an `after(:suite)` hook", @after_suite_hooks)
1992
+ end
1993
+ end
1994
+
1995
+ # @private
1996
+ # Holds the various registered hooks. Here we use a FilterableItemRepository
1997
+ # implementation that is specifically optimized for the read/write patterns
1998
+ # of the config object.
1999
+ def hooks
2000
+ @hooks ||= HookCollections.new(self, FilterableItemRepository::QueryOptimized)
2001
+ end
2002
+
2003
+ # Invokes block before defining an example group
2004
+ def on_example_group_definition(&block)
2005
+ on_example_group_definition_callbacks << block
2006
+ end
2007
+
2008
+ # @api private
2009
+ # Returns an array of blocks to call before defining an example group
2010
+ def on_example_group_definition_callbacks
2011
+ @on_example_group_definition_callbacks ||= []
2012
+ end
2013
+
2014
+ # @private
2015
+ def bisect_runner_class
2016
+ @bisect_runner_class ||= begin
2017
+ case bisect_runner
2018
+ when :fork
2019
+ RSpec::Support.require_rspec_core 'bisect/fork_runner'
2020
+ Bisect::ForkRunner
2021
+ when :shell
2022
+ RSpec::Support.require_rspec_core 'bisect/shell_runner'
2023
+ Bisect::ShellRunner
2024
+ else
2025
+ raise "Unsupported value for `bisect_runner` (#{bisect_runner.inspect}). " \
2026
+ "Only `:fork` and `:shell` are supported."
2027
+ end
2028
+ end
2029
+ end
2030
+
2031
+ private
2032
+
2033
+ def load_file_handling_errors(method, file)
2034
+ __send__(method, file)
2035
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => ex
2036
+ relative_file = Metadata.relative_path(file)
2037
+ reporter.notify_non_example_exception(ex, "An error occurred while loading #{relative_file}.")
2038
+ RSpec.world.wants_to_quit = true
2039
+ end
2040
+
2041
+ def handle_suite_hook(scope, meta)
2042
+ return nil unless scope == :suite
2043
+
2044
+ unless meta.empty?
2045
+ # TODO: in RSpec 4, consider raising an error here.
2046
+ # We warn only for backwards compatibility.
2047
+ RSpec.warn_with "WARNING: `:suite` hooks do not support metadata since " \
2048
+ "they apply to the suite as a whole rather than " \
2049
+ "any individual example or example group that has metadata. " \
2050
+ "The metadata you have provided (#{meta.inspect}) will be ignored."
2051
+ end
2052
+
2053
+ yield
2054
+ end
2055
+
2056
+ def run_suite_hooks(hook_description, hooks)
2057
+ context = SuiteHookContext.new(hook_description, reporter)
2058
+
2059
+ hooks.each do |hook|
2060
+ begin
2061
+ hook.run(context)
2062
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => ex
2063
+ context.set_exception(ex)
2064
+
2065
+ # Do not run subsequent `before` hooks if one fails.
2066
+ # But for `after` hooks, we run them all so that all
2067
+ # cleanup bits get a chance to complete, minimizing the
2068
+ # chance that resources get left behind.
2069
+ break if hooks.equal?(@before_suite_hooks)
2070
+ end
2071
+ end
2072
+ end
2073
+
2074
+ def get_files_to_run(paths)
2075
+ files = FlatMap.flat_map(paths_to_check(paths)) do |path|
2076
+ path = path.gsub(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
2077
+ File.directory?(path) ? gather_directories(path) : extract_location(path)
2078
+ end.uniq
2079
+
2080
+ return files unless only_failures?
2081
+ relative_files = files.map { |f| Metadata.relative_path(File.expand_path f) }
2082
+ intersection = (relative_files & spec_files_with_failures.to_a)
2083
+ intersection.empty? ? files : intersection
2084
+ end
2085
+
2086
+ def paths_to_check(paths)
2087
+ return paths if pattern_might_load_specs_from_vendored_dirs?
2088
+ paths + [Dir.getwd]
2089
+ end
2090
+
2091
+ def pattern_might_load_specs_from_vendored_dirs?
2092
+ pattern.split(File::SEPARATOR).first.include?('**')
2093
+ end
2094
+
2095
+ def gather_directories(path)
2096
+ include_files = get_matching_files(path, pattern)
2097
+ exclude_files = get_matching_files(path, exclude_pattern)
2098
+ (include_files - exclude_files).uniq
2099
+ end
2100
+
2101
+ def get_matching_files(path, pattern)
2102
+ raw_files = Dir[file_glob_from(path, pattern)]
2103
+ raw_files.map { |file| File.expand_path(file) }.sort
2104
+ end
2105
+
2106
+ def file_glob_from(path, pattern)
2107
+ stripped = "{#{pattern.gsub(/\s*,\s*/, ',')}}"
2108
+ return stripped if pattern =~ /^(\.\/)?#{Regexp.escape path}/ || absolute_pattern?(pattern)
2109
+ File.join(path, stripped)
2110
+ end
2111
+
2112
+ if RSpec::Support::OS.windows?
2113
+ # :nocov:
2114
+ def absolute_pattern?(pattern)
2115
+ pattern =~ /\A[A-Z]:\\/ || windows_absolute_network_path?(pattern)
2116
+ end
2117
+
2118
+ def windows_absolute_network_path?(pattern)
2119
+ return false unless ::File::ALT_SEPARATOR
2120
+ pattern.start_with?(::File::ALT_SEPARATOR + ::File::ALT_SEPARATOR)
2121
+ end
2122
+ # :nocov:
2123
+ else
2124
+ def absolute_pattern?(pattern)
2125
+ pattern.start_with?(File::Separator)
2126
+ end
2127
+ end
2128
+
2129
+ def extract_location(path)
2130
+ match = /^(.*?)((?:\:\d+)+)$/.match(path)
2131
+
2132
+ if match
2133
+ captures = match.captures
2134
+ path = captures[0]
2135
+ lines = captures[1][1..-1].split(":").map(&:to_i)
2136
+ filter_manager.add_location path, lines
2137
+ else
2138
+ path, scoped_ids = Example.parse_id(path)
2139
+ filter_manager.add_ids(path, scoped_ids.split(/\s*,\s*/)) if scoped_ids
2140
+ end
2141
+
2142
+ return [] if path == default_path
2143
+ File.expand_path(path)
2144
+ end
2145
+
2146
+ def command
2147
+ $0.split(File::SEPARATOR).last
2148
+ end
2149
+
2150
+ def value_for(key)
2151
+ @preferred_options.fetch(key) { yield }
2152
+ end
2153
+
2154
+ def define_built_in_hooks
2155
+ around(:example, :aggregate_failures => true) do |procsy|
2156
+ begin
2157
+ aggregate_failures(nil, :hide_backtrace => true, &procsy)
2158
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => exception
2159
+ procsy.example.set_aggregate_failures_exception(exception)
2160
+ end
2161
+ end
2162
+ end
2163
+
2164
+ def assert_no_example_groups_defined(config_option)
2165
+ return unless world.example_groups.any?
2166
+
2167
+ raise MustBeConfiguredBeforeExampleGroupsError.new(
2168
+ "RSpec's #{config_option} configuration option must be configured before " \
2169
+ "any example groups are defined, but you have already defined a group."
2170
+ )
2171
+ end
2172
+
2173
+ def output_wrapper
2174
+ @output_wrapper ||= OutputWrapper.new(output_stream)
2175
+ end
2176
+
2177
+ def output_to_tty?(output=output_stream)
2178
+ output.respond_to?(:tty?) && output.tty?
2179
+ end
2180
+
2181
+ def conditionally_disable_mocks_monkey_patching
2182
+ return unless disable_monkey_patching && rspec_mocks_loaded?
2183
+
2184
+ RSpec::Mocks.configuration.tap do |config|
2185
+ config.syntax = :expect
2186
+ config.patch_marshal_to_support_partial_doubles = false
2187
+ end
2188
+ end
2189
+
2190
+ def conditionally_disable_expectations_monkey_patching
2191
+ return unless disable_monkey_patching && rspec_expectations_loaded?
2192
+
2193
+ RSpec::Expectations.configuration.syntax = :expect
2194
+ end
2195
+
2196
+ def rspec_mocks_loaded?
2197
+ defined?(RSpec::Mocks.configuration)
2198
+ end
2199
+
2200
+ def rspec_expectations_loaded?
2201
+ defined?(RSpec::Expectations.configuration)
2202
+ end
2203
+
2204
+ def update_pattern_attr(name, value)
2205
+ if @spec_files_loaded
2206
+ RSpec.warning "Configuring `#{name}` to #{value} has no effect since " \
2207
+ "RSpec has already loaded the spec files."
2208
+ end
2209
+
2210
+ instance_variable_set(:"@#{name}", value)
2211
+ @files_to_run = nil
2212
+ end
2213
+
2214
+ def clear_values_derived_from_example_status_persistence_file_path
2215
+ @last_run_statuses = nil
2216
+ @spec_files_with_failures = nil
2217
+ end
2218
+
2219
+ def configure_group_with(group, module_list, application_method)
2220
+ module_list.items_for(group.metadata).each do |mod|
2221
+ __send__(application_method, mod, group)
2222
+ end
2223
+ end
2224
+
2225
+ def add_hook_to_existing_matching_groups(meta, scope, &block)
2226
+ # For example hooks, we have to apply it to each of the top level
2227
+ # groups, even if the groups do not match. When we apply it, we
2228
+ # apply it with the metadata, so it will only apply to examples
2229
+ # in the group that match the metadata.
2230
+ # #2280 for background and discussion.
2231
+ if scope == :example || scope == :each || scope.nil?
2232
+ world.example_groups.each(&block)
2233
+ else
2234
+ meta = Metadata.build_hash_from(meta.dup)
2235
+ on_existing_matching_groups(meta, &block)
2236
+ end
2237
+ end
2238
+
2239
+ def on_existing_matching_groups(meta)
2240
+ world.traverse_example_group_trees_until do |group|
2241
+ metadata_applies_to_group?(meta, group).tap do |applies|
2242
+ yield group if applies
2243
+ end
2244
+ end
2245
+ end
2246
+
2247
+ def metadata_applies_to_group?(meta, group)
2248
+ meta.empty? || MetadataFilter.apply?(:any?, meta, group.metadata)
2249
+ end
2250
+
2251
+ if RSpec::Support::RubyFeatures.module_prepends_supported?
2252
+ def safe_prepend(mod, host)
2253
+ host.__send__(:prepend, mod) unless host < mod
2254
+ end
2255
+ end
2256
+
2257
+ if RUBY_VERSION.to_f >= 1.9
2258
+ def safe_include(mod, host)
2259
+ host.__send__(:include, mod) unless host < mod
2260
+ end
2261
+
2262
+ def safe_extend(mod, host)
2263
+ host.extend(mod) unless host.singleton_class < mod
2264
+ end
2265
+ else # for 1.8.7
2266
+ # :nocov:
2267
+ def safe_include(mod, host)
2268
+ host.__send__(:include, mod) unless host.included_modules.include?(mod)
2269
+ end
2270
+
2271
+ def safe_extend(mod, host)
2272
+ host.extend(mod) unless (class << host; self; end).included_modules.include?(mod)
2273
+ end
2274
+ # :nocov:
2275
+ end
2276
+
2277
+ def define_mixed_in_module(mod, filters, mod_list, config_method, &block)
2278
+ unless Module === mod
2279
+ raise TypeError, "`RSpec.configuration.#{config_method}` expects a module but got: #{mod.inspect}"
2280
+ end
2281
+
2282
+ meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
2283
+ mod_list.append(mod, meta)
2284
+ on_existing_matching_groups(meta, &block)
2285
+ end
2286
+ end
2287
+ # rubocop:enable Metrics/ClassLength
2288
+ end
2289
+ end