gem_repackager 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (567) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +22 -0
  4. data/README.md +56 -0
  5. data/Rakefile +9 -0
  6. data/bin/gem_repackager +57 -0
  7. data/gem_repackager.gemspec +22 -0
  8. data/lib/gem_repackager.rb +131 -0
  9. data/lib/gem_repackager/version.rb +5 -0
  10. data/spec/packager_spec.rb +131 -0
  11. data/spec/spec_helper.rb +1 -0
  12. data/support/bin/rspec +19 -0
  13. data/support/gems/rspec-2.11.0/License.txt +24 -0
  14. data/support/gems/rspec-2.11.0/README.md +47 -0
  15. data/support/gems/rspec-2.11.0/lib/rspec.rb +4 -0
  16. data/support/gems/rspec-2.11.0/lib/rspec/version.rb +5 -0
  17. data/support/gems/rspec-core-2.11.1/.document +5 -0
  18. data/support/gems/rspec-core-2.11.1/.yardopts +6 -0
  19. data/support/gems/rspec-core-2.11.1/Changelog.md +570 -0
  20. data/support/gems/rspec-core-2.11.1/License.txt +24 -0
  21. data/support/gems/rspec-core-2.11.1/README.md +235 -0
  22. data/support/gems/rspec-core-2.11.1/exe/autospec +13 -0
  23. data/support/gems/rspec-core-2.11.1/exe/rspec +25 -0
  24. data/support/gems/rspec-core-2.11.1/features/Autotest.md +38 -0
  25. data/support/gems/rspec-core-2.11.1/features/README.md +17 -0
  26. data/support/gems/rspec-core-2.11.1/features/Upgrade.md +364 -0
  27. data/support/gems/rspec-core-2.11.1/features/command_line/README.md +28 -0
  28. data/support/gems/rspec-core-2.11.1/features/command_line/example_name_option.feature +101 -0
  29. data/support/gems/rspec-core-2.11.1/features/command_line/exit_status.feature +83 -0
  30. data/support/gems/rspec-core-2.11.1/features/command_line/format_option.feature +81 -0
  31. data/support/gems/rspec-core-2.11.1/features/command_line/init.feature +18 -0
  32. data/support/gems/rspec-core-2.11.1/features/command_line/line_number_appended_to_path.feature +140 -0
  33. data/support/gems/rspec-core-2.11.1/features/command_line/line_number_option.feature +58 -0
  34. data/support/gems/rspec-core-2.11.1/features/command_line/order.feature +29 -0
  35. data/support/gems/rspec-core-2.11.1/features/command_line/pattern_option.feature +31 -0
  36. data/support/gems/rspec-core-2.11.1/features/command_line/rake_task.feature +68 -0
  37. data/support/gems/rspec-core-2.11.1/features/command_line/ruby.feature +22 -0
  38. data/support/gems/rspec-core-2.11.1/features/command_line/tag.feature +91 -0
  39. data/support/gems/rspec-core-2.11.1/features/configuration/alias_example_to.feature +48 -0
  40. data/support/gems/rspec-core-2.11.1/features/configuration/custom_settings.feature +84 -0
  41. data/support/gems/rspec-core-2.11.1/features/configuration/default_path.feature +38 -0
  42. data/support/gems/rspec-core-2.11.1/features/configuration/fail_fast.feature +77 -0
  43. data/support/gems/rspec-core-2.11.1/features/configuration/read_options_from_file.feature +87 -0
  44. data/support/gems/rspec-core-2.11.1/features/example_groups/basic_structure.feature +55 -0
  45. data/support/gems/rspec-core-2.11.1/features/example_groups/shared_context.feature +74 -0
  46. data/support/gems/rspec-core-2.11.1/features/example_groups/shared_examples.feature +204 -0
  47. data/support/gems/rspec-core-2.11.1/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
  48. data/support/gems/rspec-core-2.11.1/features/filtering/exclusion_filters.feature +139 -0
  49. data/support/gems/rspec-core-2.11.1/features/filtering/if_and_unless.feature +168 -0
  50. data/support/gems/rspec-core-2.11.1/features/filtering/inclusion_filters.feature +105 -0
  51. data/support/gems/rspec-core-2.11.1/features/filtering/run_all_when_everything_filtered.feature +46 -0
  52. data/support/gems/rspec-core-2.11.1/features/formatters/custom_formatter.feature +36 -0
  53. data/support/gems/rspec-core-2.11.1/features/formatters/text_formatter.feature +46 -0
  54. data/support/gems/rspec-core-2.11.1/features/helper_methods/arbitrary_methods.feature +40 -0
  55. data/support/gems/rspec-core-2.11.1/features/helper_methods/let.feature +50 -0
  56. data/support/gems/rspec-core-2.11.1/features/helper_methods/modules.feature +149 -0
  57. data/support/gems/rspec-core-2.11.1/features/hooks/around_hooks.feature +343 -0
  58. data/support/gems/rspec-core-2.11.1/features/hooks/before_and_after_hooks.feature +423 -0
  59. data/support/gems/rspec-core-2.11.1/features/hooks/filtering.feature +234 -0
  60. data/support/gems/rspec-core-2.11.1/features/metadata/current_example.feature +17 -0
  61. data/support/gems/rspec-core-2.11.1/features/metadata/described_class.feature +17 -0
  62. data/support/gems/rspec-core-2.11.1/features/metadata/user_defined.feature +113 -0
  63. data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_any_framework.feature +106 -0
  64. data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_flexmock.feature +96 -0
  65. data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_mocha.feature +97 -0
  66. data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_rr.feature +98 -0
  67. data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_rspec.feature +97 -0
  68. data/support/gems/rspec-core-2.11.1/features/pending/pending_examples.feature +229 -0
  69. data/support/gems/rspec-core-2.11.1/features/spec_files/arbitrary_file_suffix.feature +13 -0
  70. data/support/gems/rspec-core-2.11.1/features/step_definitions/additional_cli_steps.rb +30 -0
  71. data/support/gems/rspec-core-2.11.1/features/subject/attribute_of_subject.feature +124 -0
  72. data/support/gems/rspec-core-2.11.1/features/subject/explicit_subject.feature +82 -0
  73. data/support/gems/rspec-core-2.11.1/features/subject/implicit_receiver.feature +29 -0
  74. data/support/gems/rspec-core-2.11.1/features/subject/implicit_subject.feature +63 -0
  75. data/support/gems/rspec-core-2.11.1/features/support/env.rb +12 -0
  76. data/support/gems/rspec-core-2.11.1/lib/autotest/discover.rb +1 -0
  77. data/support/gems/rspec-core-2.11.1/lib/autotest/rspec2.rb +73 -0
  78. data/support/gems/rspec-core-2.11.1/lib/rspec/autorun.rb +2 -0
  79. data/support/gems/rspec-core-2.11.1/lib/rspec/core.rb +126 -0
  80. data/support/gems/rspec-core-2.11.1/lib/rspec/core/backward_compatibility.rb +65 -0
  81. data/support/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb +36 -0
  82. data/support/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb +944 -0
  83. data/support/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb +129 -0
  84. data/support/gems/rspec-core-2.11.1/lib/rspec/core/deprecation.rb +36 -0
  85. data/support/gems/rspec-core-2.11.1/lib/rspec/core/drb_command_line.rb +26 -0
  86. data/support/gems/rspec-core-2.11.1/lib/rspec/core/drb_options.rb +87 -0
  87. data/support/gems/rspec-core-2.11.1/lib/rspec/core/dsl.rb +26 -0
  88. data/support/gems/rspec-core-2.11.1/lib/rspec/core/example.rb +330 -0
  89. data/support/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb +466 -0
  90. data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions.rb +4 -0
  91. data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
  92. data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/kernel.rb +9 -0
  93. data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
  94. data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/ordered.rb +21 -0
  95. data/support/gems/rspec-core-2.11.1/lib/rspec/core/filter_manager.rb +203 -0
  96. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/base_formatter.rb +168 -0
  97. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/base_text_formatter.rb +203 -0
  98. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
  99. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/helpers.rb +39 -0
  100. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/html_formatter.rb +464 -0
  101. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/progress_formatter.rb +32 -0
  102. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/snippet_extractor.rb +58 -0
  103. data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
  104. data/support/gems/rspec-core-2.11.1/lib/rspec/core/hooks.rb +495 -0
  105. data/support/gems/rspec-core-2.11.1/lib/rspec/core/let.rb +110 -0
  106. data/support/gems/rspec-core-2.11.1/lib/rspec/core/load_path.rb +3 -0
  107. data/support/gems/rspec-core-2.11.1/lib/rspec/core/metadata.rb +276 -0
  108. data/support/gems/rspec-core-2.11.1/lib/rspec/core/metadata_hash_builder.rb +97 -0
  109. data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
  110. data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_flexmock.rb +27 -0
  111. data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_mocha.rb +29 -0
  112. data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rr.rb +27 -0
  113. data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rspec.rb +23 -0
  114. data/support/gems/rspec-core-2.11.1/lib/rspec/core/option_parser.rb +181 -0
  115. data/support/gems/rspec-core-2.11.1/lib/rspec/core/pending.rb +101 -0
  116. data/support/gems/rspec-core-2.11.1/lib/rspec/core/project_initializer.rb +87 -0
  117. data/support/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb +179 -0
  118. data/support/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb +102 -0
  119. data/support/gems/rspec-core-2.11.1/lib/rspec/core/ruby_project.rb +44 -0
  120. data/support/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb +76 -0
  121. data/support/gems/rspec-core-2.11.1/lib/rspec/core/shared_context.rb +49 -0
  122. data/support/gems/rspec-core-2.11.1/lib/rspec/core/shared_example_group.rb +96 -0
  123. data/support/gems/rspec-core-2.11.1/lib/rspec/core/subject.rb +219 -0
  124. data/support/gems/rspec-core-2.11.1/lib/rspec/core/version.rb +7 -0
  125. data/support/gems/rspec-core-2.11.1/lib/rspec/core/world.rb +128 -0
  126. data/support/gems/rspec-core-2.11.1/spec/autotest/discover_spec.rb +19 -0
  127. data/support/gems/rspec-core-2.11.1/spec/autotest/failed_results_re_spec.rb +45 -0
  128. data/support/gems/rspec-core-2.11.1/spec/autotest/rspec_spec.rb +123 -0
  129. data/support/gems/rspec-core-2.11.1/spec/command_line/order_spec.rb +137 -0
  130. data/support/gems/rspec-core-2.11.1/spec/rspec/core/command_line_spec.rb +108 -0
  131. data/support/gems/rspec-core-2.11.1/spec/rspec/core/command_line_spec_output.txt +0 -0
  132. data/support/gems/rspec-core-2.11.1/spec/rspec/core/configuration_options_spec.rb +377 -0
  133. data/support/gems/rspec-core-2.11.1/spec/rspec/core/configuration_spec.rb +1196 -0
  134. data/support/gems/rspec-core-2.11.1/spec/rspec/core/deprecations_spec.rb +66 -0
  135. data/support/gems/rspec-core-2.11.1/spec/rspec/core/drb_command_line_spec.rb +108 -0
  136. data/support/gems/rspec-core-2.11.1/spec/rspec/core/drb_options_spec.rb +180 -0
  137. data/support/gems/rspec-core-2.11.1/spec/rspec/core/dsl_spec.rb +17 -0
  138. data/support/gems/rspec-core-2.11.1/spec/rspec/core/example_group_spec.rb +1098 -0
  139. data/support/gems/rspec-core-2.11.1/spec/rspec/core/example_spec.rb +370 -0
  140. data/support/gems/rspec-core-2.11.1/spec/rspec/core/filter_manager_spec.rb +256 -0
  141. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/base_formatter_spec.rb +80 -0
  142. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/base_text_formatter_spec.rb +363 -0
  143. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
  144. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/helpers_spec.rb +66 -0
  145. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +410 -0
  146. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.8.7.html +409 -0
  147. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.9.2.html +416 -0
  148. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.9.3.html +416 -0
  149. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatter_spec.rb +82 -0
  150. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
  151. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/snippet_extractor_spec.rb +18 -0
  152. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +410 -0
  153. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +409 -0
  154. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +416 -0
  155. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +416 -0
  156. data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatter_spec.rb +83 -0
  157. data/support/gems/rspec-core-2.11.1/spec/rspec/core/hooks_filtering_spec.rb +227 -0
  158. data/support/gems/rspec-core-2.11.1/spec/rspec/core/hooks_spec.rb +250 -0
  159. data/support/gems/rspec-core-2.11.1/spec/rspec/core/kernel_extensions_spec.rb +9 -0
  160. data/support/gems/rspec-core-2.11.1/spec/rspec/core/let_spec.rb +55 -0
  161. data/support/gems/rspec-core-2.11.1/spec/rspec/core/metadata_spec.rb +447 -0
  162. data/support/gems/rspec-core-2.11.1/spec/rspec/core/option_parser_spec.rb +166 -0
  163. data/support/gems/rspec-core-2.11.1/spec/rspec/core/pending_example_spec.rb +220 -0
  164. data/support/gems/rspec-core-2.11.1/spec/rspec/core/project_initializer_spec.rb +130 -0
  165. data/support/gems/rspec-core-2.11.1/spec/rspec/core/rake_task_spec.rb +138 -0
  166. data/support/gems/rspec-core-2.11.1/spec/rspec/core/reporter_spec.rb +103 -0
  167. data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_bar.rb +0 -0
  168. data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_foo.rb +0 -0
  169. data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_spec.rb +1 -0
  170. data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
  171. data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/formatter_specs.rb +60 -0
  172. data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/utf8_encoded.rb +8 -0
  173. data/support/gems/rspec-core-2.11.1/spec/rspec/core/rspec_matchers_spec.rb +45 -0
  174. data/support/gems/rspec-core-2.11.1/spec/rspec/core/ruby_project_spec.rb +24 -0
  175. data/support/gems/rspec-core-2.11.1/spec/rspec/core/runner_spec.rb +81 -0
  176. data/support/gems/rspec-core-2.11.1/spec/rspec/core/shared_context_spec.rb +67 -0
  177. data/support/gems/rspec-core-2.11.1/spec/rspec/core/shared_example_group_spec.rb +84 -0
  178. data/support/gems/rspec-core-2.11.1/spec/rspec/core/subject_spec.rb +244 -0
  179. data/support/gems/rspec-core-2.11.1/spec/rspec/core/world_spec.rb +144 -0
  180. data/support/gems/rspec-core-2.11.1/spec/rspec/core_spec.rb +35 -0
  181. data/support/gems/rspec-core-2.11.1/spec/spec_helper.rb +98 -0
  182. data/support/gems/rspec-core-2.11.1/spec/support/config_options_helper.rb +24 -0
  183. data/support/gems/rspec-core-2.11.1/spec/support/helper_methods.rb +5 -0
  184. data/support/gems/rspec-core-2.11.1/spec/support/matchers.rb +65 -0
  185. data/support/gems/rspec-core-2.11.1/spec/support/shared_example_groups.rb +41 -0
  186. data/support/gems/rspec-core-2.11.1/spec/support/spec_files.rb +44 -0
  187. data/support/gems/rspec-expectations-2.11.2/.document +5 -0
  188. data/support/gems/rspec-expectations-2.11.2/.yardopts +6 -0
  189. data/support/gems/rspec-expectations-2.11.2/Changelog.md +246 -0
  190. data/support/gems/rspec-expectations-2.11.2/License.txt +23 -0
  191. data/support/gems/rspec-expectations-2.11.2/README.md +224 -0
  192. data/support/gems/rspec-expectations-2.11.2/features/README.md +49 -0
  193. data/support/gems/rspec-expectations-2.11.2/features/Upgrade.md +53 -0
  194. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/README.md +90 -0
  195. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/be.feature +173 -0
  196. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/be_within.feature +46 -0
  197. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/cover.feature +45 -0
  198. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/end_with.feature +46 -0
  199. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/equality.feature +145 -0
  200. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/exist.feature +43 -0
  201. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/expect_change.feature +59 -0
  202. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/expect_error.feature +138 -0
  203. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/have.feature +103 -0
  204. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/include.feature +121 -0
  205. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/match.feature +50 -0
  206. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/operators.feature +221 -0
  207. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/predicates.feature +128 -0
  208. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/respond_to.feature +78 -0
  209. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/satisfy.feature +31 -0
  210. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/start_with.feature +46 -0
  211. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/throw_symbol.feature +85 -0
  212. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/types.feature +114 -0
  213. data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/yield.feature +146 -0
  214. data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/access_running_example.feature +53 -0
  215. data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_diffable_matcher.feature +27 -0
  216. data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher.feature +340 -0
  217. data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
  218. data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
  219. data/support/gems/rspec-expectations-2.11.2/features/customized_message.feature +22 -0
  220. data/support/gems/rspec-expectations-2.11.2/features/diffing.feature +85 -0
  221. data/support/gems/rspec-expectations-2.11.2/features/implicit_docstrings.feature +52 -0
  222. data/support/gems/rspec-expectations-2.11.2/features/step_definitions/additional_cli_steps.rb +22 -0
  223. data/support/gems/rspec-expectations-2.11.2/features/support/env.rb +5 -0
  224. data/support/gems/rspec-expectations-2.11.2/features/syntax_configuration.feature +68 -0
  225. data/support/gems/rspec-expectations-2.11.2/features/test_frameworks/test_unit.feature +46 -0
  226. data/support/gems/rspec-expectations-2.11.2/lib/rspec-expectations.rb +1 -0
  227. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations.rb +47 -0
  228. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/deprecation.rb +38 -0
  229. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/differ.rb +81 -0
  230. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/errors.rb +9 -0
  231. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/expectation_target.rb +58 -0
  232. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions.rb +2 -0
  233. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions/array.rb +9 -0
  234. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions/object.rb +39 -0
  235. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/fail_with.rb +55 -0
  236. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/handler.rb +48 -0
  237. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/syntax.rb +110 -0
  238. data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/version.rb +8 -0
  239. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers.rb +689 -0
  240. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/be_close.rb +9 -0
  241. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in.rb +39 -0
  242. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
  243. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be.rb +185 -0
  244. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_instance_of.rb +11 -0
  245. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
  246. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_within.rb +45 -0
  247. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/change.rb +132 -0
  248. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/cover.rb +21 -0
  249. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/eq.rb +22 -0
  250. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/eql.rb +23 -0
  251. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/equal.rb +44 -0
  252. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/exist.rb +26 -0
  253. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/has.rb +47 -0
  254. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/have.rb +107 -0
  255. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/include.rb +51 -0
  256. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/match.rb +12 -0
  257. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/match_array.rb +45 -0
  258. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/raise_error.rb +96 -0
  259. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/respond_to.rb +73 -0
  260. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/satisfy.rb +29 -0
  261. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
  262. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/throw_symbol.rb +93 -0
  263. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/yield.rb +219 -0
  264. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/compatibility.rb +14 -0
  265. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/configuration.rb +66 -0
  266. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/dsl.rb +24 -0
  267. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
  268. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/generated_descriptions.rb +36 -0
  269. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/matcher.rb +299 -0
  270. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/method_missing.rb +12 -0
  271. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/operator_matcher.rb +84 -0
  272. data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/pretty.rb +60 -0
  273. data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/differ_spec.rb +153 -0
  274. data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/expectation_target_spec.rb +65 -0
  275. data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
  276. data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/fail_with_spec.rb +70 -0
  277. data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/handler_spec.rb +206 -0
  278. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/base_matcher_spec.rb +60 -0
  279. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_close_spec.rb +22 -0
  280. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_instance_of_spec.rb +36 -0
  281. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_kind_of_spec.rb +33 -0
  282. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_spec.rb +452 -0
  283. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_within_spec.rb +76 -0
  284. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/change_spec.rb +522 -0
  285. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/configuration_spec.rb +160 -0
  286. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/cover_spec.rb +65 -0
  287. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/description_generation_spec.rb +176 -0
  288. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/dsl_spec.rb +57 -0
  289. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/eq_spec.rb +50 -0
  290. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/eql_spec.rb +37 -0
  291. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/equal_spec.rb +57 -0
  292. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/exist_spec.rb +104 -0
  293. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/has_spec.rb +113 -0
  294. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/have_spec.rb +458 -0
  295. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/include_spec.rb +363 -0
  296. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/match_array_spec.rb +120 -0
  297. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/match_spec.rb +57 -0
  298. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/matcher_spec.rb +434 -0
  299. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/matchers_spec.rb +31 -0
  300. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/method_missing_spec.rb +24 -0
  301. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/operator_matcher_spec.rb +221 -0
  302. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/raise_error_spec.rb +339 -0
  303. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/respond_to_spec.rb +292 -0
  304. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/satisfy_spec.rb +40 -0
  305. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/start_with_end_with_spec.rb +174 -0
  306. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/throw_symbol_spec.rb +111 -0
  307. data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/yield_spec.rb +374 -0
  308. data/support/gems/rspec-expectations-2.11.2/spec/spec_helper.rb +27 -0
  309. data/support/gems/rspec-expectations-2.11.2/spec/support/classes.rb +56 -0
  310. data/support/gems/rspec-expectations-2.11.2/spec/support/in_sub_process.rb +31 -0
  311. data/support/gems/rspec-expectations-2.11.2/spec/support/matchers.rb +22 -0
  312. data/support/gems/rspec-expectations-2.11.2/spec/support/ruby_version.rb +10 -0
  313. data/support/gems/rspec-mocks-2.11.1/.document +5 -0
  314. data/support/gems/rspec-mocks-2.11.1/.yardopts +6 -0
  315. data/support/gems/rspec-mocks-2.11.1/Changelog.md +199 -0
  316. data/support/gems/rspec-mocks-2.11.1/License.txt +23 -0
  317. data/support/gems/rspec-mocks-2.11.1/README.md +276 -0
  318. data/support/gems/rspec-mocks-2.11.1/features/README.md +67 -0
  319. data/support/gems/rspec-mocks-2.11.1/features/Scope.md +17 -0
  320. data/support/gems/rspec-mocks-2.11.1/features/Upgrade.md +22 -0
  321. data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/README.md +27 -0
  322. data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/explicit.feature +60 -0
  323. data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/general_matchers.feature +85 -0
  324. data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/type_matchers.feature +25 -0
  325. data/support/gems/rspec-mocks-2.11.1/features/message_expectations/README.md +58 -0
  326. data/support/gems/rspec-mocks-2.11.1/features/message_expectations/any_instance.feature +21 -0
  327. data/support/gems/rspec-mocks-2.11.1/features/message_expectations/block_local_expectations.feature.pending +55 -0
  328. data/support/gems/rspec-mocks-2.11.1/features/message_expectations/expect_message.feature +94 -0
  329. data/support/gems/rspec-mocks-2.11.1/features/message_expectations/receive_counts.feature +209 -0
  330. data/support/gems/rspec-mocks-2.11.1/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
  331. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/README.md +43 -0
  332. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/any_instance.feature +133 -0
  333. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/as_null_object.feature +35 -0
  334. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/simple_return_value.feature +64 -0
  335. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/stub_chain.feature +51 -0
  336. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/stub_implementation.feature +26 -0
  337. data/support/gems/rspec-mocks-2.11.1/features/method_stubs/to_ary.feature +47 -0
  338. data/support/gems/rspec-mocks-2.11.1/features/outside_rspec/configuration.feature +82 -0
  339. data/support/gems/rspec-mocks-2.11.1/features/outside_rspec/standalone.feature +32 -0
  340. data/support/gems/rspec-mocks-2.11.1/features/step_definitions/additional_cli_steps.rb +4 -0
  341. data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/README.md +62 -0
  342. data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/stub_defined_constant.feature +79 -0
  343. data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/stub_undefined_constant.feature +50 -0
  344. data/support/gems/rspec-mocks-2.11.1/features/support/env.rb +6 -0
  345. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks.rb +39 -0
  346. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance.rb +81 -0
  347. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/chain.rb +77 -0
  348. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/expectation_chain.rb +57 -0
  349. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
  350. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/recorder.rb +197 -0
  351. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/stub_chain.rb +37 -0
  352. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +25 -0
  353. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/argument_list_matcher.rb +93 -0
  354. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/argument_matchers.rb +238 -0
  355. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/error_generator.rb +114 -0
  356. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/errors.rb +12 -0
  357. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/example_methods.rb +95 -0
  358. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
  359. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/marshal.rb +23 -0
  360. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/psych.rb +23 -0
  361. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/framework.rb +20 -0
  362. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/message_expectation.rb +488 -0
  363. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/method_double.rb +196 -0
  364. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/methods.rb +155 -0
  365. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/mock.rb +7 -0
  366. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/order_group.rb +40 -0
  367. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/proxy.rb +190 -0
  368. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/serialization.rb +34 -0
  369. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/space.rb +34 -0
  370. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/standalone.rb +3 -0
  371. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/stub_const.rb +280 -0
  372. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/test_double.rb +103 -0
  373. data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/version.rb +7 -0
  374. data/support/gems/rspec-mocks-2.11.1/lib/spec/mocks.rb +2 -0
  375. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/and_yield_spec.rb +114 -0
  376. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
  377. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_instance_spec.rb +825 -0
  378. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
  379. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/argument_expectation_spec.rb +34 -0
  380. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/at_least_spec.rb +142 -0
  381. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/at_most_spec.rb +90 -0
  382. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/block_return_value_spec.rb +53 -0
  383. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
  384. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_10263_spec.rb +25 -0
  385. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
  386. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
  387. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
  388. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
  389. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
  390. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
  391. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
  392. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/double_spec.rb +12 -0
  393. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/failing_argument_matchers_spec.rb +95 -0
  394. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
  395. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
  396. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
  397. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_space_spec.rb +58 -0
  398. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_spec.rb +730 -0
  399. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/multiple_return_value_spec.rb +119 -0
  400. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/nil_expectation_warning_spec.rb +62 -0
  401. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/null_object_mock_spec.rb +106 -0
  402. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/once_counts_spec.rb +52 -0
  403. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/options_hash_spec.rb +35 -0
  404. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/partial_mock_spec.rb +156 -0
  405. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
  406. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
  407. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/precise_counts_spec.rb +68 -0
  408. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/record_messages_spec.rb +26 -0
  409. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/serialization_spec.rb +111 -0
  410. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stash_spec.rb +27 -0
  411. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_chain_spec.rb +149 -0
  412. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_const_spec.rb +309 -0
  413. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_implementation_spec.rb +68 -0
  414. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_spec.rb +238 -0
  415. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stubbed_message_expectations_spec.rb +47 -0
  416. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/test_double_spec.rb +57 -0
  417. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/to_ary_spec.rb +40 -0
  418. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/twice_counts_spec.rb +66 -0
  419. data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks_spec.rb +51 -0
  420. data/support/gems/rspec-mocks-2.11.1/spec/spec_helper.rb +15 -0
  421. data/support/gems/rspec-rails-2.11.0/.document +5 -0
  422. data/support/gems/rspec-rails-2.11.0/.yardopts +8 -0
  423. data/support/gems/rspec-rails-2.11.0/Changelog.md +293 -0
  424. data/support/gems/rspec-rails-2.11.0/License.txt +22 -0
  425. data/support/gems/rspec-rails-2.11.0/README.md +494 -0
  426. data/support/gems/rspec-rails-2.11.0/features/Autotest.md +24 -0
  427. data/support/gems/rspec-rails-2.11.0/features/Generators.md +8 -0
  428. data/support/gems/rspec-rails-2.11.0/features/GettingStarted.md +84 -0
  429. data/support/gems/rspec-rails-2.11.0/features/README.md +56 -0
  430. data/support/gems/rspec-rails-2.11.0/features/RailsVersions.md +4 -0
  431. data/support/gems/rspec-rails-2.11.0/features/Transactions.md +84 -0
  432. data/support/gems/rspec-rails-2.11.0/features/Upgrade.md +117 -0
  433. data/support/gems/rspec-rails-2.11.0/features/controller_specs/Cookies.md +57 -0
  434. data/support/gems/rspec-rails-2.11.0/features/controller_specs/README.md +45 -0
  435. data/support/gems/rspec-rails-2.11.0/features/controller_specs/anonymous_controller.feature +330 -0
  436. data/support/gems/rspec-rails-2.11.0/features/controller_specs/bypass_rescue.feature +75 -0
  437. data/support/gems/rspec-rails-2.11.0/features/controller_specs/controller_spec.feature +35 -0
  438. data/support/gems/rspec-rails-2.11.0/features/controller_specs/isolation_from_views.feature +87 -0
  439. data/support/gems/rspec-rails-2.11.0/features/controller_specs/render_views.feature +114 -0
  440. data/support/gems/rspec-rails-2.11.0/features/helper_specs/helper_spec.feature +96 -0
  441. data/support/gems/rspec-rails-2.11.0/features/mailer_specs/url_helpers.feature +38 -0
  442. data/support/gems/rspec-rails-2.11.0/features/matchers/README.md +18 -0
  443. data/support/gems/rspec-rails-2.11.0/features/matchers/new_record_matcher.feature +28 -0
  444. data/support/gems/rspec-rails-2.11.0/features/matchers/redirect_to_matcher.feature +40 -0
  445. data/support/gems/rspec-rails-2.11.0/features/matchers/relation_match_array.feature +20 -0
  446. data/support/gems/rspec-rails-2.11.0/features/matchers/render_template_matcher.feature +28 -0
  447. data/support/gems/rspec-rails-2.11.0/features/mocks/mock_model.feature +147 -0
  448. data/support/gems/rspec-rails-2.11.0/features/mocks/stub_model.feature +58 -0
  449. data/support/gems/rspec-rails-2.11.0/features/model_specs/README.md +21 -0
  450. data/support/gems/rspec-rails-2.11.0/features/model_specs/errors_on.feature +33 -0
  451. data/support/gems/rspec-rails-2.11.0/features/model_specs/transactional_examples.feature +109 -0
  452. data/support/gems/rspec-rails-2.11.0/features/request_specs/request_spec.feature +49 -0
  453. data/support/gems/rspec-rails-2.11.0/features/routing_specs/README.md +17 -0
  454. data/support/gems/rspec-rails-2.11.0/features/routing_specs/be_routable_matcher.feature +80 -0
  455. data/support/gems/rspec-rails-2.11.0/features/routing_specs/named_routes.feature +18 -0
  456. data/support/gems/rspec-rails-2.11.0/features/routing_specs/route_to_matcher.feature +90 -0
  457. data/support/gems/rspec-rails-2.11.0/features/step_definitions/additional_cli_steps.rb +4 -0
  458. data/support/gems/rspec-rails-2.11.0/features/step_definitions/model_steps.rb +3 -0
  459. data/support/gems/rspec-rails-2.11.0/features/support/env.rb +53 -0
  460. data/support/gems/rspec-rails-2.11.0/features/view_specs/inferred_controller_path.feature +44 -0
  461. data/support/gems/rspec-rails-2.11.0/features/view_specs/stub_template.feature +51 -0
  462. data/support/gems/rspec-rails-2.11.0/features/view_specs/view_spec.feature +174 -0
  463. data/support/gems/rspec-rails-2.11.0/lib/autotest/rails_rspec2.rb +84 -0
  464. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec.rb +25 -0
  465. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/controller_generator.rb +33 -0
  466. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/templates/controller_spec.rb +14 -0
  467. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/templates/view_spec.rb +5 -0
  468. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/helper/helper_generator.rb +15 -0
  469. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/helper/templates/helper_spec.rb +15 -0
  470. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/install_generator.rb +24 -0
  471. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/templates/.rspec +1 -0
  472. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/templates/spec/spec_helper.rb +38 -0
  473. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/integration_generator.rb +27 -0
  474. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/templates/request_spec.rb +15 -0
  475. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/mailer_generator.rb +20 -0
  476. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/templates/fixture +3 -0
  477. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/templates/mailer_spec.rb +23 -0
  478. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/model_generator.rb +22 -0
  479. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/templates/fixtures.yml +19 -0
  480. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/templates/model_spec.rb +5 -0
  481. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/observer/observer_generator.rb +12 -0
  482. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/observer/templates/observer_spec.rb +5 -0
  483. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/scaffold_generator.rb +158 -0
  484. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/controller_spec.rb +166 -0
  485. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/edit_spec.rb +31 -0
  486. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/index_spec.rb +32 -0
  487. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/new_spec.rb +30 -0
  488. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/routing_spec.rb +37 -0
  489. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/show_spec.rb +28 -0
  490. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/view/templates/view_spec.rb +5 -0
  491. data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/view/view_generator.rb +21 -0
  492. data/support/gems/rspec-rails-2.11.0/lib/rspec-rails.rb +14 -0
  493. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails.rb +17 -0
  494. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/adapters.rb +79 -0
  495. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example.rb +38 -0
  496. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/controller_example_group.rb +128 -0
  497. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/helper_example_group.rb +40 -0
  498. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/mailer_example_group.rb +22 -0
  499. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/model_example_group.rb +10 -0
  500. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/rails_example_group.rb +14 -0
  501. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/request_example_group.rb +23 -0
  502. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/routing_example_group.rb +27 -0
  503. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/view_example_group.rb +155 -0
  504. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/extensions.rb +1 -0
  505. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/extensions/active_record/base.rb +45 -0
  506. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/fixture_support.rb +40 -0
  507. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers.rb +26 -0
  508. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/be_a_new.rb +76 -0
  509. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/be_new_record.rb +19 -0
  510. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/have_extension.rb +35 -0
  511. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/have_rendered.rb +40 -0
  512. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/redirect_to.rb +37 -0
  513. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/relation_match_array.rb +3 -0
  514. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/routing_matchers.rb +107 -0
  515. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/mocks.rb +243 -0
  516. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/module_inclusion.rb +29 -0
  517. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/tasks/rspec.rake +56 -0
  518. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/vendor/capybara.rb +29 -0
  519. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/vendor/webrat.rb +33 -0
  520. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/version.rb +7 -0
  521. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/view_assigns.rb +45 -0
  522. data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/view_rendering.rb +121 -0
  523. data/support/gems/rspec-rails-2.11.0/spec/autotest/rails_rspec2_spec.rb +36 -0
  524. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/controller/controller_generator_spec.rb +86 -0
  525. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/helper/helper_generator_spec.rb +30 -0
  526. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/install/install_generator_spec.rb +18 -0
  527. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/integration/integration_generator_spec.rb +44 -0
  528. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/mailer/mailer_generator_spec.rb +48 -0
  529. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/model/model_generator_spec.rb +52 -0
  530. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/observer/observer_generator_spec.rb +21 -0
  531. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/scaffold/scaffold_generator_spec.rb +107 -0
  532. data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/view/view_generator_spec.rb +41 -0
  533. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/assertion_adapter_spec.rb +28 -0
  534. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/configuration_spec.rb +26 -0
  535. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/deprecations_spec.rb +18 -0
  536. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/controller_example_group_spec.rb +100 -0
  537. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/helper_example_group_spec.rb +64 -0
  538. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/mailer_example_group_spec.rb +21 -0
  539. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/model_example_group_spec.rb +15 -0
  540. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/request_example_group_spec.rb +17 -0
  541. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/routing_example_group_spec.rb +32 -0
  542. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/view_example_group_spec.rb +214 -0
  543. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/extensions/active_model/errors_on_spec.rb +23 -0
  544. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/extensions/active_record/records_spec.rb +9 -0
  545. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/fixture_support_spec.rb +17 -0
  546. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_a_new_spec.rb +142 -0
  547. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_new_record_spec.rb +19 -0
  548. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_routable_spec.rb +41 -0
  549. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/errors_on_spec.rb +38 -0
  550. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/have_rendered_spec.rb +93 -0
  551. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/redirect_to_spec.rb +80 -0
  552. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/relation_match_array_spec.rb +20 -0
  553. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/route_to_spec.rb +152 -0
  554. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/mocks/mock_model_spec.rb +379 -0
  555. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/mocks/stub_model_spec.rb +154 -0
  556. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/setup_and_teardown_adapter_spec.rb +32 -0
  557. data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/view_rendering_spec.rb +111 -0
  558. data/support/gems/rspec-rails-2.11.0/spec/spec_helper.rb +31 -0
  559. data/support/gems/rspec-rails-2.11.0/spec/support/ar_classes.rb +42 -0
  560. data/support/gems/rspec-rails-2.11.0/spec/support/helpers.rb +20 -0
  561. data/support/gems/rspec-rails-2.11.0/spec/support/matchers.rb +9 -0
  562. data/support/specifications/rspec-2.11.0.gemspec +39 -0
  563. data/support/specifications/rspec-core-2.11.1.gemspec +61 -0
  564. data/support/specifications/rspec-expectations-2.11.2.gemspec +40 -0
  565. data/support/specifications/rspec-mocks-2.11.1.gemspec +37 -0
  566. data/support/specifications/rspec-rails-2.11.0.gemspec +55 -0
  567. metadata +653 -0
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in gem_repackager.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Andrew Nordman
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Gem::Repackager
2
+
3
+ Have you ever been without internet and needed a gem but it's in the wrong RVM gemset?
4
+ How about attempting to correct a problem with a production environment and need to
5
+ clone the exact gems available? Perhaps you are attempting a full app stack backup
6
+ for compliance purposes?
7
+
8
+ Gem::Repackager packages one or more of your installed gems back into .gem files for
9
+ easy transportation. Gem::Repackager comes with a command-line utility to facilitate,
10
+ with easy extensibility in the code as well.
11
+
12
+ ## Installation
13
+
14
+ It's a gem, so install it. `gem install gem_repackager` or add it to bundler.
15
+
16
+ ## Usage
17
+
18
+ The command-line utility is as follows:
19
+
20
+ `gem_repackager DIRECTORY [options]`
21
+
22
+ This will repackage all gems in `DIRECTORY` and place the resulting .gem files in
23
+ `DIRECTORY`. `DIRECTORY` refers to the location of your installed directories. Note
24
+ that this is the directory that contains `specifications`, `bin`, `gems`, etc,
25
+ and not the `gems` directory itself. In RVM, this is usually along the lines of
26
+ `~/.rvm/gems/GEMSET` or simply `$GEM_HOME`.
27
+
28
+ By default, `gem_repackager` places the packaged gems into `DIRECTORY`. To change
29
+ this, pass the `--destination DIR` parameter and the resulting gems will be moved
30
+ there.
31
+
32
+ ### Options
33
+
34
+ * `--gems gem-version[,gem-version,...]` - A comma-separated list of gems in "GEM-VERSION"
35
+ * `--destination DIR` - Location to store the packaged .gem files to. If this is not
36
+ passed, it will default to `DIRECTORY`
37
+ * `--[no]-verbose` - Toggle verbose mode. This includes Gem::Specification warnings,
38
+ so this could get noisy.
39
+
40
+ Here's an example of packaging all gems in my current RVM gemset to a custom directory:
41
+
42
+ `gem_repackager $GEM_HOME --destination=~/gem_export`
43
+
44
+ And here is how you would package all of the rspec 2.11.0 gems to the default directory:
45
+
46
+ `gem_repackager $GEM_HOME --gems rspec-2.11.0,rspec-core-2.11.0,rspec-expectations-2.11.2,rspec-mocks-2.11-1`
47
+
48
+ ## Contributing
49
+
50
+ Pull requests welcome, preferably with tests because I am lazy and do not want to run
51
+ every command to make sure changes did not break anything.
52
+
53
+ ## Author
54
+
55
+ Written by [Andrew 'Cad' Nordman](https://github.com/cadwallion) thanks to not having
56
+ any internet access for a week and needing to get things done.
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+
5
+
6
+ task :default => :spec
7
+
8
+ desc "Run specs"
9
+ RSpec::Core::RakeTask.new(:spec)
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'gem_repackager'
5
+
6
+ options = {
7
+ verbose: false
8
+ }
9
+
10
+ OptionParser.new do |opts|
11
+ opts.banner = "Usage: gem_repackager DIRECTORY [options]"
12
+
13
+ opts.on("--destination N", String, "Set custom directory for gems to be sent") do |v|
14
+ options[:destination] = v
15
+ end
16
+
17
+ opts.on('--gems x,y,z', Array, 'Comma-separated list of gem-version') do |list|
18
+ options[:gems] = list
19
+ end
20
+
21
+ opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
22
+ options[:verbose] = v
23
+ end
24
+
25
+ opts.on_tail("--version", "Show version") do
26
+ puts Gem::Repackager::VERSION
27
+ exit
28
+ end
29
+ end.parse!
30
+
31
+ directory = ARGV[0]
32
+ options[:destination] ||= directory
33
+
34
+ if directory
35
+ packager = Gem::Repackager.new directory
36
+ packager.silence_warnings unless options[:verbose]
37
+
38
+ if options[:gems]
39
+ options[:gems].each do |gem|
40
+ name, version = gem.split '-'
41
+ spec = packager.load_spec name: name, version: version
42
+ filename = packager.package_gem spec
43
+
44
+ if filename
45
+ FileUtils.mv filename, options[:destination]
46
+ puts "#{gem} created at #{options[:destination]}"
47
+ else
48
+ puts "#{gem} could not be repackaged."
49
+ end
50
+ end
51
+ else
52
+ packager.package_all options[:destination]
53
+ puts "Gems repackaged: #{packager.gems_built.size}. Gems failed: #{packager.gems_failed.size}."
54
+ end
55
+ else
56
+ puts "Usage: gem_repackager DIRECTORY [options]"
57
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require File.expand_path('../lib/gem_repackager/version', __FILE__)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.authors = ["Andrew Nordman"]
7
+ gem.email = ["cadwallion@gmail.com"]
8
+ gem.description = %q{Repackage your installed gems}
9
+ gem.summary = %q{Repackage installed gems into .gem files}
10
+ gem.homepage = ""
11
+
12
+ gem.files = `git ls-files`.split($\)
13
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
+ gem.name = "gem_repackager"
16
+ gem.require_paths = ["lib"]
17
+ gem.version = Gem::Repackager::VERSION
18
+
19
+ gem.add_development_dependency 'pry'
20
+ gem.add_development_dependency 'rspec'
21
+ gem.add_development_dependency 'rake'
22
+ end
@@ -0,0 +1,131 @@
1
+ require 'gem_repackager/version'
2
+
3
+ module Gem
4
+ module UserInteraction
5
+ def silent_alert_warning(*) ; end
6
+ end
7
+
8
+ # Repackages one or more installed gems back into a .gem file
9
+ #
10
+ # When a gem is installed, the file is split into multiple directories. The
11
+ # gemspec is placed in the specifications directory, the executables are
12
+ # placed in the bin directory, and the rest of the code is placed in a named
13
+ # directory within the gems directory.
14
+ #
15
+ # Gem::Repackager repackages gems back into .gem file(s), either individually
16
+ # or a directory at a time.
17
+ #
18
+ # packager = Gem::Repackager.new '/opt/ruby/gems'
19
+ # packager.package_all '~/gems'
20
+ #
21
+ # spec = packager.load_spec 'activemodel', '3.2.8'
22
+ # packager.package_gem spec
23
+ #
24
+ # Gem::Repackager requires a path to the gems directory of the desired Ruby
25
+ # installation in order to detect specs and properly recombine all the parts
26
+ # of a gem. It defaults to the current working directory.
27
+ class Repackager
28
+ attr_reader :gems_built, :gems_failed, :gem_dir
29
+
30
+ def initialize gem_dir = '.'
31
+ @gem_dir = gem_dir
32
+ end
33
+
34
+ # Builds all gems and moves to determined directory
35
+ #
36
+ # @param [String] Destination of built gems. Defaults to gem directory
37
+ # @return [Array] List of all gems built successfully
38
+ def package_all destination = gem_dir
39
+ @gems_built = []
40
+ @gems_failed = []
41
+
42
+ Dir["#{@gem_dir}/specifications/*.gemspec"].each do |spec_filename|
43
+ spec = load_spec filename: spec_filename
44
+ gem = package_gem spec
45
+
46
+ if gem
47
+ @gems_built.push gem
48
+ FileUtils.mv gem, destination
49
+ else
50
+ @gems_failed.push spec_filename
51
+ end
52
+ end
53
+
54
+ @gems_built
55
+ end
56
+
57
+ # Packages gem from Gem::Specification. If successful, returns the
58
+ # filename of the gem packaged. If unsuccessul, returns nil.
59
+ #
60
+ # @param [Gem::Specification] Gemspec to build
61
+ # @return [String,nil] Filename of gem built, or nil
62
+ def package_gem spec
63
+ enter_gem_directory spec.file_name.sub(/\.gem/,'')
64
+ symlink_bin
65
+ Gem::Builder.new(spec).build
66
+ rescue Gem::InvalidSpecificationException
67
+ return nil
68
+ ensure
69
+ unlink_bin
70
+ end
71
+
72
+ # Enters gems directory and loads the .gemspec
73
+ #
74
+ # @param [String] filename (.gemspec) of gem
75
+ # @return [Gem::Specification] parsed .gemspec
76
+ def load_spec options = {}
77
+ if options[:filename]
78
+ filename = options[:filename]
79
+ elsif options[:name] && options[:version]
80
+ filename = "#{@gem_dir}/specifications/#{options[:name]}-#{options[:version]}.gemspec"
81
+ end
82
+
83
+ Gem::Specification.load filename
84
+ end
85
+
86
+ # Enters specific gem's directory within gems dir
87
+ #
88
+ # @param [String] name of the gem
89
+ def enter_gem_directory gem
90
+ FileUtils.cd "#{@gem_dir}/gems/#{gem}"
91
+ end
92
+
93
+ # Symlink the bin directory to the gem directory. This is due
94
+ # to the decomposed nature of installed gems compared to the
95
+ # original conjoined structure of the gem before packaging.
96
+ #
97
+ # @see Gem::Repackager
98
+ def symlink_bin
99
+ FileUtils.ln_sf('../../bin', 'bin')
100
+ end
101
+
102
+ # Removes the symlink to the bin directory.
103
+ #
104
+ # @see #symlink_bin
105
+ def unlink_bin
106
+ FileUtils.rm_f('bin')
107
+ end
108
+
109
+ # Silences warning generated by validating and packaging gems
110
+ #
111
+ # When validating a gemspec before building, a slew of warnings and
112
+ # success notifications are spewed into the console without an easy
113
+ # way to silence the verbosity. This shuts off the warnings and
114
+ # build success output in a reversible fashion
115
+ def silence_warnings
116
+ @verbose = Gem.configuration.verbose
117
+ Gem.configuration.verbose = false # SILENCE
118
+ Gem::UserInteraction.send :alias_method, :loud_alert_warning, :alert_warning
119
+ Gem::UserInteraction.send :alias_method, :alert_warning, :silent_alert_warning
120
+ end
121
+
122
+ # Resets warnings to before their silenced state
123
+ #
124
+ # @see #silence_warnings
125
+ def reset_warnings
126
+ Gem.configuration.verbose = @verbose
127
+ Gem::UserInteraction.send :alias_method, :silent_alert_warning, :alert_warning
128
+ Gem::UserInteraction.send :alias_method, :alert_warning, :loud_alert_warning
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,5 @@
1
+ module Gem
2
+ class Repackager
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
@@ -0,0 +1,131 @@
1
+ require 'spec_helper'
2
+
3
+ describe Gem::Repackager do
4
+ let(:gem_dir) {
5
+ File.expand_path File.dirname(__FILE__) + '/../support'
6
+ }
7
+ let(:destination_dir) {
8
+ File.expand_path File.dirname(__FILE__) + '/../support/built'
9
+ }
10
+ subject { Gem::Repackager.new gem_dir }
11
+ let(:packager) { subject }
12
+
13
+ its(:gem_dir) { should == gem_dir }
14
+
15
+ before do
16
+ packager.silence_warnings
17
+ end
18
+
19
+ describe '#package_all' do
20
+ it 'detects all specs in the spec dir' do
21
+ packager.stub(:package_gem) { false }
22
+ packager.should_receive(:load_spec).exactly(5).times
23
+ packager.package_all
24
+ end
25
+
26
+ it 'calls package_gem for each spec loaded' do
27
+ packager.should_receive(:package_gem).exactly(5).times
28
+ packager.package_all
29
+ end
30
+
31
+ it 'adds the gem to gems_built if successfully packaged' do
32
+ packager.should_receive(:package_gem).exactly(5).times { "gem" }
33
+ FileUtils.stub(:mv)
34
+ packager.package_all
35
+ packager.gems_built.should have(5).gems
36
+ end
37
+
38
+ it 'should move the gem to the default directory' do
39
+ packager.should_receive(:package_gem).exactly(5).times { "gem" }
40
+ FileUtils.should_receive(:mv).with("gem", packager.gem_dir).exactly(5).times
41
+ packager.package_all
42
+ end
43
+
44
+ it 'should move the gem to a custom directory if passed' do
45
+ packager.should_receive(:package_gem).exactly(5).times { "gem" }
46
+ FileUtils.should_receive(:mv).with("gem", destination_dir).exactly(5).times
47
+ packager.package_all destination_dir
48
+ end
49
+ end
50
+
51
+ describe '#package_gem' do
52
+ let(:spec_file) { gem_dir + "/specifications/rspec-2.11.0.gemspec" }
53
+ let(:spec) { Gem::Specification.load spec_file }
54
+
55
+ it 'returns the gem filename if packaging was successful' do
56
+ result = packager.package_gem spec
57
+ result.should == 'rspec-2.11.0.gem'
58
+ FileUtils.rm_rf('rspec-2.11.0.gem')
59
+ end
60
+
61
+ it 'returns nil if packaging was unsuccessful' do
62
+ Gem::Builder.any_instance.should_receive(:build) { nil }
63
+ result = packager.package_gem spec
64
+ result.should be_nil
65
+ end
66
+
67
+ it 'changes to the gem directory' do
68
+ Gem::Builder.any_instance.should_receive(:build) { nil }
69
+ packager.should_receive(:enter_gem_directory).with('rspec-2.11.0')
70
+ packager.package_gem spec
71
+ end
72
+
73
+ it 'symlinks the bin directory' do
74
+ Gem::Builder.any_instance.should_receive(:build) { nil }
75
+ packager.should_receive(:symlink_bin)
76
+ packager.package_gem spec
77
+ end
78
+
79
+ it 'removes the bin directory after building' do
80
+ Gem::Builder.any_instance.should_receive(:build) { nil }
81
+ packager.should_receive(:unlink_bin)
82
+ packager.package_gem spec
83
+ end
84
+ end
85
+
86
+ describe '#load_spec' do
87
+ let(:spec_file) { gem_dir + "/specifications/rspec-2.11.0.gemspec" }
88
+
89
+ context 'passing gem name and version' do
90
+ it 'converts name and version to gemspec filename' do
91
+ Gem::Specification.should_receive(:load).with(spec_file)
92
+ spec = packager.load_spec name: 'rspec', version: '2.11.0'
93
+ end
94
+
95
+ it 'returns a Gem::Specification' do
96
+ spec = packager.load_spec name: 'rspec', version: '2.11.0'
97
+ spec.should be_instance_of Gem::Specification
98
+ spec.file_name.should == 'rspec-2.11.0.gem'
99
+ end
100
+ end
101
+
102
+ context 'passing gemspec filename' do
103
+ it 'returns a Gem::Specification' do
104
+ spec = packager.load_spec filename: spec_file
105
+ spec.should be_instance_of Gem::Specification
106
+ spec.file_name.should == 'rspec-2.11.0.gem'
107
+ end
108
+ end
109
+ end
110
+
111
+ describe '#enter_gem_directory' do
112
+ it 'should change directory to gem directory' do
113
+ FileUtils.should_receive(:cd).with("#{gem_dir}/gems/rspec-2.11.0")
114
+ packager.enter_gem_directory 'rspec-2.11.0'
115
+ end
116
+ end
117
+
118
+ describe '#symlink_bin' do
119
+ it 'should create a symlink to the bin directory inside the gem directory' do
120
+ FileUtils.should_receive(:ln_sf).with('../../bin', 'bin')
121
+ packager.symlink_bin
122
+ end
123
+ end
124
+
125
+ describe '#unlink_bin' do
126
+ it 'should remove the symlink to the bin dir' do
127
+ FileUtils.should_receive(:rm_f).with('bin')
128
+ packager.unlink_bin
129
+ end
130
+ end
131
+ end