cvss-suite 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (841) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +2 -0
  5. data/.travis.yml +4 -0
  6. data/CODE_OF_CONDUCT.md +13 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE.md +20 -0
  9. data/README.md +88 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +7 -0
  13. data/cvss_suite.gemspec +39 -0
  14. data/lib/cvss_suite.rb +37 -0
  15. data/lib/cvss_suite/cvss.rb +88 -0
  16. data/lib/cvss_suite/cvss2/cvss2.rb +42 -0
  17. data/lib/cvss_suite/cvss2/cvss2_base.rb +81 -0
  18. data/lib/cvss_suite/cvss2/cvss2_environmental.rb +64 -0
  19. data/lib/cvss_suite/cvss2/cvss2_temporal.rb +47 -0
  20. data/lib/cvss_suite/cvss3/cvss3.rb +42 -0
  21. data/lib/cvss_suite/cvss3/cvss3_base.rb +85 -0
  22. data/lib/cvss_suite/cvss3/cvss3_environmental.rb +134 -0
  23. data/lib/cvss_suite/cvss3/cvss3_temporal.rb +47 -0
  24. data/lib/cvss_suite/cvss_metric.rb +44 -0
  25. data/lib/cvss_suite/cvss_property.rb +76 -0
  26. data/lib/cvss_suite/helpers/cvss3_helper.rb +20 -0
  27. data/lib/cvss_suite/helpers/extensions.rb +12 -0
  28. data/lib/cvss_suite/version.rb +3 -0
  29. data/vendor/cache/badgerbadgerbadger-0.14.0.gem +0 -0
  30. data/vendor/cache/diff-lcs-1.2.5.gem +0 -0
  31. data/vendor/cache/docile-1.1.5.gem +0 -0
  32. data/vendor/cache/git-1.3.0.gem +0 -0
  33. data/vendor/cache/json-1.8.3.gem +0 -0
  34. data/vendor/cache/rake-10.4.2.gem +0 -0
  35. data/vendor/cache/rdoc-4.2.0.gem +0 -0
  36. data/vendor/cache/rspec-3.4.0.gem +0 -0
  37. data/vendor/cache/rspec-core-3.4.0.gem +0 -0
  38. data/vendor/cache/rspec-expectations-3.4.0.gem +0 -0
  39. data/vendor/cache/rspec-its-1.2.0.gem +0 -0
  40. data/vendor/cache/rspec-mocks-3.4.0.gem +0 -0
  41. data/vendor/cache/rspec-support-3.4.0.gem +0 -0
  42. data/vendor/cache/ruby/2.2.0/bin/badger +23 -0
  43. data/vendor/cache/ruby/2.2.0/bin/htmldiff +25 -0
  44. data/vendor/cache/ruby/2.2.0/bin/ldiff +25 -0
  45. data/vendor/cache/ruby/2.2.0/bin/rspec +23 -0
  46. data/vendor/cache/ruby/2.2.0/bin/thor +23 -0
  47. data/vendor/cache/ruby/2.2.0/cache/badgerbadgerbadger-0.14.0.gem +0 -0
  48. data/vendor/cache/ruby/2.2.0/cache/diff-lcs-1.2.5.gem +0 -0
  49. data/vendor/cache/ruby/2.2.0/cache/docile-1.1.5.gem +0 -0
  50. data/vendor/cache/ruby/2.2.0/cache/git-1.3.0.gem +0 -0
  51. data/vendor/cache/ruby/2.2.0/cache/json-1.8.3.gem +0 -0
  52. data/vendor/cache/ruby/2.2.0/cache/rake-10.4.2.gem +0 -0
  53. data/vendor/cache/ruby/2.2.0/cache/rdoc-4.2.0.gem +0 -0
  54. data/vendor/cache/ruby/2.2.0/cache/rspec-3.4.0.gem +0 -0
  55. data/vendor/cache/ruby/2.2.0/cache/rspec-core-3.4.0.gem +0 -0
  56. data/vendor/cache/ruby/2.2.0/cache/rspec-expectations-3.4.0.gem +0 -0
  57. data/vendor/cache/ruby/2.2.0/cache/rspec-its-1.2.0.gem +0 -0
  58. data/vendor/cache/ruby/2.2.0/cache/rspec-mocks-3.4.0.gem +0 -0
  59. data/vendor/cache/ruby/2.2.0/cache/rspec-support-3.4.0.gem +0 -0
  60. data/vendor/cache/ruby/2.2.0/cache/simplecov-0.11.2.gem +0 -0
  61. data/vendor/cache/ruby/2.2.0/cache/simplecov-html-0.10.0.gem +0 -0
  62. data/vendor/cache/ruby/2.2.0/cache/thor-0.19.1.gem +0 -0
  63. data/vendor/cache/ruby/2.2.0/extensions/x86-linux/2.2.0/json-1.8.3/gem.build_complete +0 -0
  64. data/vendor/cache/ruby/2.2.0/extensions/x86-linux/2.2.0/json-1.8.3/gem_make.out +9 -0
  65. data/vendor/cache/ruby/2.2.0/extensions/x86-linux/2.2.0/json-1.8.3/json/ext/generator.so +0 -0
  66. data/vendor/cache/ruby/2.2.0/extensions/x86-linux/2.2.0/json-1.8.3/json/ext/parser.so +0 -0
  67. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/.gitignore +19 -0
  68. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/.rspec +2 -0
  69. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/.travis.yml +15 -0
  70. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/DESC.md +27 -0
  71. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/Gemfile +7 -0
  72. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/Guardfile +30 -0
  73. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/LICENSE.md +22 -0
  74. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/README.md +53 -0
  75. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/Rakefile +10 -0
  76. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/badger.gemspec +34 -0
  77. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/bin/badger +4 -0
  78. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/config/config.yaml +8 -0
  79. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/config/licenses.yaml +25 -0
  80. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/config/services.yaml +40 -0
  81. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/alternative-styles.feature +24 -0
  82. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/badger.feature +50 -0
  83. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/heroku-only-remote.feature +12 -0
  84. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/licenses.feature +61 -0
  85. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/multiple-remotes.feature +18 -0
  86. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/png.feature +17 -0
  87. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/pulls-and-issues.feature +19 -0
  88. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/remote-with-different-name.feature +17 -0
  89. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/rubygems.feature +46 -0
  90. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/services.feature +53 -0
  91. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/size.feature +18 -0
  92. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/ssh-remote.feature +39 -0
  93. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/step_definitions/badger_steps.rb +11 -0
  94. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/env.rb +11 -0
  95. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/fixtures/licenses/apache.txt +202 -0
  96. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/fixtures/licenses/doge.md +1 -0
  97. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/fixtures/licenses/gpl-2.0.txt +339 -0
  98. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/fixtures/licenses/gpl-3.0.txt +674 -0
  99. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/fixtures/licenses/mit.md +22 -0
  100. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/hooks/hooks.rb +15 -0
  101. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/hooks/licenses.rb +19 -0
  102. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/hooks/rubygems.rb +66 -0
  103. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/features/support/hooks/services.rb +17 -0
  104. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger.rb +15 -0
  105. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/badge.rb +20 -0
  106. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/badger.rb +61 -0
  107. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/bonus.rb +17 -0
  108. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/cli.rb +56 -0
  109. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb +49 -0
  110. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/helpers.rb +95 -0
  111. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/license.rb +22 -0
  112. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/rubygem.rb +16 -0
  113. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/service.rb +46 -0
  114. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/version.rb +3 -0
  115. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/badge_types_spec.rb +27 -0
  116. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/badger_spec.rb +62 -0
  117. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/licenses_spec.rb +42 -0
  118. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/services_spec.rb +33 -0
  119. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/size_spec.rb +20 -0
  120. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/spec_helper.rb +22 -0
  121. data/vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/spec/user_and_repo_spec.rb +33 -0
  122. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/.autotest +3 -0
  123. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/.gemtest +0 -0
  124. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/.hoerc +2 -0
  125. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/.rspec +2 -0
  126. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/.travis.yml +22 -0
  127. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
  128. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/Gemfile +20 -0
  129. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/History.rdoc +152 -0
  130. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/License.rdoc +39 -0
  131. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
  132. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/README.rdoc +85 -0
  133. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/Rakefile +41 -0
  134. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
  135. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
  136. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
  137. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
  138. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
  139. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
  140. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
  141. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
  142. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
  143. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
  144. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
  145. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
  146. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
  147. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
  148. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
  149. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
  150. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
  151. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
  152. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
  153. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
  154. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
  155. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
  156. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
  157. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
  158. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
  159. data/vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
  160. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/.gitignore +9 -0
  161. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/.rspec +2 -0
  162. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/.ruby-gemset +1 -0
  163. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/.ruby-version +1 -0
  164. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/.travis.yml +21 -0
  165. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/.yardopts +7 -0
  166. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/Gemfile +4 -0
  167. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/HISTORY.md +61 -0
  168. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/LICENSE +21 -0
  169. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/README.md +241 -0
  170. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/Rakefile +28 -0
  171. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/docile.gemspec +43 -0
  172. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/lib/docile.rb +84 -0
  173. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/lib/docile/chaining_fallback_context_proxy.rb +20 -0
  174. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/lib/docile/execution.rb +35 -0
  175. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/lib/docile/fallback_context_proxy.rb +63 -0
  176. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/lib/docile/version.rb +4 -0
  177. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/on_what.rb +14 -0
  178. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/spec/docile_spec.rb +339 -0
  179. data/vendor/cache/ruby/2.2.0/gems/docile-1.1.5/spec/spec_helper.rb +30 -0
  180. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/CHANGELOG +84 -0
  181. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/LICENSE +21 -0
  182. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/README.md +297 -0
  183. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/VERSION +2 -0
  184. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git.rb +166 -0
  185. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/author.rb +14 -0
  186. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/base.rb +540 -0
  187. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/base/factory.rb +75 -0
  188. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/branch.rb +122 -0
  189. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/branches.rb +71 -0
  190. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/config.rb +22 -0
  191. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/diff.rb +158 -0
  192. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/index.rb +5 -0
  193. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/lib.rb +1011 -0
  194. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/log.rb +128 -0
  195. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/object.rb +312 -0
  196. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/path.rb +31 -0
  197. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb +36 -0
  198. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/repository.rb +6 -0
  199. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/stash.rb +27 -0
  200. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/stashes.rb +44 -0
  201. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/status.rb +117 -0
  202. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/version.rb +7 -0
  203. data/vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/working_directory.rb +4 -0
  204. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/.gitignore +16 -0
  205. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/.travis.yml +26 -0
  206. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/CHANGES +295 -0
  207. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/COPYING +58 -0
  208. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/COPYING-json-jruby +57 -0
  209. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/GPL +340 -0
  210. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/Gemfile +10 -0
  211. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/README-json-jruby.markdown +33 -0
  212. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/README.rdoc +358 -0
  213. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/Rakefile +412 -0
  214. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/TODO +1 -0
  215. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/VERSION +1 -0
  216. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/data/example.json +1 -0
  217. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/data/index.html +38 -0
  218. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/data/prototype.js +4184 -0
  219. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/diagrams/.keep +0 -0
  220. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/fbuffer/fbuffer.h +190 -0
  221. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/generator/.RUBYARCHDIR.-.json.-.ext.time +0 -0
  222. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/generator/depend +1 -0
  223. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/generator/extconf.rb +4 -0
  224. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/generator/generator.c +1458 -0
  225. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/generator/generator.h +166 -0
  226. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/generator/generator.so +0 -0
  227. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/.RUBYARCHDIR.-.json.-.ext.time +0 -0
  228. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/depend +1 -0
  229. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/extconf.rb +3 -0
  230. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/parser.c +2216 -0
  231. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/parser.h +92 -0
  232. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/parser.rl +939 -0
  233. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/ext/parser/parser.so +0 -0
  234. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/ext/json/extconf.rb +3 -0
  235. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/install.rb +23 -0
  236. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/ByteListTranscoder.java +167 -0
  237. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/Generator.java +444 -0
  238. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/GeneratorMethods.java +232 -0
  239. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/GeneratorService.java +43 -0
  240. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/GeneratorState.java +543 -0
  241. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/OptionsReader.java +114 -0
  242. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/Parser.java +2645 -0
  243. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/Parser.rl +969 -0
  244. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/ParserService.java +35 -0
  245. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/RuntimeInfo.java +121 -0
  246. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/StringDecoder.java +167 -0
  247. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/StringEncoder.java +106 -0
  248. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/java/src/json/ext/Utils.java +89 -0
  249. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/json-java.gemspec +23 -0
  250. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/json.gemspec +0 -0
  251. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/json_pure.gemspec +40 -0
  252. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json.rb +62 -0
  253. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/bigdecimal.rb +28 -0
  254. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/complex.rb +28 -0
  255. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/core.rb +11 -0
  256. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/date.rb +34 -0
  257. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/date_time.rb +50 -0
  258. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/exception.rb +31 -0
  259. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/ostruct.rb +31 -0
  260. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/range.rb +29 -0
  261. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/rational.rb +27 -0
  262. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/regexp.rb +30 -0
  263. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/struct.rb +30 -0
  264. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/symbol.rb +25 -0
  265. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/add/time.rb +38 -0
  266. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/common.rb +484 -0
  267. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/ext.rb +21 -0
  268. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/ext/.keep +0 -0
  269. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/ext/generator.so +0 -0
  270. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/ext/parser.so +0 -0
  271. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/generic_object.rb +70 -0
  272. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/pure.rb +21 -0
  273. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/pure/generator.rb +522 -0
  274. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/pure/parser.rb +359 -0
  275. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/lib/json/version.rb +8 -0
  276. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail1.json +1 -0
  277. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail10.json +1 -0
  278. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail11.json +1 -0
  279. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail12.json +1 -0
  280. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail13.json +1 -0
  281. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail14.json +1 -0
  282. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail18.json +1 -0
  283. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail19.json +1 -0
  284. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail2.json +1 -0
  285. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail20.json +1 -0
  286. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail21.json +1 -0
  287. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail22.json +1 -0
  288. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail23.json +1 -0
  289. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail24.json +1 -0
  290. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail25.json +1 -0
  291. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail27.json +2 -0
  292. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail28.json +2 -0
  293. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail3.json +1 -0
  294. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail4.json +1 -0
  295. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail5.json +1 -0
  296. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail6.json +1 -0
  297. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail7.json +1 -0
  298. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail8.json +1 -0
  299. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/fail9.json +1 -0
  300. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass1.json +56 -0
  301. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass15.json +1 -0
  302. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass16.json +1 -0
  303. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass17.json +1 -0
  304. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass2.json +1 -0
  305. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass26.json +1 -0
  306. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/fixtures/pass3.json +6 -0
  307. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/setup_variant.rb +11 -0
  308. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json.rb +553 -0
  309. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_addition.rb +196 -0
  310. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_encoding.rb +65 -0
  311. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_fixtures.rb +35 -0
  312. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_generate.rb +337 -0
  313. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_generic_object.rb +75 -0
  314. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_string_matching.rb +39 -0
  315. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tests/test_json_unicode.rb +72 -0
  316. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tools/fuzz.rb +139 -0
  317. data/vendor/cache/ruby/2.2.0/gems/json-1.8.3/tools/server.rb +62 -0
  318. data/vendor/cache/ruby/2.2.0/gems/rspec-3.4.0/LICENSE.md +27 -0
  319. data/vendor/cache/ruby/2.2.0/gems/rspec-3.4.0/README.md +39 -0
  320. data/vendor/cache/ruby/2.2.0/gems/rspec-3.4.0/lib/rspec.rb +3 -0
  321. data/vendor/cache/ruby/2.2.0/gems/rspec-3.4.0/lib/rspec/version.rb +5 -0
  322. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/.document +5 -0
  323. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/.yardopts +8 -0
  324. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/Changelog.md +1925 -0
  325. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/LICENSE.md +26 -0
  326. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/README.md +384 -0
  327. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/exe/rspec +4 -0
  328. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/autorun.rb +3 -0
  329. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core.rb +181 -0
  330. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/backtrace_formatter.rb +64 -0
  331. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/bisect/coordinator.rb +66 -0
  332. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/bisect/example_minimizer.rb +169 -0
  333. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/bisect/runner.rb +139 -0
  334. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/bisect/server.rb +61 -0
  335. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/configuration.rb +1869 -0
  336. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/configuration_options.rb +191 -0
  337. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/drb.rb +111 -0
  338. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/dsl.rb +96 -0
  339. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/example.rb +620 -0
  340. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/example_group.rb +816 -0
  341. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/example_status_persister.rb +235 -0
  342. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/filter_manager.rb +231 -0
  343. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/flat_map.rb +20 -0
  344. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters.rb +255 -0
  345. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  346. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/base_text_formatter.rb +77 -0
  347. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/bisect_formatter.rb +68 -0
  348. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +144 -0
  349. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/console_codes.rb +65 -0
  350. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  351. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
  352. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/exception_presenter.rb +480 -0
  353. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  354. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/helpers.rb +109 -0
  355. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/html_formatter.rb +151 -0
  356. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/html_printer.rb +414 -0
  357. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/html_snippet_extractor.rb +116 -0
  358. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/json_formatter.rb +96 -0
  359. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  360. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/progress_formatter.rb +28 -0
  361. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/protocol.rb +181 -0
  362. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/formatters/snippet_extractor.rb +143 -0
  363. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/hooks.rb +638 -0
  364. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/memoized_helpers.rb +532 -0
  365. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/metadata.rb +491 -0
  366. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/metadata_filter.rb +240 -0
  367. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  368. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  369. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  370. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  371. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  372. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  373. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/notifications.rb +499 -0
  374. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/option_parser.rb +319 -0
  375. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/ordering.rb +158 -0
  376. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/pending.rb +165 -0
  377. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/profiler.rb +32 -0
  378. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/project_initializer.rb +48 -0
  379. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/project_initializer/.rspec +2 -0
  380. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +96 -0
  381. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/rake_task.rb +167 -0
  382. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/reporter.rb +236 -0
  383. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/ruby_project.rb +53 -0
  384. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/runner.rb +179 -0
  385. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/sandbox.rb +37 -0
  386. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/set.rb +49 -0
  387. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/shared_context.rb +55 -0
  388. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/shared_example_group.rb +212 -0
  389. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/shell_escape.rb +49 -0
  390. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/source.rb +76 -0
  391. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/source/location.rb +13 -0
  392. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/source/node.rb +93 -0
  393. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/source/syntax_highlighter.rb +71 -0
  394. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/source/token.rb +43 -0
  395. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  396. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/version.rb +9 -0
  397. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/warnings.rb +40 -0
  398. data/vendor/cache/ruby/2.2.0/gems/rspec-core-3.4.0/lib/rspec/core/world.rb +197 -0
  399. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/.document +5 -0
  400. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/.yardopts +6 -0
  401. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/Changelog.md +979 -0
  402. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/LICENSE.md +25 -0
  403. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/README.md +303 -0
  404. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations.rb +81 -0
  405. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/configuration.rb +164 -0
  406. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/expectation_target.rb +113 -0
  407. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/fail_with.rb +31 -0
  408. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/failure_aggregator.rb +194 -0
  409. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/handler.rb +170 -0
  410. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/minitest_integration.rb +31 -0
  411. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/syntax.rb +132 -0
  412. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/expectations/version.rb +8 -0
  413. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers.rb +1037 -0
  414. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/aliased_matcher.rb +116 -0
  415. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in.rb +52 -0
  416. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/all.rb +85 -0
  417. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/base_matcher.rb +181 -0
  418. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/be.rb +285 -0
  419. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/be_between.rb +77 -0
  420. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
  421. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
  422. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/be_within.rb +72 -0
  423. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/change.rb +354 -0
  424. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/compound.rb +272 -0
  425. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/contain_exactly.rb +286 -0
  426. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/cover.rb +24 -0
  427. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/eq.rb +40 -0
  428. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/eql.rb +34 -0
  429. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/equal.rb +81 -0
  430. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/exist.rb +86 -0
  431. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/has.rb +103 -0
  432. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  433. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/include.rb +130 -0
  434. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/match.rb +106 -0
  435. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/operators.rb +128 -0
  436. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/output.rb +200 -0
  437. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/raise_error.rb +228 -0
  438. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/respond_to.rb +90 -0
  439. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/satisfy.rb +37 -0
  440. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  441. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  442. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/built_in/yield.rb +419 -0
  443. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/composable.rb +185 -0
  444. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/dsl.rb +453 -0
  445. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/english_phrasing.rb +42 -0
  446. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  447. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/fail_matchers.rb +42 -0
  448. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/generated_descriptions.rb +42 -0
  449. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/matcher_delegator.rb +35 -0
  450. data/vendor/cache/ruby/2.2.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers/matcher_protocol.rb +99 -0
  451. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/.gitignore +19 -0
  452. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/.rspec +3 -0
  453. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/.travis.yml +24 -0
  454. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/Changelog.md +49 -0
  455. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/Gemfile +26 -0
  456. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/LICENSE.txt +27 -0
  457. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/README.md +72 -0
  458. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/Rakefile +16 -0
  459. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/cucumber.yml +2 -0
  460. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/features/its.feature +125 -0
  461. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/features/step_definitions/additional_cli_steps.rb +21 -0
  462. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/features/support/env.rb +23 -0
  463. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/lib/rspec/its.rb +149 -0
  464. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/lib/rspec/its/version.rb +5 -0
  465. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/rspec-its.gemspec +28 -0
  466. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/script/test_all +20 -0
  467. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/spec/rspec/its_spec.rb +237 -0
  468. data/vendor/cache/ruby/2.2.0/gems/rspec-its-1.2.0/spec/spec_helper.rb +15 -0
  469. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/.document +5 -0
  470. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/.yardopts +6 -0
  471. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/Changelog.md +984 -0
  472. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/LICENSE.md +25 -0
  473. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/README.md +445 -0
  474. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks.rb +126 -0
  475. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance.rb +11 -0
  476. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
  477. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  478. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
  479. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/expectation_chain.rb +48 -0
  480. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  481. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  482. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/recorder.rb +264 -0
  483. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/stub_chain.rb +46 -0
  484. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +27 -0
  485. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  486. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/argument_matchers.rb +320 -0
  487. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/configuration.rb +205 -0
  488. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/error_generator.rb +367 -0
  489. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/example_methods.rb +422 -0
  490. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/instance_method_stasher.rb +134 -0
  491. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  492. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  493. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/matchers/have_received.rb +128 -0
  494. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/matchers/receive.rb +130 -0
  495. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/matchers/receive_message_chain.rb +80 -0
  496. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/matchers/receive_messages.rb +75 -0
  497. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/message_chain.rb +87 -0
  498. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/message_expectation.rb +717 -0
  499. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/method_double.rb +287 -0
  500. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/method_reference.rb +192 -0
  501. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/mutate_const.rb +335 -0
  502. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/object_reference.rb +149 -0
  503. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/order_group.rb +81 -0
  504. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/proxy.rb +484 -0
  505. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/space.rb +238 -0
  506. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/standalone.rb +3 -0
  507. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/syntax.rb +325 -0
  508. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/targets.rb +97 -0
  509. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/test_double.rb +170 -0
  510. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/verifying_double.rb +129 -0
  511. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  512. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/verifying_proxy.rb +213 -0
  513. data/vendor/cache/ruby/2.2.0/gems/rspec-mocks-3.4.0/lib/rspec/mocks/version.rb +9 -0
  514. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/Changelog.md +141 -0
  515. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/LICENSE.md +23 -0
  516. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/README.md +40 -0
  517. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support.rb +139 -0
  518. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/caller_filter.rb +83 -0
  519. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/comparable_version.rb +46 -0
  520. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/differ.rb +215 -0
  521. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/directory_maker.rb +63 -0
  522. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/encoded_string.rb +155 -0
  523. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  524. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/hunk_generator.rb +47 -0
  525. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/matcher_definition.rb +42 -0
  526. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/method_signature_verifier.rb +290 -0
  527. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/mutex.rb +73 -0
  528. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/object_formatter.rb +108 -0
  529. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  530. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/reentrant_mutex.rb +53 -0
  531. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/ruby_features.rb +147 -0
  532. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec.rb +81 -0
  533. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  534. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  535. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/in_sub_process.rb +52 -0
  536. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/library_wide_checks.rb +152 -0
  537. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/shell_out.rb +71 -0
  538. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  539. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  540. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/with_isolated_directory.rb +9 -0
  541. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  542. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/version.rb +7 -0
  543. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/version_checker.rb +53 -0
  544. data/vendor/cache/ruby/2.2.0/gems/rspec-support-3.4.0/lib/rspec/support/warnings.rb +39 -0
  545. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/.gitignore +31 -0
  546. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/.rspec +3 -0
  547. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/.rubocop.yml +73 -0
  548. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/.travis.yml +27 -0
  549. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/.yardopts +1 -0
  550. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/CHANGELOG.md +391 -0
  551. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/CONTRIBUTING.md +48 -0
  552. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/Gemfile +34 -0
  553. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/MIT-LICENSE +20 -0
  554. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/README.md +646 -0
  555. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/Rakefile +36 -0
  556. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/cucumber.yml +13 -0
  557. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/doc/alternate-formatters.md +36 -0
  558. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/doc/commercial-services.md +20 -0
  559. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/doc/editor-integration.md +13 -0
  560. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_autoload.feature +46 -0
  561. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_command_name.feature +45 -0
  562. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_coverage_dir.feature +33 -0
  563. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_deactivate_merging.feature +42 -0
  564. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_formatters.feature +77 -0
  565. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_merge_timeout.feature +39 -0
  566. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_nocov_token.feature +79 -0
  567. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_profiles.feature +44 -0
  568. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_project_name.feature +27 -0
  569. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_styles.feature +121 -0
  570. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/config_tracked_files.feature +29 -0
  571. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/cucumber_basic.feature +29 -0
  572. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/maximum_coverage_drop.feature +36 -0
  573. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/merging_test_unit_and_rspec.feature +44 -0
  574. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/minimum_coverage.feature +59 -0
  575. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/refuse_coverage_drop.feature +35 -0
  576. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/rspec_basic.feature +32 -0
  577. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/rspec_fails_on_initialization.feature +14 -0
  578. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/rspec_groups_and_filters_basic.feature +29 -0
  579. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/rspec_groups_and_filters_complex.feature +37 -0
  580. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/rspec_groups_using_filter_class.feature +41 -0
  581. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/rspec_without_simplecov.feature +20 -0
  582. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/skipping_code_blocks_manually.feature +70 -0
  583. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/step_definitions/html_steps.rb +44 -0
  584. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/step_definitions/simplecov_steps.rb +68 -0
  585. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/step_definitions/transformers.rb +13 -0
  586. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/step_definitions/web_steps.rb +64 -0
  587. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb +50 -0
  588. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/test_unit_basic.feature +34 -0
  589. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/test_unit_groups_and_filters_basic.feature +29 -0
  590. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/test_unit_groups_and_filters_complex.feature +35 -0
  591. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/test_unit_groups_using_filter_class.feature +40 -0
  592. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/test_unit_without_simplecov.feature +20 -0
  593. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/unicode_compatiblity.feature +67 -0
  594. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov.rb +183 -0
  595. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/command_guesser.rb +59 -0
  596. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/configuration.rb +296 -0
  597. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/defaults.rb +122 -0
  598. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/exit_codes.rb +8 -0
  599. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/file_list.rb +59 -0
  600. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/filter.rb +54 -0
  601. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/formatter.rb +8 -0
  602. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/formatter/multi_formatter.rb +32 -0
  603. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/formatter/simple_formatter.rb +23 -0
  604. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/jruby_fix.rb +42 -0
  605. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb +22 -0
  606. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/merge_helpers.rb +35 -0
  607. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/no_defaults.rb +2 -0
  608. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/profiles.rb +31 -0
  609. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/railtie.rb +7 -0
  610. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/railties/tasks.rake +11 -0
  611. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/result.rb +82 -0
  612. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/result_merger.rb +88 -0
  613. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/source_file.rb +190 -0
  614. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/version.rb +25 -0
  615. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/simplecov.gemspec +27 -0
  616. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/1_8_fallbacks_spec.rb +29 -0
  617. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/command_guesser_spec.rb +46 -0
  618. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/deleted_source_spec.rb +12 -0
  619. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/Gemfile +6 -0
  620. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/Rakefile +8 -0
  621. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/cucumber.yml +13 -0
  622. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/features/step_definitions/my_steps.rb +22 -0
  623. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/features/support/env.rb +12 -0
  624. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/features/test_stuff.feature +6 -0
  625. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/lib/faked_project.rb +11 -0
  626. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/lib/faked_project/framework_specific.rb +18 -0
  627. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/lib/faked_project/meta_magic.rb +24 -0
  628. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/lib/faked_project/some_class.rb +28 -0
  629. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/lib/faked_project/untested_class.rb +11 -0
  630. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/spec/faked_spec.rb +11 -0
  631. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/spec/forking_spec.rb +7 -0
  632. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/spec/meta_magic_spec.rb +15 -0
  633. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/spec/some_class_spec.rb +13 -0
  634. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/spec/spec_helper.rb +11 -0
  635. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/test/faked_test.rb +11 -0
  636. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/test/meta_magic_test.rb +13 -0
  637. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/test/some_class_test.rb +15 -0
  638. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/faked_project/test/test_helper.rb +12 -0
  639. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/file_list_spec.rb +48 -0
  640. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/filters_spec.rb +96 -0
  641. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/app/controllers/sample_controller.rb +10 -0
  642. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/app/models/user.rb +10 -0
  643. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/deleted_source_sample.rb +15 -0
  644. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/frameworks/rspec_bad.rb +9 -0
  645. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/frameworks/rspec_good.rb +9 -0
  646. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/frameworks/testunit_bad.rb +9 -0
  647. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/frameworks/testunit_good.rb +9 -0
  648. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/iso-8859.rb +3 -0
  649. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/resultset1.rb +4 -0
  650. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/resultset2.rb +4 -0
  651. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/sample.rb +16 -0
  652. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/fixtures/utf-8.rb +3 -0
  653. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb +24 -0
  654. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/merge_helpers_spec.rb +108 -0
  655. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/multi_formatter_spec.rb +20 -0
  656. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/result_spec.rb +207 -0
  657. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/return_codes_spec.rb +37 -0
  658. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/source_file_line_spec.rb +153 -0
  659. data/vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/source_file_spec.rb +75 -0
  660. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/.document +5 -0
  661. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/.gitignore +27 -0
  662. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/.rubocop.yml +50 -0
  663. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/.travis.yml +27 -0
  664. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/Gemfile +22 -0
  665. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/Guardfile +12 -0
  666. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/LICENSE +20 -0
  667. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/README.md +30 -0
  668. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/Rakefile +41 -0
  669. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/application.js +127 -0
  670. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/libraries/jquery-1.6.2.min.js +18 -0
  671. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/plugins/highlight.pack.js +1 -0
  672. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/plugins/jquery.colorbox.js +1090 -0
  673. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/plugins/jquery.dataTables.min.js +152 -0
  674. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/plugins/jquery.timeago.js +141 -0
  675. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/javascripts/plugins/jquery.url.js +174 -0
  676. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/stylesheets/application.css +3 -0
  677. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/stylesheets/plugins/highlight.css +129 -0
  678. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css +295 -0
  679. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/stylesheets/plugins/jquery.colorbox.css +52 -0
  680. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/stylesheets/reset.css +103 -0
  681. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/assets/stylesheets/screen.css.sass +220 -0
  682. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/lib/simplecov-html.rb +110 -0
  683. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/lib/simplecov-html/version.rb +27 -0
  684. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/application.css +799 -0
  685. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/application.js +1707 -0
  686. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/colorbox/border.png +0 -0
  687. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/colorbox/controls.png +0 -0
  688. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/colorbox/loading.gif +0 -0
  689. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/colorbox/loading_background.png +0 -0
  690. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/favicon_green.png +0 -0
  691. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/favicon_red.png +0 -0
  692. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/favicon_yellow.png +0 -0
  693. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/loading.gif +0 -0
  694. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/magnify.png +0 -0
  695. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  696. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  697. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  698. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  699. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  700. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  701. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  702. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  703. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-icons_222222_256x240.png +0 -0
  704. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  705. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-icons_454545_256x240.png +0 -0
  706. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-icons_888888_256x240.png +0 -0
  707. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/public/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  708. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/simplecov-html.gemspec +22 -0
  709. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/test/helper.rb +4 -0
  710. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/test/test_simple_cov-html.rb +8 -0
  711. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/views/file_list.erb +45 -0
  712. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/views/layout.erb +41 -0
  713. data/vendor/cache/ruby/2.2.0/gems/simplecov-html-0.10.0/views/source_file.erb +23 -0
  714. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/.document +5 -0
  715. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/CHANGELOG.md +139 -0
  716. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/LICENSE.md +20 -0
  717. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/README.md +41 -0
  718. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/Thorfile +29 -0
  719. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/bin/thor +6 -0
  720. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor.rb +484 -0
  721. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb +319 -0
  722. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb +103 -0
  723. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_link.rb +59 -0
  724. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions/directory.rb +118 -0
  725. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb +135 -0
  726. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb +316 -0
  727. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb +107 -0
  728. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/base.rb +656 -0
  729. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/command.rb +133 -0
  730. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
  731. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/core_ext/io_binary_read.rb +10 -0
  732. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/core_ext/ordered_hash.rb +98 -0
  733. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/error.rb +32 -0
  734. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/group.rb +281 -0
  735. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb +178 -0
  736. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/line_editor.rb +17 -0
  737. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/line_editor/basic.rb +35 -0
  738. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/line_editor/readline.rb +88 -0
  739. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/parser.rb +4 -0
  740. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/parser/argument.rb +73 -0
  741. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/parser/arguments.rb +175 -0
  742. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/parser/option.rb +125 -0
  743. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/parser/options.rb +218 -0
  744. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/rake_compat.rb +71 -0
  745. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/runner.rb +322 -0
  746. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/shell.rb +81 -0
  747. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/shell/basic.rb +421 -0
  748. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/shell/color.rb +149 -0
  749. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/shell/html.rb +126 -0
  750. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/util.rb +267 -0
  751. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/lib/thor/version.rb +3 -0
  752. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions/create_file_spec.rb +168 -0
  753. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions/create_link_spec.rb +96 -0
  754. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions/directory_spec.rb +169 -0
  755. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions/empty_directory_spec.rb +129 -0
  756. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions/file_manipulation_spec.rb +392 -0
  757. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions/inject_into_file_spec.rb +135 -0
  758. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/actions_spec.rb +331 -0
  759. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/base_spec.rb +298 -0
  760. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/command_spec.rb +79 -0
  761. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/core_ext/hash_with_indifferent_access_spec.rb +48 -0
  762. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/core_ext/ordered_hash_spec.rb +115 -0
  763. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb +19 -0
  764. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/application.rb +2 -0
  765. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/app{1}/README +3 -0
  766. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/bundle/execute.rb +6 -0
  767. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/bundle/main.thor +1 -0
  768. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/command.thor +10 -0
  769. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/%file_name%.rb.tt +1 -0
  770. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/COMMENTER +11 -0
  771. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/README +3 -0
  772. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/block_helper.rb +3 -0
  773. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/config.rb +1 -0
  774. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/config.yaml.tt +1 -0
  775. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/doc/excluding/%file_name%.rb.tt +1 -0
  776. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/enum.thor +10 -0
  777. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/group.thor +128 -0
  778. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/invoke.thor +131 -0
  779. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/path with spaces b/data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/path with → spaces +0 -0
  780. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/preserve/script.sh +3 -0
  781. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/script.thor +220 -0
  782. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/fixtures/subcommand.thor +17 -0
  783. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/group_spec.rb +222 -0
  784. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/helper.rb +80 -0
  785. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/invocation_spec.rb +120 -0
  786. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/line_editor/basic_spec.rb +28 -0
  787. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/line_editor/readline_spec.rb +69 -0
  788. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/line_editor_spec.rb +43 -0
  789. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/parser/argument_spec.rb +53 -0
  790. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/parser/arguments_spec.rb +66 -0
  791. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/parser/option_spec.rb +210 -0
  792. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/parser/options_spec.rb +414 -0
  793. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/quality_spec.rb +75 -0
  794. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/rake_compat_spec.rb +72 -0
  795. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/register_spec.rb +227 -0
  796. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/runner_spec.rb +246 -0
  797. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/application.rb +2 -0
  798. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/app{1}/README +3 -0
  799. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/bundle/execute.rb +6 -0
  800. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/bundle/main.thor +1 -0
  801. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/command.thor +10 -0
  802. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/%file_name%.rb.tt +1 -0
  803. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/COMMENTER +11 -0
  804. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/README +3 -0
  805. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/block_helper.rb +3 -0
  806. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/config.rb +1 -0
  807. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/config.yaml.tt +1 -0
  808. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/doc/excluding/%file_name%.rb.tt +1 -0
  809. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/enum.thor +10 -0
  810. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/group.thor +128 -0
  811. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/invoke.thor +131 -0
  812. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/path with spaces b/data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/path with → spaces +0 -0
  813. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/preserve/script.sh +3 -0
  814. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/script.thor +220 -0
  815. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/sandbox/subcommand.thor +17 -0
  816. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/shell/basic_spec.rb +337 -0
  817. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/shell/color_spec.rb +119 -0
  818. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/shell/html_spec.rb +31 -0
  819. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/shell_spec.rb +47 -0
  820. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/subcommand_spec.rb +48 -0
  821. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/thor_spec.rb +505 -0
  822. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/util_spec.rb +196 -0
  823. data/vendor/cache/ruby/2.2.0/gems/thor-0.19.1/thor.gemspec +24 -0
  824. data/vendor/cache/ruby/2.2.0/specifications/badgerbadgerbadger-0.14.0.gemspec +70 -0
  825. data/vendor/cache/ruby/2.2.0/specifications/diff-lcs-1.2.5.gemspec +68 -0
  826. data/vendor/cache/ruby/2.2.0/specifications/docile-1.1.5.gemspec +48 -0
  827. data/vendor/cache/ruby/2.2.0/specifications/git-1.3.0.gemspec +42 -0
  828. data/vendor/cache/ruby/2.2.0/specifications/json-1.8.3.gemspec +0 -0
  829. data/vendor/cache/ruby/2.2.0/specifications/rspec-3.4.0.gemspec +42 -0
  830. data/vendor/cache/ruby/2.2.0/specifications/rspec-core-3.4.0.gemspec +68 -0
  831. data/vendor/cache/ruby/2.2.0/specifications/rspec-expectations-3.4.0.gemspec +50 -0
  832. data/vendor/cache/ruby/2.2.0/specifications/rspec-its-1.2.0.gemspec +47 -0
  833. data/vendor/cache/ruby/2.2.0/specifications/rspec-mocks-3.4.0.gemspec +50 -0
  834. data/vendor/cache/ruby/2.2.0/specifications/rspec-support-3.4.0.gemspec +41 -0
  835. data/vendor/cache/ruby/2.2.0/specifications/simplecov-0.11.2.gemspec +42 -0
  836. data/vendor/cache/ruby/2.2.0/specifications/simplecov-html-0.10.0.gemspec +33 -0
  837. data/vendor/cache/ruby/2.2.0/specifications/thor-0.19.1.gemspec +34 -0
  838. data/vendor/cache/simplecov-0.11.2.gem +0 -0
  839. data/vendor/cache/simplecov-html-0.10.0.gem +0 -0
  840. data/vendor/cache/thor-0.19.1.gem +0 -0
  841. metadata +983 -0
@@ -0,0 +1,1869 @@
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
+
5
+ module RSpec
6
+ module Core
7
+ # rubocop:disable Metrics/ClassLength
8
+
9
+ # Stores runtime configuration information.
10
+ #
11
+ # Configuration options are loaded from `~/.rspec`, `.rspec`,
12
+ # `.rspec-local`, command line switches, and the `SPEC_OPTS` environment
13
+ # variable (listed in lowest to highest precedence; for example, an option
14
+ # in `~/.rspec` can be overridden by an option in `.rspec-local`).
15
+ #
16
+ # @example Standard settings
17
+ # RSpec.configure do |c|
18
+ # c.drb = true
19
+ # c.drb_port = 1234
20
+ # c.default_path = 'behavior'
21
+ # end
22
+ #
23
+ # @example Hooks
24
+ # RSpec.configure do |c|
25
+ # c.before(:suite) { establish_connection }
26
+ # c.before(:example) { log_in_as :authorized }
27
+ # c.around(:example) { |ex| Database.transaction(&ex) }
28
+ # end
29
+ #
30
+ # @see RSpec.configure
31
+ # @see Hooks
32
+ class Configuration
33
+ include RSpec::Core::Hooks
34
+
35
+ # Module that holds `attr_reader` declarations. It's in a separate
36
+ # module to allow us to override those methods and use `super`.
37
+ # @private
38
+ Readers = Module.new
39
+ include Readers
40
+
41
+ # @private
42
+ class MustBeConfiguredBeforeExampleGroupsError < StandardError; end
43
+
44
+ # @private
45
+ def self.define_reader(name)
46
+ Readers.class_eval do
47
+ remove_method name if method_defined?(name)
48
+ attr_reader name
49
+ end
50
+
51
+ define_method(name) { value_for(name) { super() } }
52
+ end
53
+
54
+ # @private
55
+ def self.define_aliases(name, alias_name)
56
+ alias_method alias_name, name
57
+ alias_method "#{alias_name}=", "#{name}="
58
+ define_predicate_for alias_name
59
+ end
60
+
61
+ # @private
62
+ def self.define_predicate_for(*names)
63
+ names.each { |name| alias_method "#{name}?", name }
64
+ end
65
+
66
+ # @private
67
+ #
68
+ # Invoked by the `add_setting` instance method. Use that method on a
69
+ # `Configuration` instance rather than this class method.
70
+ def self.add_setting(name, opts={})
71
+ raise "Use the instance add_setting method if you want to set a default" if opts.key?(:default)
72
+ attr_writer name
73
+ add_read_only_setting name
74
+
75
+ Array(opts[:alias_with]).each do |alias_name|
76
+ define_aliases(name, alias_name)
77
+ end
78
+ end
79
+
80
+ # @private
81
+ #
82
+ # As `add_setting` but only add the reader.
83
+ def self.add_read_only_setting(name, opts={})
84
+ raise "Use the instance add_setting method if you want to set a default" if opts.key?(:default)
85
+ define_reader name
86
+ define_predicate_for name
87
+ end
88
+
89
+ # @macro [attach] add_setting
90
+ # @!attribute [rw] $1
91
+ # @!method $1=(value)
92
+ #
93
+ # @macro [attach] define_reader
94
+ # @!attribute [r] $1
95
+
96
+ # @macro add_setting
97
+ # Path to use if no path is provided to the `rspec` command (default:
98
+ # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to
99
+ # run all the examples in the `spec` directory.
100
+ #
101
+ # @note Other scripts invoking `rspec` indirectly will ignore this
102
+ # setting.
103
+ add_read_only_setting :default_path
104
+ def default_path=(path)
105
+ project_source_dirs << path
106
+ @default_path = path
107
+ end
108
+
109
+ # @macro add_setting
110
+ # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb
111
+ # server, but you can use tools like spork.
112
+ add_setting :drb
113
+
114
+ # @macro add_setting
115
+ # The drb_port (default: nil).
116
+ add_setting :drb_port
117
+
118
+ # @macro add_setting
119
+ # Default: `$stderr`.
120
+ add_setting :error_stream
121
+
122
+ # Indicates if the DSL has been exposed off of modules and `main`.
123
+ # Default: true
124
+ def expose_dsl_globally?
125
+ Core::DSL.exposed_globally?
126
+ end
127
+
128
+ # Use this to expose the core RSpec DSL via `Module` and the `main`
129
+ # object. It will be set automatically but you can override it to
130
+ # remove the DSL.
131
+ # Default: true
132
+ def expose_dsl_globally=(value)
133
+ if value
134
+ Core::DSL.expose_globally!
135
+ Core::SharedExampleGroup::TopLevelDSL.expose_globally!
136
+ else
137
+ Core::DSL.remove_globally!
138
+ Core::SharedExampleGroup::TopLevelDSL.remove_globally!
139
+ end
140
+ end
141
+
142
+ # Determines where deprecation warnings are printed.
143
+ # Defaults to `$stderr`.
144
+ # @return [IO, String] IO to write to or filename to write to
145
+ define_reader :deprecation_stream
146
+
147
+ # Determines where deprecation warnings are printed.
148
+ # @param value [IO, String] IO to write to or filename to write to
149
+ def deprecation_stream=(value)
150
+ if @reporter && !value.equal?(@deprecation_stream)
151
+ warn "RSpec's reporter has already been initialized with " \
152
+ "#{deprecation_stream.inspect} as the deprecation stream, so your change to "\
153
+ "`deprecation_stream` will be ignored. You should configure it earlier for " \
154
+ "it to take effect, or use the `--deprecation-out` CLI option. " \
155
+ "(Called from #{CallerFilter.first_non_rspec_line})"
156
+ else
157
+ @deprecation_stream = value
158
+ end
159
+ end
160
+
161
+ # @macro define_reader
162
+ # The file path to use for persisting example statuses. Necessary for the
163
+ # `--only-failures` and `--next-failures` CLI options.
164
+ #
165
+ # @overload example_status_persistence_file_path
166
+ # @return [String] the file path
167
+ # @overload example_status_persistence_file_path=(value)
168
+ # @param value [String] the file path
169
+ define_reader :example_status_persistence_file_path
170
+
171
+ # Sets the file path to use for persisting example statuses. Necessary for the
172
+ # `--only-failures` and `--next-failures` CLI options.
173
+ def example_status_persistence_file_path=(value)
174
+ @example_status_persistence_file_path = value
175
+ clear_values_derived_from_example_status_persistence_file_path
176
+ end
177
+
178
+ # @macro define_reader
179
+ # Indicates if the `--only-failures` (or `--next-failure`) flag is being used.
180
+ define_reader :only_failures
181
+ alias_method :only_failures?, :only_failures
182
+
183
+ # @private
184
+ def only_failures_but_not_configured?
185
+ only_failures? && !example_status_persistence_file_path
186
+ end
187
+
188
+ # @macro add_setting
189
+ # If specified, indicates the number of failures required before cleaning
190
+ # up and exit (default: `nil`).
191
+ add_setting :fail_fast
192
+
193
+ # @macro add_setting
194
+ # Prints the formatter output of your suite without running any
195
+ # examples or hooks.
196
+ add_setting :dry_run
197
+
198
+ # @macro add_setting
199
+ # The exit code to return if there are any failures (default: 1).
200
+ add_setting :failure_exit_code
201
+
202
+ # @macro define_reader
203
+ # Indicates files configured to be required.
204
+ define_reader :requires
205
+
206
+ # @macro define_reader
207
+ # Returns dirs that have been prepended to the load path by the `-I`
208
+ # command line option.
209
+ define_reader :libs
210
+
211
+ # @macro add_setting
212
+ # Determines where RSpec will send its output.
213
+ # Default: `$stdout`.
214
+ define_reader :output_stream
215
+
216
+ # Set the output stream for reporter.
217
+ # @attr value [IO] value for output, defaults to $stdout
218
+ def output_stream=(value)
219
+ if @reporter && !value.equal?(@output_stream)
220
+ warn "RSpec's reporter has already been initialized with " \
221
+ "#{output_stream.inspect} as the output stream, so your change to "\
222
+ "`output_stream` will be ignored. You should configure it earlier for " \
223
+ "it to take effect. (Called from #{CallerFilter.first_non_rspec_line})"
224
+ else
225
+ @output_stream = value
226
+ end
227
+ end
228
+
229
+ # @macro define_reader
230
+ # Load files matching this pattern (default: `'**{,/*/**}/*_spec.rb'`).
231
+ define_reader :pattern
232
+
233
+ # Set pattern to match files to load.
234
+ # @attr value [String] the filename pattern to filter spec files by
235
+ def pattern=(value)
236
+ update_pattern_attr :pattern, value
237
+ end
238
+
239
+ # @macro define_reader
240
+ # Exclude files matching this pattern.
241
+ define_reader :exclude_pattern
242
+
243
+ # Set pattern to match files to exclude.
244
+ # @attr value [String] the filename pattern to exclude spec files by
245
+ def exclude_pattern=(value)
246
+ update_pattern_attr :exclude_pattern, value
247
+ end
248
+
249
+ # @macro add_setting
250
+ # Specifies which directories contain the source code for your project.
251
+ # When a failure occurs, RSpec looks through the backtrace to find a
252
+ # a line of source to print. It first looks for a line coming from
253
+ # one of the project source directories so that, for example, it prints
254
+ # the expectation or assertion call rather than the source code from
255
+ # the expectation or assertion framework.
256
+ # @return [Array<String>]
257
+ add_setting :project_source_dirs
258
+
259
+ # @macro add_setting
260
+ # Report the times for the slowest examples (default: `false`).
261
+ # Use this to specify the number of examples to include in the profile.
262
+ add_setting :profile_examples
263
+
264
+ # @macro add_setting
265
+ # Run all examples if none match the configured filters
266
+ # (default: `false`).
267
+ add_setting :run_all_when_everything_filtered
268
+
269
+ # @macro add_setting
270
+ # Color to use to indicate success.
271
+ # @param color [Symbol] defaults to `:green` but can be set to one of the
272
+ # following: `[:black, :white, :red, :green, :yellow, :blue, :magenta,
273
+ # :cyan]`
274
+ add_setting :success_color
275
+
276
+ # @macro add_setting
277
+ # Color to use to print pending examples.
278
+ # @param color [Symbol] defaults to `:yellow` but can be set to one of the
279
+ # following: `[:black, :white, :red, :green, :yellow, :blue, :magenta,
280
+ # :cyan]`
281
+ add_setting :pending_color
282
+
283
+ # @macro add_setting
284
+ # Color to use to indicate failure.
285
+ # @param color [Symbol] defaults to `:red` but can be set to one of the
286
+ # following: `[:black, :white, :red, :green, :yellow, :blue, :magenta,
287
+ # :cyan]`
288
+ add_setting :failure_color
289
+
290
+ # @macro add_setting
291
+ # The default output color.
292
+ # @param color [Symbol] defaults to `:white` but can be set to one of the
293
+ # following: `[:black, :white, :red, :green, :yellow, :blue, :magenta,
294
+ # :cyan]`
295
+ add_setting :default_color
296
+
297
+ # @macro add_setting
298
+ # Color used when a pending example is fixed.
299
+ # @param color [Symbol] defaults to `:blue` but can be set to one of the
300
+ # following: `[:black, :white, :red, :green, :yellow, :blue, :magenta,
301
+ # :cyan]`
302
+ add_setting :fixed_color
303
+
304
+ # @macro add_setting
305
+ # Color used to print details.
306
+ # @param color [Symbol] defaults to `:cyan` but can be set to one of the
307
+ # following: `[:black, :white, :red, :green, :yellow, :blue, :magenta,
308
+ # :cyan]`
309
+ add_setting :detail_color
310
+
311
+ # @macro add_setting
312
+ # Don't print filter info i.e. "Run options: include {:focus=>true}"
313
+ # (default `false`).
314
+ add_setting :silence_filter_announcements
315
+
316
+ # Deprecated. This config option was added in RSpec 2 to pave the way
317
+ # for this being the default behavior in RSpec 3. Now this option is
318
+ # a no-op.
319
+ def treat_symbols_as_metadata_keys_with_true_values=(_value)
320
+ RSpec.deprecate(
321
+ "RSpec::Core::Configuration#treat_symbols_as_metadata_keys_with_true_values=",
322
+ :message => "RSpec::Core::Configuration#treat_symbols_as_metadata_keys_with_true_values= " \
323
+ "is deprecated, it is now set to true as default and " \
324
+ "setting it to false has no effect."
325
+ )
326
+ end
327
+
328
+ # Record the start time of the spec suite to measure load time.
329
+ add_setting :start_time
330
+
331
+ # @macro add_setting
332
+ # Use threadsafe options where available.
333
+ # Currently this will place a mutex around memoized values such as let blocks.
334
+ add_setting :threadsafe
335
+
336
+ # @macro add_setting
337
+ # Maximum count of failed source lines to display in the failure reports.
338
+ # (default `10`).
339
+ add_setting :max_displayed_failure_line_count
340
+
341
+ # @private
342
+ add_setting :tty
343
+ # @private
344
+ attr_writer :files_to_run
345
+ # @private
346
+ attr_accessor :filter_manager
347
+ # @private
348
+ attr_accessor :static_config_filter_manager
349
+ # @private
350
+ attr_reader :backtrace_formatter, :ordering_manager, :loaded_spec_files
351
+
352
+ def initialize
353
+ # rubocop:disable Style/GlobalVars
354
+ @start_time = $_rspec_core_load_started_at || ::RSpec::Core::Time.now
355
+ # rubocop:enable Style/GlobalVars
356
+ @expectation_frameworks = []
357
+ @include_modules = FilterableItemRepository::QueryOptimized.new(:any?)
358
+ @extend_modules = FilterableItemRepository::QueryOptimized.new(:any?)
359
+ @prepend_modules = FilterableItemRepository::QueryOptimized.new(:any?)
360
+
361
+ @before_suite_hooks = []
362
+ @after_suite_hooks = []
363
+
364
+ @mock_framework = nil
365
+ @files_or_directories_to_run = []
366
+ @loaded_spec_files = Set.new
367
+ @color = false
368
+ @pattern = '**{,/*/**}/*_spec.rb'
369
+ @exclude_pattern = ''
370
+ @failure_exit_code = 1
371
+ @spec_files_loaded = false
372
+
373
+ @backtrace_formatter = BacktraceFormatter.new
374
+
375
+ @default_path = 'spec'
376
+ @project_source_dirs = %w[ spec lib app ]
377
+ @deprecation_stream = $stderr
378
+ @output_stream = $stdout
379
+ @reporter = nil
380
+ @reporter_buffer = nil
381
+ @filter_manager = FilterManager.new
382
+ @static_config_filter_manager = FilterManager.new
383
+ @ordering_manager = Ordering::ConfigurationManager.new
384
+ @preferred_options = {}
385
+ @failure_color = :red
386
+ @success_color = :green
387
+ @pending_color = :yellow
388
+ @default_color = :white
389
+ @fixed_color = :blue
390
+ @detail_color = :cyan
391
+ @profile_examples = false
392
+ @requires = []
393
+ @libs = []
394
+ @derived_metadata_blocks = FilterableItemRepository::QueryOptimized.new(:any?)
395
+ @threadsafe = true
396
+ @max_displayed_failure_line_count = 10
397
+
398
+ define_built_in_hooks
399
+ end
400
+
401
+ # @private
402
+ #
403
+ # Used to set higher priority option values from the command line.
404
+ def force(hash)
405
+ ordering_manager.force(hash)
406
+ @preferred_options.merge!(hash)
407
+
408
+ return unless hash.key?(:example_status_persistence_file_path)
409
+ clear_values_derived_from_example_status_persistence_file_path
410
+ end
411
+
412
+ # @private
413
+ def reset
414
+ @spec_files_loaded = false
415
+ @reporter = nil
416
+ @formatter_loader = nil
417
+ end
418
+
419
+ # @private
420
+ def reset_filters
421
+ self.filter_manager = FilterManager.new
422
+ filter_manager.include_only(
423
+ Metadata.deep_hash_dup(static_config_filter_manager.inclusions.rules)
424
+ )
425
+ filter_manager.exclude_only(
426
+ Metadata.deep_hash_dup(static_config_filter_manager.exclusions.rules)
427
+ )
428
+ end
429
+
430
+ # @overload add_setting(name)
431
+ # @overload add_setting(name, opts)
432
+ # @option opts [Symbol] :default
433
+ #
434
+ # Set a default value for the generated getter and predicate methods:
435
+ #
436
+ # add_setting(:foo, :default => "default value")
437
+ #
438
+ # @option opts [Symbol] :alias_with
439
+ #
440
+ # Use `:alias_with` to alias the setter, getter, and predicate to
441
+ # another name, or names:
442
+ #
443
+ # add_setting(:foo, :alias_with => :bar)
444
+ # add_setting(:foo, :alias_with => [:bar, :baz])
445
+ #
446
+ # Adds a custom setting to the RSpec.configuration object.
447
+ #
448
+ # RSpec.configuration.add_setting :foo
449
+ #
450
+ # Used internally and by extension frameworks like rspec-rails, so they
451
+ # can add config settings that are domain specific. For example:
452
+ #
453
+ # RSpec.configure do |c|
454
+ # c.add_setting :use_transactional_fixtures,
455
+ # :default => true,
456
+ # :alias_with => :use_transactional_examples
457
+ # end
458
+ #
459
+ # `add_setting` creates three methods on the configuration object, a
460
+ # setter, a getter, and a predicate:
461
+ #
462
+ # RSpec.configuration.foo=(value)
463
+ # RSpec.configuration.foo
464
+ # RSpec.configuration.foo? # Returns true if foo returns anything but nil or false.
465
+ def add_setting(name, opts={})
466
+ default = opts.delete(:default)
467
+ (class << self; self; end).class_exec do
468
+ add_setting(name, opts)
469
+ end
470
+ __send__("#{name}=", default) if default
471
+ end
472
+
473
+ # Returns the configured mock framework adapter module.
474
+ def mock_framework
475
+ if @mock_framework.nil?
476
+ begin
477
+ mock_with :rspec
478
+ rescue LoadError
479
+ mock_with :nothing
480
+ end
481
+ end
482
+ @mock_framework
483
+ end
484
+
485
+ # Delegates to mock_framework=(framework).
486
+ def mock_framework=(framework)
487
+ mock_with framework
488
+ end
489
+
490
+ # Regexps used to exclude lines from backtraces.
491
+ #
492
+ # Excludes lines from ruby (and jruby) source, installed gems, anything
493
+ # in any "bin" directory, and any of the RSpec libs (outside gem
494
+ # installs) by default.
495
+ #
496
+ # You can modify the list via the getter, or replace it with the setter.
497
+ #
498
+ # To override this behaviour and display a full backtrace, use
499
+ # `--backtrace` on the command line, in a `.rspec` file, or in the
500
+ # `rspec_options` attribute of RSpec's rake task.
501
+ def backtrace_exclusion_patterns
502
+ @backtrace_formatter.exclusion_patterns
503
+ end
504
+
505
+ # Set regular expressions used to exclude lines in backtrace.
506
+ # @param patterns [Regexp] set the backtrace exlusion pattern
507
+ def backtrace_exclusion_patterns=(patterns)
508
+ @backtrace_formatter.exclusion_patterns = patterns
509
+ end
510
+
511
+ # Regexps used to include lines in backtraces.
512
+ #
513
+ # Defaults to [Regexp.new Dir.getwd].
514
+ #
515
+ # Lines that match an exclusion _and_ an inclusion pattern
516
+ # will be included.
517
+ #
518
+ # You can modify the list via the getter, or replace it with the setter.
519
+ def backtrace_inclusion_patterns
520
+ @backtrace_formatter.inclusion_patterns
521
+ end
522
+
523
+ # Set regular expressions used to include lines in backtrace.
524
+ # @attr patterns [Regexp] set backtrace_formatter inclusion_patterns
525
+ def backtrace_inclusion_patterns=(patterns)
526
+ @backtrace_formatter.inclusion_patterns = patterns
527
+ end
528
+
529
+ # Adds {#backtrace_exclusion_patterns} that will filter lines from
530
+ # the named gems from backtraces.
531
+ #
532
+ # @param gem_names [Array<String>] Names of the gems to filter
533
+ #
534
+ # @example
535
+ # RSpec.configure do |config|
536
+ # config.filter_gems_from_backtrace "rack", "rake"
537
+ # end
538
+ #
539
+ # @note The patterns this adds will match the named gems in their common
540
+ # locations (e.g. system gems, vendored with bundler, installed as a
541
+ # :git dependency with bundler, etc) but is not guaranteed to work for
542
+ # all possible gem locations. For example, if you have the gem source
543
+ # in a directory with a completely unrelated name, and use bundler's
544
+ # :path option, this will not filter it.
545
+ def filter_gems_from_backtrace(*gem_names)
546
+ gem_names.each do |name|
547
+ @backtrace_formatter.filter_gem(name)
548
+ end
549
+ end
550
+
551
+ # @private
552
+ MOCKING_ADAPTERS = {
553
+ :rspec => :RSpec,
554
+ :flexmock => :Flexmock,
555
+ :rr => :RR,
556
+ :mocha => :Mocha,
557
+ :nothing => :Null
558
+ }
559
+
560
+ # Sets the mock framework adapter module.
561
+ #
562
+ # `framework` can be a Symbol or a Module.
563
+ #
564
+ # Given any of `:rspec`, `:mocha`, `:flexmock`, or `:rr`, configures the
565
+ # named framework.
566
+ #
567
+ # Given `:nothing`, configures no framework. Use this if you don't use
568
+ # any mocking framework to save a little bit of overhead.
569
+ #
570
+ # Given a Module, includes that module in every example group. The module
571
+ # should adhere to RSpec's mock framework adapter API:
572
+ #
573
+ # setup_mocks_for_rspec
574
+ # - called before each example
575
+ #
576
+ # verify_mocks_for_rspec
577
+ # - called after each example if the example hasn't yet failed.
578
+ # Framework should raise an exception when expectations fail
579
+ #
580
+ # teardown_mocks_for_rspec
581
+ # - called after verify_mocks_for_rspec (even if there are errors)
582
+ #
583
+ # If the module responds to `configuration` and `mock_with` receives a
584
+ # block, it will yield the configuration object to the block e.g.
585
+ #
586
+ # config.mock_with OtherMockFrameworkAdapter do |mod_config|
587
+ # mod_config.custom_setting = true
588
+ # end
589
+ def mock_with(framework)
590
+ framework_module =
591
+ if framework.is_a?(Module)
592
+ framework
593
+ else
594
+ const_name = MOCKING_ADAPTERS.fetch(framework) do
595
+ raise ArgumentError,
596
+ "Unknown mocking framework: #{framework.inspect}. " \
597
+ "Pass a module or one of #{MOCKING_ADAPTERS.keys.inspect}"
598
+ end
599
+
600
+ RSpec::Support.require_rspec_core "mocking_adapters/#{const_name.to_s.downcase}"
601
+ RSpec::Core::MockingAdapters.const_get(const_name)
602
+ end
603
+
604
+ new_name, old_name = [framework_module, @mock_framework].map do |mod|
605
+ mod.respond_to?(:framework_name) ? mod.framework_name : :unnamed
606
+ end
607
+
608
+ unless new_name == old_name
609
+ assert_no_example_groups_defined(:mock_framework)
610
+ end
611
+
612
+ if block_given?
613
+ raise "#{framework_module} must respond to `configuration` so that " \
614
+ "mock_with can yield it." unless framework_module.respond_to?(:configuration)
615
+ yield framework_module.configuration
616
+ end
617
+
618
+ @mock_framework = framework_module
619
+ end
620
+
621
+ # Returns the configured expectation framework adapter module(s)
622
+ def expectation_frameworks
623
+ if @expectation_frameworks.empty?
624
+ begin
625
+ expect_with :rspec
626
+ rescue LoadError
627
+ expect_with Module.new
628
+ end
629
+ end
630
+ @expectation_frameworks
631
+ end
632
+
633
+ # Delegates to expect_with(framework).
634
+ def expectation_framework=(framework)
635
+ expect_with(framework)
636
+ end
637
+
638
+ # Sets the expectation framework module(s) to be included in each example
639
+ # group.
640
+ #
641
+ # `frameworks` can be `:rspec`, `:test_unit`, `:minitest`, a custom
642
+ # module, or any combination thereof:
643
+ #
644
+ # config.expect_with :rspec
645
+ # config.expect_with :test_unit
646
+ # config.expect_with :minitest
647
+ # config.expect_with :rspec, :minitest
648
+ # config.expect_with OtherExpectationFramework
649
+ #
650
+ # RSpec will translate `:rspec`, `:minitest`, and `:test_unit` into the
651
+ # appropriate modules.
652
+ #
653
+ # ## Configuration
654
+ #
655
+ # If the module responds to `configuration`, `expect_with` will
656
+ # yield the `configuration` object if given a block:
657
+ #
658
+ # config.expect_with OtherExpectationFramework do |custom_config|
659
+ # custom_config.custom_setting = true
660
+ # end
661
+ def expect_with(*frameworks)
662
+ modules = frameworks.map do |framework|
663
+ case framework
664
+ when Module
665
+ framework
666
+ when :rspec
667
+ require 'rspec/expectations'
668
+
669
+ # Tag this exception class so our exception formatting logic knows
670
+ # that it satisfies the `MultipleExceptionError` interface.
671
+ ::RSpec::Expectations::MultipleExpectationsNotMetError.__send__(
672
+ :include, MultipleExceptionError::InterfaceTag
673
+ )
674
+
675
+ ::RSpec::Matchers
676
+ when :test_unit
677
+ require 'rspec/core/test_unit_assertions_adapter'
678
+ ::RSpec::Core::TestUnitAssertionsAdapter
679
+ when :minitest
680
+ require 'rspec/core/minitest_assertions_adapter'
681
+ ::RSpec::Core::MinitestAssertionsAdapter
682
+ else
683
+ raise ArgumentError, "#{framework.inspect} is not supported"
684
+ end
685
+ end
686
+
687
+ if (modules - @expectation_frameworks).any?
688
+ assert_no_example_groups_defined(:expect_with)
689
+ end
690
+
691
+ if block_given?
692
+ raise "expect_with only accepts a block with a single argument. " \
693
+ "Call expect_with #{modules.length} times, " \
694
+ "once with each argument, instead." if modules.length > 1
695
+ raise "#{modules.first} must respond to `configuration` so that " \
696
+ "expect_with can yield it." unless modules.first.respond_to?(:configuration)
697
+ yield modules.first.configuration
698
+ end
699
+
700
+ @expectation_frameworks.push(*modules)
701
+ end
702
+
703
+ # Check if full backtrace is enabled.
704
+ # @return [Boolean] is full backtrace enabled
705
+ def full_backtrace?
706
+ @backtrace_formatter.full_backtrace?
707
+ end
708
+
709
+ # Toggle full backtrace.
710
+ # @attr true_or_false [Boolean] toggle full backtrace display
711
+ def full_backtrace=(true_or_false)
712
+ @backtrace_formatter.full_backtrace = true_or_false
713
+ end
714
+
715
+ # Returns the configuration option for color, but should not
716
+ # be used to check if color is supported.
717
+ #
718
+ # @see color_enabled?
719
+ # @return [Boolean]
720
+ def color
721
+ value_for(:color) { @color }
722
+ end
723
+
724
+ # Check if color is enabled for a particular output.
725
+ # @param output [IO] an output stream to use, defaults to the current
726
+ # `output_stream`
727
+ # @return [Boolean]
728
+ def color_enabled?(output=output_stream)
729
+ output_to_tty?(output) && color
730
+ end
731
+
732
+ # Toggle output color.
733
+ attr_writer :color
734
+
735
+ # @private
736
+ def libs=(libs)
737
+ libs.map do |lib|
738
+ @libs.unshift lib
739
+ $LOAD_PATH.unshift lib
740
+ end
741
+ end
742
+
743
+ # Run examples matching on `description` in all files to run.
744
+ # @param description [String, Regexp] the pattern to filter on
745
+ def full_description=(description)
746
+ filter_run :full_description => Regexp.union(*Array(description).map { |d| Regexp.new(d) })
747
+ end
748
+
749
+ # @return [Array] full description filter
750
+ def full_description
751
+ filter.fetch :full_description, nil
752
+ end
753
+
754
+ # @overload add_formatter(formatter)
755
+ #
756
+ # Adds a formatter to the formatters collection. `formatter` can be a
757
+ # string representing any of the built-in formatters (see
758
+ # `built_in_formatter`), or a custom formatter class.
759
+ #
760
+ # ### Note
761
+ #
762
+ # For internal purposes, `add_formatter` also accepts the name of a class
763
+ # and paths to use for output streams, but you should consider that a
764
+ # private api that may change at any time without notice.
765
+ def add_formatter(formatter_to_use, *paths)
766
+ paths << output_stream if paths.empty?
767
+ formatter_loader.add formatter_to_use, *paths
768
+ end
769
+ alias_method :formatter=, :add_formatter
770
+
771
+ # The formatter that will be used if no formatter has been set.
772
+ # Defaults to 'progress'.
773
+ def default_formatter
774
+ formatter_loader.default_formatter
775
+ end
776
+
777
+ # Sets a fallback formatter to use if none other has been set.
778
+ #
779
+ # @example
780
+ #
781
+ # RSpec.configure do |rspec|
782
+ # rspec.default_formatter = 'doc'
783
+ # end
784
+ def default_formatter=(value)
785
+ formatter_loader.default_formatter = value
786
+ end
787
+
788
+ # Returns a duplicate of the formatters currently loaded in
789
+ # the `FormatterLoader` for introspection.
790
+ #
791
+ # Note as this is a duplicate, any mutations will be disregarded.
792
+ #
793
+ # @return [Array] the formatters currently loaded
794
+ def formatters
795
+ formatter_loader.formatters.dup
796
+ end
797
+
798
+ # @private
799
+ def formatter_loader
800
+ @formatter_loader ||= Formatters::Loader.new(Reporter.new(self))
801
+ end
802
+
803
+ # @private
804
+ #
805
+ # This buffer is used to capture all messages sent to the reporter during
806
+ # reporter initialization. It can then replay those messages after the
807
+ # formatter is correctly initialized. Otherwise, deprecation warnings
808
+ # during formatter initialization can cause an infinite loop.
809
+ class DeprecationReporterBuffer
810
+ def initialize
811
+ @calls = []
812
+ end
813
+
814
+ def deprecation(*args)
815
+ @calls << args
816
+ end
817
+
818
+ def play_onto(reporter)
819
+ @calls.each do |args|
820
+ reporter.deprecation(*args)
821
+ end
822
+ end
823
+ end
824
+
825
+ # @private
826
+ def reporter
827
+ # @reporter_buffer should only ever be set in this method to cover
828
+ # initialization of @reporter.
829
+ @reporter_buffer || @reporter ||=
830
+ begin
831
+ @reporter_buffer = DeprecationReporterBuffer.new
832
+ formatter_loader.setup_default output_stream, deprecation_stream
833
+ @reporter_buffer.play_onto(formatter_loader.reporter)
834
+ @reporter_buffer = nil
835
+ formatter_loader.reporter
836
+ end
837
+ end
838
+
839
+ # @api private
840
+ #
841
+ # Defaults `profile_examples` to 10 examples when `@profile_examples` is
842
+ # `true`.
843
+ def profile_examples
844
+ profile = value_for(:profile_examples) { @profile_examples }
845
+ if profile && !profile.is_a?(Integer)
846
+ 10
847
+ else
848
+ profile
849
+ end
850
+ end
851
+
852
+ # @private
853
+ def files_or_directories_to_run=(*files)
854
+ files = files.flatten
855
+
856
+ if (command == 'rspec' || Runner.running_in_drb?) && default_path && files.empty?
857
+ files << default_path
858
+ end
859
+
860
+ @files_or_directories_to_run = files
861
+ @files_to_run = nil
862
+ end
863
+
864
+ # The spec files RSpec will run.
865
+ # @return [Array] specified files about to run
866
+ def files_to_run
867
+ @files_to_run ||= get_files_to_run(@files_or_directories_to_run)
868
+ end
869
+
870
+ # @private
871
+ def last_run_statuses
872
+ @last_run_statuses ||= Hash.new(UNKNOWN_STATUS).tap do |statuses|
873
+ if (path = example_status_persistence_file_path)
874
+ begin
875
+ ExampleStatusPersister.load_from(path).inject(statuses) do |hash, example|
876
+ hash[example.fetch(:example_id)] = example.fetch(:status)
877
+ hash
878
+ end
879
+ rescue SystemCallError => e
880
+ RSpec.warning "Could not read from #{path.inspect} (configured as " \
881
+ "`config.example_status_persistence_file_path`) due " \
882
+ "to a system error: #{e.inspect}. Please check that " \
883
+ "the config option is set to an accessible, valid " \
884
+ "file path", :call_site => nil
885
+ end
886
+ end
887
+ end
888
+ end
889
+
890
+ # @private
891
+ UNKNOWN_STATUS = "unknown".freeze
892
+
893
+ # @private
894
+ FAILED_STATUS = "failed".freeze
895
+
896
+ # @private
897
+ def spec_files_with_failures
898
+ @spec_files_with_failures ||= last_run_statuses.inject(Set.new) do |files, (id, status)|
899
+ files << Example.parse_id(id).first if status == FAILED_STATUS
900
+ files
901
+ end.to_a
902
+ end
903
+
904
+ # Creates a method that delegates to `example` including the submitted
905
+ # `args`. Used internally to add variants of `example` like `pending`:
906
+ # @param name [String] example name alias
907
+ # @param args [Array<Symbol>, Hash] metadata for the generated example
908
+ #
909
+ # @note The specific example alias below (`pending`) is already
910
+ # defined for you.
911
+ # @note Use with caution. This extends the language used in your
912
+ # specs, but does not add any additional documentation. We use this
913
+ # in RSpec to define methods like `focus` and `xit`, but we also add
914
+ # docs for those methods.
915
+ #
916
+ # @example
917
+ # RSpec.configure do |config|
918
+ # config.alias_example_to :pending, :pending => true
919
+ # end
920
+ #
921
+ # # This lets you do this:
922
+ #
923
+ # describe Thing do
924
+ # pending "does something" do
925
+ # thing = Thing.new
926
+ # end
927
+ # end
928
+ #
929
+ # # ... which is the equivalent of
930
+ #
931
+ # describe Thing do
932
+ # it "does something", :pending => true do
933
+ # thing = Thing.new
934
+ # end
935
+ # end
936
+ def alias_example_to(name, *args)
937
+ extra_options = Metadata.build_hash_from(args)
938
+ RSpec::Core::ExampleGroup.define_example_method(name, extra_options)
939
+ end
940
+
941
+ # Creates a method that defines an example group with the provided
942
+ # metadata. Can be used to define example group/metadata shortcuts.
943
+ #
944
+ # @example
945
+ # RSpec.configure do |config|
946
+ # config.alias_example_group_to :describe_model, :type => :model
947
+ # end
948
+ #
949
+ # shared_context_for "model tests", :type => :model do
950
+ # # define common model test helper methods, `let` declarations, etc
951
+ # end
952
+ #
953
+ # # This lets you do this:
954
+ #
955
+ # RSpec.describe_model User do
956
+ # end
957
+ #
958
+ # # ... which is the equivalent of
959
+ #
960
+ # RSpec.describe User, :type => :model do
961
+ # end
962
+ #
963
+ # @note The defined aliased will also be added to the top level
964
+ # (e.g. `main` and from within modules) if
965
+ # `expose_dsl_globally` is set to true.
966
+ # @see #alias_example_to
967
+ # @see #expose_dsl_globally=
968
+ def alias_example_group_to(new_name, *args)
969
+ extra_options = Metadata.build_hash_from(args)
970
+ RSpec::Core::ExampleGroup.define_example_group_method(new_name, extra_options)
971
+ end
972
+
973
+ # Define an alias for it_should_behave_like that allows different
974
+ # language (like "it_has_behavior" or "it_behaves_like") to be
975
+ # employed when including shared examples.
976
+ #
977
+ # @example
978
+ # RSpec.configure do |config|
979
+ # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:')
980
+ # end
981
+ #
982
+ # # allows the user to include a shared example group like:
983
+ #
984
+ # describe Entity do
985
+ # it_has_behavior 'sortability' do
986
+ # let(:sortable) { Entity.new }
987
+ # end
988
+ # end
989
+ #
990
+ # # which is reported in the output as:
991
+ # # Entity
992
+ # # has behavior: sortability
993
+ # # ...sortability examples here
994
+ #
995
+ # @note Use with caution. This extends the language used in your
996
+ # specs, but does not add any additional documentation. We use this
997
+ # in RSpec to define `it_should_behave_like` (for backward
998
+ # compatibility), but we also add docs for that method.
999
+ def alias_it_behaves_like_to(new_name, report_label='')
1000
+ RSpec::Core::ExampleGroup.define_nested_shared_group_method(new_name, report_label)
1001
+ end
1002
+ alias_method :alias_it_should_behave_like_to, :alias_it_behaves_like_to
1003
+
1004
+ # Adds key/value pairs to the `inclusion_filter`. If `args`
1005
+ # includes any symbols that are not part of the hash, each symbol
1006
+ # is treated as a key in the hash with the value `true`.
1007
+ #
1008
+ # ### Note
1009
+ #
1010
+ # Filters set using this method can be overridden from the command line
1011
+ # or config files (e.g. `.rspec`).
1012
+ #
1013
+ # @example
1014
+ # # Given this declaration.
1015
+ # describe "something", :foo => 'bar' do
1016
+ # # ...
1017
+ # end
1018
+ #
1019
+ # # Any of the following will include that group.
1020
+ # config.filter_run_including :foo => 'bar'
1021
+ # config.filter_run_including :foo => /^ba/
1022
+ # config.filter_run_including :foo => lambda {|v| v == 'bar'}
1023
+ # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'}
1024
+ #
1025
+ # # Given a proc with an arity of 1, the lambda is passed the value
1026
+ # # related to the key, e.g.
1027
+ # config.filter_run_including :foo => lambda {|v| v == 'bar'}
1028
+ #
1029
+ # # Given a proc with an arity of 2, the lambda is passed the value
1030
+ # # related to the key, and the metadata itself e.g.
1031
+ # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'}
1032
+ #
1033
+ # filter_run_including :foo # same as filter_run_including :foo => true
1034
+ def filter_run_including(*args)
1035
+ meta = Metadata.build_hash_from(args, :warn_about_example_group_filtering)
1036
+ filter_manager.include_with_low_priority meta
1037
+ static_config_filter_manager.include_with_low_priority Metadata.deep_hash_dup(meta)
1038
+ end
1039
+
1040
+ alias_method :filter_run, :filter_run_including
1041
+
1042
+ # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't
1043
+ # want any inclusion filter at all.
1044
+ #
1045
+ # ### Warning
1046
+ #
1047
+ # This overrides any inclusion filters/tags set on the command line or in
1048
+ # configuration files.
1049
+ def inclusion_filter=(filter)
1050
+ meta = Metadata.build_hash_from([filter], :warn_about_example_group_filtering)
1051
+ filter_manager.include_only meta
1052
+ end
1053
+
1054
+ alias_method :filter=, :inclusion_filter=
1055
+
1056
+ # Returns the `inclusion_filter`. If none has been set, returns an empty
1057
+ # hash.
1058
+ def inclusion_filter
1059
+ filter_manager.inclusions
1060
+ end
1061
+
1062
+ alias_method :filter, :inclusion_filter
1063
+
1064
+ # Adds key/value pairs to the `exclusion_filter`. If `args`
1065
+ # includes any symbols that are not part of the hash, each symbol
1066
+ # is treated as a key in the hash with the value `true`.
1067
+ #
1068
+ # ### Note
1069
+ #
1070
+ # Filters set using this method can be overridden from the command line
1071
+ # or config files (e.g. `.rspec`).
1072
+ #
1073
+ # @example
1074
+ # # Given this declaration.
1075
+ # describe "something", :foo => 'bar' do
1076
+ # # ...
1077
+ # end
1078
+ #
1079
+ # # Any of the following will exclude that group.
1080
+ # config.filter_run_excluding :foo => 'bar'
1081
+ # config.filter_run_excluding :foo => /^ba/
1082
+ # config.filter_run_excluding :foo => lambda {|v| v == 'bar'}
1083
+ # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'}
1084
+ #
1085
+ # # Given a proc with an arity of 1, the lambda is passed the value
1086
+ # # related to the key, e.g.
1087
+ # config.filter_run_excluding :foo => lambda {|v| v == 'bar'}
1088
+ #
1089
+ # # Given a proc with an arity of 2, the lambda is passed the value
1090
+ # # related to the key, and the metadata itself e.g.
1091
+ # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'}
1092
+ #
1093
+ # filter_run_excluding :foo # same as filter_run_excluding :foo => true
1094
+ def filter_run_excluding(*args)
1095
+ meta = Metadata.build_hash_from(args, :warn_about_example_group_filtering)
1096
+ filter_manager.exclude_with_low_priority meta
1097
+ static_config_filter_manager.exclude_with_low_priority Metadata.deep_hash_dup(meta)
1098
+ end
1099
+
1100
+ # Clears and reassigns the `exclusion_filter`. Set to `nil` if you don't
1101
+ # want any exclusion filter at all.
1102
+ #
1103
+ # ### Warning
1104
+ #
1105
+ # This overrides any exclusion filters/tags set on the command line or in
1106
+ # configuration files.
1107
+ def exclusion_filter=(filter)
1108
+ meta = Metadata.build_hash_from([filter], :warn_about_example_group_filtering)
1109
+ filter_manager.exclude_only meta
1110
+ end
1111
+
1112
+ # Returns the `exclusion_filter`. If none has been set, returns an empty
1113
+ # hash.
1114
+ def exclusion_filter
1115
+ filter_manager.exclusions
1116
+ end
1117
+
1118
+ # Tells RSpec to include `mod` in example groups. Methods defined in
1119
+ # `mod` are exposed to examples (not example groups). Use `filters` to
1120
+ # constrain the groups or examples in which to include the module.
1121
+ #
1122
+ # @example
1123
+ #
1124
+ # module AuthenticationHelpers
1125
+ # def login_as(user)
1126
+ # # ...
1127
+ # end
1128
+ # end
1129
+ #
1130
+ # module UserHelpers
1131
+ # def users(username)
1132
+ # # ...
1133
+ # end
1134
+ # end
1135
+ #
1136
+ # RSpec.configure do |config|
1137
+ # config.include(UserHelpers) # included in all modules
1138
+ # config.include(AuthenticationHelpers, :type => :request)
1139
+ # end
1140
+ #
1141
+ # describe "edit profile", :type => :request do
1142
+ # it "can be viewed by owning user" do
1143
+ # login_as users(:jdoe)
1144
+ # get "/profiles/jdoe"
1145
+ # assert_select ".username", :text => 'jdoe'
1146
+ # end
1147
+ # end
1148
+ #
1149
+ # @note Filtered module inclusions can also be applied to
1150
+ # individual examples that have matching metadata. Just like
1151
+ # Ruby's object model is that every object has a singleton class
1152
+ # which has only a single instance, RSpec's model is that every
1153
+ # example has a singleton example group containing just the one
1154
+ # example.
1155
+ #
1156
+ # @see #extend
1157
+ # @see #prepend
1158
+ def include(mod, *filters)
1159
+ meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
1160
+ @include_modules.append(mod, meta)
1161
+ configure_existing_groups(mod, meta, :safe_include)
1162
+ end
1163
+
1164
+ # Tells RSpec to extend example groups with `mod`. Methods defined in
1165
+ # `mod` are exposed to example groups (not examples). Use `filters` to
1166
+ # constrain the groups to extend.
1167
+ #
1168
+ # Similar to `include`, but behavior is added to example groups, which
1169
+ # are classes, rather than the examples, which are instances of those
1170
+ # classes.
1171
+ #
1172
+ # @example
1173
+ #
1174
+ # module UiHelpers
1175
+ # def run_in_browser
1176
+ # # ...
1177
+ # end
1178
+ # end
1179
+ #
1180
+ # RSpec.configure do |config|
1181
+ # config.extend(UiHelpers, :type => :request)
1182
+ # end
1183
+ #
1184
+ # describe "edit profile", :type => :request do
1185
+ # run_in_browser
1186
+ #
1187
+ # it "does stuff in the client" do
1188
+ # # ...
1189
+ # end
1190
+ # end
1191
+ #
1192
+ # @see #include
1193
+ # @see #prepend
1194
+ def extend(mod, *filters)
1195
+ meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
1196
+ @extend_modules.append(mod, meta)
1197
+ configure_existing_groups(mod, meta, :safe_extend)
1198
+ end
1199
+
1200
+ if RSpec::Support::RubyFeatures.module_prepends_supported?
1201
+ # Tells RSpec to prepend example groups with `mod`. Methods defined in
1202
+ # `mod` are exposed to examples (not example groups). Use `filters` to
1203
+ # constrain the groups in which to prepend the module.
1204
+ #
1205
+ # Similar to `include`, but module is included before the example group's class
1206
+ # in the ancestor chain.
1207
+ #
1208
+ # @example
1209
+ #
1210
+ # module OverrideMod
1211
+ # def override_me
1212
+ # "overridden"
1213
+ # end
1214
+ # end
1215
+ #
1216
+ # RSpec.configure do |config|
1217
+ # config.prepend(OverrideMod, :method => :prepend)
1218
+ # end
1219
+ #
1220
+ # describe "overriding example's class", :method => :prepend do
1221
+ # it "finds the user" do
1222
+ # self.class.class_eval do
1223
+ # def override_me
1224
+ # end
1225
+ # end
1226
+ # override_me # => "overridden"
1227
+ # # ...
1228
+ # end
1229
+ # end
1230
+ #
1231
+ # @see #include
1232
+ # @see #extend
1233
+ def prepend(mod, *filters)
1234
+ meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
1235
+ @prepend_modules.append(mod, meta)
1236
+ configure_existing_groups(mod, meta, :safe_prepend)
1237
+ end
1238
+ end
1239
+
1240
+ # @private
1241
+ #
1242
+ # Used internally to extend a group with modules using `include`, `prepend` and/or
1243
+ # `extend`.
1244
+ def configure_group(group)
1245
+ configure_group_with group, @include_modules, :safe_include
1246
+ configure_group_with group, @extend_modules, :safe_extend
1247
+ configure_group_with group, @prepend_modules, :safe_prepend
1248
+ end
1249
+
1250
+ # @private
1251
+ def configure_group_with(group, module_list, application_method)
1252
+ module_list.items_for(group.metadata).each do |mod|
1253
+ __send__(application_method, mod, group)
1254
+ end
1255
+ end
1256
+
1257
+ # @private
1258
+ def configure_existing_groups(mod, meta, application_method)
1259
+ RSpec.world.all_example_groups.each do |group|
1260
+ next unless meta.empty? || MetadataFilter.apply?(:any?, meta, group.metadata)
1261
+ __send__(application_method, mod, group)
1262
+ end
1263
+ end
1264
+
1265
+ # @private
1266
+ #
1267
+ # Used internally to extend the singleton class of a single example's
1268
+ # example group instance with modules using `include` and/or `extend`.
1269
+ def configure_example(example)
1270
+ singleton_group = example.example_group_instance.singleton_class
1271
+
1272
+ # We replace the metadata so that SharedExampleGroupModule#included
1273
+ # has access to the example's metadata[:location].
1274
+ singleton_group.with_replaced_metadata(example.metadata) do
1275
+ modules = @include_modules.items_for(example.metadata)
1276
+ modules.each do |mod|
1277
+ safe_include(mod, example.example_group_instance.singleton_class)
1278
+ end
1279
+
1280
+ MemoizedHelpers.define_helpers_on(singleton_group) unless modules.empty?
1281
+ end
1282
+ end
1283
+
1284
+ if RSpec::Support::RubyFeatures.module_prepends_supported?
1285
+ # @private
1286
+ def safe_prepend(mod, host)
1287
+ host.__send__(:prepend, mod) unless host < mod
1288
+ end
1289
+ end
1290
+
1291
+ # @private
1292
+ def requires=(paths)
1293
+ directories = ['lib', default_path].select { |p| File.directory? p }
1294
+ RSpec::Core::RubyProject.add_to_load_path(*directories)
1295
+ paths.each { |path| require path }
1296
+ @requires += paths
1297
+ end
1298
+
1299
+ # @private
1300
+ def in_project_source_dir_regex
1301
+ regexes = project_source_dirs.map do |dir|
1302
+ /\A#{Regexp.escape(File.expand_path(dir))}\//
1303
+ end
1304
+
1305
+ Regexp.union(regexes)
1306
+ end
1307
+
1308
+ # @private
1309
+ if RUBY_VERSION.to_f >= 1.9
1310
+ # @private
1311
+ def safe_include(mod, host)
1312
+ host.__send__(:include, mod) unless host < mod
1313
+ end
1314
+
1315
+ # @private
1316
+ def safe_extend(mod, host)
1317
+ host.extend(mod) unless host.singleton_class < mod
1318
+ end
1319
+ else # for 1.8.7
1320
+ # :nocov:
1321
+ # @private
1322
+ def safe_include(mod, host)
1323
+ host.__send__(:include, mod) unless host.included_modules.include?(mod)
1324
+ end
1325
+
1326
+ # @private
1327
+ def safe_extend(mod, host)
1328
+ host.extend(mod) unless (class << host; self; end).included_modules.include?(mod)
1329
+ end
1330
+ # :nocov:
1331
+ end
1332
+
1333
+ # @private
1334
+ def configure_mock_framework
1335
+ RSpec::Core::ExampleGroup.__send__(:include, mock_framework)
1336
+ conditionally_disable_mocks_monkey_patching
1337
+ end
1338
+
1339
+ # @private
1340
+ def configure_expectation_framework
1341
+ expectation_frameworks.each do |framework|
1342
+ RSpec::Core::ExampleGroup.__send__(:include, framework)
1343
+ end
1344
+ conditionally_disable_expectations_monkey_patching
1345
+ end
1346
+
1347
+ # @private
1348
+ def load_spec_files
1349
+ # Note which spec files world is already aware of.
1350
+ # This is generally only needed for when the user runs
1351
+ # `ruby path/to/spec.rb` (and loads `rspec/autorun`) --
1352
+ # in that case, the spec file was loaded by `ruby` and
1353
+ # isn't loaded by us here so we only know about it because
1354
+ # of an example group being registered in it.
1355
+ RSpec.world.registered_example_group_files.each do |f|
1356
+ loaded_spec_files << f # the registered files are already expended absolute paths
1357
+ end
1358
+
1359
+ files_to_run.uniq.each do |f|
1360
+ file = File.expand_path(f)
1361
+ load file
1362
+ loaded_spec_files << file
1363
+ end
1364
+
1365
+ @spec_files_loaded = true
1366
+ end
1367
+
1368
+ # @private
1369
+ DEFAULT_FORMATTER = lambda { |string| string }
1370
+
1371
+ # Formats the docstring output using the block provided.
1372
+ #
1373
+ # @example
1374
+ # # This will strip the descriptions of both examples and example
1375
+ # # groups.
1376
+ # RSpec.configure do |config|
1377
+ # config.format_docstrings { |s| s.strip }
1378
+ # end
1379
+ def format_docstrings(&block)
1380
+ @format_docstrings_block = block_given? ? block : DEFAULT_FORMATTER
1381
+ end
1382
+
1383
+ # @private
1384
+ def format_docstrings_block
1385
+ @format_docstrings_block ||= DEFAULT_FORMATTER
1386
+ end
1387
+
1388
+ # @private
1389
+ # @macro [attach] delegate_to_ordering_manager
1390
+ # @!method $1
1391
+ def self.delegate_to_ordering_manager(*methods)
1392
+ methods.each do |method|
1393
+ define_method method do |*args, &block|
1394
+ ordering_manager.__send__(method, *args, &block)
1395
+ end
1396
+ end
1397
+ end
1398
+
1399
+ # @macro delegate_to_ordering_manager
1400
+ #
1401
+ # Sets the seed value and sets the default global ordering to random.
1402
+ delegate_to_ordering_manager :seed=
1403
+
1404
+ # @macro delegate_to_ordering_manager
1405
+ # Seed for random ordering (default: generated randomly each run).
1406
+ #
1407
+ # When you run specs with `--order random`, RSpec generates a random seed
1408
+ # for the randomization and prints it to the `output_stream` (assuming
1409
+ # you're using RSpec's built-in formatters). If you discover an ordering
1410
+ # dependency (i.e. examples fail intermittently depending on order), set
1411
+ # this (on Configuration or on the command line with `--seed`) to run
1412
+ # using the same seed while you debug the issue.
1413
+ #
1414
+ # We recommend, actually, that you use the command line approach so you
1415
+ # don't accidentally leave the seed encoded.
1416
+ delegate_to_ordering_manager :seed
1417
+
1418
+ # @macro delegate_to_ordering_manager
1419
+ #
1420
+ # Sets the default global order and, if order is `'rand:<seed>'`, also
1421
+ # sets the seed.
1422
+ delegate_to_ordering_manager :order=
1423
+
1424
+ # @macro delegate_to_ordering_manager
1425
+ # Registers a named ordering strategy that can later be
1426
+ # used to order an example group's subgroups by adding
1427
+ # `:order => <name>` metadata to the example group.
1428
+ #
1429
+ # @param name [Symbol] The name of the ordering.
1430
+ # @yield Block that will order the given examples or example groups
1431
+ # @yieldparam list [Array<RSpec::Core::Example>,
1432
+ # Array<RSpec::Core::ExampleGroup>] The examples or groups to order
1433
+ # @yieldreturn [Array<RSpec::Core::Example>,
1434
+ # Array<RSpec::Core::ExampleGroup>] The re-ordered examples or groups
1435
+ #
1436
+ # @example
1437
+ # RSpec.configure do |rspec|
1438
+ # rspec.register_ordering :reverse do |list|
1439
+ # list.reverse
1440
+ # end
1441
+ # end
1442
+ #
1443
+ # describe MyClass, :order => :reverse do
1444
+ # # ...
1445
+ # end
1446
+ #
1447
+ # @note Pass the symbol `:global` to set the ordering strategy that
1448
+ # will be used to order the top-level example groups and any example
1449
+ # groups that do not have declared `:order` metadata.
1450
+ delegate_to_ordering_manager :register_ordering
1451
+
1452
+ # @private
1453
+ delegate_to_ordering_manager :seed_used?, :ordering_registry
1454
+
1455
+ # Set Ruby warnings on or off.
1456
+ def warnings=(value)
1457
+ $VERBOSE = !!value
1458
+ end
1459
+
1460
+ # @return [Boolean] Whether or not ruby warnings are enabled.
1461
+ def warnings?
1462
+ $VERBOSE
1463
+ end
1464
+
1465
+ # @private
1466
+ RAISE_ERROR_WARNING_NOTIFIER = lambda { |message| raise message }
1467
+
1468
+ # Turns warnings into errors. This can be useful when
1469
+ # you want RSpec to run in a 'strict' no warning situation.
1470
+ #
1471
+ # @example
1472
+ #
1473
+ # RSpec.configure do |rspec|
1474
+ # rspec.raise_on_warning = true
1475
+ # end
1476
+ def raise_on_warning=(value)
1477
+ if value
1478
+ RSpec::Support.warning_notifier = RAISE_ERROR_WARNING_NOTIFIER
1479
+ else
1480
+ RSpec::Support.warning_notifier = RSpec::Support::DEFAULT_WARNING_NOTIFIER
1481
+ end
1482
+ end
1483
+
1484
+ # Exposes the current running example via the named
1485
+ # helper method. RSpec 2.x exposed this via `example`,
1486
+ # but in RSpec 3.0, the example is instead exposed via
1487
+ # an arg yielded to `it`, `before`, `let`, etc. However,
1488
+ # some extension gems (such as Capybara) depend on the
1489
+ # RSpec 2.x's `example` method, so this config option
1490
+ # can be used to maintain compatibility.
1491
+ #
1492
+ # @param method_name [Symbol] the name of the helper method
1493
+ #
1494
+ # @example
1495
+ #
1496
+ # RSpec.configure do |rspec|
1497
+ # rspec.expose_current_running_example_as :example
1498
+ # end
1499
+ #
1500
+ # describe MyClass do
1501
+ # before do
1502
+ # # `example` can be used here because of the above config.
1503
+ # do_something if example.metadata[:type] == "foo"
1504
+ # end
1505
+ # end
1506
+ def expose_current_running_example_as(method_name)
1507
+ ExposeCurrentExample.module_exec do
1508
+ extend RSpec::SharedContext
1509
+ let(method_name) { |ex| ex }
1510
+ end
1511
+
1512
+ include ExposeCurrentExample
1513
+ end
1514
+
1515
+ # @private
1516
+ module ExposeCurrentExample; end
1517
+
1518
+ # Turns deprecation warnings into errors, in order to surface
1519
+ # the full backtrace of the call site. This can be useful when
1520
+ # you need more context to address a deprecation than the
1521
+ # single-line call site normally provided.
1522
+ #
1523
+ # @example
1524
+ #
1525
+ # RSpec.configure do |rspec|
1526
+ # rspec.raise_errors_for_deprecations!
1527
+ # end
1528
+ def raise_errors_for_deprecations!
1529
+ self.deprecation_stream = Formatters::DeprecationFormatter::RaiseErrorStream.new
1530
+ end
1531
+
1532
+ # Enables zero monkey patching mode for RSpec. It removes monkey
1533
+ # patching of the top-level DSL methods (`describe`,
1534
+ # `shared_examples_for`, etc) onto `main` and `Module`, instead
1535
+ # requiring you to prefix these methods with `RSpec.`. It enables
1536
+ # expect-only syntax for rspec-mocks and rspec-expectations. It
1537
+ # simply disables monkey patching on whatever pieces of RSpec
1538
+ # the user is using.
1539
+ #
1540
+ # @note It configures rspec-mocks and rspec-expectations only
1541
+ # if the user is using those (either explicitly or implicitly
1542
+ # by not setting `mock_with` or `expect_with` to anything else).
1543
+ #
1544
+ # @note If the user uses this options with `mock_with :mocha`
1545
+ # (or similiar) they will still have monkey patching active
1546
+ # in their test environment from mocha.
1547
+ #
1548
+ # @example
1549
+ #
1550
+ # # It disables all monkey patching.
1551
+ # RSpec.configure do |config|
1552
+ # config.disable_monkey_patching!
1553
+ # end
1554
+ #
1555
+ # # Is an equivalent to
1556
+ # RSpec.configure do |config|
1557
+ # config.expose_dsl_globally = false
1558
+ #
1559
+ # config.mock_with :rspec do |mocks|
1560
+ # mocks.syntax = :expect
1561
+ # mocks.patch_marshal_to_support_partial_doubles = false
1562
+ # end
1563
+ #
1564
+ # config.mock_with :rspec do |expectations|
1565
+ # expectations.syntax = :expect
1566
+ # end
1567
+ # end
1568
+ def disable_monkey_patching!
1569
+ self.expose_dsl_globally = false
1570
+ self.disable_monkey_patching = true
1571
+ conditionally_disable_mocks_monkey_patching
1572
+ conditionally_disable_expectations_monkey_patching
1573
+ end
1574
+
1575
+ # @private
1576
+ attr_accessor :disable_monkey_patching
1577
+
1578
+ # Defines a callback that can assign derived metadata values.
1579
+ #
1580
+ # @param filters [Array<Symbol>, Hash] metadata filters that determine
1581
+ # which example or group metadata hashes the callback will be triggered
1582
+ # for. If none are given, the callback will be run against the metadata
1583
+ # hashes of all groups and examples.
1584
+ # @yieldparam metadata [Hash] original metadata hash from an example or
1585
+ # group. Mutate this in your block as needed.
1586
+ #
1587
+ # @example
1588
+ # RSpec.configure do |config|
1589
+ # # Tag all groups and examples in the spec/unit directory with
1590
+ # # :type => :unit
1591
+ # config.define_derived_metadata(:file_path => %r{/spec/unit/}) do |metadata|
1592
+ # metadata[:type] = :unit
1593
+ # end
1594
+ # end
1595
+ def define_derived_metadata(*filters, &block)
1596
+ meta = Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
1597
+ @derived_metadata_blocks.append(block, meta)
1598
+ end
1599
+
1600
+ # @private
1601
+ def apply_derived_metadata_to(metadata)
1602
+ @derived_metadata_blocks.items_for(metadata).each do |block|
1603
+ block.call(metadata)
1604
+ end
1605
+ end
1606
+
1607
+ # Defines a `before` hook. See {Hooks#before} for full docs.
1608
+ #
1609
+ # This method differs from {Hooks#before} in only one way: it supports
1610
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once before
1611
+ # the first example of the entire suite is executed.
1612
+ #
1613
+ # @see #prepend_before
1614
+ # @see #after
1615
+ # @see #append_after
1616
+ def before(*args, &block)
1617
+ handle_suite_hook(args, @before_suite_hooks, :push,
1618
+ Hooks::BeforeHook, block) || super(*args, &block)
1619
+ end
1620
+ alias_method :append_before, :before
1621
+
1622
+ # Adds `block` to the start of the list of `before` blocks in the same
1623
+ # scope (`:example`, `:context`, or `:suite`), in contrast to {#before},
1624
+ # which adds the hook to the end of the list.
1625
+ #
1626
+ # See {Hooks#before} for full `before` hook docs.
1627
+ #
1628
+ # This method differs from {Hooks#prepend_before} in only one way: it supports
1629
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once before
1630
+ # the first example of the entire suite is executed.
1631
+ #
1632
+ # @see #before
1633
+ # @see #after
1634
+ # @see #append_after
1635
+ def prepend_before(*args, &block)
1636
+ handle_suite_hook(args, @before_suite_hooks, :unshift,
1637
+ Hooks::BeforeHook, block) || super(*args, &block)
1638
+ end
1639
+
1640
+ # Defines a `after` hook. See {Hooks#after} for full docs.
1641
+ #
1642
+ # This method differs from {Hooks#after} in only one way: it supports
1643
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once after
1644
+ # the last example of the entire suite is executed.
1645
+ #
1646
+ # @see #append_after
1647
+ # @see #before
1648
+ # @see #prepend_before
1649
+ def after(*args, &block)
1650
+ handle_suite_hook(args, @after_suite_hooks, :unshift,
1651
+ Hooks::AfterHook, block) || super(*args, &block)
1652
+ end
1653
+ alias_method :prepend_after, :after
1654
+
1655
+ # Adds `block` to the end of the list of `after` blocks in the same
1656
+ # scope (`:example`, `:context`, or `:suite`), in contrast to {#after},
1657
+ # which adds the hook to the start of the list.
1658
+ #
1659
+ # See {Hooks#after} for full `after` hook docs.
1660
+ #
1661
+ # This method differs from {Hooks#append_after} in only one way: it supports
1662
+ # the `:suite` scope. Hooks with the `:suite` scope will be run once after
1663
+ # the last example of the entire suite is executed.
1664
+ #
1665
+ # @see #append_after
1666
+ # @see #before
1667
+ # @see #prepend_before
1668
+ def append_after(*args, &block)
1669
+ handle_suite_hook(args, @after_suite_hooks, :push,
1670
+ Hooks::AfterHook, block) || super(*args, &block)
1671
+ end
1672
+
1673
+ # @private
1674
+ def with_suite_hooks
1675
+ return yield if dry_run?
1676
+
1677
+ hook_context = SuiteHookContext.new
1678
+ begin
1679
+ run_hooks_with(@before_suite_hooks, hook_context)
1680
+ yield
1681
+ ensure
1682
+ run_hooks_with(@after_suite_hooks, hook_context)
1683
+ end
1684
+ end
1685
+
1686
+ # @private
1687
+ # Holds the various registered hooks. Here we use a FilterableItemRepository
1688
+ # implementation that is specifically optimized for the read/write patterns
1689
+ # of the config object.
1690
+ def hooks
1691
+ @hooks ||= HookCollections.new(self, FilterableItemRepository::QueryOptimized)
1692
+ end
1693
+
1694
+ # Invokes block before defining an example group
1695
+ def on_example_group_definition(&block)
1696
+ on_example_group_definition_callbacks << block
1697
+ end
1698
+
1699
+ # @api private
1700
+ # Returns an array of blocks to call before defining an example group
1701
+ def on_example_group_definition_callbacks
1702
+ @on_example_group_definition_callbacks ||= []
1703
+ end
1704
+
1705
+ private
1706
+
1707
+ def handle_suite_hook(args, collection, append_or_prepend, hook_type, block)
1708
+ scope, meta = *args
1709
+ return nil unless scope == :suite
1710
+
1711
+ if meta
1712
+ # TODO: in RSpec 4, consider raising an error here.
1713
+ # We warn only for backwards compatibility.
1714
+ RSpec.warn_with "WARNING: `:suite` hooks do not support metadata since " \
1715
+ "they apply to the suite as a whole rather than " \
1716
+ "any individual example or example group that has metadata. " \
1717
+ "The metadata you have provided (#{meta.inspect}) will be ignored."
1718
+ end
1719
+
1720
+ collection.__send__(append_or_prepend, hook_type.new(block, {}))
1721
+ end
1722
+
1723
+ def run_hooks_with(hooks, hook_context)
1724
+ hooks.each { |h| h.run(hook_context) }
1725
+ end
1726
+
1727
+ def get_files_to_run(paths)
1728
+ files = FlatMap.flat_map(paths_to_check(paths)) do |path|
1729
+ path = path.gsub(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
1730
+ File.directory?(path) ? gather_directories(path) : extract_location(path)
1731
+ end.sort.uniq
1732
+
1733
+ return files unless only_failures?
1734
+ relative_files = files.map { |f| Metadata.relative_path(File.expand_path f) }
1735
+ intersection = (relative_files & spec_files_with_failures.to_a)
1736
+ intersection.empty? ? files : intersection
1737
+ end
1738
+
1739
+ def paths_to_check(paths)
1740
+ return paths if pattern_might_load_specs_from_vendored_dirs?
1741
+ paths + [Dir.getwd]
1742
+ end
1743
+
1744
+ def pattern_might_load_specs_from_vendored_dirs?
1745
+ pattern.split(File::SEPARATOR).first.include?('**')
1746
+ end
1747
+
1748
+ def gather_directories(path)
1749
+ include_files = get_matching_files(path, pattern)
1750
+ exclude_files = get_matching_files(path, exclude_pattern)
1751
+ (include_files - exclude_files).sort.uniq
1752
+ end
1753
+
1754
+ def get_matching_files(path, pattern)
1755
+ Dir[file_glob_from(path, pattern)].map { |file| File.expand_path(file) }
1756
+ end
1757
+
1758
+ def file_glob_from(path, pattern)
1759
+ stripped = "{#{pattern.gsub(/\s*,\s*/, ',')}}"
1760
+ return stripped if pattern =~ /^(\.\/)?#{Regexp.escape path}/ || absolute_pattern?(pattern)
1761
+ File.join(path, stripped)
1762
+ end
1763
+
1764
+ if RSpec::Support::OS.windows?
1765
+ # :nocov:
1766
+ def absolute_pattern?(pattern)
1767
+ pattern =~ /\A[A-Z]:\\/ || windows_absolute_network_path?(pattern)
1768
+ end
1769
+
1770
+ def windows_absolute_network_path?(pattern)
1771
+ return false unless ::File::ALT_SEPARATOR
1772
+ pattern.start_with?(::File::ALT_SEPARATOR + ::File::ALT_SEPARATOR)
1773
+ end
1774
+ # :nocov:
1775
+ else
1776
+ def absolute_pattern?(pattern)
1777
+ pattern.start_with?(File::Separator)
1778
+ end
1779
+ end
1780
+
1781
+ def extract_location(path)
1782
+ match = /^(.*?)((?:\:\d+)+)$/.match(path)
1783
+
1784
+ if match
1785
+ captures = match.captures
1786
+ path = captures[0]
1787
+ lines = captures[1][1..-1].split(":").map(&:to_i)
1788
+ filter_manager.add_location path, lines
1789
+ else
1790
+ path, scoped_ids = Example.parse_id(path)
1791
+ filter_manager.add_ids(path, scoped_ids.split(/\s*,\s*/)) if scoped_ids
1792
+ end
1793
+
1794
+ return [] if path == default_path
1795
+ path
1796
+ end
1797
+
1798
+ def command
1799
+ $0.split(File::SEPARATOR).last
1800
+ end
1801
+
1802
+ def value_for(key)
1803
+ @preferred_options.fetch(key) { yield }
1804
+ end
1805
+
1806
+ def define_built_in_hooks
1807
+ around(:example, :aggregate_failures => true) do |procsy|
1808
+ begin
1809
+ aggregate_failures(nil, :hide_backtrace => true, &procsy)
1810
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => exception
1811
+ procsy.example.set_aggregate_failures_exception(exception)
1812
+ end
1813
+ end
1814
+ end
1815
+
1816
+ def assert_no_example_groups_defined(config_option)
1817
+ return unless RSpec.world.example_groups.any?
1818
+
1819
+ raise MustBeConfiguredBeforeExampleGroupsError.new(
1820
+ "RSpec's #{config_option} configuration option must be configured before " \
1821
+ "any example groups are defined, but you have already defined a group."
1822
+ )
1823
+ end
1824
+
1825
+ def output_to_tty?(output=output_stream)
1826
+ tty? || (output.respond_to?(:tty?) && output.tty?)
1827
+ end
1828
+
1829
+ def conditionally_disable_mocks_monkey_patching
1830
+ return unless disable_monkey_patching && rspec_mocks_loaded?
1831
+
1832
+ RSpec::Mocks.configuration.tap do |config|
1833
+ config.syntax = :expect
1834
+ config.patch_marshal_to_support_partial_doubles = false
1835
+ end
1836
+ end
1837
+
1838
+ def conditionally_disable_expectations_monkey_patching
1839
+ return unless disable_monkey_patching && rspec_expectations_loaded?
1840
+
1841
+ RSpec::Expectations.configuration.syntax = :expect
1842
+ end
1843
+
1844
+ def rspec_mocks_loaded?
1845
+ defined?(RSpec::Mocks.configuration)
1846
+ end
1847
+
1848
+ def rspec_expectations_loaded?
1849
+ defined?(RSpec::Expectations.configuration)
1850
+ end
1851
+
1852
+ def update_pattern_attr(name, value)
1853
+ if @spec_files_loaded
1854
+ RSpec.warning "Configuring `#{name}` to #{value} has no effect since " \
1855
+ "RSpec has already loaded the spec files."
1856
+ end
1857
+
1858
+ instance_variable_set(:"@#{name}", value)
1859
+ @files_to_run = nil
1860
+ end
1861
+
1862
+ def clear_values_derived_from_example_status_persistence_file_path
1863
+ @last_run_statuses = nil
1864
+ @spec_files_with_failures = nil
1865
+ end
1866
+ end
1867
+ # rubocop:enable Metrics/ClassLength
1868
+ end
1869
+ end