sublimetheme 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +230 -0
  9. data/Rakefile +8 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +7 -0
  12. data/lib/sublimetheme.rb +6832 -0
  13. data/lib/sublimetheme/version.rb +3 -0
  14. data/path/bin/htmldiff +25 -0
  15. data/path/bin/htmldiff.bat +6 -0
  16. data/path/bin/ldiff +25 -0
  17. data/path/bin/ldiff.bat +6 -0
  18. data/path/bin/rspec +23 -0
  19. data/path/bin/rspec.bat +6 -0
  20. data/path/cache/diff-lcs-1.2.5.gem +0 -0
  21. data/path/cache/rspec-3.3.0.gem +0 -0
  22. data/path/cache/rspec-core-3.3.2.gem +0 -0
  23. data/path/cache/rspec-expectations-3.3.1.gem +0 -0
  24. data/path/cache/rspec-mocks-3.3.2.gem +0 -0
  25. data/path/cache/rspec-support-3.3.0.gem +0 -0
  26. data/path/gems/diff-lcs-1.2.5/.autotest +3 -0
  27. data/path/gems/diff-lcs-1.2.5/.gemtest +0 -0
  28. data/path/gems/diff-lcs-1.2.5/.hoerc +2 -0
  29. data/path/gems/diff-lcs-1.2.5/.rspec +2 -0
  30. data/path/gems/diff-lcs-1.2.5/.travis.yml +22 -0
  31. data/path/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
  32. data/path/gems/diff-lcs-1.2.5/Gemfile +20 -0
  33. data/path/gems/diff-lcs-1.2.5/History.rdoc +152 -0
  34. data/path/gems/diff-lcs-1.2.5/License.rdoc +39 -0
  35. data/path/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
  36. data/path/gems/diff-lcs-1.2.5/README.rdoc +85 -0
  37. data/path/gems/diff-lcs-1.2.5/Rakefile +41 -0
  38. data/path/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
  39. data/path/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
  40. data/path/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
  41. data/path/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
  42. data/path/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
  43. data/path/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
  44. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
  45. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
  46. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
  47. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
  48. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
  49. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
  50. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
  51. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
  52. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
  53. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
  54. data/path/gems/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
  55. data/path/gems/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
  56. data/path/gems/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
  57. data/path/gems/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
  58. data/path/gems/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
  59. data/path/gems/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
  60. data/path/gems/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
  61. data/path/gems/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
  62. data/path/gems/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
  63. data/path/gems/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
  64. data/path/gems/rspec-3.3.0/License.txt +24 -0
  65. data/path/gems/rspec-3.3.0/README.md +34 -0
  66. data/path/gems/rspec-3.3.0/lib/rspec.rb +3 -0
  67. data/path/gems/rspec-3.3.0/lib/rspec/version.rb +5 -0
  68. data/path/gems/rspec-core-3.3.2/.document +5 -0
  69. data/path/gems/rspec-core-3.3.2/.yardopts +8 -0
  70. data/path/gems/rspec-core-3.3.2/Changelog.md +1856 -0
  71. data/path/gems/rspec-core-3.3.2/License.txt +25 -0
  72. data/path/gems/rspec-core-3.3.2/README.md +369 -0
  73. data/path/gems/rspec-core-3.3.2/exe/rspec +4 -0
  74. data/path/gems/rspec-core-3.3.2/lib/rspec/autorun.rb +3 -0
  75. data/path/gems/rspec-core-3.3.2/lib/rspec/core.rb +181 -0
  76. data/path/gems/rspec-core-3.3.2/lib/rspec/core/backtrace_formatter.rb +64 -0
  77. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/coordinator.rb +66 -0
  78. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/example_minimizer.rb +130 -0
  79. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/runner.rb +139 -0
  80. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/server.rb +61 -0
  81. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/subset_enumerator.rb +39 -0
  82. data/path/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb +1807 -0
  83. data/path/gems/rspec-core-3.3.2/lib/rspec/core/configuration_options.rb +191 -0
  84. data/path/gems/rspec-core-3.3.2/lib/rspec/core/drb.rb +111 -0
  85. data/path/gems/rspec-core-3.3.2/lib/rspec/core/dsl.rb +96 -0
  86. data/path/gems/rspec-core-3.3.2/lib/rspec/core/example.rb +573 -0
  87. data/path/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb +796 -0
  88. data/path/gems/rspec-core-3.3.2/lib/rspec/core/example_status_persister.rb +235 -0
  89. data/path/gems/rspec-core-3.3.2/lib/rspec/core/filter_manager.rb +231 -0
  90. data/path/gems/rspec-core-3.3.2/lib/rspec/core/flat_map.rb +20 -0
  91. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters.rb +254 -0
  92. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
  93. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_text_formatter.rb +77 -0
  94. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_formatter.rb +68 -0
  95. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +115 -0
  96. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/console_codes.rb +65 -0
  97. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  98. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
  99. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/exception_presenter.rb +393 -0
  100. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  101. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/helpers.rb +109 -0
  102. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_formatter.rb +151 -0
  103. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_printer.rb +415 -0
  104. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/json_formatter.rb +96 -0
  105. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  106. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/progress_formatter.rb +28 -0
  107. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/protocol.rb +172 -0
  108. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/snippet_extractor.rb +116 -0
  109. data/path/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb +638 -0
  110. data/path/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb +532 -0
  111. data/path/gems/rspec-core-3.3.2/lib/rspec/core/metadata.rb +490 -0
  112. data/path/gems/rspec-core-3.3.2/lib/rspec/core/metadata_filter.rb +235 -0
  113. data/path/gems/rspec-core-3.3.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  114. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  115. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  116. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
  117. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  118. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  119. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mutex.rb +63 -0
  120. data/path/gems/rspec-core-3.3.2/lib/rspec/core/notifications.rb +498 -0
  121. data/path/gems/rspec-core-3.3.2/lib/rspec/core/option_parser.rb +301 -0
  122. data/path/gems/rspec-core-3.3.2/lib/rspec/core/ordering.rb +158 -0
  123. data/path/gems/rspec-core-3.3.2/lib/rspec/core/pending.rb +165 -0
  124. data/path/gems/rspec-core-3.3.2/lib/rspec/core/profiler.rb +32 -0
  125. data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer.rb +48 -0
  126. data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/.rspec +2 -0
  127. data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +96 -0
  128. data/path/gems/rspec-core-3.3.2/lib/rspec/core/rake_task.rb +158 -0
  129. data/path/gems/rspec-core-3.3.2/lib/rspec/core/reentrant_mutex.rb +52 -0
  130. data/path/gems/rspec-core-3.3.2/lib/rspec/core/reporter.rb +220 -0
  131. data/path/gems/rspec-core-3.3.2/lib/rspec/core/ruby_project.rb +53 -0
  132. data/path/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb +179 -0
  133. data/path/gems/rspec-core-3.3.2/lib/rspec/core/sandbox.rb +37 -0
  134. data/path/gems/rspec-core-3.3.2/lib/rspec/core/set.rb +49 -0
  135. data/path/gems/rspec-core-3.3.2/lib/rspec/core/shared_context.rb +55 -0
  136. data/path/gems/rspec-core-3.3.2/lib/rspec/core/shared_example_group.rb +210 -0
  137. data/path/gems/rspec-core-3.3.2/lib/rspec/core/shell_escape.rb +49 -0
  138. data/path/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  139. data/path/gems/rspec-core-3.3.2/lib/rspec/core/version.rb +9 -0
  140. data/path/gems/rspec-core-3.3.2/lib/rspec/core/warnings.rb +40 -0
  141. data/path/gems/rspec-core-3.3.2/lib/rspec/core/world.rb +178 -0
  142. data/path/gems/rspec-expectations-3.3.1/.document +5 -0
  143. data/path/gems/rspec-expectations-3.3.1/.yardopts +6 -0
  144. data/path/gems/rspec-expectations-3.3.1/Changelog.md +953 -0
  145. data/path/gems/rspec-expectations-3.3.1/License.txt +24 -0
  146. data/path/gems/rspec-expectations-3.3.1/README.md +289 -0
  147. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations.rb +81 -0
  148. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/configuration.rb +164 -0
  149. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/expectation_target.rb +113 -0
  150. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/fail_with.rb +31 -0
  151. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
  152. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/handler.rb +170 -0
  153. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/minitest_integration.rb +31 -0
  154. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/syntax.rb +132 -0
  155. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/version.rb +8 -0
  156. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers.rb +1009 -0
  157. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
  158. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in.rb +52 -0
  159. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/all.rb +85 -0
  160. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/base_matcher.rb +181 -0
  161. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be.rb +285 -0
  162. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
  163. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
  164. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
  165. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
  166. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/change.rb +337 -0
  167. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/compound.rb +293 -0
  168. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/contain_exactly.rb +253 -0
  169. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/cover.rb +24 -0
  170. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eq.rb +40 -0
  171. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eql.rb +34 -0
  172. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/equal.rb +81 -0
  173. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/exist.rb +86 -0
  174. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/has.rb +103 -0
  175. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  176. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/include.rb +130 -0
  177. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/match.rb +37 -0
  178. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/operators.rb +128 -0
  179. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/output.rb +200 -0
  180. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/raise_error.rb +216 -0
  181. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/respond_to.rb +90 -0
  182. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/satisfy.rb +37 -0
  183. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  184. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  185. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/yield.rb +418 -0
  186. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/composable.rb +184 -0
  187. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/dsl.rb +453 -0
  188. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/english_phrasing.rb +42 -0
  189. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  190. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/fail_matchers.rb +42 -0
  191. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/generated_descriptions.rb +42 -0
  192. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
  193. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
  194. data/path/gems/rspec-mocks-3.3.2/.document +5 -0
  195. data/path/gems/rspec-mocks-3.3.2/.yardopts +6 -0
  196. data/path/gems/rspec-mocks-3.3.2/Changelog.md +965 -0
  197. data/path/gems/rspec-mocks-3.3.2/License.txt +24 -0
  198. data/path/gems/rspec-mocks-3.3.2/README.md +430 -0
  199. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks.rb +126 -0
  200. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance.rb +11 -0
  201. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/chain.rb +110 -0
  202. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  203. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
  204. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expectation_chain.rb +48 -0
  205. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  206. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  207. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/recorder.rb +264 -0
  208. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain.rb +46 -0
  209. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +27 -0
  210. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  211. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_matchers.rb +320 -0
  212. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/configuration.rb +188 -0
  213. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/error_generator.rb +362 -0
  214. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/example_methods.rb +421 -0
  215. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/instance_method_stasher.rb +135 -0
  216. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/marshal_extension.rb +41 -0
  217. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  218. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/have_received.rb +116 -0
  219. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive.rb +130 -0
  220. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_message_chain.rb +80 -0
  221. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_messages.rb +75 -0
  222. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_chain.rb +87 -0
  223. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_expectation.rb +717 -0
  224. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_double.rb +287 -0
  225. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_reference.rb +192 -0
  226. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutate_const.rb +335 -0
  227. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutex.rb +73 -0
  228. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/object_reference.rb +149 -0
  229. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/order_group.rb +81 -0
  230. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/proxy.rb +439 -0
  231. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/reentrant_mutex.rb +53 -0
  232. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/space.rb +238 -0
  233. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/standalone.rb +3 -0
  234. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/syntax.rb +325 -0
  235. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/targets.rb +97 -0
  236. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/test_double.rb +170 -0
  237. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_double.rb +129 -0
  238. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_message_expecation.rb +54 -0
  239. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_proxy.rb +213 -0
  240. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/version.rb +9 -0
  241. data/path/gems/rspec-support-3.3.0/Changelog.md +125 -0
  242. data/path/gems/rspec-support-3.3.0/LICENSE.txt +22 -0
  243. data/path/gems/rspec-support-3.3.0/README.md +26 -0
  244. data/path/gems/rspec-support-3.3.0/lib/rspec/support.rb +111 -0
  245. data/path/gems/rspec-support-3.3.0/lib/rspec/support/caller_filter.rb +83 -0
  246. data/path/gems/rspec-support-3.3.0/lib/rspec/support/differ.rb +215 -0
  247. data/path/gems/rspec-support-3.3.0/lib/rspec/support/directory_maker.rb +63 -0
  248. data/path/gems/rspec-support-3.3.0/lib/rspec/support/encoded_string.rb +155 -0
  249. data/path/gems/rspec-support-3.3.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  250. data/path/gems/rspec-support-3.3.0/lib/rspec/support/hunk_generator.rb +47 -0
  251. data/path/gems/rspec-support-3.3.0/lib/rspec/support/matcher_definition.rb +42 -0
  252. data/path/gems/rspec-support-3.3.0/lib/rspec/support/method_signature_verifier.rb +273 -0
  253. data/path/gems/rspec-support-3.3.0/lib/rspec/support/object_formatter.rb +93 -0
  254. data/path/gems/rspec-support-3.3.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  255. data/path/gems/rspec-support-3.3.0/lib/rspec/support/ruby_features.rb +118 -0
  256. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec.rb +81 -0
  257. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  258. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  259. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/in_sub_process.rb +52 -0
  260. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/library_wide_checks.rb +145 -0
  261. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/shell_out.rb +71 -0
  262. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  263. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  264. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_directory.rb +9 -0
  265. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  266. data/path/gems/rspec-support-3.3.0/lib/rspec/support/version.rb +7 -0
  267. data/path/gems/rspec-support-3.3.0/lib/rspec/support/version_checker.rb +53 -0
  268. data/path/gems/rspec-support-3.3.0/lib/rspec/support/warnings.rb +39 -0
  269. data/path/specifications/diff-lcs-1.2.5.gemspec +68 -0
  270. data/path/specifications/rspec-3.3.0.gemspec +42 -0
  271. data/path/specifications/rspec-core-3.3.2.gemspec +68 -0
  272. data/path/specifications/rspec-expectations-3.3.1.gemspec +50 -0
  273. data/path/specifications/rspec-mocks-3.3.2.gemspec +53 -0
  274. data/path/specifications/rspec-support-3.3.0.gemspec +38 -0
  275. data/sublimetheme.gemspec +32 -0
  276. metadata +363 -0
@@ -0,0 +1,48 @@
1
+ module RSpec
2
+ module Support
3
+ # Provides a means to fuzzy-match between two arbitrary objects.
4
+ # Understands array/hash nesting. Uses `===` or `==` to
5
+ # perform the matching.
6
+ module FuzzyMatcher
7
+ # @api private
8
+ def self.values_match?(expected, actual)
9
+ if Hash === actual
10
+ return hashes_match?(expected, actual) if Hash === expected
11
+ elsif Array === expected && Enumerable === actual && !(Struct === actual)
12
+ return arrays_match?(expected, actual.to_a)
13
+ end
14
+
15
+ return true if expected == actual
16
+
17
+ begin
18
+ expected === actual
19
+ rescue ArgumentError
20
+ # Some objects, like 0-arg lambdas on 1.9+, raise
21
+ # ArgumentError for `expected === actual`.
22
+ false
23
+ end
24
+ end
25
+
26
+ # @private
27
+ def self.arrays_match?(expected_list, actual_list)
28
+ return false if expected_list.size != actual_list.size
29
+
30
+ expected_list.zip(actual_list).all? do |expected, actual|
31
+ values_match?(expected, actual)
32
+ end
33
+ end
34
+
35
+ # @private
36
+ def self.hashes_match?(expected_hash, actual_hash)
37
+ return false if expected_hash.size != actual_hash.size
38
+
39
+ expected_hash.all? do |expected_key, expected_value|
40
+ actual_value = actual_hash.fetch(expected_key) { return false }
41
+ values_match?(expected_value, actual_value)
42
+ end
43
+ end
44
+
45
+ private_class_method :arrays_match?, :hashes_match?
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,47 @@
1
+ require 'diff/lcs'
2
+ require 'diff/lcs/hunk'
3
+
4
+ module RSpec
5
+ module Support
6
+ # @private
7
+ class HunkGenerator
8
+ def initialize(actual, expected)
9
+ @actual = actual
10
+ @expected = expected
11
+ end
12
+
13
+ def hunks
14
+ @file_length_difference = 0
15
+ @hunks ||= diffs.map do |piece|
16
+ build_hunk(piece)
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def diffs
23
+ Diff::LCS.diff(expected_lines, actual_lines)
24
+ end
25
+
26
+ def expected_lines
27
+ @expected.split("\n").map! { |e| e.chomp }
28
+ end
29
+
30
+ def actual_lines
31
+ @actual.split("\n").map! { |e| e.chomp }
32
+ end
33
+
34
+ def build_hunk(piece)
35
+ Diff::LCS::Hunk.new(
36
+ expected_lines, actual_lines, piece, context_lines, @file_length_difference
37
+ ).tap do |h|
38
+ @file_length_difference = h.file_length_difference
39
+ end
40
+ end
41
+
42
+ def context_lines
43
+ 3
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,42 @@
1
+ module RSpec
2
+ module Support
3
+ # @private
4
+ def self.matcher_definitions
5
+ @matcher_definitions ||= []
6
+ end
7
+
8
+ # Used internally to break cyclic dependency between mocks, expectations,
9
+ # and support. We don't currently have a consistent implementation of our
10
+ # matchers, though we are considering changing that:
11
+ # https://github.com/rspec/rspec-mocks/issues/513
12
+ #
13
+ # @private
14
+ def self.register_matcher_definition(&block)
15
+ matcher_definitions << block
16
+ end
17
+
18
+ # Remove a previously registered matcher. Useful for cleaning up after
19
+ # yourself in specs.
20
+ #
21
+ # @private
22
+ def self.deregister_matcher_definition(&block)
23
+ matcher_definitions.delete(block)
24
+ end
25
+
26
+ # @private
27
+ def self.is_a_matcher?(object)
28
+ matcher_definitions.any? { |md| md.call(object) }
29
+ end
30
+
31
+ # @api private
32
+ #
33
+ # gives a string representation of an object for use in RSpec descriptions
34
+ def self.rspec_description_for_object(object)
35
+ if RSpec::Support.is_a_matcher?(object) && object.respond_to?(:description)
36
+ object.description
37
+ else
38
+ object
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,273 @@
1
+ require 'rspec/support'
2
+ RSpec::Support.require_rspec_support "ruby_features"
3
+ RSpec::Support.require_rspec_support "matcher_definition"
4
+
5
+ module RSpec
6
+ module Support
7
+ # Extracts info about the number of arguments and allowed/required
8
+ # keyword args of a given method.
9
+ #
10
+ # @private
11
+ class MethodSignature
12
+ attr_reader :min_non_kw_args, :max_non_kw_args, :optional_kw_args, :required_kw_args
13
+
14
+ def initialize(method)
15
+ @method = method
16
+ @optional_kw_args = []
17
+ @required_kw_args = []
18
+ classify_parameters
19
+ end
20
+
21
+ def non_kw_args_arity_description
22
+ case max_non_kw_args
23
+ when min_non_kw_args then min_non_kw_args.to_s
24
+ when INFINITY then "#{min_non_kw_args} or more"
25
+ else "#{min_non_kw_args} to #{max_non_kw_args}"
26
+ end
27
+ end
28
+
29
+ def valid_non_kw_args?(positional_arg_count)
30
+ min_non_kw_args <= positional_arg_count &&
31
+ positional_arg_count <= max_non_kw_args
32
+ end
33
+
34
+ if RubyFeatures.optional_and_splat_args_supported?
35
+ def description
36
+ @description ||= begin
37
+ parts = []
38
+
39
+ unless non_kw_args_arity_description == "0"
40
+ parts << "arity of #{non_kw_args_arity_description}"
41
+ end
42
+
43
+ if @optional_kw_args.any?
44
+ parts << "optional keyword args (#{@optional_kw_args.map(&:inspect).join(", ")})"
45
+ end
46
+
47
+ if @required_kw_args.any?
48
+ parts << "required keyword args (#{@required_kw_args.map(&:inspect).join(", ")})"
49
+ end
50
+
51
+ parts << "any additional keyword args" if @allows_any_kw_args
52
+
53
+ parts.join(" and ")
54
+ end
55
+ end
56
+
57
+ def missing_kw_args_from(given_kw_args)
58
+ @required_kw_args - given_kw_args
59
+ end
60
+
61
+ def invalid_kw_args_from(given_kw_args)
62
+ return [] if @allows_any_kw_args
63
+ given_kw_args - @allowed_kw_args
64
+ end
65
+
66
+ def has_kw_args_in?(args)
67
+ Hash === args.last && could_contain_kw_args?(args)
68
+ end
69
+
70
+ # Without considering what the last arg is, could it
71
+ # contain keyword arguments?
72
+ def could_contain_kw_args?(args)
73
+ return false if args.count <= min_non_kw_args
74
+ @allows_any_kw_args || @allowed_kw_args.any?
75
+ end
76
+
77
+ def classify_parameters
78
+ optional_non_kw_args = @min_non_kw_args = 0
79
+ @allows_any_kw_args = false
80
+
81
+ @method.parameters.each do |(type, name)|
82
+ case type
83
+ # def foo(a:)
84
+ when :keyreq then @required_kw_args << name
85
+ # def foo(a: 1)
86
+ when :key then @optional_kw_args << name
87
+ # def foo(**kw_args)
88
+ when :keyrest then @allows_any_kw_args = true
89
+ # def foo(a)
90
+ when :req then @min_non_kw_args += 1
91
+ # def foo(a = 1)
92
+ when :opt then optional_non_kw_args += 1
93
+ # def foo(*a)
94
+ when :rest then optional_non_kw_args = INFINITY
95
+ end
96
+ end
97
+
98
+ @max_non_kw_args = @min_non_kw_args + optional_non_kw_args
99
+ @allowed_kw_args = @required_kw_args + @optional_kw_args
100
+ end
101
+ else
102
+ def description
103
+ "arity of #{non_kw_args_arity_description}"
104
+ end
105
+
106
+ def missing_kw_args_from(_given_kw_args)
107
+ []
108
+ end
109
+
110
+ def invalid_kw_args_from(_given_kw_args)
111
+ []
112
+ end
113
+
114
+ def has_kw_args_in?(_args)
115
+ false
116
+ end
117
+
118
+ def could_contain_kw_args?(*)
119
+ false
120
+ end
121
+
122
+ def classify_parameters
123
+ arity = @method.arity
124
+ if arity < 0
125
+ # `~` inverts the one's complement and gives us the
126
+ # number of required args
127
+ @min_non_kw_args = ~arity
128
+ @max_non_kw_args = INFINITY
129
+ else
130
+ @min_non_kw_args = arity
131
+ @max_non_kw_args = arity
132
+ end
133
+ end
134
+ end
135
+
136
+ INFINITY = 1 / 0.0
137
+ end
138
+
139
+ # Deals with the slightly different semantics of block arguments.
140
+ # For methods, arguments are required unless a default value is provided.
141
+ # For blocks, arguments are optional, even if no default value is provided.
142
+ #
143
+ # However, we want to treat block args as required since you virtually
144
+ # always want to pass a value for each received argument and our
145
+ # `and_yield` has treated block args as required for many years.
146
+ #
147
+ # @api private
148
+ class BlockSignature < MethodSignature
149
+ if RubyFeatures.optional_and_splat_args_supported?
150
+ def classify_parameters
151
+ super
152
+ @min_non_kw_args = @max_non_kw_args unless @max_non_kw_args == INFINITY
153
+ end
154
+ end
155
+ end
156
+
157
+ # Abstract base class for signature verifiers.
158
+ #
159
+ # @api private
160
+ class MethodSignatureVerifier
161
+ attr_reader :non_kw_args, :kw_args
162
+
163
+ def initialize(signature, args)
164
+ @signature = signature
165
+ @non_kw_args, @kw_args = split_args(*args)
166
+ end
167
+
168
+ def valid?
169
+ missing_kw_args.empty? &&
170
+ invalid_kw_args.empty? &&
171
+ valid_non_kw_args?
172
+ end
173
+
174
+ def error_message
175
+ if missing_kw_args.any?
176
+ "Missing required keyword arguments: %s" % [
177
+ missing_kw_args.join(", ")
178
+ ]
179
+ elsif invalid_kw_args.any?
180
+ "Invalid keyword arguments provided: %s" % [
181
+ invalid_kw_args.join(", ")
182
+ ]
183
+ elsif !valid_non_kw_args?
184
+ "Wrong number of arguments. Expected %s, got %s." % [
185
+ @signature.non_kw_args_arity_description,
186
+ non_kw_args.length
187
+ ]
188
+ end
189
+ end
190
+
191
+ private
192
+
193
+ def valid_non_kw_args?
194
+ @signature.valid_non_kw_args?(non_kw_args.length)
195
+ end
196
+
197
+ def missing_kw_args
198
+ @signature.missing_kw_args_from(kw_args)
199
+ end
200
+
201
+ def invalid_kw_args
202
+ @signature.invalid_kw_args_from(kw_args)
203
+ end
204
+
205
+ def split_args(*args)
206
+ kw_args = if @signature.has_kw_args_in?(args)
207
+ args.pop.keys
208
+ else
209
+ []
210
+ end
211
+
212
+ [args, kw_args]
213
+ end
214
+ end
215
+
216
+ # Figures out wether a given method can accept various arguments.
217
+ # Surprisingly non-trivial.
218
+ #
219
+ # @private
220
+ StrictSignatureVerifier = MethodSignatureVerifier
221
+
222
+ # Allows matchers to be used instead of providing keyword arguments. In
223
+ # practice, when this happens only the arity of the method is verified.
224
+ #
225
+ # @private
226
+ class LooseSignatureVerifier < MethodSignatureVerifier
227
+ private
228
+
229
+ def split_args(*args)
230
+ if RSpec::Support.is_a_matcher?(args.last) && @signature.could_contain_kw_args?(args)
231
+ args.pop
232
+ @signature = SignatureWithKeywordArgumentsMatcher.new(@signature)
233
+ end
234
+
235
+ super(*args)
236
+ end
237
+
238
+ # If a matcher is used in a signature in place of keyword arguments, all
239
+ # keyword argument validation needs to be skipped since the matcher is
240
+ # opaque.
241
+ #
242
+ # Instead, keyword arguments will be validated when the method is called
243
+ # and they are actually known.
244
+ #
245
+ # @private
246
+ class SignatureWithKeywordArgumentsMatcher
247
+ def initialize(signature)
248
+ @signature = signature
249
+ end
250
+
251
+ def missing_kw_args_from(_kw_args)
252
+ []
253
+ end
254
+
255
+ def invalid_kw_args_from(_kw_args)
256
+ []
257
+ end
258
+
259
+ def non_kw_args_arity_description
260
+ @signature.non_kw_args_arity_description
261
+ end
262
+
263
+ def valid_non_kw_args?(*args)
264
+ @signature.valid_non_kw_args?(*args)
265
+ end
266
+
267
+ def has_kw_args_in?(args)
268
+ @signature.has_kw_args_in?(args)
269
+ end
270
+ end
271
+ end
272
+ end
273
+ end
@@ -0,0 +1,93 @@
1
+ module RSpec
2
+ module Support
3
+ # Provide additional output details beyond what `inspect` provides when
4
+ # printing Time, DateTime, or BigDecimal
5
+ module ObjectFormatter
6
+ # @api private
7
+ def self.format(object)
8
+ prepare_for_inspection(object).inspect
9
+ end
10
+
11
+ # rubocop:disable MethodLength
12
+
13
+ # @private
14
+ # Prepares the provided object to be formatted by wrapping it as needed
15
+ # in something that, when `inspect` is called on it, will produce the
16
+ # desired output.
17
+ #
18
+ # This allows us to apply the desired formatting to hash/array data structures
19
+ # at any level of nesting, simply by walking that structure and replacing items
20
+ # with custom items that have `inspect` defined to return the desired output
21
+ # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to
22
+ # format the entire thing.
23
+ def self.prepare_for_inspection(object)
24
+ case object
25
+ when Array
26
+ return object.map { |o| prepare_for_inspection(o) }
27
+ when Hash
28
+ return prepare_hash(object)
29
+ when Time
30
+ inspection = format_time(object)
31
+ else
32
+ if defined?(DateTime) && DateTime === object
33
+ inspection = format_date_time(object)
34
+ elsif defined?(BigDecimal) && BigDecimal === object
35
+ inspection = "#{object.to_s 'F'} (#{object.inspect})"
36
+ elsif RSpec::Support.is_a_matcher?(object) && object.respond_to?(:description)
37
+ inspection = object.description
38
+ else
39
+ return object
40
+ end
41
+ end
42
+
43
+ InspectableItem.new(inspection)
44
+ end
45
+ # rubocop:enable MethodLength
46
+
47
+ # @private
48
+ def self.prepare_hash(input)
49
+ input.inject({}) do |hash, (k, v)|
50
+ hash[prepare_for_inspection(k)] = prepare_for_inspection(v)
51
+ hash
52
+ end
53
+ end
54
+
55
+ TIME_FORMAT = "%Y-%m-%d %H:%M:%S"
56
+
57
+ if Time.method_defined?(:nsec)
58
+ # @private
59
+ def self.format_time(time)
60
+ time.strftime("#{TIME_FORMAT}.#{"%09d" % time.nsec} %z")
61
+ end
62
+ else # for 1.8.7
63
+ # @private
64
+ def self.format_time(time)
65
+ time.strftime("#{TIME_FORMAT}.#{"%06d" % time.usec} %z")
66
+ end
67
+ end
68
+
69
+ DATE_TIME_FORMAT = "%a, %d %b %Y %H:%M:%S.%N %z"
70
+ # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is
71
+ # defined use a custom format string that includes more time precision.
72
+ # @private
73
+ def self.format_date_time(date_time)
74
+ if defined?(ActiveSupport)
75
+ date_time.strftime(DATE_TIME_FORMAT)
76
+ else
77
+ date_time.inspect
78
+ end
79
+ end
80
+
81
+ # @private
82
+ InspectableItem = Struct.new(:inspection) do
83
+ def inspect
84
+ inspection
85
+ end
86
+
87
+ def pretty_print(pp)
88
+ pp.text inspection
89
+ end
90
+ end
91
+ end
92
+ end
93
+ end