shoulda-matchers 3.1.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/{MIT-LICENSE → LICENSE} +1 -1
- data/README.md +407 -232
- data/docs/errors/NonCaseSwappableValueError.md +2 -2
- data/lib/shoulda/matchers/action_controller/callback_matcher.rb +7 -80
- data/lib/shoulda/matchers/action_controller/filter_param_matcher.rb +4 -3
- data/lib/shoulda/matchers/action_controller/flash_store.rb +2 -4
- data/lib/shoulda/matchers/action_controller/permit_matcher.rb +36 -30
- data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +8 -10
- data/lib/shoulda/matchers/action_controller/render_template_matcher.rb +7 -9
- data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +18 -15
- data/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb +3 -2
- data/lib/shoulda/matchers/action_controller/respond_with_matcher.rb +3 -3
- data/lib/shoulda/matchers/action_controller/route_matcher.rb +88 -29
- data/lib/shoulda/matchers/action_controller/route_params.rb +2 -2
- data/lib/shoulda/matchers/action_controller/set_flash_matcher.rb +4 -4
- data/lib/shoulda/matchers/action_controller/set_session_matcher.rb +3 -3
- data/lib/shoulda/matchers/action_controller/set_session_or_flash_matcher.rb +19 -13
- data/lib/shoulda/matchers/action_controller.rb +2 -0
- data/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_changed_value_error.rb +1 -1
- data/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb +5 -9
- data/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter_and_validator.rb +2 -2
- data/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters.rb +1 -1
- data/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb +1 -1
- data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +42 -39
- data/lib/shoulda/matchers/active_model/disallow_value_matcher.rb +1 -1
- data/lib/shoulda/matchers/active_model/have_secure_password_matcher.rb +52 -26
- data/lib/shoulda/matchers/active_model/helpers.rb +2 -2
- data/lib/shoulda/matchers/active_model/numericality_matchers/comparison_matcher.rb +32 -30
- data/lib/shoulda/matchers/active_model/numericality_matchers/numeric_type_matcher.rb +2 -1
- data/lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb +26 -0
- data/lib/shoulda/matchers/active_model/qualifiers/allow_nil.rb +26 -0
- data/lib/shoulda/matchers/active_model/qualifiers/ignoring_interference_by_writer.rb +1 -1
- data/lib/shoulda/matchers/active_model/qualifiers.rb +2 -0
- data/lib/shoulda/matchers/active_model/validate_absence_of_matcher.rb +30 -6
- data/lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb +8 -3
- data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +31 -16
- data/lib/shoulda/matchers/active_model/validate_exclusion_of_matcher.rb +52 -16
- data/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +137 -84
- data/lib/shoulda/matchers/active_model/validate_length_of_matcher.rb +159 -46
- data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +130 -66
- data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +251 -24
- data/lib/shoulda/matchers/active_model/validation_matcher/build_description.rb +12 -9
- data/lib/shoulda/matchers/active_model/validation_matcher.rb +38 -6
- data/lib/shoulda/matchers/active_model/validation_message_finder.rb +2 -4
- data/lib/shoulda/matchers/active_model/validator.rb +4 -9
- data/lib/shoulda/matchers/active_model.rb +3 -5
- data/lib/shoulda/matchers/active_record/accept_nested_attributes_for_matcher.rb +10 -7
- data/lib/shoulda/matchers/active_record/association_matcher.rb +386 -111
- data/lib/shoulda/matchers/active_record/association_matchers/counter_cache_matcher.rb +5 -2
- data/lib/shoulda/matchers/active_record/association_matchers/dependent_matcher.rb +4 -4
- data/lib/shoulda/matchers/active_record/association_matchers/inverse_of_matcher.rb +1 -1
- data/lib/shoulda/matchers/active_record/association_matchers/join_table_matcher.rb +11 -6
- data/lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb +14 -15
- data/lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb +30 -8
- data/lib/shoulda/matchers/active_record/association_matchers/option_verifier.rb +34 -11
- data/lib/shoulda/matchers/active_record/association_matchers/optional_matcher.rb +69 -0
- data/lib/shoulda/matchers/active_record/association_matchers/order_matcher.rb +1 -1
- data/lib/shoulda/matchers/active_record/association_matchers/required_matcher.rb +74 -0
- data/lib/shoulda/matchers/active_record/association_matchers/source_matcher.rb +3 -2
- data/lib/shoulda/matchers/active_record/association_matchers/through_matcher.rb +7 -5
- data/lib/shoulda/matchers/active_record/define_enum_for_matcher.rb +458 -42
- data/lib/shoulda/matchers/active_record/have_attached_matcher.rb +185 -0
- data/lib/shoulda/matchers/active_record/have_db_column_matcher.rb +63 -23
- data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +164 -48
- data/lib/shoulda/matchers/active_record/have_implicit_order_column.rb +106 -0
- data/lib/shoulda/matchers/active_record/have_readonly_attribute_matcher.rb +13 -11
- data/lib/shoulda/matchers/active_record/have_rich_text_matcher.rb +83 -0
- data/lib/shoulda/matchers/active_record/have_secure_token_matcher.rb +132 -0
- data/lib/shoulda/matchers/active_record/serialize_matcher.rb +18 -18
- data/lib/shoulda/matchers/active_record/uniqueness/test_model_creator.rb +1 -3
- data/lib/shoulda/matchers/active_record/uniqueness/test_models.rb +0 -2
- data/lib/shoulda/matchers/active_record/uniqueness.rb +1 -1
- data/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb +430 -200
- data/lib/shoulda/matchers/active_record.rb +28 -20
- data/lib/shoulda/matchers/configuration.rb +12 -1
- data/lib/shoulda/matchers/doublespeak/double.rb +1 -1
- data/lib/shoulda/matchers/doublespeak/double_collection.rb +3 -3
- data/lib/shoulda/matchers/doublespeak/double_implementation_registry.rb +8 -5
- data/lib/shoulda/matchers/doublespeak/object_double.rb +6 -2
- data/lib/shoulda/matchers/doublespeak/stub_implementation.rb +1 -5
- data/lib/shoulda/matchers/doublespeak/world.rb +2 -2
- data/lib/shoulda/matchers/doublespeak.rb +2 -1
- data/lib/shoulda/matchers/error.rb +1 -1
- data/lib/shoulda/matchers/independent/delegate_method_matcher.rb +109 -29
- data/lib/shoulda/matchers/independent.rb +2 -2
- data/lib/shoulda/matchers/integrations/configuration.rb +8 -4
- data/lib/shoulda/matchers/integrations/libraries/action_controller.rb +1 -1
- data/lib/shoulda/matchers/integrations/libraries/rails.rb +2 -2
- data/lib/shoulda/matchers/integrations/test_frameworks/active_support_test_case.rb +1 -1
- data/lib/shoulda/matchers/integrations/test_frameworks/minitest_4.rb +1 -1
- data/lib/shoulda/matchers/integrations/test_frameworks/minitest_5.rb +1 -1
- data/lib/shoulda/matchers/integrations/test_frameworks/missing_test_framework.rb +1 -1
- data/lib/shoulda/matchers/integrations/test_frameworks/test_unit.rb +1 -1
- data/lib/shoulda/matchers/rails_shim.rb +172 -51
- data/lib/shoulda/matchers/routing.rb +2 -2
- data/lib/shoulda/matchers/util/word_wrap.rb +17 -12
- data/lib/shoulda/matchers/util.rb +39 -5
- data/lib/shoulda/matchers/version.rb +1 -1
- data/lib/shoulda/matchers/warn.rb +4 -3
- data/shoulda-matchers.gemspec +33 -15
- metadata +31 -338
- data/.gitignore +0 -12
- data/.hound.yml +0 -3
- data/.hound_config/ruby.yml +0 -12
- data/.travis.yml +0 -19
- data/.yardopts +0 -10
- data/Appraisals +0 -73
- data/CONTRIBUTING.md +0 -101
- data/Gemfile +0 -15
- data/Gemfile.lock +0 -70
- data/NEWS.md +0 -986
- data/Rakefile +0 -39
- data/custom_plan.rb +0 -88
- data/doc_config/gh-pages/index.html.erb +0 -9
- data/doc_config/yard/setup.rb +0 -22
- data/doc_config/yard/templates/default/fulldoc/html/css/bootstrap.css +0 -5967
- data/doc_config/yard/templates/default/fulldoc/html/css/full_list.css +0 -12
- data/doc_config/yard/templates/default/fulldoc/html/css/global.css +0 -62
- data/doc_config/yard/templates/default/fulldoc/html/css/solarized.css +0 -69
- data/doc_config/yard/templates/default/fulldoc/html/css/style.css +0 -312
- data/doc_config/yard/templates/default/fulldoc/html/full_list.erb +0 -32
- data/doc_config/yard/templates/default/fulldoc/html/full_list_class.erb +0 -1
- data/doc_config/yard/templates/default/fulldoc/html/full_list_method.erb +0 -8
- data/doc_config/yard/templates/default/fulldoc/html/js/app.js +0 -298
- data/doc_config/yard/templates/default/fulldoc/html/js/full_list.js +0 -1
- data/doc_config/yard/templates/default/fulldoc/html/js/jquery.stickyheaders.js +0 -289
- data/doc_config/yard/templates/default/fulldoc/html/js/underscore.min.js +0 -6
- data/doc_config/yard/templates/default/fulldoc/html/setup.rb +0 -8
- data/doc_config/yard/templates/default/layout/html/breadcrumb.erb +0 -14
- data/doc_config/yard/templates/default/layout/html/fonts.erb +0 -1
- data/doc_config/yard/templates/default/layout/html/footer.erb +0 -6
- data/doc_config/yard/templates/default/layout/html/layout.erb +0 -23
- data/doc_config/yard/templates/default/layout/html/search.erb +0 -13
- data/doc_config/yard/templates/default/layout/html/setup.rb +0 -40
- data/doc_config/yard/templates/default/method_details/html/source.erb +0 -10
- data/doc_config/yard/templates/default/module/html/box_info.erb +0 -31
- data/gemfiles/4.0.0.gemfile +0 -38
- data/gemfiles/4.0.0.gemfile.lock +0 -223
- data/gemfiles/4.0.1.gemfile +0 -38
- data/gemfiles/4.0.1.gemfile.lock +0 -225
- data/gemfiles/4.1.gemfile +0 -38
- data/gemfiles/4.1.gemfile.lock +0 -220
- data/gemfiles/4.2.gemfile +0 -38
- data/gemfiles/4.2.gemfile.lock +0 -243
- data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +0 -159
- data/lib/shoulda/matchers/independent/delegate_method_matcher/stubbed_target.rb +0 -37
- data/script/SUPPORTED_VERSIONS +0 -1
- data/script/install_gems_in_all_appraisals +0 -14
- data/script/run_all_tests +0 -14
- data/script/update_gem_in_all_appraisals +0 -15
- data/script/update_gems_in_all_appraisals +0 -14
- data/spec/acceptance/active_model_integration_spec.rb +0 -23
- data/spec/acceptance/independent_matchers_spec.rb +0 -125
- data/spec/acceptance/multiple_libraries_integration_spec.rb +0 -55
- data/spec/acceptance/rails_integration_spec.rb +0 -156
- data/spec/acceptance_spec_helper.rb +0 -23
- data/spec/doublespeak_spec_helper.rb +0 -2
- data/spec/report_warnings.rb +0 -7
- data/spec/spec_helper.rb +0 -21
- data/spec/support/acceptance/adds_shoulda_matchers_to_project.rb +0 -133
- data/spec/support/acceptance/helpers/active_model_helpers.rb +0 -11
- data/spec/support/acceptance/helpers/array_helpers.rb +0 -13
- data/spec/support/acceptance/helpers/base_helpers.rb +0 -19
- data/spec/support/acceptance/helpers/command_helpers.rb +0 -55
- data/spec/support/acceptance/helpers/file_helpers.rb +0 -19
- data/spec/support/acceptance/helpers/gem_helpers.rb +0 -31
- data/spec/support/acceptance/helpers/minitest_helpers.rb +0 -11
- data/spec/support/acceptance/helpers/n_unit_helpers.rb +0 -25
- data/spec/support/acceptance/helpers/pluralization_helpers.rb +0 -13
- data/spec/support/acceptance/helpers/rails_version_helpers.rb +0 -11
- data/spec/support/acceptance/helpers/rspec_helpers.rb +0 -24
- data/spec/support/acceptance/helpers/ruby_version_helpers.rb +0 -9
- data/spec/support/acceptance/helpers/step_helpers.rb +0 -127
- data/spec/support/acceptance/helpers.rb +0 -31
- data/spec/support/acceptance/matchers/have_output.rb +0 -31
- data/spec/support/acceptance/matchers/indicate_number_of_tests_was_run_matcher.rb +0 -55
- data/spec/support/acceptance/matchers/indicate_that_tests_were_run_matcher.rb +0 -103
- data/spec/support/tests/bundle.rb +0 -94
- data/spec/support/tests/command_runner.rb +0 -230
- data/spec/support/tests/current_bundle.rb +0 -61
- data/spec/support/tests/database.rb +0 -28
- data/spec/support/tests/database_adapters/postgresql.rb +0 -25
- data/spec/support/tests/database_adapters/sqlite3.rb +0 -26
- data/spec/support/tests/database_configuration.rb +0 -33
- data/spec/support/tests/database_configuration_registry.rb +0 -28
- data/spec/support/tests/filesystem.rb +0 -100
- data/spec/support/tests/version.rb +0 -45
- data/spec/support/unit/active_record/create_table.rb +0 -54
- data/spec/support/unit/attribute.rb +0 -47
- data/spec/support/unit/capture.rb +0 -40
- data/spec/support/unit/change_value.rb +0 -111
- data/spec/support/unit/create_model_arguments/basic.rb +0 -135
- data/spec/support/unit/create_model_arguments/has_many.rb +0 -15
- data/spec/support/unit/create_model_arguments/uniqueness_matcher.rb +0 -74
- data/spec/support/unit/helpers/active_model_helpers.rb +0 -27
- data/spec/support/unit/helpers/active_model_versions.rb +0 -28
- data/spec/support/unit/helpers/active_record_versions.rb +0 -24
- data/spec/support/unit/helpers/active_resource_builder.rb +0 -27
- data/spec/support/unit/helpers/allow_value_matcher_helpers.rb +0 -15
- data/spec/support/unit/helpers/class_builder.rb +0 -90
- data/spec/support/unit/helpers/column_type_helpers.rb +0 -26
- data/spec/support/unit/helpers/confirmation_matcher_helpers.rb +0 -17
- data/spec/support/unit/helpers/controller_builder.rb +0 -63
- data/spec/support/unit/helpers/database_helpers.rb +0 -20
- data/spec/support/unit/helpers/i18n_faker.rb +0 -15
- data/spec/support/unit/helpers/mailer_builder.rb +0 -12
- data/spec/support/unit/helpers/model_builder.rb +0 -114
- data/spec/support/unit/helpers/rails_versions.rb +0 -28
- data/spec/support/unit/helpers/validation_matcher_scenario_helpers.rb +0 -44
- data/spec/support/unit/i18n.rb +0 -7
- data/spec/support/unit/load_environment.rb +0 -12
- data/spec/support/unit/matchers/deprecate.rb +0 -60
- data/spec/support/unit/matchers/fail_with_message_including_matcher.rb +0 -51
- data/spec/support/unit/matchers/fail_with_message_matcher.rb +0 -62
- data/spec/support/unit/matchers/print_warning_including.rb +0 -59
- data/spec/support/unit/model_creation_strategies/active_model.rb +0 -111
- data/spec/support/unit/model_creation_strategies/active_record.rb +0 -77
- data/spec/support/unit/model_creators/active_model.rb +0 -39
- data/spec/support/unit/model_creators/active_record/has_and_belongs_to_many.rb +0 -95
- data/spec/support/unit/model_creators/active_record/has_many.rb +0 -67
- data/spec/support/unit/model_creators/active_record/uniqueness_matcher.rb +0 -42
- data/spec/support/unit/model_creators/active_record.rb +0 -43
- data/spec/support/unit/model_creators/basic.rb +0 -97
- data/spec/support/unit/model_creators.rb +0 -19
- data/spec/support/unit/rails_application.rb +0 -126
- data/spec/support/unit/record_builder_with_i18n_validation_message.rb +0 -69
- data/spec/support/unit/record_validating_confirmation_builder.rb +0 -51
- data/spec/support/unit/record_with_different_error_attribute_builder.rb +0 -92
- data/spec/support/unit/shared_examples/ignoring_interference_by_writer.rb +0 -79
- data/spec/support/unit/shared_examples/numerical_submatcher.rb +0 -17
- data/spec/support/unit/shared_examples/set_session_or_flash.rb +0 -360
- data/spec/support/unit/validation_matcher_scenario.rb +0 -62
- data/spec/unit/shoulda/matchers/action_controller/callback_matcher_spec.rb +0 -82
- data/spec/unit/shoulda/matchers/action_controller/filter_param_matcher_spec.rb +0 -28
- data/spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb +0 -592
- data/spec/unit/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb +0 -42
- data/spec/unit/shoulda/matchers/action_controller/render_template_matcher_spec.rb +0 -76
- data/spec/unit/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +0 -62
- data/spec/unit/shoulda/matchers/action_controller/rescue_from_matcher_spec.rb +0 -90
- data/spec/unit/shoulda/matchers/action_controller/respond_with_matcher_spec.rb +0 -31
- data/spec/unit/shoulda/matchers/action_controller/route_matcher_spec.rb +0 -330
- data/spec/unit/shoulda/matchers/action_controller/route_params_spec.rb +0 -30
- data/spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb +0 -67
- data/spec/unit/shoulda/matchers/action_controller/set_session_matcher_spec.rb +0 -17
- data/spec/unit/shoulda/matchers/action_controller/set_session_or_flash_matcher_spec.rb +0 -562
- data/spec/unit/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb +0 -115
- data/spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb +0 -823
- data/spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +0 -86
- data/spec/unit/shoulda/matchers/active_model/have_secure_password_matcher_spec.rb +0 -20
- data/spec/unit/shoulda/matchers/active_model/helpers_spec.rb +0 -162
- data/spec/unit/shoulda/matchers/active_model/validate_absence_of_matcher_spec.rb +0 -266
- data/spec/unit/shoulda/matchers/active_model/validate_acceptance_of_matcher_spec.rb +0 -91
- data/spec/unit/shoulda/matchers/active_model/validate_confirmation_of_matcher_spec.rb +0 -149
- data/spec/unit/shoulda/matchers/active_model/validate_exclusion_of_matcher_spec.rb +0 -207
- data/spec/unit/shoulda/matchers/active_model/validate_inclusion_of_matcher_spec.rb +0 -1015
- data/spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb +0 -288
- data/spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +0 -1837
- data/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +0 -380
- data/spec/unit/shoulda/matchers/active_record/accept_nested_attributes_for_matcher_spec.rb +0 -107
- data/spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb +0 -1242
- data/spec/unit/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb +0 -251
- data/spec/unit/shoulda/matchers/active_record/define_enum_for_matcher_spec.rb +0 -168
- data/spec/unit/shoulda/matchers/active_record/have_db_column_matcher_spec.rb +0 -111
- data/spec/unit/shoulda/matchers/active_record/have_db_index_matcher_spec.rb +0 -85
- data/spec/unit/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb +0 -41
- data/spec/unit/shoulda/matchers/active_record/serialize_matcher_spec.rb +0 -86
- data/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb +0 -1418
- data/spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb +0 -190
- data/spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb +0 -21
- data/spec/unit/shoulda/matchers/doublespeak/double_spec.rb +0 -271
- data/spec/unit/shoulda/matchers/doublespeak/object_double_spec.rb +0 -77
- data/spec/unit/shoulda/matchers/doublespeak/proxy_implementation_spec.rb +0 -72
- data/spec/unit/shoulda/matchers/doublespeak/stub_implementation_spec.rb +0 -101
- data/spec/unit/shoulda/matchers/doublespeak/world_spec.rb +0 -80
- data/spec/unit/shoulda/matchers/doublespeak_spec.rb +0 -27
- data/spec/unit/shoulda/matchers/independent/delegate_method_matcher/stubbed_target_spec.rb +0 -43
- data/spec/unit/shoulda/matchers/independent/delegate_method_matcher_spec.rb +0 -517
- data/spec/unit/shoulda/matchers/routing/route_matcher_spec.rb +0 -242
- data/spec/unit/shoulda/matchers/util/word_wrap_spec.rb +0 -252
- data/spec/unit_spec_helper.rb +0 -46
- data/spec/warnings_spy/filesystem.rb +0 -45
- data/spec/warnings_spy/partitioner.rb +0 -36
- data/spec/warnings_spy/reader.rb +0 -53
- data/spec/warnings_spy/reporter.rb +0 -88
- data/spec/warnings_spy.rb +0 -64
- data/tasks/documentation.rb +0 -199
- data/zeus.json +0 -11
data/gemfiles/4.1.gemfile.lock
DELETED
@@ -1,220 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/pry/pry.git
|
3
|
-
revision: 3c138cbf94a44f7a6696afdab1ab5149d7541974
|
4
|
-
specs:
|
5
|
-
pry (0.10.1)
|
6
|
-
coderay (~> 1.1.0)
|
7
|
-
method_source (~> 0.8.1)
|
8
|
-
slop (~> 3.4)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actionmailer (4.1.13)
|
14
|
-
actionpack (= 4.1.13)
|
15
|
-
actionview (= 4.1.13)
|
16
|
-
mail (~> 2.5, >= 2.5.4)
|
17
|
-
actionpack (4.1.13)
|
18
|
-
actionview (= 4.1.13)
|
19
|
-
activesupport (= 4.1.13)
|
20
|
-
rack (~> 1.5.2)
|
21
|
-
rack-test (~> 0.6.2)
|
22
|
-
actionview (4.1.13)
|
23
|
-
activesupport (= 4.1.13)
|
24
|
-
builder (~> 3.1)
|
25
|
-
erubis (~> 2.7.0)
|
26
|
-
activemodel (4.1.13)
|
27
|
-
activesupport (= 4.1.13)
|
28
|
-
builder (~> 3.1)
|
29
|
-
activerecord (4.1.13)
|
30
|
-
activemodel (= 4.1.13)
|
31
|
-
activesupport (= 4.1.13)
|
32
|
-
arel (~> 5.0.0)
|
33
|
-
activeresource (4.0.0)
|
34
|
-
activemodel (~> 4.0)
|
35
|
-
activesupport (~> 4.0)
|
36
|
-
rails-observers (~> 0.1.1)
|
37
|
-
activesupport (4.1.13)
|
38
|
-
i18n (~> 0.6, >= 0.6.9)
|
39
|
-
json (~> 1.7, >= 1.7.7)
|
40
|
-
minitest (~> 5.1)
|
41
|
-
thread_safe (~> 0.1)
|
42
|
-
tzinfo (~> 1.1)
|
43
|
-
ansi (1.5.0)
|
44
|
-
appraisal (2.1.0)
|
45
|
-
bundler
|
46
|
-
rake
|
47
|
-
thor (>= 0.14.0)
|
48
|
-
arel (5.0.1.20140414130214)
|
49
|
-
bcrypt (3.1.10)
|
50
|
-
builder (3.2.2)
|
51
|
-
byebug (5.0.0)
|
52
|
-
columnize (= 0.9.0)
|
53
|
-
coderay (1.1.0)
|
54
|
-
coffee-rails (4.0.1)
|
55
|
-
coffee-script (>= 2.2.0)
|
56
|
-
railties (>= 4.0.0, < 5.0)
|
57
|
-
coffee-script (2.4.1)
|
58
|
-
coffee-script-source
|
59
|
-
execjs
|
60
|
-
coffee-script-source (1.9.1.1)
|
61
|
-
columnize (0.9.0)
|
62
|
-
diff-lcs (1.2.5)
|
63
|
-
erubis (2.7.0)
|
64
|
-
execjs (2.6.0)
|
65
|
-
fssm (0.2.10)
|
66
|
-
hike (1.2.3)
|
67
|
-
i18n (0.7.0)
|
68
|
-
jbuilder (2.3.1)
|
69
|
-
activesupport (>= 3.0.0, < 5)
|
70
|
-
multi_json (~> 1.2)
|
71
|
-
jquery-rails (3.1.4)
|
72
|
-
railties (>= 3.0, < 5.0)
|
73
|
-
thor (>= 0.14, < 2.0)
|
74
|
-
json (1.8.3)
|
75
|
-
mail (2.6.3)
|
76
|
-
mime-types (>= 1.16, < 3)
|
77
|
-
method_source (0.8.2)
|
78
|
-
mime-types (2.6.2)
|
79
|
-
minitest (5.8.3)
|
80
|
-
minitest-reporters (1.1.2)
|
81
|
-
ansi
|
82
|
-
builder
|
83
|
-
minitest (>= 5.0)
|
84
|
-
ruby-progressbar
|
85
|
-
multi_json (1.11.2)
|
86
|
-
pg (0.18.3)
|
87
|
-
posix-spawn (0.3.11)
|
88
|
-
protected_attributes (1.0.9)
|
89
|
-
activemodel (>= 4.0.1, < 5.0)
|
90
|
-
pry-byebug (3.2.0)
|
91
|
-
byebug (~> 5.0)
|
92
|
-
pry (~> 0.10)
|
93
|
-
pygments.rb (0.6.3)
|
94
|
-
posix-spawn (~> 0.3.6)
|
95
|
-
yajl-ruby (~> 1.2.0)
|
96
|
-
rack (1.5.5)
|
97
|
-
rack-test (0.6.3)
|
98
|
-
rack (>= 1.0)
|
99
|
-
rails (4.1.13)
|
100
|
-
actionmailer (= 4.1.13)
|
101
|
-
actionpack (= 4.1.13)
|
102
|
-
actionview (= 4.1.13)
|
103
|
-
activemodel (= 4.1.13)
|
104
|
-
activerecord (= 4.1.13)
|
105
|
-
activesupport (= 4.1.13)
|
106
|
-
bundler (>= 1.3.0, < 2.0)
|
107
|
-
railties (= 4.1.13)
|
108
|
-
sprockets-rails (~> 2.0)
|
109
|
-
rails-observers (0.1.2)
|
110
|
-
activemodel (~> 4.0)
|
111
|
-
railties (4.1.13)
|
112
|
-
actionpack (= 4.1.13)
|
113
|
-
activesupport (= 4.1.13)
|
114
|
-
rake (>= 0.8.7)
|
115
|
-
thor (>= 0.18.1, < 2.0)
|
116
|
-
rake (10.4.2)
|
117
|
-
rdoc (4.2.0)
|
118
|
-
redcarpet (3.3.2)
|
119
|
-
rspec (3.4.0)
|
120
|
-
rspec-core (~> 3.4.0)
|
121
|
-
rspec-expectations (~> 3.4.0)
|
122
|
-
rspec-mocks (~> 3.4.0)
|
123
|
-
rspec-core (3.4.1)
|
124
|
-
rspec-support (~> 3.4.0)
|
125
|
-
rspec-expectations (3.4.0)
|
126
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
127
|
-
rspec-support (~> 3.4.0)
|
128
|
-
rspec-mocks (3.4.0)
|
129
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
130
|
-
rspec-support (~> 3.4.0)
|
131
|
-
rspec-rails (3.4.0)
|
132
|
-
actionpack (>= 3.0, < 4.3)
|
133
|
-
activesupport (>= 3.0, < 4.3)
|
134
|
-
railties (>= 3.0, < 4.3)
|
135
|
-
rspec-core (~> 3.4.0)
|
136
|
-
rspec-expectations (~> 3.4.0)
|
137
|
-
rspec-mocks (~> 3.4.0)
|
138
|
-
rspec-support (~> 3.4.0)
|
139
|
-
rspec-support (3.4.1)
|
140
|
-
ruby-progressbar (1.7.5)
|
141
|
-
sass (3.2.19)
|
142
|
-
sass-rails (4.0.5)
|
143
|
-
railties (>= 4.0.0, < 5.0)
|
144
|
-
sass (~> 3.2.2)
|
145
|
-
sprockets (~> 2.8, < 3.0)
|
146
|
-
sprockets-rails (~> 2.0)
|
147
|
-
sdoc (0.4.1)
|
148
|
-
json (~> 1.7, >= 1.7.7)
|
149
|
-
rdoc (~> 4.0)
|
150
|
-
shoulda-context (1.2.1)
|
151
|
-
slop (3.6.0)
|
152
|
-
spring (1.4.0)
|
153
|
-
spring-commands-rspec (1.0.4)
|
154
|
-
spring (>= 0.9.1)
|
155
|
-
sprockets (2.12.4)
|
156
|
-
hike (~> 1.2)
|
157
|
-
multi_json (~> 1.0)
|
158
|
-
rack (~> 1.0)
|
159
|
-
tilt (~> 1.1, != 1.3.0)
|
160
|
-
sprockets-rails (2.3.3)
|
161
|
-
actionpack (>= 3.0)
|
162
|
-
activesupport (>= 3.0)
|
163
|
-
sprockets (>= 2.8, < 4.0)
|
164
|
-
sqlite3 (1.3.10)
|
165
|
-
thor (0.19.1)
|
166
|
-
thread_safe (0.3.5)
|
167
|
-
tilt (1.4.1)
|
168
|
-
turbolinks (2.5.3)
|
169
|
-
coffee-rails
|
170
|
-
tzinfo (1.2.2)
|
171
|
-
thread_safe (~> 0.1)
|
172
|
-
uglifier (2.7.2)
|
173
|
-
execjs (>= 0.3.0)
|
174
|
-
json (>= 1.8.0)
|
175
|
-
yajl-ruby (1.2.1)
|
176
|
-
yard (0.8.7.6)
|
177
|
-
zeus (0.15.4)
|
178
|
-
method_source (>= 0.6.7)
|
179
|
-
|
180
|
-
PLATFORMS
|
181
|
-
ruby
|
182
|
-
|
183
|
-
DEPENDENCIES
|
184
|
-
activerecord-jdbc-adapter
|
185
|
-
activerecord-jdbcsqlite3-adapter
|
186
|
-
activeresource (= 4.0.0)
|
187
|
-
appraisal (~> 2.0)
|
188
|
-
bcrypt (~> 3.1.7)
|
189
|
-
bundler (~> 1.1)
|
190
|
-
coffee-rails (~> 4.0.0)
|
191
|
-
fssm
|
192
|
-
jbuilder (~> 2.0)
|
193
|
-
jdbc-sqlite3
|
194
|
-
jquery-rails
|
195
|
-
jruby-openssl
|
196
|
-
minitest-reporters
|
197
|
-
pg
|
198
|
-
protected_attributes (~> 1.0.6)
|
199
|
-
pry!
|
200
|
-
pry-byebug
|
201
|
-
pygments.rb
|
202
|
-
rails (~> 4.1.0)
|
203
|
-
rake (~> 10.0)
|
204
|
-
redcarpet
|
205
|
-
rspec (~> 3.2)
|
206
|
-
rspec-rails (>= 3.2.0, < 4)
|
207
|
-
sass-rails (~> 4.0.3)
|
208
|
-
sdoc (~> 0.4.0)
|
209
|
-
shoulda-context (~> 1.2.0)
|
210
|
-
spring
|
211
|
-
spring-commands-rspec
|
212
|
-
sqlite3
|
213
|
-
therubyrhino
|
214
|
-
turbolinks
|
215
|
-
uglifier (>= 1.3.0)
|
216
|
-
yard
|
217
|
-
zeus
|
218
|
-
|
219
|
-
BUNDLED WITH
|
220
|
-
1.11.1
|
data/gemfiles/4.2.gemfile
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "appraisal", "~> 2.0"
|
6
|
-
gem "bundler", "~> 1.1"
|
7
|
-
gem "pry", :github => "pry/pry"
|
8
|
-
gem "pry-byebug"
|
9
|
-
gem "rake", "~> 10.0"
|
10
|
-
gem "rspec", "~> 3.2"
|
11
|
-
gem "zeus"
|
12
|
-
gem "yard"
|
13
|
-
gem "redcarpet"
|
14
|
-
gem "pygments.rb"
|
15
|
-
gem "fssm"
|
16
|
-
gem "rspec-rails", ">= 3.2.0", "< 4"
|
17
|
-
gem "shoulda-context", "~> 1.2.0"
|
18
|
-
gem "sqlite3", :platform => :ruby
|
19
|
-
gem "pg", :platform => :ruby
|
20
|
-
gem "activerecord-jdbc-adapter", :platform => :jruby
|
21
|
-
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
|
22
|
-
gem "jdbc-sqlite3", :platform => :jruby
|
23
|
-
gem "jruby-openssl", :platform => :jruby
|
24
|
-
gem "therubyrhino", :platform => :jruby
|
25
|
-
gem "spring"
|
26
|
-
gem "spring-commands-rspec"
|
27
|
-
gem "uglifier", ">= 1.3.0"
|
28
|
-
gem "coffee-rails", "~> 4.1.0"
|
29
|
-
gem "jquery-rails"
|
30
|
-
gem "turbolinks"
|
31
|
-
gem "sdoc", "~> 0.4.0"
|
32
|
-
gem "activeresource", "4.0.0"
|
33
|
-
gem "protected_attributes", "~> 1.0.6"
|
34
|
-
gem "minitest-reporters"
|
35
|
-
gem "rails", "~> 4.2.0"
|
36
|
-
gem "sass-rails", "~> 5.0"
|
37
|
-
gem "jbuilder", "~> 2.0"
|
38
|
-
gem "bcrypt", "~> 3.1.7"
|
data/gemfiles/4.2.gemfile.lock
DELETED
@@ -1,243 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/pry/pry.git
|
3
|
-
revision: 3c138cbf94a44f7a6696afdab1ab5149d7541974
|
4
|
-
specs:
|
5
|
-
pry (0.10.1)
|
6
|
-
coderay (~> 1.1.0)
|
7
|
-
method_source (~> 0.8.1)
|
8
|
-
slop (~> 3.4)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actionmailer (4.2.4)
|
14
|
-
actionpack (= 4.2.4)
|
15
|
-
actionview (= 4.2.4)
|
16
|
-
activejob (= 4.2.4)
|
17
|
-
mail (~> 2.5, >= 2.5.4)
|
18
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
19
|
-
actionpack (4.2.4)
|
20
|
-
actionview (= 4.2.4)
|
21
|
-
activesupport (= 4.2.4)
|
22
|
-
rack (~> 1.6)
|
23
|
-
rack-test (~> 0.6.2)
|
24
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
25
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
26
|
-
actionview (4.2.4)
|
27
|
-
activesupport (= 4.2.4)
|
28
|
-
builder (~> 3.1)
|
29
|
-
erubis (~> 2.7.0)
|
30
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
31
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
32
|
-
activejob (4.2.4)
|
33
|
-
activesupport (= 4.2.4)
|
34
|
-
globalid (>= 0.3.0)
|
35
|
-
activemodel (4.2.4)
|
36
|
-
activesupport (= 4.2.4)
|
37
|
-
builder (~> 3.1)
|
38
|
-
activerecord (4.2.4)
|
39
|
-
activemodel (= 4.2.4)
|
40
|
-
activesupport (= 4.2.4)
|
41
|
-
arel (~> 6.0)
|
42
|
-
activeresource (4.0.0)
|
43
|
-
activemodel (~> 4.0)
|
44
|
-
activesupport (~> 4.0)
|
45
|
-
rails-observers (~> 0.1.1)
|
46
|
-
activesupport (4.2.4)
|
47
|
-
i18n (~> 0.7)
|
48
|
-
json (~> 1.7, >= 1.7.7)
|
49
|
-
minitest (~> 5.1)
|
50
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
51
|
-
tzinfo (~> 1.1)
|
52
|
-
ansi (1.5.0)
|
53
|
-
appraisal (2.1.0)
|
54
|
-
bundler
|
55
|
-
rake
|
56
|
-
thor (>= 0.14.0)
|
57
|
-
arel (6.0.3)
|
58
|
-
bcrypt (3.1.10)
|
59
|
-
builder (3.2.2)
|
60
|
-
byebug (5.0.0)
|
61
|
-
columnize (= 0.9.0)
|
62
|
-
coderay (1.1.0)
|
63
|
-
coffee-rails (4.1.0)
|
64
|
-
coffee-script (>= 2.2.0)
|
65
|
-
railties (>= 4.0.0, < 5.0)
|
66
|
-
coffee-script (2.4.1)
|
67
|
-
coffee-script-source
|
68
|
-
execjs
|
69
|
-
coffee-script-source (1.9.1.1)
|
70
|
-
columnize (0.9.0)
|
71
|
-
diff-lcs (1.2.5)
|
72
|
-
erubis (2.7.0)
|
73
|
-
execjs (2.6.0)
|
74
|
-
fssm (0.2.10)
|
75
|
-
globalid (0.3.6)
|
76
|
-
activesupport (>= 4.1.0)
|
77
|
-
i18n (0.7.0)
|
78
|
-
jbuilder (2.3.1)
|
79
|
-
activesupport (>= 3.0.0, < 5)
|
80
|
-
multi_json (~> 1.2)
|
81
|
-
jquery-rails (4.0.5)
|
82
|
-
rails-dom-testing (~> 1.0)
|
83
|
-
railties (>= 4.2.0)
|
84
|
-
thor (>= 0.14, < 2.0)
|
85
|
-
json (1.8.3)
|
86
|
-
loofah (2.0.3)
|
87
|
-
nokogiri (>= 1.5.9)
|
88
|
-
mail (2.6.3)
|
89
|
-
mime-types (>= 1.16, < 3)
|
90
|
-
method_source (0.8.2)
|
91
|
-
mime-types (2.6.2)
|
92
|
-
mini_portile2 (2.0.0)
|
93
|
-
minitest (5.8.3)
|
94
|
-
minitest-reporters (1.1.2)
|
95
|
-
ansi
|
96
|
-
builder
|
97
|
-
minitest (>= 5.0)
|
98
|
-
ruby-progressbar
|
99
|
-
multi_json (1.11.2)
|
100
|
-
nokogiri (1.6.7.1)
|
101
|
-
mini_portile2 (~> 2.0.0.rc2)
|
102
|
-
pg (0.18.3)
|
103
|
-
posix-spawn (0.3.11)
|
104
|
-
protected_attributes (1.0.9)
|
105
|
-
activemodel (>= 4.0.1, < 5.0)
|
106
|
-
pry-byebug (3.2.0)
|
107
|
-
byebug (~> 5.0)
|
108
|
-
pry (~> 0.10)
|
109
|
-
pygments.rb (0.6.3)
|
110
|
-
posix-spawn (~> 0.3.6)
|
111
|
-
yajl-ruby (~> 1.2.0)
|
112
|
-
rack (1.6.4)
|
113
|
-
rack-test (0.6.3)
|
114
|
-
rack (>= 1.0)
|
115
|
-
rails (4.2.4)
|
116
|
-
actionmailer (= 4.2.4)
|
117
|
-
actionpack (= 4.2.4)
|
118
|
-
actionview (= 4.2.4)
|
119
|
-
activejob (= 4.2.4)
|
120
|
-
activemodel (= 4.2.4)
|
121
|
-
activerecord (= 4.2.4)
|
122
|
-
activesupport (= 4.2.4)
|
123
|
-
bundler (>= 1.3.0, < 2.0)
|
124
|
-
railties (= 4.2.4)
|
125
|
-
sprockets-rails
|
126
|
-
rails-deprecated_sanitizer (1.0.3)
|
127
|
-
activesupport (>= 4.2.0.alpha)
|
128
|
-
rails-dom-testing (1.0.7)
|
129
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
130
|
-
nokogiri (~> 1.6.0)
|
131
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
132
|
-
rails-html-sanitizer (1.0.2)
|
133
|
-
loofah (~> 2.0)
|
134
|
-
rails-observers (0.1.2)
|
135
|
-
activemodel (~> 4.0)
|
136
|
-
railties (4.2.4)
|
137
|
-
actionpack (= 4.2.4)
|
138
|
-
activesupport (= 4.2.4)
|
139
|
-
rake (>= 0.8.7)
|
140
|
-
thor (>= 0.18.1, < 2.0)
|
141
|
-
rake (10.4.2)
|
142
|
-
rdoc (4.2.0)
|
143
|
-
redcarpet (3.3.2)
|
144
|
-
rspec (3.4.0)
|
145
|
-
rspec-core (~> 3.4.0)
|
146
|
-
rspec-expectations (~> 3.4.0)
|
147
|
-
rspec-mocks (~> 3.4.0)
|
148
|
-
rspec-core (3.4.1)
|
149
|
-
rspec-support (~> 3.4.0)
|
150
|
-
rspec-expectations (3.4.0)
|
151
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
-
rspec-support (~> 3.4.0)
|
153
|
-
rspec-mocks (3.4.0)
|
154
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
155
|
-
rspec-support (~> 3.4.0)
|
156
|
-
rspec-rails (3.4.0)
|
157
|
-
actionpack (>= 3.0, < 4.3)
|
158
|
-
activesupport (>= 3.0, < 4.3)
|
159
|
-
railties (>= 3.0, < 4.3)
|
160
|
-
rspec-core (~> 3.4.0)
|
161
|
-
rspec-expectations (~> 3.4.0)
|
162
|
-
rspec-mocks (~> 3.4.0)
|
163
|
-
rspec-support (~> 3.4.0)
|
164
|
-
rspec-support (3.4.1)
|
165
|
-
ruby-progressbar (1.7.5)
|
166
|
-
sass (3.4.18)
|
167
|
-
sass-rails (5.0.4)
|
168
|
-
railties (>= 4.0.0, < 5.0)
|
169
|
-
sass (~> 3.1)
|
170
|
-
sprockets (>= 2.8, < 4.0)
|
171
|
-
sprockets-rails (>= 2.0, < 4.0)
|
172
|
-
tilt (>= 1.1, < 3)
|
173
|
-
sdoc (0.4.1)
|
174
|
-
json (~> 1.7, >= 1.7.7)
|
175
|
-
rdoc (~> 4.0)
|
176
|
-
shoulda-context (1.2.1)
|
177
|
-
slop (3.6.0)
|
178
|
-
spring (1.4.0)
|
179
|
-
spring-commands-rspec (1.0.4)
|
180
|
-
spring (>= 0.9.1)
|
181
|
-
sprockets (3.3.5)
|
182
|
-
rack (> 1, < 3)
|
183
|
-
sprockets-rails (2.3.3)
|
184
|
-
actionpack (>= 3.0)
|
185
|
-
activesupport (>= 3.0)
|
186
|
-
sprockets (>= 2.8, < 4.0)
|
187
|
-
sqlite3 (1.3.10)
|
188
|
-
thor (0.19.1)
|
189
|
-
thread_safe (0.3.5)
|
190
|
-
tilt (2.0.1)
|
191
|
-
turbolinks (2.5.3)
|
192
|
-
coffee-rails
|
193
|
-
tzinfo (1.2.2)
|
194
|
-
thread_safe (~> 0.1)
|
195
|
-
uglifier (2.7.2)
|
196
|
-
execjs (>= 0.3.0)
|
197
|
-
json (>= 1.8.0)
|
198
|
-
yajl-ruby (1.2.1)
|
199
|
-
yard (0.8.7.6)
|
200
|
-
zeus (0.15.4)
|
201
|
-
method_source (>= 0.6.7)
|
202
|
-
|
203
|
-
PLATFORMS
|
204
|
-
ruby
|
205
|
-
|
206
|
-
DEPENDENCIES
|
207
|
-
activerecord-jdbc-adapter
|
208
|
-
activerecord-jdbcsqlite3-adapter
|
209
|
-
activeresource (= 4.0.0)
|
210
|
-
appraisal (~> 2.0)
|
211
|
-
bcrypt (~> 3.1.7)
|
212
|
-
bundler (~> 1.1)
|
213
|
-
coffee-rails (~> 4.1.0)
|
214
|
-
fssm
|
215
|
-
jbuilder (~> 2.0)
|
216
|
-
jdbc-sqlite3
|
217
|
-
jquery-rails
|
218
|
-
jruby-openssl
|
219
|
-
minitest-reporters
|
220
|
-
pg
|
221
|
-
protected_attributes (~> 1.0.6)
|
222
|
-
pry!
|
223
|
-
pry-byebug
|
224
|
-
pygments.rb
|
225
|
-
rails (~> 4.2.0)
|
226
|
-
rake (~> 10.0)
|
227
|
-
redcarpet
|
228
|
-
rspec (~> 3.2)
|
229
|
-
rspec-rails (>= 3.2.0, < 4)
|
230
|
-
sass-rails (~> 5.0)
|
231
|
-
sdoc (~> 0.4.0)
|
232
|
-
shoulda-context (~> 1.2.0)
|
233
|
-
spring
|
234
|
-
spring-commands-rspec
|
235
|
-
sqlite3
|
236
|
-
therubyrhino
|
237
|
-
turbolinks
|
238
|
-
uglifier (>= 1.3.0)
|
239
|
-
yard
|
240
|
-
zeus
|
241
|
-
|
242
|
-
BUNDLED WITH
|
243
|
-
1.11.1
|
@@ -1,159 +0,0 @@
|
|
1
|
-
module Shoulda
|
2
|
-
module Matchers
|
3
|
-
module ActiveModel
|
4
|
-
# The `allow_mass_assignment_of` matcher tests usage of Rails 3's
|
5
|
-
# `attr_accessible` and `attr_protected` macros, asserting that an
|
6
|
-
# attribute in your model is contained in either the whitelist or
|
7
|
-
# blacklist and thus can or cannot be set via mass assignment.
|
8
|
-
#
|
9
|
-
# class Post
|
10
|
-
# include ActiveModel::Model
|
11
|
-
# include ActiveModel::MassAssignmentSecurity
|
12
|
-
# attr_accessor :title
|
13
|
-
#
|
14
|
-
# attr_accessible :title
|
15
|
-
# end
|
16
|
-
#
|
17
|
-
# class User
|
18
|
-
# include ActiveModel::Model
|
19
|
-
# include ActiveModel::MassAssignmentSecurity
|
20
|
-
# attr_accessor :encrypted_password
|
21
|
-
#
|
22
|
-
# attr_protected :encrypted_password
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
# # RSpec
|
26
|
-
# describe Post do
|
27
|
-
# it { should allow_mass_assignment_of(:title) }
|
28
|
-
# end
|
29
|
-
#
|
30
|
-
# describe User do
|
31
|
-
# it { should_not allow_mass_assignment_of(:encrypted_password) }
|
32
|
-
# end
|
33
|
-
#
|
34
|
-
# # Minitest (Shoulda)
|
35
|
-
# class PostTest < ActiveSupport::TestCase
|
36
|
-
# should allow_mass_assignment_of(:title)
|
37
|
-
# end
|
38
|
-
#
|
39
|
-
# class UserTest < ActiveSupport::TestCase
|
40
|
-
# should_not allow_mass_assignment_of(:encrypted_password)
|
41
|
-
# end
|
42
|
-
#
|
43
|
-
# #### Optional qualifiers
|
44
|
-
#
|
45
|
-
# ##### as
|
46
|
-
#
|
47
|
-
# Use `as` if your mass-assignment rules apply only under a certain role
|
48
|
-
# *(Rails >= 3.1 only)*.
|
49
|
-
#
|
50
|
-
# class Post
|
51
|
-
# include ActiveModel::Model
|
52
|
-
# include ActiveModel::MassAssignmentSecurity
|
53
|
-
# attr_accessor :title
|
54
|
-
#
|
55
|
-
# attr_accessible :title, as: :admin
|
56
|
-
# end
|
57
|
-
#
|
58
|
-
# # RSpec
|
59
|
-
# describe Post do
|
60
|
-
# it { should allow_mass_assignment_of(:title).as(:admin) }
|
61
|
-
# end
|
62
|
-
#
|
63
|
-
# # Minitest (Shoulda)
|
64
|
-
# class PostTest < ActiveSupport::TestCase
|
65
|
-
# should allow_mass_assignment_of(:title).as(:admin)
|
66
|
-
# end
|
67
|
-
#
|
68
|
-
# @return [AllowMassAssignmentOfMatcher]
|
69
|
-
#
|
70
|
-
def allow_mass_assignment_of(value)
|
71
|
-
AllowMassAssignmentOfMatcher.new(value)
|
72
|
-
end
|
73
|
-
|
74
|
-
# @private
|
75
|
-
class AllowMassAssignmentOfMatcher
|
76
|
-
attr_reader :failure_message, :failure_message_when_negated
|
77
|
-
|
78
|
-
def initialize(attribute)
|
79
|
-
@attribute = attribute.to_s
|
80
|
-
@options = {}
|
81
|
-
end
|
82
|
-
|
83
|
-
def as(role)
|
84
|
-
@options[:role] = role
|
85
|
-
self
|
86
|
-
end
|
87
|
-
|
88
|
-
def matches?(subject)
|
89
|
-
@subject = subject
|
90
|
-
if attr_mass_assignable?
|
91
|
-
if whitelisting?
|
92
|
-
@failure_message_when_negated = "#{@attribute} was made accessible"
|
93
|
-
else
|
94
|
-
if protected_attributes.empty?
|
95
|
-
@failure_message_when_negated = 'no attributes were protected'
|
96
|
-
else
|
97
|
-
@failure_message_when_negated = "#{class_name} is protecting " <<
|
98
|
-
"#{protected_attributes.to_a.to_sentence}, " <<
|
99
|
-
"but not #{@attribute}."
|
100
|
-
end
|
101
|
-
end
|
102
|
-
true
|
103
|
-
else
|
104
|
-
if whitelisting?
|
105
|
-
@failure_message = "Expected #{@attribute} to be accessible"
|
106
|
-
else
|
107
|
-
@failure_message = "Did not expect #{@attribute} to be protected"
|
108
|
-
end
|
109
|
-
false
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
def description
|
114
|
-
[base_description, role_description].compact.join(' ')
|
115
|
-
end
|
116
|
-
|
117
|
-
private
|
118
|
-
|
119
|
-
def base_description
|
120
|
-
"allow mass assignment of #{@attribute}"
|
121
|
-
end
|
122
|
-
|
123
|
-
def role_description
|
124
|
-
if role != :default
|
125
|
-
"as #{role}"
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
def role
|
130
|
-
@options[:role] || :default
|
131
|
-
end
|
132
|
-
|
133
|
-
def protected_attributes
|
134
|
-
@protected_attributes ||= (@subject.class.protected_attributes || [])
|
135
|
-
end
|
136
|
-
|
137
|
-
def accessible_attributes
|
138
|
-
@accessible_attributes ||= (@subject.class.accessible_attributes || [])
|
139
|
-
end
|
140
|
-
|
141
|
-
def whitelisting?
|
142
|
-
authorizer.kind_of?(::ActiveModel::MassAssignmentSecurity::WhiteList)
|
143
|
-
end
|
144
|
-
|
145
|
-
def attr_mass_assignable?
|
146
|
-
!authorizer.deny?(@attribute)
|
147
|
-
end
|
148
|
-
|
149
|
-
def authorizer
|
150
|
-
@subject.class.active_authorizer[role]
|
151
|
-
end
|
152
|
-
|
153
|
-
def class_name
|
154
|
-
@subject.class.name
|
155
|
-
end
|
156
|
-
end
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
module Shoulda
|
2
|
-
module Matchers
|
3
|
-
module Independent
|
4
|
-
class DelegateMethodMatcher
|
5
|
-
# @private
|
6
|
-
class StubbedTarget
|
7
|
-
def initialize(method)
|
8
|
-
@received_method = false
|
9
|
-
@received_arguments = []
|
10
|
-
stub_method(method)
|
11
|
-
end
|
12
|
-
|
13
|
-
def has_received_method?
|
14
|
-
received_method
|
15
|
-
end
|
16
|
-
|
17
|
-
def has_received_arguments?(*args)
|
18
|
-
args == received_arguments
|
19
|
-
end
|
20
|
-
|
21
|
-
protected
|
22
|
-
|
23
|
-
def stub_method(method)
|
24
|
-
class_eval do
|
25
|
-
define_method method do |*args|
|
26
|
-
@received_method = true
|
27
|
-
@received_arguments = args
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
attr_reader :received_method, :received_arguments
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
data/script/SUPPORTED_VERSIONS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.0 2.1.6 2.2.3
|
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
SUPPORTED_VERSIONS=$(<script/SUPPORTED_VERSIONS)
|
4
|
-
|
5
|
-
install-gems-for-version() {
|
6
|
-
local version="$1"
|
7
|
-
(export RBENV_VERSION=$version; bundle && bundle exec appraisal install)
|
8
|
-
}
|
9
|
-
|
10
|
-
for version in $SUPPORTED_VERSIONS; do
|
11
|
-
echo
|
12
|
-
echo "*** Installing gems for $version ***"
|
13
|
-
install-gems-for-version $version
|
14
|
-
done
|