gem_repackager 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +56 -0
- data/Rakefile +9 -0
- data/bin/gem_repackager +57 -0
- data/gem_repackager.gemspec +22 -0
- data/lib/gem_repackager.rb +131 -0
- data/lib/gem_repackager/version.rb +5 -0
- data/spec/packager_spec.rb +131 -0
- data/spec/spec_helper.rb +1 -0
- data/support/bin/rspec +19 -0
- data/support/gems/rspec-2.11.0/License.txt +24 -0
- data/support/gems/rspec-2.11.0/README.md +47 -0
- data/support/gems/rspec-2.11.0/lib/rspec.rb +4 -0
- data/support/gems/rspec-2.11.0/lib/rspec/version.rb +5 -0
- data/support/gems/rspec-core-2.11.1/.document +5 -0
- data/support/gems/rspec-core-2.11.1/.yardopts +6 -0
- data/support/gems/rspec-core-2.11.1/Changelog.md +570 -0
- data/support/gems/rspec-core-2.11.1/License.txt +24 -0
- data/support/gems/rspec-core-2.11.1/README.md +235 -0
- data/support/gems/rspec-core-2.11.1/exe/autospec +13 -0
- data/support/gems/rspec-core-2.11.1/exe/rspec +25 -0
- data/support/gems/rspec-core-2.11.1/features/Autotest.md +38 -0
- data/support/gems/rspec-core-2.11.1/features/README.md +17 -0
- data/support/gems/rspec-core-2.11.1/features/Upgrade.md +364 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/README.md +28 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/example_name_option.feature +101 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/exit_status.feature +83 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/format_option.feature +81 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/init.feature +18 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/line_number_appended_to_path.feature +140 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/line_number_option.feature +58 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/order.feature +29 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/pattern_option.feature +31 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/rake_task.feature +68 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/ruby.feature +22 -0
- data/support/gems/rspec-core-2.11.1/features/command_line/tag.feature +91 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/alias_example_to.feature +48 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/custom_settings.feature +84 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/default_path.feature +38 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/fail_fast.feature +77 -0
- data/support/gems/rspec-core-2.11.1/features/configuration/read_options_from_file.feature +87 -0
- data/support/gems/rspec-core-2.11.1/features/example_groups/basic_structure.feature +55 -0
- data/support/gems/rspec-core-2.11.1/features/example_groups/shared_context.feature +74 -0
- data/support/gems/rspec-core-2.11.1/features/example_groups/shared_examples.feature +204 -0
- data/support/gems/rspec-core-2.11.1/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/exclusion_filters.feature +139 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/if_and_unless.feature +168 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/inclusion_filters.feature +105 -0
- data/support/gems/rspec-core-2.11.1/features/filtering/run_all_when_everything_filtered.feature +46 -0
- data/support/gems/rspec-core-2.11.1/features/formatters/custom_formatter.feature +36 -0
- data/support/gems/rspec-core-2.11.1/features/formatters/text_formatter.feature +46 -0
- data/support/gems/rspec-core-2.11.1/features/helper_methods/arbitrary_methods.feature +40 -0
- data/support/gems/rspec-core-2.11.1/features/helper_methods/let.feature +50 -0
- data/support/gems/rspec-core-2.11.1/features/helper_methods/modules.feature +149 -0
- data/support/gems/rspec-core-2.11.1/features/hooks/around_hooks.feature +343 -0
- data/support/gems/rspec-core-2.11.1/features/hooks/before_and_after_hooks.feature +423 -0
- data/support/gems/rspec-core-2.11.1/features/hooks/filtering.feature +234 -0
- data/support/gems/rspec-core-2.11.1/features/metadata/current_example.feature +17 -0
- data/support/gems/rspec-core-2.11.1/features/metadata/described_class.feature +17 -0
- data/support/gems/rspec-core-2.11.1/features/metadata/user_defined.feature +113 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_mocha.feature +97 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_rr.feature +98 -0
- data/support/gems/rspec-core-2.11.1/features/mock_framework_integration/use_rspec.feature +97 -0
- data/support/gems/rspec-core-2.11.1/features/pending/pending_examples.feature +229 -0
- data/support/gems/rspec-core-2.11.1/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/support/gems/rspec-core-2.11.1/features/step_definitions/additional_cli_steps.rb +30 -0
- data/support/gems/rspec-core-2.11.1/features/subject/attribute_of_subject.feature +124 -0
- data/support/gems/rspec-core-2.11.1/features/subject/explicit_subject.feature +82 -0
- data/support/gems/rspec-core-2.11.1/features/subject/implicit_receiver.feature +29 -0
- data/support/gems/rspec-core-2.11.1/features/subject/implicit_subject.feature +63 -0
- data/support/gems/rspec-core-2.11.1/features/support/env.rb +12 -0
- data/support/gems/rspec-core-2.11.1/lib/autotest/discover.rb +1 -0
- data/support/gems/rspec-core-2.11.1/lib/autotest/rspec2.rb +73 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/autorun.rb +2 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core.rb +126 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/backward_compatibility.rb +65 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb +36 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb +944 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb +129 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/deprecation.rb +36 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/drb_command_line.rb +26 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/drb_options.rb +87 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/dsl.rb +26 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/example.rb +330 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb +466 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions.rb +4 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/kernel.rb +9 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/extensions/ordered.rb +21 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/filter_manager.rb +203 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/base_formatter.rb +168 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/base_text_formatter.rb +203 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/helpers.rb +39 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/html_formatter.rb +464 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/snippet_extractor.rb +58 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/hooks.rb +495 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/let.rb +110 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/load_path.rb +3 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/metadata.rb +276 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_mocha.rb +29 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rspec.rb +23 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/option_parser.rb +181 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/pending.rb +101 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/project_initializer.rb +87 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb +179 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb +102 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/ruby_project.rb +44 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb +76 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/shared_context.rb +49 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/shared_example_group.rb +96 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/subject.rb +219 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/version.rb +7 -0
- data/support/gems/rspec-core-2.11.1/lib/rspec/core/world.rb +128 -0
- data/support/gems/rspec-core-2.11.1/spec/autotest/discover_spec.rb +19 -0
- data/support/gems/rspec-core-2.11.1/spec/autotest/failed_results_re_spec.rb +45 -0
- data/support/gems/rspec-core-2.11.1/spec/autotest/rspec_spec.rb +123 -0
- data/support/gems/rspec-core-2.11.1/spec/command_line/order_spec.rb +137 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/command_line_spec.rb +108 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/configuration_options_spec.rb +377 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/configuration_spec.rb +1196 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/deprecations_spec.rb +66 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/drb_command_line_spec.rb +108 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/drb_options_spec.rb +180 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/dsl_spec.rb +17 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/example_group_spec.rb +1098 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/example_spec.rb +370 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/filter_manager_spec.rb +256 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/base_formatter_spec.rb +80 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/base_text_formatter_spec.rb +363 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/helpers_spec.rb +66 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +410 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.8.7.html +409 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.9.2.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatted-1.9.3.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/html_formatter_spec.rb +82 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/snippet_extractor_spec.rb +18 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +410 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +409 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +416 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/formatters/text_mate_formatter_spec.rb +83 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/hooks_spec.rb +250 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/let_spec.rb +55 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/metadata_spec.rb +447 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/option_parser_spec.rb +166 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/pending_example_spec.rb +220 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/rake_task_spec.rb +138 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/reporter_spec.rb +103 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_bar.rb +0 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_foo.rb +0 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/a_spec.rb +1 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/ruby_project_spec.rb +24 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/runner_spec.rb +81 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/shared_context_spec.rb +67 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/shared_example_group_spec.rb +84 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/subject_spec.rb +244 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core/world_spec.rb +144 -0
- data/support/gems/rspec-core-2.11.1/spec/rspec/core_spec.rb +35 -0
- data/support/gems/rspec-core-2.11.1/spec/spec_helper.rb +98 -0
- data/support/gems/rspec-core-2.11.1/spec/support/config_options_helper.rb +24 -0
- data/support/gems/rspec-core-2.11.1/spec/support/helper_methods.rb +5 -0
- data/support/gems/rspec-core-2.11.1/spec/support/matchers.rb +65 -0
- data/support/gems/rspec-core-2.11.1/spec/support/shared_example_groups.rb +41 -0
- data/support/gems/rspec-core-2.11.1/spec/support/spec_files.rb +44 -0
- data/support/gems/rspec-expectations-2.11.2/.document +5 -0
- data/support/gems/rspec-expectations-2.11.2/.yardopts +6 -0
- data/support/gems/rspec-expectations-2.11.2/Changelog.md +246 -0
- data/support/gems/rspec-expectations-2.11.2/License.txt +23 -0
- data/support/gems/rspec-expectations-2.11.2/README.md +224 -0
- data/support/gems/rspec-expectations-2.11.2/features/README.md +49 -0
- data/support/gems/rspec-expectations-2.11.2/features/Upgrade.md +53 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/README.md +90 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/be.feature +173 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/be_within.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/cover.feature +45 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/end_with.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/equality.feature +145 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/exist.feature +43 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/expect_change.feature +59 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/expect_error.feature +138 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/have.feature +103 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/include.feature +121 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/match.feature +50 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/operators.feature +221 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/predicates.feature +128 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/respond_to.feature +78 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/satisfy.feature +31 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/start_with.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/throw_symbol.feature +85 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/types.feature +114 -0
- data/support/gems/rspec-expectations-2.11.2/features/built_in_matchers/yield.feature +146 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/access_running_example.feature +53 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher.feature +340 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/support/gems/rspec-expectations-2.11.2/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/support/gems/rspec-expectations-2.11.2/features/customized_message.feature +22 -0
- data/support/gems/rspec-expectations-2.11.2/features/diffing.feature +85 -0
- data/support/gems/rspec-expectations-2.11.2/features/implicit_docstrings.feature +52 -0
- data/support/gems/rspec-expectations-2.11.2/features/step_definitions/additional_cli_steps.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/features/support/env.rb +5 -0
- data/support/gems/rspec-expectations-2.11.2/features/syntax_configuration.feature +68 -0
- data/support/gems/rspec-expectations-2.11.2/features/test_frameworks/test_unit.feature +46 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec-expectations.rb +1 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations.rb +47 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/deprecation.rb +38 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/differ.rb +81 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/errors.rb +9 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/expectation_target.rb +58 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions.rb +2 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions/array.rb +9 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/extensions/object.rb +39 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/fail_with.rb +55 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/handler.rb +48 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/syntax.rb +110 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/expectations/version.rb +8 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers.rb +689 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/be_close.rb +9 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in.rb +39 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be.rb +185 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_instance_of.rb +11 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/be_within.rb +45 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/change.rb +132 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/equal.rb +44 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/has.rb +47 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/have.rb +107 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/include.rb +51 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/match.rb +12 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/match_array.rb +45 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/raise_error.rb +96 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/respond_to.rb +73 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/satisfy.rb +29 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/throw_symbol.rb +93 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/built_in/yield.rb +219 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/compatibility.rb +14 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/configuration.rb +66 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/dsl.rb +24 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/generated_descriptions.rb +36 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/matcher.rb +299 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/method_missing.rb +12 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/operator_matcher.rb +84 -0
- data/support/gems/rspec-expectations-2.11.2/lib/rspec/matchers/pretty.rb +60 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/differ_spec.rb +153 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/expectation_target_spec.rb +65 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/fail_with_spec.rb +70 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/expectations/handler_spec.rb +206 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/base_matcher_spec.rb +60 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_instance_of_spec.rb +36 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_kind_of_spec.rb +33 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_spec.rb +452 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/be_within_spec.rb +76 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/change_spec.rb +522 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/configuration_spec.rb +160 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/cover_spec.rb +65 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/description_generation_spec.rb +176 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/eq_spec.rb +50 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/eql_spec.rb +37 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/equal_spec.rb +57 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/exist_spec.rb +104 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/has_spec.rb +113 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/have_spec.rb +458 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/include_spec.rb +363 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/match_array_spec.rb +120 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/match_spec.rb +57 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/matcher_spec.rb +434 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/matchers_spec.rb +31 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/method_missing_spec.rb +24 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/operator_matcher_spec.rb +221 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/raise_error_spec.rb +339 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/satisfy_spec.rb +40 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/start_with_end_with_spec.rb +174 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/throw_symbol_spec.rb +111 -0
- data/support/gems/rspec-expectations-2.11.2/spec/rspec/matchers/yield_spec.rb +374 -0
- data/support/gems/rspec-expectations-2.11.2/spec/spec_helper.rb +27 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/classes.rb +56 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/in_sub_process.rb +31 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/matchers.rb +22 -0
- data/support/gems/rspec-expectations-2.11.2/spec/support/ruby_version.rb +10 -0
- data/support/gems/rspec-mocks-2.11.1/.document +5 -0
- data/support/gems/rspec-mocks-2.11.1/.yardopts +6 -0
- data/support/gems/rspec-mocks-2.11.1/Changelog.md +199 -0
- data/support/gems/rspec-mocks-2.11.1/License.txt +23 -0
- data/support/gems/rspec-mocks-2.11.1/README.md +276 -0
- data/support/gems/rspec-mocks-2.11.1/features/README.md +67 -0
- data/support/gems/rspec-mocks-2.11.1/features/Scope.md +17 -0
- data/support/gems/rspec-mocks-2.11.1/features/Upgrade.md +22 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/README.md +27 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/explicit.feature +60 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/general_matchers.feature +85 -0
- data/support/gems/rspec-mocks-2.11.1/features/argument_matchers/type_matchers.feature +25 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/README.md +58 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/any_instance.feature +21 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/expect_message.feature +94 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/receive_counts.feature +209 -0
- data/support/gems/rspec-mocks-2.11.1/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/README.md +43 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/any_instance.feature +133 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/as_null_object.feature +35 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/simple_return_value.feature +64 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/stub_chain.feature +51 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/stub_implementation.feature +26 -0
- data/support/gems/rspec-mocks-2.11.1/features/method_stubs/to_ary.feature +47 -0
- data/support/gems/rspec-mocks-2.11.1/features/outside_rspec/configuration.feature +82 -0
- data/support/gems/rspec-mocks-2.11.1/features/outside_rspec/standalone.feature +32 -0
- data/support/gems/rspec-mocks-2.11.1/features/step_definitions/additional_cli_steps.rb +4 -0
- data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/README.md +62 -0
- data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/stub_defined_constant.feature +79 -0
- data/support/gems/rspec-mocks-2.11.1/features/stubbing_constants/stub_undefined_constant.feature +50 -0
- data/support/gems/rspec-mocks-2.11.1/features/support/env.rb +6 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks.rb +39 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance.rb +81 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/chain.rb +77 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/expectation_chain.rb +57 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/recorder.rb +197 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/stub_chain.rb +37 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +25 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/argument_list_matcher.rb +93 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/error_generator.rb +114 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/errors.rb +12 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/example_methods.rb +95 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/marshal.rb +23 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/extensions/psych.rb +23 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/framework.rb +20 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/message_expectation.rb +488 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/method_double.rb +196 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/methods.rb +155 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/mock.rb +7 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/order_group.rb +40 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/proxy.rb +190 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/serialization.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/space.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/standalone.rb +3 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/stub_const.rb +280 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/test_double.rb +103 -0
- data/support/gems/rspec-mocks-2.11.1/lib/rspec/mocks/version.rb +7 -0
- data/support/gems/rspec-mocks-2.11.1/lib/spec/mocks.rb +2 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/and_yield_spec.rb +114 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_instance/message_chains_spec.rb +40 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_instance_spec.rb +825 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/any_number_of_times_spec.rb +30 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/argument_expectation_spec.rb +34 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/at_least_spec.rb +142 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/block_return_value_spec.rb +53 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_10263_spec.rb +25 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/double_spec.rb +12 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/failing_argument_matchers_spec.rb +95 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_space_spec.rb +58 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/mock_spec.rb +730 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/multiple_return_value_spec.rb +119 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/nil_expectation_warning_spec.rb +62 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/null_object_mock_spec.rb +106 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/partial_mock_spec.rb +156 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/serialization_spec.rb +111 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stash_spec.rb +27 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_chain_spec.rb +149 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_const_spec.rb +309 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_implementation_spec.rb +68 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stub_spec.rb +238 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/stubbed_message_expectations_spec.rb +47 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/test_double_spec.rb +57 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/to_ary_spec.rb +40 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/support/gems/rspec-mocks-2.11.1/spec/rspec/mocks_spec.rb +51 -0
- data/support/gems/rspec-mocks-2.11.1/spec/spec_helper.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/.document +5 -0
- data/support/gems/rspec-rails-2.11.0/.yardopts +8 -0
- data/support/gems/rspec-rails-2.11.0/Changelog.md +293 -0
- data/support/gems/rspec-rails-2.11.0/License.txt +22 -0
- data/support/gems/rspec-rails-2.11.0/README.md +494 -0
- data/support/gems/rspec-rails-2.11.0/features/Autotest.md +24 -0
- data/support/gems/rspec-rails-2.11.0/features/Generators.md +8 -0
- data/support/gems/rspec-rails-2.11.0/features/GettingStarted.md +84 -0
- data/support/gems/rspec-rails-2.11.0/features/README.md +56 -0
- data/support/gems/rspec-rails-2.11.0/features/RailsVersions.md +4 -0
- data/support/gems/rspec-rails-2.11.0/features/Transactions.md +84 -0
- data/support/gems/rspec-rails-2.11.0/features/Upgrade.md +117 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/Cookies.md +57 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/README.md +45 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/anonymous_controller.feature +330 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/bypass_rescue.feature +75 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/controller_spec.feature +35 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/isolation_from_views.feature +87 -0
- data/support/gems/rspec-rails-2.11.0/features/controller_specs/render_views.feature +114 -0
- data/support/gems/rspec-rails-2.11.0/features/helper_specs/helper_spec.feature +96 -0
- data/support/gems/rspec-rails-2.11.0/features/mailer_specs/url_helpers.feature +38 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/README.md +18 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/new_record_matcher.feature +28 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/redirect_to_matcher.feature +40 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/relation_match_array.feature +20 -0
- data/support/gems/rspec-rails-2.11.0/features/matchers/render_template_matcher.feature +28 -0
- data/support/gems/rspec-rails-2.11.0/features/mocks/mock_model.feature +147 -0
- data/support/gems/rspec-rails-2.11.0/features/mocks/stub_model.feature +58 -0
- data/support/gems/rspec-rails-2.11.0/features/model_specs/README.md +21 -0
- data/support/gems/rspec-rails-2.11.0/features/model_specs/errors_on.feature +33 -0
- data/support/gems/rspec-rails-2.11.0/features/model_specs/transactional_examples.feature +109 -0
- data/support/gems/rspec-rails-2.11.0/features/request_specs/request_spec.feature +49 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/README.md +17 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/be_routable_matcher.feature +80 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/named_routes.feature +18 -0
- data/support/gems/rspec-rails-2.11.0/features/routing_specs/route_to_matcher.feature +90 -0
- data/support/gems/rspec-rails-2.11.0/features/step_definitions/additional_cli_steps.rb +4 -0
- data/support/gems/rspec-rails-2.11.0/features/step_definitions/model_steps.rb +3 -0
- data/support/gems/rspec-rails-2.11.0/features/support/env.rb +53 -0
- data/support/gems/rspec-rails-2.11.0/features/view_specs/inferred_controller_path.feature +44 -0
- data/support/gems/rspec-rails-2.11.0/features/view_specs/stub_template.feature +51 -0
- data/support/gems/rspec-rails-2.11.0/features/view_specs/view_spec.feature +174 -0
- data/support/gems/rspec-rails-2.11.0/lib/autotest/rails_rspec2.rb +84 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec.rb +25 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/controller_generator.rb +33 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/templates/controller_spec.rb +14 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/controller/templates/view_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/helper/helper_generator.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/helper/templates/helper_spec.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/install_generator.rb +24 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/templates/.rspec +1 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/install/templates/spec/spec_helper.rb +38 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/integration_generator.rb +27 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/templates/request_spec.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/mailer_generator.rb +20 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/templates/fixture +3 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/mailer/templates/mailer_spec.rb +23 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/model_generator.rb +22 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/templates/fixtures.yml +19 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/model/templates/model_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/observer/observer_generator.rb +12 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/observer/templates/observer_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/scaffold_generator.rb +158 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/controller_spec.rb +166 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/edit_spec.rb +31 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/index_spec.rb +32 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/new_spec.rb +30 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/routing_spec.rb +37 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/scaffold/templates/show_spec.rb +28 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/view/templates/view_spec.rb +5 -0
- data/support/gems/rspec-rails-2.11.0/lib/generators/rspec/view/view_generator.rb +21 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec-rails.rb +14 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails.rb +17 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/adapters.rb +79 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example.rb +38 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/controller_example_group.rb +128 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/helper_example_group.rb +40 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/mailer_example_group.rb +22 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/model_example_group.rb +10 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/rails_example_group.rb +14 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/request_example_group.rb +23 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/routing_example_group.rb +27 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/view_example_group.rb +155 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/extensions.rb +1 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/extensions/active_record/base.rb +45 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/fixture_support.rb +40 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers.rb +26 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/be_a_new.rb +76 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/be_new_record.rb +19 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/have_extension.rb +35 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/have_rendered.rb +40 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/redirect_to.rb +37 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/relation_match_array.rb +3 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/matchers/routing_matchers.rb +107 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/mocks.rb +243 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/module_inclusion.rb +29 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/tasks/rspec.rake +56 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/vendor/capybara.rb +29 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/vendor/webrat.rb +33 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/version.rb +7 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/view_assigns.rb +45 -0
- data/support/gems/rspec-rails-2.11.0/lib/rspec/rails/view_rendering.rb +121 -0
- data/support/gems/rspec-rails-2.11.0/spec/autotest/rails_rspec2_spec.rb +36 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/controller/controller_generator_spec.rb +86 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/helper/helper_generator_spec.rb +30 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/install/install_generator_spec.rb +18 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/integration/integration_generator_spec.rb +44 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/mailer/mailer_generator_spec.rb +48 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/model/model_generator_spec.rb +52 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/observer/observer_generator_spec.rb +21 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/scaffold/scaffold_generator_spec.rb +107 -0
- data/support/gems/rspec-rails-2.11.0/spec/generators/rspec/view/view_generator_spec.rb +41 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/assertion_adapter_spec.rb +28 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/configuration_spec.rb +26 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/deprecations_spec.rb +18 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/controller_example_group_spec.rb +100 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/helper_example_group_spec.rb +64 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/mailer_example_group_spec.rb +21 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/model_example_group_spec.rb +15 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/request_example_group_spec.rb +17 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/routing_example_group_spec.rb +32 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/view_example_group_spec.rb +214 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/extensions/active_model/errors_on_spec.rb +23 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/extensions/active_record/records_spec.rb +9 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/fixture_support_spec.rb +17 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_a_new_spec.rb +142 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_new_record_spec.rb +19 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/be_routable_spec.rb +41 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/errors_on_spec.rb +38 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/have_rendered_spec.rb +93 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/redirect_to_spec.rb +80 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/relation_match_array_spec.rb +20 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/matchers/route_to_spec.rb +152 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/mocks/mock_model_spec.rb +379 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/mocks/stub_model_spec.rb +154 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/setup_and_teardown_adapter_spec.rb +32 -0
- data/support/gems/rspec-rails-2.11.0/spec/rspec/rails/view_rendering_spec.rb +111 -0
- data/support/gems/rspec-rails-2.11.0/spec/spec_helper.rb +31 -0
- data/support/gems/rspec-rails-2.11.0/spec/support/ar_classes.rb +42 -0
- data/support/gems/rspec-rails-2.11.0/spec/support/helpers.rb +20 -0
- data/support/gems/rspec-rails-2.11.0/spec/support/matchers.rb +9 -0
- data/support/specifications/rspec-2.11.0.gemspec +39 -0
- data/support/specifications/rspec-core-2.11.1.gemspec +61 -0
- data/support/specifications/rspec-expectations-2.11.2.gemspec +40 -0
- data/support/specifications/rspec-mocks-2.11.1.gemspec +37 -0
- data/support/specifications/rspec-rails-2.11.0.gemspec +55 -0
- metadata +653 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
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
data/bin/gem_repackager
ADDED
@@ -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,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
|