pact_broker 2.77.0 → 2.80.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release_gem.yml +1 -0
- data/.github/workflows/test.yml +37 -11
- data/.rubocop.yml +37 -879
- data/.ruby-version +1 -1
- data/CHANGELOG.md +102 -0
- data/DEVELOPER_DOCUMENTATION.md +13 -0
- data/DEVELOPER_SETUP.md +6 -0
- data/Dockerfile +1 -1
- data/Gemfile +30 -28
- data/Rakefile +8 -6
- data/config.ru +11 -11
- data/config/boot.rb +6 -6
- data/db/ddl_statements/latest_pact_consumer_version_orders.rb +1 -1
- data/db/ddl_statements/latest_pact_publications_by_consumer_versions.rb +2 -2
- data/db/migrations/000001_create_pacticipant_table.rb +1 -1
- data/db/migrations/000002_create_versions_table.rb +1 -1
- data/db/migrations/000003_create_pacts_table.rb +1 -1
- data/db/migrations/000004_create_tags_table.rb +1 -1
- data/db/migrations/000007_increase_json_content_length.rb +1 -1
- data/db/migrations/000012_create_webhooks_table.rb +6 -6
- data/db/migrations/000015_create_pact_version_content.rb +4 -4
- data/db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb +3 -3
- data/db/migrations/000017_migrate_json_content_to_pact_version_content_table.rb +2 -2
- data/db/migrations/000018_drop_json_content_column_from_pacts.rb +2 -2
- data/db/migrations/000019_make_pact_version_content_sha_not_nullable.rb +2 -2
- data/db/migrations/000020_add_pact_version_content_sha_to_all_pacts_view.rb +2 -2
- data/db/migrations/000021_recreate_latest_pacts_view.rb +2 -2
- data/db/migrations/000023_create_pact_versions_table.rb +3 -3
- data/db/migrations/000026_create_pact_publications.rb +3 -3
- data/db/migrations/000031_create_verifications.rb +1 -1
- data/db/migrations/000033_create_config_table.rb +3 -3
- data/db/migrations/000034_create_index_on_consumer_version_order.rb +3 -3
- data/db/migrations/000035_create_index_on_names.rb +2 -2
- data/db/migrations/000036_create_webhook_execution.rb +2 -2
- data/db/migrations/000037_create_labels_table.rb +1 -1
- data/db/migrations/000038_create_triggered_webhooks_table.rb +3 -3
- data/db/migrations/000041_migrate_execution_data.rb +3 -3
- data/db/migrations/000043_add_provider_version_to_verification.rb +1 -1
- data/db/migrations/000044_populate_verifications_provider_version_id.rb +9 -9
- data/db/migrations/20171112_add_test_results.rb +1 -1
- data/db/migrations/20171117_create_webhook_events.rb +3 -3
- data/db/migrations/20171118_create_webhook_events.rb +2 -2
- data/db/migrations/20180108_create_certificates_table.rb +3 -3
- data/db/migrations/20180109_migrate_trigger_type.rb +2 -2
- data/db/migrations/20180119_update_latest_triggered_webhooks.rb +1 -1
- data/db/migrations/20180123_create_tags_with_latest_flag.rb +1 -1
- data/db/migrations/20180130_create_materialized_matrix.rb +4 -4
- data/db/migrations/20180131_create_materialized_latest_matrix.rb +4 -4
- data/db/migrations/20180202_create_materialized_head_matrix.rb +4 -4
- data/db/migrations/20180205_drop_materialized_latest_matrix.rb +4 -4
- data/db/migrations/20180210_fix_latest_matrix_for_cv_and_pv_again.rb +2 -2
- data/db/migrations/20180311_optimise_head_matrix.rb +2 -3
- data/db/migrations/20180523_create_latest_verifications_for_consumer_version_tags.rb +1 -1
- data/db/migrations/20180524_create_latest_verifications_for_consumer_and_provider.rb +1 -1
- data/db/migrations/20180613_migrate_pacticipant_ids_for_verifications.rb +1 -1
- data/db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb +1 -1
- data/db/migrations/20180616_migrate_consumer_ids_for_pact_publications.rb +1 -1
- data/db/migrations/20180720_create_latest_pact_publication_ids.rb +1 -1
- data/db/migrations/20180722_recreate_views.rb +1 -1
- data/db/migrations/20180723_create_latest_verification_ids.rb +6 -6
- data/db/migrations/20180729_create_latest_verification_ids_for_provider_versions.rb +1 -1
- data/db/migrations/20190509_create_version_sequence.rb +1 -1
- data/db/migrations/20190510_set_version_sequence.rb +1 -1
- data/db/migrations/20190524_set_webhooks_enabled.rb +1 -1
- data/db/migrations/20190603_migrate_webhook_headers.rb +1 -1
- data/db/migrations/20191025_optimise_latest_verification_ids_for_cv_tags.rb +1 -1
- data/db/migrations/20191028_optimise_latest_tagged_pact_cv_orders.rb +1 -1
- data/db/migrations/20191030_optimise_latest_pact_publications_by_consumer_versions_.rb +1 -1
- data/db/migrations/20191031_optimise_latest_verification_ids_for_consumer_version_tags.rb +1 -1
- data/db/migrations/20191101_create_head_pact_tags.rb +1 -1
- data/db/migrations/20200930_update_latest_triggered_webhooks.rb +2 -2
- data/db/migrations/20201023_create_verification_number_sequence.rb +1 -1
- data/db/migrations/20201024_create_version_order_sequence.rb +1 -1
- data/db/migrations/20201026_update_latest_verification_ids_for_consumer_and_provider.rb +2 -2
- data/db/migrations/20210115_add_webhook_foreign_key_indexes.rb +1 -1
- data/db/migrations/20210116_add_context_to_triggered_webhook.rb +1 -1
- data/db/migrations/20210202_add_created_at_to_head_pact_tags.rb +2 -2
- data/db/migrations/20210205_add_pacticipant_id_to_tag.rb +1 -1
- data/db/migrations/20210206_add_index_to_tags_and_versions.rb +1 -1
- data/db/migrations/20210207_optimise_latest_verification_ids_for_consumer_version_tags.rb +1 -1
- data/db/migrations/20210208_optimise_latest_tagged_pact_cv_orders.rb +1 -1
- data/db/migrations/20210210_create_environments_table.rb +16 -0
- data/db/migrations/20210216_create_deployed_versions_table.rb +18 -0
- data/db/migrations/20210226_set_deployment_columns_not_null.rb +31 -0
- data/db/migrations/20210301_add_pacticipant_columns.rb +10 -0
- data/db/migrations/20210413_create_currently_deployed_version_ids_table.rb +13 -0
- data/db/migrations/20210415_add_target_column_to_deployed_version.rb +21 -0
- data/db/migrations/20210419_create_released_versions_table.rb +17 -0
- data/db/migrations/20210529_add_main_branch_to_pacticipant.rb +18 -0
- data/db/migrations/20210608_add_uuid_to_webhook.rb +14 -0
- data/db/migrations/20210609_set_webhook_uuid.rb +11 -0
- data/db/migrations/20210702_drop_unused_columns_from_deployed_versions.rb +15 -0
- data/db/migrations/migration_helper.rb +3 -3
- data/db/test/backwards_compatibility/Gemfile +11 -11
- data/db/test/backwards_compatibility/Rakefile +17 -17
- data/db/test/backwards_compatibility/config.ru +6 -6
- data/db/test/backwards_compatibility/spec/publish_pact_spec.rb +13 -13
- data/db/test/backwards_compatibility/spec/spec_helper.rb +3 -3
- data/db/test/backwards_compatibility/spec/support/fixture_helpers.rb +2 -2
- data/db/test/backwards_compatibility/spec/support/request_helpers.rb +3 -4
- data/db/test/change_migration_strategy/Rakefile +6 -6
- data/db/test/change_migration_strategy/before/Gemfile +1 -1
- data/docker-compose-dev-postgres.yml +9 -1
- data/example/Gemfile +4 -4
- data/example/basic_auth/Gemfile +1 -1
- data/example/basic_auth/config.ru +7 -7
- data/example/config.ru +7 -7
- data/issue-reproduction/Dockerfile-pact-broker +1 -1
- data/lib/db.rb +18 -12
- data/lib/pact/doc/generator.rb +3 -3
- data/lib/pact/doc/interaction_view_model.rb +13 -13
- data/lib/pact/doc/markdown/consumer_contract_renderer.rb +4 -4
- data/lib/pact/doc/markdown/generator.rb +6 -6
- data/lib/pact/doc/markdown/interaction_renderer.rb +4 -4
- data/lib/pact/doc/sort_interactions.rb +0 -1
- data/lib/pact_broker.rb +4 -4
- data/lib/pact_broker/api.rb +102 -78
- data/lib/pact_broker/api/contracts/base_contract.rb +2 -2
- data/lib/pact_broker/api/contracts/dry_validation_predicates.rb +18 -1
- data/lib/pact_broker/api/contracts/dry_validation_workarounds.rb +3 -2
- data/lib/pact_broker/api/contracts/environment_schema.rb +49 -0
- data/lib/pact_broker/api/contracts/pacticipant_name_contract.rb +1 -1
- data/lib/pact_broker/api/contracts/pacticipant_name_validation.rb +2 -2
- data/lib/pact_broker/api/contracts/pacticipant_schema.rb +34 -0
- data/lib/pact_broker/api/contracts/publish_contracts_schema.rb +104 -0
- data/lib/pact_broker/api/contracts/put_pact_params_contract.rb +1 -1
- data/lib/pact_broker/api/contracts/request_validations.rb +2 -2
- data/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema.rb +70 -15
- data/lib/pact_broker/api/contracts/verifiable_pacts_query_schema.rb +3 -3
- data/lib/pact_broker/api/contracts/verification_contract.rb +2 -2
- data/lib/pact_broker/api/contracts/webhook_contract.rb +10 -7
- data/lib/pact_broker/api/decorators/base_decorator.rb +20 -5
- data/lib/pact_broker/api/decorators/basic_pacticipant_decorator.rb +1 -1
- data/lib/pact_broker/api/decorators/configuration.rb +2 -2
- data/lib/pact_broker/api/decorators/dashboard_decorator.rb +8 -8
- data/lib/pact_broker/api/decorators/dashboard_text_decorator.rb +3 -3
- data/lib/pact_broker/api/decorators/decorator_context.rb +1 -1
- data/lib/pact_broker/api/decorators/decorator_context_creator.rb +1 -1
- data/lib/pact_broker/api/decorators/deployed_version_decorator.rb +26 -0
- data/lib/pact_broker/api/decorators/deployed_versions_decorator.rb +20 -0
- data/lib/pact_broker/api/decorators/embedded_label_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/embedded_pacticipant_decorator.rb +17 -0
- data/lib/pact_broker/api/decorators/embedded_tag_decorator.rb +4 -4
- data/lib/pact_broker/api/decorators/embedded_version_decorator.rb +7 -2
- data/lib/pact_broker/api/decorators/environment_decorator.rb +51 -0
- data/lib/pact_broker/api/decorators/environments_decorator.rb +31 -0
- data/lib/pact_broker/api/decorators/extended_pact_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/extended_verification_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/integration_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/integrations_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/label_decorator.rb +5 -5
- data/lib/pact_broker/api/decorators/latest_pact_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/matrix_decorator.rb +26 -11
- data/lib/pact_broker/api/decorators/matrix_text_decorator.rb +5 -5
- data/lib/pact_broker/api/decorators/pact_collection_decorator.rb +6 -6
- data/lib/pact_broker/api/decorators/pact_decorator.rb +5 -5
- data/lib/pact_broker/api/decorators/pact_details_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/pact_pacticipant_decorator.rb +3 -3
- data/lib/pact_broker/api/decorators/pact_version_decorator.rb +3 -3
- data/lib/pact_broker/api/decorators/pact_versions_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/pact_webhooks_status_decorator.rb +6 -6
- data/lib/pact_broker/api/decorators/pacticipant_collection_decorator.rb +8 -8
- data/lib/pact_broker/api/decorators/pacticipant_decorator.rb +29 -13
- data/lib/pact_broker/api/decorators/pagination_links.rb +2 -2
- data/lib/pact_broker/api/decorators/provider_pacts_decorator.rb +2 -3
- data/lib/pact_broker/api/decorators/publish_contract_decorator.rb +19 -0
- data/lib/pact_broker/api/decorators/publish_contracts_decorator.rb +21 -0
- data/lib/pact_broker/api/decorators/publish_contracts_results_decorator.rb +55 -0
- data/lib/pact_broker/api/decorators/reason_decorator.rb +30 -14
- data/lib/pact_broker/api/decorators/relationships_csv_decorator.rb +3 -1
- data/lib/pact_broker/api/decorators/released_version_decorator.rb +25 -0
- data/lib/pact_broker/api/decorators/released_versions_decorator.rb +20 -0
- data/lib/pact_broker/api/decorators/representable_pact.rb +1 -1
- data/lib/pact_broker/api/decorators/tag_decorator.rb +6 -6
- data/lib/pact_broker/api/decorators/tagged_pact_versions_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/timestamps.rb +2 -2
- data/lib/pact_broker/api/decorators/triggered_webhook_decorator.rb +8 -6
- data/lib/pact_broker/api/decorators/triggered_webhooks_decorator.rb +2 -2
- data/lib/pact_broker/api/decorators/verifiable_pact_decorator.rb +4 -4
- data/lib/pact_broker/api/decorators/verifiable_pacts_decorator.rb +3 -3
- data/lib/pact_broker/api/decorators/verifiable_pacts_query_decorator.rb +16 -9
- data/lib/pact_broker/api/decorators/verification_decorator.rb +6 -6
- data/lib/pact_broker/api/decorators/verification_summary_decorator.rb +4 -4
- data/lib/pact_broker/api/decorators/version_decorator.rb +38 -7
- data/lib/pact_broker/api/decorators/versions_decorator.rb +5 -5
- data/lib/pact_broker/api/decorators/webhook_decorator.rb +10 -8
- data/lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb +7 -7
- data/lib/pact_broker/api/decorators/webhook_request_template_decorator.rb +1 -1
- data/lib/pact_broker/api/decorators/webhooks_decorator.rb +3 -3
- data/lib/pact_broker/api/pact_broker_urls.rb +125 -69
- data/lib/pact_broker/api/paths.rb +2 -2
- data/lib/pact_broker/api/renderers/html_pact_renderer.rb +16 -17
- data/lib/pact_broker/api/resources.rb +1 -1
- data/lib/pact_broker/api/resources/all_webhooks.rb +14 -6
- data/lib/pact_broker/api/resources/authentication.rb +1 -1
- data/lib/pact_broker/api/resources/authorization.rb +37 -0
- data/lib/pact_broker/api/resources/badge.rb +8 -8
- data/lib/pact_broker/api/resources/base_resource.rb +1 -1
- data/lib/pact_broker/api/resources/can_i_deploy.rb +13 -13
- data/lib/pact_broker/api/resources/can_i_deploy_badge.rb +7 -7
- data/lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb +23 -18
- data/lib/pact_broker/api/resources/clean.rb +3 -3
- data/lib/pact_broker/api/resources/currently_deployed_versions_for_environment.rb +75 -0
- data/lib/pact_broker/api/resources/currently_supported_versions_for_environment.rb +70 -0
- data/lib/pact_broker/api/resources/dashboard.rb +3 -3
- data/lib/pact_broker/api/resources/default_base_resource.rb +47 -20
- data/lib/pact_broker/api/resources/deployed_version.rb +94 -0
- data/lib/pact_broker/api/resources/deployed_versions_for_version_and_environment.rb +89 -0
- data/lib/pact_broker/api/resources/environment.rb +76 -0
- data/lib/pact_broker/api/resources/environments.rb +79 -0
- data/lib/pact_broker/api/resources/error_handler.rb +4 -4
- data/lib/pact_broker/api/resources/error_response_body_generator.rb +3 -3
- data/lib/pact_broker/api/resources/error_test.rb +2 -2
- data/lib/pact_broker/api/resources/group.rb +2 -2
- data/lib/pact_broker/api/resources/index.rb +91 -70
- data/lib/pact_broker/api/resources/integration.rb +1 -1
- data/lib/pact_broker/api/resources/integrations.rb +3 -3
- data/lib/pact_broker/api/resources/label.rb +2 -2
- data/lib/pact_broker/api/resources/latest_pact.rb +5 -5
- data/lib/pact_broker/api/resources/latest_pacts.rb +1 -1
- data/lib/pact_broker/api/resources/latest_provider_pacts.rb +3 -3
- data/lib/pact_broker/api/resources/latest_verification_for_latest_pact.rb +5 -1
- data/lib/pact_broker/api/resources/latest_verification_for_pact.rb +5 -1
- data/lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb +5 -5
- data/lib/pact_broker/api/resources/latest_version.rb +1 -1
- data/lib/pact_broker/api/resources/matrix.rb +18 -13
- data/lib/pact_broker/api/resources/matrix_badge.rb +1 -1
- data/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb +2 -2
- data/lib/pact_broker/api/resources/metadata_resource_methods.rb +2 -2
- data/lib/pact_broker/api/resources/metrics.rb +1 -1
- data/lib/pact_broker/api/resources/pact.rb +17 -27
- data/lib/pact_broker/api/resources/pact_content_diff.rb +3 -3
- data/lib/pact_broker/api/resources/pact_triggered_webhooks.rb +7 -3
- data/lib/pact_broker/api/resources/pact_version.rb +2 -2
- data/lib/pact_broker/api/resources/pact_versions.rb +3 -3
- data/lib/pact_broker/api/resources/pact_webhooks.rb +7 -8
- data/lib/pact_broker/api/resources/pact_webhooks_status.rb +2 -2
- data/lib/pact_broker/api/resources/pacticipant.rb +51 -15
- data/lib/pact_broker/api/resources/pacticipant_resource_methods.rb +1 -1
- data/lib/pact_broker/api/resources/{webhooks.rb → pacticipant_webhooks.rb} +12 -8
- data/lib/pact_broker/api/resources/pacticipants.rb +13 -8
- data/lib/pact_broker/api/resources/pacticipants_for_label.rb +2 -2
- data/lib/pact_broker/api/resources/previous_distinct_pact_version.rb +4 -4
- data/lib/pact_broker/api/resources/provider_pacts.rb +3 -3
- data/lib/pact_broker/api/resources/provider_pacts_for_verification.rb +10 -6
- data/lib/pact_broker/api/resources/publish_contracts.rb +81 -0
- data/lib/pact_broker/api/resources/relationships.rb +2 -2
- data/lib/pact_broker/api/resources/released_version.rb +84 -0
- data/lib/pact_broker/api/resources/released_versions_for_version_and_environment.rb +94 -0
- data/lib/pact_broker/api/resources/tag.rb +1 -1
- data/lib/pact_broker/api/resources/tagged_pact_versions.rb +4 -4
- data/lib/pact_broker/api/resources/triggered_webhook_logs.rb +16 -8
- data/lib/pact_broker/api/resources/verification.rb +17 -7
- data/lib/pact_broker/api/resources/verification_triggered_webhooks.rb +7 -3
- data/lib/pact_broker/api/resources/verifications.rb +13 -18
- data/lib/pact_broker/api/resources/version.rb +49 -11
- data/lib/pact_broker/api/resources/versions.rb +6 -6
- data/lib/pact_broker/api/resources/webhook.rb +17 -9
- data/lib/pact_broker/api/resources/webhook_execution.rb +18 -14
- data/lib/pact_broker/api/resources/webhook_execution_methods.rb +31 -0
- data/lib/pact_broker/app.rb +37 -35
- data/lib/pact_broker/application_context.rb +5 -5
- data/lib/pact_broker/badges/service.rb +22 -22
- data/lib/pact_broker/build_http_options.rb +2 -2
- data/lib/pact_broker/certificates/service.rb +4 -4
- data/lib/pact_broker/config/load.rb +4 -4
- data/lib/pact_broker/config/repository.rb +1 -1
- data/lib/pact_broker/config/save.rb +4 -4
- data/lib/pact_broker/config/setting.rb +28 -24
- data/lib/pact_broker/config/space_delimited_integer_list.rb +3 -3
- data/lib/pact_broker/config/space_delimited_string_list.rb +3 -3
- data/lib/pact_broker/configuration.rb +27 -20
- data/lib/pact_broker/constants.rb +2 -2
- data/lib/pact_broker/contracts/contract_to_publish.rb +19 -0
- data/lib/pact_broker/contracts/contracts_publication_results.rb +14 -0
- data/lib/pact_broker/contracts/contracts_to_publish.rb +11 -0
- data/lib/pact_broker/contracts/notice.rb +21 -0
- data/lib/pact_broker/contracts/service.rb +264 -0
- data/lib/pact_broker/date_helper.rb +48 -46
- data/lib/pact_broker/db.rb +11 -7
- data/lib/pact_broker/db/clean.rb +4 -8
- data/lib/pact_broker/db/clean_incremental.rb +8 -6
- data/lib/pact_broker/db/data_migrations/delete_deprecated_webhook_executions.rb +1 -1
- data/lib/pact_broker/db/data_migrations/migrate_webhook_headers.rb +1 -1
- data/lib/pact_broker/db/data_migrations/set_consumer_ids_for_pact_publications.rb +1 -1
- data/lib/pact_broker/db/data_migrations/set_created_at_for_latest_pact_publications.rb +1 -1
- data/lib/pact_broker/db/data_migrations/set_created_at_for_latest_verifications.rb +1 -1
- data/lib/pact_broker/db/data_migrations/set_extra_columns_for_tags.rb +3 -3
- data/lib/pact_broker/db/data_migrations/set_latest_version_sequence_value.rb +1 -1
- data/lib/pact_broker/db/data_migrations/set_pacticipant_display_name.rb +23 -0
- data/lib/pact_broker/db/data_migrations/set_pacticipant_ids_for_verifications.rb +1 -1
- data/lib/pact_broker/db/data_migrations/set_pacticipant_main_branch.rb +53 -0
- data/lib/pact_broker/db/data_migrations/set_webhook_uuid.rb +24 -0
- data/lib/pact_broker/db/data_migrations/set_webhooks_enabled.rb +1 -1
- data/lib/pact_broker/db/delete_overwritten_data.rb +7 -7
- data/lib/pact_broker/db/log_quietener.rb +1 -1
- data/lib/pact_broker/db/migrate.rb +4 -4
- data/lib/pact_broker/db/migrate_data.rb +4 -1
- data/lib/pact_broker/db/models.rb +17 -12
- data/lib/pact_broker/db/seed_example_data.rb +9 -4
- data/lib/pact_broker/db/validate_encoding.rb +4 -4
- data/lib/pact_broker/db/version.rb +1 -1
- data/lib/pact_broker/deployments/currently_deployed_version_id.rb +30 -0
- data/lib/pact_broker/deployments/deployed_version.rb +115 -0
- data/lib/pact_broker/deployments/deployed_version_service.rb +85 -0
- data/lib/pact_broker/deployments/environment.rb +49 -0
- data/lib/pact_broker/deployments/environment_service.rb +52 -0
- data/lib/pact_broker/deployments/released_version.rb +83 -0
- data/lib/pact_broker/deployments/released_version_service.rb +47 -0
- data/lib/pact_broker/diagnostic/app.rb +8 -8
- data/lib/pact_broker/diagnostic/resources/base_resource.rb +2 -2
- data/lib/pact_broker/diagnostic/resources/dependencies.rb +3 -3
- data/lib/pact_broker/diagnostic/resources/heartbeat.rb +1 -1
- data/lib/pact_broker/doc/controllers/app.rb +10 -10
- data/lib/pact_broker/doc/views/can-i-deploy.markdown +4 -2
- data/lib/pact_broker/doc/views/index/environment.markdown +37 -0
- data/lib/pact_broker/doc/views/index/environments.markdown +53 -0
- data/lib/pact_broker/doc/views/index/latest-pact-versions.markdown +1 -1
- data/lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown +1 -0
- data/lib/pact_broker/doc/views/index/pacticipants.markdown +25 -3
- data/lib/pact_broker/doc/views/index/publish-contracts.markdown +120 -0
- data/lib/pact_broker/doc/views/provider-pacts-for-verification.markdown +22 -11
- data/lib/pact_broker/doc/views/webhooks.markdown +5 -3
- data/lib/pact_broker/domain.rb +6 -6
- data/lib/pact_broker/domain/index_item.rb +27 -8
- data/lib/pact_broker/domain/label.rb +1 -2
- data/lib/pact_broker/domain/order_versions.rb +2 -2
- data/lib/pact_broker/domain/pact.rb +14 -7
- data/lib/pact_broker/domain/pacticipant.rb +27 -18
- data/lib/pact_broker/domain/tag.rb +5 -3
- data/lib/pact_broker/domain/verification.rb +8 -8
- data/lib/pact_broker/domain/version.rb +55 -10
- data/lib/pact_broker/domain/webhook.rb +14 -15
- data/lib/pact_broker/domain/webhook_request.rb +14 -18
- data/lib/pact_broker/errors.rb +7 -7
- data/lib/pact_broker/errors/error_logger.rb +3 -3
- data/lib/pact_broker/events/event.rb +5 -0
- data/lib/pact_broker/events/publisher.rb +9 -0
- data/lib/pact_broker/events/subscriber.rb +42 -0
- data/lib/pact_broker/feature_toggle.rb +2 -2
- data/lib/pact_broker/groups/service.rb +2 -2
- data/lib/pact_broker/hash_refinements.rb +12 -12
- data/lib/pact_broker/index/service.rb +69 -36
- data/lib/pact_broker/integrations/integration.rb +5 -5
- data/lib/pact_broker/integrations/service.rb +11 -7
- data/lib/pact_broker/labels/repository.rb +2 -2
- data/lib/pact_broker/labels/service.rb +1 -1
- data/lib/pact_broker/locale/en.yml +54 -14
- data/lib/pact_broker/logging.rb +3 -3
- data/lib/pact_broker/logging/default_formatter.rb +3 -3
- data/lib/pact_broker/matrix/aggregated_row.rb +4 -4
- data/lib/pact_broker/matrix/can_i_deploy_query_schema.rb +17 -2
- data/lib/pact_broker/matrix/deployment_status_summary.rb +78 -38
- data/lib/pact_broker/matrix/every_row.rb +2 -2
- data/lib/pact_broker/matrix/head_row.rb +2 -2
- data/lib/pact_broker/matrix/integration.rb +6 -6
- data/lib/pact_broker/matrix/parse_can_i_deploy_query.rb +19 -3
- data/lib/pact_broker/matrix/parse_query.rb +47 -24
- data/lib/pact_broker/matrix/query_builder.rb +10 -10
- data/lib/pact_broker/matrix/query_results.rb +9 -4
- data/lib/pact_broker/matrix/query_results_with_deployment_status_summary.rb +3 -3
- data/lib/pact_broker/matrix/quick_row.rb +32 -34
- data/lib/pact_broker/matrix/reason.rb +88 -1
- data/lib/pact_broker/matrix/repository.rb +137 -66
- data/lib/pact_broker/matrix/resolved_selector.rb +82 -7
- data/lib/pact_broker/matrix/row.rb +6 -6
- data/lib/pact_broker/matrix/service.rb +44 -14
- data/lib/pact_broker/matrix/unresolved_selector.rb +22 -2
- data/lib/pact_broker/messages.rb +17 -5
- data/lib/pact_broker/metrics/service.rb +16 -15
- data/lib/pact_broker/pacticipants/find_potential_duplicate_pacticipant_names.rb +5 -5
- data/lib/pact_broker/pacticipants/generate_display_name.rb +27 -0
- data/lib/pact_broker/pacticipants/repository.rb +34 -16
- data/lib/pact_broker/pacticipants/service.rb +19 -19
- data/lib/pact_broker/pacts/all_pact_publications.rb +6 -6
- data/lib/pact_broker/pacts/build_verifiable_pact_notices.rb +8 -8
- data/lib/pact_broker/pacts/content.rb +23 -21
- data/lib/pact_broker/pacts/create_formatted_diff.rb +3 -3
- data/lib/pact_broker/pacts/diff.rb +8 -8
- data/lib/pact_broker/pacts/eager_loaders.rb +1 -1
- data/lib/pact_broker/pacts/generate_interaction_sha.rb +2 -2
- data/lib/pact_broker/pacts/generate_sha.rb +10 -10
- data/lib/pact_broker/pacts/head_pact.rb +1 -1
- data/lib/pact_broker/pacts/latest_pact_publication_id_for_consumer_version.rb +2 -2
- data/lib/pact_broker/pacts/latest_pact_publications.rb +2 -2
- data/lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb +1 -1
- data/lib/pact_broker/pacts/latest_tagged_pact_publications.rb +2 -2
- data/lib/pact_broker/pacts/lazy_loaders.rb +2 -2
- data/lib/pact_broker/pacts/merger.rb +2 -2
- data/lib/pact_broker/pacts/order_hash_keys.rb +1 -1
- data/lib/pact_broker/pacts/pact_params.rb +7 -7
- data/lib/pact_broker/pacts/pact_publication.rb +19 -13
- data/lib/pact_broker/pacts/pact_publication_dataset_module.rb +7 -49
- data/lib/pact_broker/pacts/pact_publication_selector_dataset_module.rb +70 -0
- data/lib/pact_broker/pacts/pact_publication_wip_dataset_module.rb +106 -0
- data/lib/pact_broker/pacts/pact_version.rb +46 -14
- data/lib/pact_broker/pacts/pacts_for_verification_repository.rb +51 -47
- data/lib/pact_broker/pacts/parse.rb +1 -1
- data/lib/pact_broker/pacts/placeholder_pact.rb +1 -1
- data/lib/pact_broker/pacts/repository.rb +27 -23
- data/lib/pact_broker/pacts/selected_pact.rb +5 -1
- data/lib/pact_broker/pacts/selector.rb +124 -6
- data/lib/pact_broker/pacts/selectors.rb +5 -1
- data/lib/pact_broker/pacts/service.rb +102 -32
- data/lib/pact_broker/pacts/sort_content.rb +14 -9
- data/lib/pact_broker/pacts/squash_pacts_for_verification.rb +0 -1
- data/lib/pact_broker/pacts/verifiable_pact.rb +5 -3
- data/lib/pact_broker/pacts/verifiable_pact_messages.rb +82 -37
- data/lib/pact_broker/policies.rb +1 -1
- data/lib/pact_broker/project_root.rb +2 -2
- data/lib/pact_broker/relationships/groupify.rb +1 -1
- data/lib/pact_broker/repositories.rb +9 -9
- data/lib/pact_broker/services.rb +53 -15
- data/lib/pact_broker/string_refinements.rb +10 -4
- data/lib/pact_broker/tags/eager_loaders.rb +2 -2
- data/lib/pact_broker/tags/head_pact_tags.rb +2 -2
- data/lib/pact_broker/tags/repository.rb +2 -2
- data/lib/pact_broker/tags/service.rb +1 -1
- data/lib/pact_broker/tags/tag_with_latest_flag.rb +2 -2
- data/lib/pact_broker/tasks.rb +5 -5
- data/lib/pact_broker/tasks/clean_task.rb +12 -12
- data/lib/pact_broker/tasks/data_migration_task.rb +4 -4
- data/lib/pact_broker/tasks/delete_overwritten_data_task.rb +8 -8
- data/lib/pact_broker/tasks/migration_task.rb +5 -5
- data/lib/pact_broker/tasks/version_task.rb +3 -3
- data/lib/pact_broker/test/http_test_data_builder.rb +72 -31
- data/lib/pact_broker/test/test_data_builder.rb +119 -52
- data/lib/pact_broker/ui.rb +3 -3
- data/lib/pact_broker/ui/app.rb +9 -9
- data/lib/pact_broker/ui/controllers/base_controller.rb +6 -6
- data/lib/pact_broker/ui/controllers/can_i_deploy.rb +9 -9
- data/lib/pact_broker/ui/controllers/clusters.rb +5 -5
- data/lib/pact_broker/ui/controllers/error_test.rb +3 -3
- data/lib/pact_broker/ui/controllers/groups.rb +4 -4
- data/lib/pact_broker/ui/controllers/index.rb +28 -15
- data/lib/pact_broker/ui/controllers/matrix.rb +11 -11
- data/lib/pact_broker/ui/controllers/pacts.rb +1 -1
- data/lib/pact_broker/ui/helpers/matrix_helper.rb +12 -8
- data/lib/pact_broker/ui/helpers/url_helper.rb +3 -3
- data/lib/pact_broker/ui/view_models/index_item.rb +29 -15
- data/lib/pact_broker/ui/view_models/index_items.rb +2 -2
- data/lib/pact_broker/ui/view_models/matrix_deployed_version.rb +37 -0
- data/lib/pact_broker/ui/view_models/matrix_line.rb +45 -11
- data/lib/pact_broker/ui/view_models/matrix_lines.rb +1 -1
- data/lib/pact_broker/ui/view_models/matrix_released_version.rb +37 -0
- data/lib/pact_broker/ui/view_models/matrix_tag.rb +3 -3
- data/lib/pact_broker/ui/views/index/show-with-tags.haml +60 -14
- data/lib/pact_broker/ui/views/index/show.haml +23 -2
- data/lib/pact_broker/ui/views/matrix/show.haml +33 -9
- data/lib/pact_broker/verifications/latest_verification_for_consumer_and_provider.rb +1 -1
- data/lib/pact_broker/verifications/latest_verification_for_consumer_version_tag.rb +1 -1
- data/lib/pact_broker/verifications/latest_verification_for_pact_version.rb +1 -1
- data/lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb +1 -1
- data/lib/pact_broker/verifications/repository.rb +9 -5
- data/lib/pact_broker/verifications/sequence.rb +2 -2
- data/lib/pact_broker/verifications/service.rb +33 -17
- data/lib/pact_broker/version.rb +1 -1
- data/lib/pact_broker/versions/eager_loaders.rb +6 -6
- data/lib/pact_broker/versions/latest_version.rb +1 -1
- data/lib/pact_broker/versions/parse_semantic_version.rb +2 -2
- data/lib/pact_broker/versions/repository.rb +47 -15
- data/lib/pact_broker/versions/sequence.rb +1 -1
- data/lib/pact_broker/versions/service.rb +25 -2
- data/lib/pact_broker/webhooks/check_host_whitelist.rb +1 -1
- data/lib/pact_broker/webhooks/event_listener.rb +86 -0
- data/lib/pact_broker/webhooks/execution.rb +3 -3
- data/lib/pact_broker/webhooks/execution_configuration.rb +1 -1
- data/lib/pact_broker/webhooks/execution_configuration_creator.rb +2 -2
- data/lib/pact_broker/webhooks/http_request_with_redacted_headers.rb +1 -1
- data/lib/pact_broker/webhooks/http_response_with_utf_8_safe_body.rb +1 -1
- data/lib/pact_broker/webhooks/job.rb +5 -5
- data/lib/pact_broker/webhooks/latest_triggered_webhook.rb +17 -2
- data/lib/pact_broker/webhooks/pact_and_verification_parameters.rb +57 -15
- data/lib/pact_broker/webhooks/redact_logs.rb +3 -3
- data/lib/pact_broker/webhooks/render.rb +4 -5
- data/lib/pact_broker/webhooks/repository.rb +69 -75
- data/lib/pact_broker/webhooks/service.rb +52 -134
- data/lib/pact_broker/webhooks/status.rb +3 -1
- data/lib/pact_broker/webhooks/trigger_service.rb +75 -70
- data/lib/pact_broker/webhooks/triggered_webhook.rb +15 -12
- data/lib/pact_broker/webhooks/webhook.rb +43 -6
- data/lib/pact_broker/webhooks/webhook_event.rb +7 -7
- data/lib/pact_broker/webhooks/webhook_execution_result.rb +8 -3
- data/lib/pact_broker/webhooks/webhook_request_logger.rb +9 -7
- data/lib/pact_broker/webhooks/webhook_request_template.rb +41 -6
- data/lib/rack/hal_browser.rb +1 -1
- data/lib/rack/hal_browser/redirect.rb +9 -9
- data/lib/rack/pact_broker/add_pact_broker_version_header.rb +2 -2
- data/lib/rack/pact_broker/convert_404_to_hal.rb +2 -2
- data/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb +1 -1
- data/lib/rack/pact_broker/database_transaction.rb +3 -3
- data/lib/rack/pact_broker/invalid_uri_protection.rb +5 -5
- data/lib/rack/pact_broker/no_auth.rb +1 -1
- data/lib/rack/pact_broker/request_target.rb +8 -8
- data/lib/rack/pact_broker/reset_thread_data.rb +1 -1
- data/lib/rack/pact_broker/set_base_url.rb +35 -5
- data/lib/rack/pact_broker/ui_authentication.rb +3 -3
- data/lib/rack/pact_broker/ui_request_filter.rb +1 -1
- data/lib/sequel/extensions/statement_timeout.rb +9 -9
- data/pact_broker.gemspec +26 -25
- data/public/javascripts/clipboard.js +8 -2
- data/public/javascripts/matrix.js +11 -6
- data/public/stylesheets/index.css +14 -1
- data/regression/can_i_deploy_spec.rb +1 -1
- data/regression/index_spec.rb +3 -3
- data/regression/regression_helper.rb +9 -9
- data/scaffolding/README.md +23 -0
- data/scaffolding/run.rb +242 -0
- data/scaffolding/templates/decorator.rb.erb +13 -0
- data/scaffolding/templates/decorator_spec.erb.rb +0 -0
- data/scaffolding/templates/migration.erb +12 -0
- data/scaffolding/templates/model.erb +14 -0
- data/scaffolding/templates/repository.rb.erb +18 -0
- data/scaffolding/templates/repository_spec.rb.erb +9 -0
- data/scaffolding/templates/resource.erb +46 -0
- data/scaffolding/templates/resource_spec.rb.erb +78 -0
- data/scaffolding/templates/service.rb.erb +22 -0
- data/scaffolding/templates/service_spec.rb.erb +9 -0
- data/script/data/environments.rb +45 -0
- data/script/demonstrate-version-branches.rb +2 -2
- data/script/docker-container/test.sh +1 -1
- data/script/generate-certificates-for-webooks-certificate-spec.rb +1 -1
- data/script/insert-self-signed-certificate-from-url.rb +5 -5
- data/script/pry.rb +18 -12
- data/script/query.rb +5 -5
- data/script/reproduce-issue-can-i-deploy-ignore.rb +48 -0
- data/script/reproduce-issue-expand-currently-deployed.rb +47 -0
- data/script/reproduce-issue-starting-up.rb +12 -7
- data/script/reproduce-issue.rb +7 -2
- data/script/run-with-ssl.rb +8 -8
- data/script/seed-example-matrix.rb +11 -11
- data/script/seed-for-webhook-test.rb +22 -22
- data/script/seed-matrix.rb +20 -20
- data/script/seed.rb +25 -25
- data/script/test/approval-all.sh +6 -0
- data/script/webhook-server.ru +3 -3
- data/spec/features/base_equality_only_on_content_that_affects_verification_results_spec.rb +3 -3
- data/spec/features/can_i_deploy_spec.rb +1 -1
- data/spec/features/create_environment_spec.rb +47 -0
- data/spec/features/create_pacticipant_spec.rb +13 -7
- data/spec/features/create_tag_spec.rb +32 -0
- data/spec/features/create_version_spec.rb +40 -26
- data/spec/features/create_webhook_spec.rb +10 -10
- data/spec/features/delete_environment_spec.rb +16 -0
- data/spec/features/delete_label_spec.rb +1 -1
- data/spec/features/delete_pact_spec.rb +1 -1
- data/spec/features/delete_verification_spec.rb +3 -3
- data/spec/features/delete_version_spec.rb +1 -1
- data/spec/features/delete_webhook_spec.rb +5 -1
- data/spec/features/edit_webhook_spec.rb +8 -8
- data/spec/features/end_deployment_spec.rb +29 -0
- data/spec/features/end_support_spec.rb +67 -0
- data/spec/features/execute_unsaved_webhook_spec.rb +7 -10
- data/spec/features/execute_webhook_spec.rb +5 -5
- data/spec/features/get_can_i_deploy_badge_spec.rb +2 -2
- data/spec/features/get_currently_deployed_versions_for_environment_spec.rb +59 -0
- data/spec/features/get_currently_deployed_versions_for_version_spec.rb +27 -0
- data/spec/features/get_currently_supported_versions_for_environment_spec.rb +57 -0
- data/spec/features/get_dashboard_spec.rb +1 -1
- data/spec/features/get_deployed_versions_for_version_and_environment.rb +27 -0
- data/spec/features/get_diff_spec.rb +5 -5
- data/spec/features/get_environment_spec.rb +19 -0
- data/spec/features/get_environments_spec.rb +30 -0
- data/spec/features/get_integrations_dot_file_spec.rb +2 -2
- data/spec/features/get_integrations_spec.rb +1 -1
- data/spec/features/get_label_spec.rb +1 -1
- data/spec/features/get_latest_pact_badge_spec.rb +7 -7
- data/spec/features/get_latest_tagged_pact_badge_spec.rb +8 -8
- data/spec/features/get_latest_untagged_pact_badge_spec.rb +8 -8
- data/spec/features/get_latest_untagged_pact_spec.rb +1 -1
- data/spec/features/get_latest_verification_for_pact_spec.rb +2 -2
- data/spec/features/get_matrix_badge_spec.rb +10 -10
- data/spec/features/get_matrix_for_consumer_and_provider_spec.rb +3 -6
- data/spec/features/get_matrix_spec.rb +5 -5
- data/spec/features/get_pact_version.rb +2 -2
- data/spec/features/get_pact_versions_spec.rb +1 -1
- data/spec/features/get_previous_distinct_version.rb +5 -5
- data/spec/features/get_provider_pacts_for_verification_spec.rb +16 -5
- data/spec/features/get_released_versions_for_version_and_environment.rb +27 -0
- data/spec/features/get_tagged_pact_versions_spec.rb +1 -1
- data/spec/features/get_triggered_webhooks_for_pact_spec.rb +1 -1
- data/spec/features/get_triggered_webhooks_for_verification_spec.rb +1 -1
- data/spec/features/get_verifications_for_consumer_version_spec.rb +1 -1
- data/spec/features/get_version_spec.rb +2 -2
- data/spec/features/get_versions_spec.rb +2 -2
- data/spec/features/label_pacticipant_spec.rb +3 -3
- data/spec/features/merge_pact_spec.rb +8 -8
- data/spec/features/pending_pacts_with_tags_spec.rb +138 -0
- data/spec/features/publish_not_a_pact_spec.rb +5 -5
- data/spec/features/publish_pact_all_in_one_approval_spec.rb +72 -0
- data/spec/features/publish_pact_all_in_one_spec.rb +43 -0
- data/spec/features/publish_pact_spec.rb +41 -6
- data/spec/features/publish_verification_spec.rb +11 -11
- data/spec/features/record_deployment_spec.rb +93 -0
- data/spec/features/record_release_spec.rb +84 -0
- data/spec/features/record_undeployment_spec.rb +67 -0
- data/spec/features/tag_version_spec.rb +2 -2
- data/spec/features/update_environment_spec.rb +44 -0
- data/spec/features/update_matrix_spec.rb +5 -5
- data/spec/features/update_pacticipant_spec.rb +87 -12
- data/spec/features/update_version_spec.rb +155 -0
- data/spec/features/update_webhook_spec.rb +6 -6
- data/spec/features/wip_pacts_spec.rb +64 -43
- data/spec/fixtures/approvals/get_provider_pacts_for_verification.approved.json +57 -0
- data/spec/fixtures/approvals/modifiable_resources.approved.json +24 -3
- data/spec/fixtures/approvals/publish_contract_no_branch.approved.json +166 -0
- data/spec/fixtures/approvals/publish_contract_nothing_exists.approved.json +158 -0
- data/spec/fixtures/approvals/publish_contract_nothing_exists_with_webhook.approved.json +158 -0
- data/spec/fixtures/approvals/publish_contract_verification_already_exists.approved.json +149 -0
- data/spec/fixtures/approvals/publish_contract_with_validation_error.approved.json +42 -0
- data/spec/fixtures/approvals/publish_contracts_results_decorator.approved.json +61 -0
- data/spec/integration/app_spec.rb +41 -41
- data/spec/integration/ui/index_spec.rb +4 -4
- data/spec/integration/ui/matrix_spec.rb +3 -3
- data/spec/integration/webhooks/certificate_spec.rb +7 -7
- data/spec/lib/pact/doc/generator_spec.rb +7 -7
- data/spec/lib/pact/doc/interaction_view_model_spec.rb +16 -16
- data/spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb +9 -9
- data/spec/lib/pact/doc/markdown/index_renderer_spec.rb +3 -3
- data/spec/lib/pact_broker/api/contracts/environment_schema_spec.rb +91 -0
- data/spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb +46 -0
- data/spec/lib/pact_broker/api/contracts/publish_contracts_schema_spec.rb +114 -0
- data/spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb +6 -6
- data/spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_combinations_spec.rb +76 -0
- data/spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb +158 -4
- data/spec/lib/pact_broker/api/contracts/verifiable_pacts_query_schema_spec.rb +1 -1
- data/spec/lib/pact_broker/api/contracts/verification_contract_spec.rb +4 -4
- data/spec/lib/pact_broker/api/contracts/webhook_contract_spec.rb +26 -26
- data/spec/lib/pact_broker/api/decorators/dashboard_decorator_spec.rb +30 -30
- data/spec/lib/pact_broker/api/decorators/embedded_label_decorator_spec.rb +2 -2
- data/spec/lib/pact_broker/api/decorators/embedded_tag_decorator_spec.rb +5 -5
- data/spec/lib/pact_broker/api/decorators/embedded_version_decorator_spec.rb +3 -3
- data/spec/lib/pact_broker/api/decorators/extended_pact_decorator_spec.rb +17 -17
- data/spec/lib/pact_broker/api/decorators/integration_decorator_spec.rb +3 -3
- data/spec/lib/pact_broker/api/decorators/integrations_decorator_spec.rb +3 -3
- data/spec/lib/pact_broker/api/decorators/label_decorator_spec.rb +2 -2
- data/spec/lib/pact_broker/api/decorators/latest_pact_decorator_spec.rb +4 -4
- data/spec/lib/pact_broker/api/decorators/matrix_decorator_spec.rb +50 -25
- data/spec/lib/pact_broker/api/decorators/pact_collection_decorator_spec.rb +6 -6
- data/spec/lib/pact_broker/api/decorators/pact_decorator_spec.rb +25 -25
- data/spec/lib/pact_broker/api/decorators/pact_version_decorator_spec.rb +22 -17
- data/spec/lib/pact_broker/api/decorators/pact_webhooks_status_decorator_spec.rb +17 -14
- data/spec/lib/pact_broker/api/decorators/pacticipant_collection_decorator_spec.rb +7 -7
- data/spec/lib/pact_broker/api/decorators/pacticipant_decorator_spec.rb +63 -50
- data/spec/lib/pact_broker/api/decorators/provider_pacts_decorator_spec.rb +7 -7
- data/spec/lib/pact_broker/api/decorators/publish_contracts_results_decorator_spec.rb +53 -0
- data/spec/lib/pact_broker/api/decorators/reason_decorator_spec.rb +27 -8
- data/spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb +4 -4
- data/spec/lib/pact_broker/api/decorators/representable_pact_spec.rb +7 -7
- data/spec/lib/pact_broker/api/decorators/tag_decorator_spec.rb +4 -4
- data/spec/lib/pact_broker/api/decorators/tagged_pact_versions_decorator_spec.rb +4 -4
- data/spec/lib/pact_broker/api/decorators/triggered_webhook_decorator_spec.rb +18 -15
- data/spec/lib/pact_broker/api/decorators/triggered_webhooks_decorator_spec.rb +5 -5
- data/spec/lib/pact_broker/api/decorators/verifiable_pact_decorator_spec.rb +11 -11
- data/spec/lib/pact_broker/api/decorators/verifiable_pacts_decorator_spec.rb +3 -3
- data/spec/lib/pact_broker/api/decorators/verifiable_pacts_query_decorator_spec.rb +44 -1
- data/spec/lib/pact_broker/api/decorators/verification_decorator_spec.rb +15 -15
- data/spec/lib/pact_broker/api/decorators/verification_summary_decorator_spec.rb +9 -9
- data/spec/lib/pact_broker/api/decorators/version_decorator_spec.rb +93 -48
- data/spec/lib/pact_broker/api/decorators/versions_decorator_spec.rb +7 -7
- data/spec/lib/pact_broker/api/decorators/webhook_decorator_spec.rb +59 -59
- data/spec/lib/pact_broker/api/decorators/webhook_execution_result_decorator_spec.rb +15 -15
- data/spec/lib/pact_broker/api/decorators/webhook_request_template_decorator_spec.rb +13 -13
- data/spec/lib/pact_broker/api/decorators/webhooks_decorator_spec.rb +10 -10
- data/spec/lib/pact_broker/api/pact_broker_urls_spec.rb +36 -10
- data/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb +30 -30
- data/spec/lib/pact_broker/api/renderers/integrations_dot_renderer_spec.rb +4 -4
- data/spec/lib/pact_broker/api/resources/all_webhooks_spec.rb +32 -41
- data/spec/lib/pact_broker/api/resources/badge_spec.rb +17 -17
- data/spec/lib/pact_broker/api/resources/can_i_deploy_badge_spec.rb +6 -6
- data/spec/lib/pact_broker/api/resources/can_i_deploy_pacticipant_version_spec.rb +9 -9
- data/spec/lib/pact_broker/api/resources/can_i_deploy_spec.rb +7 -7
- data/spec/lib/pact_broker/api/resources/dashboard_spec.rb +1 -1
- data/spec/lib/pact_broker/api/resources/default_base_resource_approval_spec.rb +12 -11
- data/spec/lib/pact_broker/api/resources/default_base_resource_spec.rb +25 -24
- data/spec/lib/pact_broker/api/resources/error_response_body_generator_spec.rb +11 -11
- data/spec/lib/pact_broker/api/resources/group_spec.rb +11 -11
- data/spec/lib/pact_broker/api/resources/latest_pact_spec.rb +15 -15
- data/spec/lib/pact_broker/api/resources/latest_provider_pacts_spec.rb +6 -6
- data/spec/lib/pact_broker/api/resources/latest_verifications_for_consumer_version_spec.rb +8 -8
- data/spec/lib/pact_broker/api/resources/matrix_badge_spec.rb +1 -1
- data/spec/lib/pact_broker/api/resources/matrix_spec.rb +10 -10
- data/spec/lib/pact_broker/api/resources/pact_spec.rb +24 -24
- data/spec/lib/pact_broker/api/resources/pact_triggered_webhooks_spec.rb +4 -4
- data/spec/lib/pact_broker/api/resources/pacticipant_spec.rb +2 -5
- data/spec/lib/pact_broker/api/resources/{webhooks_spec.rb → pacticipant_webhooks_spec.rb} +19 -19
- data/spec/lib/pact_broker/api/resources/pacticipants_spec.rb +18 -22
- data/spec/lib/pact_broker/api/resources/provider_pacts_for_verification_spec.rb +17 -17
- data/spec/lib/pact_broker/api/resources/provider_pacts_spec.rb +8 -8
- data/spec/lib/pact_broker/api/resources/released_version_spec.rb +61 -0
- data/spec/lib/pact_broker/api/resources/tag_spec.rb +3 -3
- data/spec/lib/pact_broker/api/resources/tagged_pact_versions_spec.rb +7 -7
- data/spec/lib/pact_broker/api/resources/triggered_webhook_logs_spec.rb +9 -6
- data/spec/lib/pact_broker/api/resources/verification_spec.rb +76 -7
- data/spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb +4 -4
- data/spec/lib/pact_broker/api/resources/verifications_spec.rb +22 -28
- data/spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb +56 -0
- data/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb +10 -10
- data/spec/lib/pact_broker/api/resources/webhook_spec.rb +15 -15
- data/spec/lib/pact_broker/app_spec.rb +43 -43
- data/spec/lib/pact_broker/badges/service_spec.rb +6 -6
- data/spec/lib/pact_broker/build_http_options_spec.rb +5 -5
- data/spec/lib/pact_broker/certificates/service_spec.rb +7 -7
- data/spec/lib/pact_broker/config/load_spec.rb +11 -11
- data/spec/lib/pact_broker/config/save_and_load_spec.rb +2 -2
- data/spec/lib/pact_broker/config/save_spec.rb +29 -29
- data/spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb +1 -1
- data/spec/lib/pact_broker/config/space_delimited_string_list_spec.rb +1 -1
- data/spec/lib/pact_broker/configuration_spec.rb +9 -9
- data/spec/lib/pact_broker/contracts/service_spec.rb +108 -0
- data/spec/lib/pact_broker/db/clean_incremental_spec.rb +12 -11
- data/spec/lib/pact_broker/db/clean_old_spec.rb +2 -4
- data/spec/lib/pact_broker/db/clean_spec.rb +5 -7
- data/spec/lib/pact_broker/db/data_migrations/migrate_webhook_headers_spec.rb +1 -1
- data/spec/lib/pact_broker/db/data_migrations/set_consumer_ids_for_pact_publications_spec.rb +6 -6
- data/spec/lib/pact_broker/db/data_migrations/set_latest_version_sequence_value_spec.rb +8 -8
- data/spec/lib/pact_broker/db/data_migrations/set_pacticipant_main_branch_spec.rb +41 -0
- data/spec/lib/pact_broker/db/delete_overwritten_data_spec.rb +1 -1
- data/spec/lib/pact_broker/db/log_quietener_spec.rb +1 -1
- data/spec/lib/pact_broker/db/validate_encoding_spec.rb +8 -8
- data/spec/lib/pact_broker/deployments/deployed_version_spec.rb +109 -0
- data/spec/lib/pact_broker/deployments/environment_service_spec.rb +37 -0
- data/spec/lib/pact_broker/deployments/environment_spec.rb +27 -0
- data/spec/lib/pact_broker/diagnostic/resources/dependencies_spec.rb +9 -9
- data/spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb +5 -5
- data/spec/lib/pact_broker/doc/controllers/app_spec.rb +4 -4
- data/spec/lib/pact_broker/doc/coverage_spec.rb +5 -5
- data/spec/lib/pact_broker/domain/group_spec.rb +7 -7
- data/spec/lib/pact_broker/domain/index_item_spec.rb +3 -3
- data/spec/lib/pact_broker/domain/order_versions_spec.rb +26 -26
- data/spec/lib/pact_broker/domain/pact_spec.rb +3 -3
- data/spec/lib/pact_broker/domain/tag_spec.rb +1 -1
- data/spec/lib/pact_broker/domain/verification_spec.rb +3 -3
- data/spec/lib/pact_broker/domain/version_spec.rb +118 -7
- data/spec/lib/pact_broker/domain/webhook_request_spec.rb +36 -36
- data/spec/lib/pact_broker/domain/webhook_spec.rb +11 -11
- data/spec/lib/pact_broker/errors/error_logger_spec.rb +4 -4
- data/spec/lib/pact_broker/errors_spec.rb +7 -8
- data/spec/lib/pact_broker/events/subscriber_spec.rb +43 -0
- data/spec/lib/pact_broker/feature_toggle_spec.rb +9 -9
- data/spec/lib/pact_broker/groups/service_spec.rb +8 -8
- data/spec/lib/pact_broker/hash_refinements_spec.rb +1 -1
- data/spec/lib/pact_broker/index/service_spec.rb +13 -14
- data/spec/lib/pact_broker/integrations/integration_spec.rb +1 -1
- data/spec/lib/pact_broker/integrations/service_spec.rb +17 -6
- data/spec/lib/pact_broker/labels/repository_spec.rb +2 -2
- data/spec/lib/pact_broker/labels/service_spec.rb +1 -1
- data/spec/lib/pact_broker/matrix/aggregated_row_spec.rb +14 -14
- data/spec/lib/pact_broker/matrix/can_i_deploy_query_schema_spec.rb +72 -0
- data/spec/lib/pact_broker/matrix/deployment_status_summary_spec.rb +100 -20
- data/spec/lib/pact_broker/matrix/every_row_spec.rb +5 -5
- data/spec/lib/pact_broker/matrix/head_row_spec.rb +1 -1
- data/spec/lib/pact_broker/matrix/integration_environment_spec.rb +175 -0
- data/spec/lib/pact_broker/matrix/integration_ignore_spec.rb +226 -0
- data/spec/lib/pact_broker/matrix/integration_spec.rb +11 -13
- data/spec/lib/pact_broker/matrix/parse_can_i_deploy_query_spec.rb +49 -0
- data/spec/lib/pact_broker/matrix/parse_query_spec.rb +28 -6
- data/spec/lib/pact_broker/matrix/quick_row_spec.rb +7 -7
- data/spec/lib/pact_broker/matrix/repository_dependency_spec.rb +2 -2
- data/spec/lib/pact_broker/matrix/repository_query_limit_spec.rb +9 -9
- data/spec/lib/pact_broker/matrix/repository_spec.rb +44 -211
- data/spec/lib/pact_broker/matrix/row_spec.rb +7 -7
- data/spec/lib/pact_broker/matrix/service_spec.rb +83 -20
- data/spec/lib/pact_broker/messages_spec.rb +6 -6
- data/spec/lib/pact_broker/metrics/service_spec.rb +1 -1
- data/spec/lib/pact_broker/pacticipants/find_potential_duplicate_pacticipant_names_spec.rb +10 -10
- data/spec/lib/pact_broker/pacticipants/generate_display_name_spec.rb +39 -0
- data/spec/lib/pact_broker/pacticipants/repository_spec.rb +86 -15
- data/spec/lib/pact_broker/pacticipants/service_spec.rb +27 -73
- data/spec/lib/pact_broker/pacts/build_verifiable_pact_notices_spec.rb +10 -10
- data/spec/lib/pact_broker/pacts/content_spec.rb +55 -55
- data/spec/lib/pact_broker/pacts/create_formatted_diff_spec.rb +10 -10
- data/spec/lib/pact_broker/pacts/diff_spec.rb +23 -23
- data/spec/lib/pact_broker/pacts/generate_interaction_sha_spec.rb +1 -1
- data/spec/lib/pact_broker/pacts/generate_sha_spec.rb +7 -7
- data/spec/lib/pact_broker/pacts/latest_tagged_pact_publications_spec.rb +1 -1
- data/spec/lib/pact_broker/pacts/merger_spec.rb +7 -7
- data/spec/lib/pact_broker/pacts/metadata_spec.rb +3 -3
- data/spec/lib/pact_broker/pacts/pact_params_spec.rb +12 -12
- data/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb +8 -8
- data/spec/lib/pact_broker/pacts/pact_publication_selector_dataset_module_spec.rb +120 -0
- data/spec/lib/pact_broker/pacts/pact_publication_spec.rb +9 -9
- data/spec/lib/pact_broker/pacts/pact_version_spec.rb +47 -3
- data/spec/lib/pact_broker/pacts/repository_find_for_currently_deployed_spec.rb +124 -0
- data/spec/lib/pact_broker/pacts/repository_find_for_currently_supported_releases_spec.rb +159 -0
- data/spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb +1 -1
- data/spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb +19 -19
- data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb +59 -1
- data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb +81 -22
- data/spec/lib/pact_broker/pacts/repository_spec.rb +39 -39
- data/spec/lib/pact_broker/pacts/selected_pact_spec.rb +1 -1
- data/spec/lib/pact_broker/pacts/selector_spec.rb +14 -11
- data/spec/lib/pact_broker/pacts/selectors_spec.rb +3 -3
- data/spec/lib/pact_broker/pacts/service_find_for_verification_spec.rb +5 -5
- data/spec/lib/pact_broker/pacts/service_spec.rb +111 -39
- data/spec/lib/pact_broker/pacts/sort_content_spec.rb +21 -8
- data/spec/lib/pact_broker/pacts/squash_pacts_for_verification_spec.rb +3 -3
- data/spec/lib/pact_broker/pacts/verifiable_pact_messages_spec.rb +99 -35
- data/spec/lib/pact_broker/relationships/groupify_spec.rb +12 -12
- data/spec/lib/pact_broker/tags/repository_spec.rb +2 -2
- data/spec/lib/pact_broker/tags/service_spec.rb +2 -2
- data/spec/lib/pact_broker/ui/controllers/can_i_deploy_spec.rb +1 -1
- data/spec/lib/pact_broker/ui/controllers/clusters_spec.rb +3 -3
- data/spec/lib/pact_broker/ui/controllers/index_spec.rb +47 -8
- data/spec/lib/pact_broker/ui/view_models/index_item_spec.rb +9 -9
- data/spec/lib/pact_broker/ui/view_models/index_items_spec.rb +3 -3
- data/spec/lib/pact_broker/ui/view_models/matrix_deployed_version_spec.rb +29 -0
- data/spec/lib/pact_broker/verifications/pseudo_branch_status_spec.rb +5 -5
- data/spec/lib/pact_broker/verifications/repository_spec.rb +4 -4
- data/spec/lib/pact_broker/verifications/sequence_spec.rb +1 -1
- data/spec/lib/pact_broker/verifications/service_spec.rb +30 -25
- data/spec/lib/pact_broker/verifications/summary_for_consumer_version_spec.rb +6 -6
- data/spec/lib/pact_broker/versions/abbreviate_number_spec.rb +5 -5
- data/spec/lib/pact_broker/versions/parse_semantic_version_spec.rb +2 -2
- data/spec/lib/pact_broker/versions/repository_spec.rb +16 -6
- data/spec/lib/pact_broker/versions/service_spec.rb +1 -1
- data/spec/lib/pact_broker/webhooks/check_host_whitelist_spec.rb +1 -1
- data/spec/lib/pact_broker/webhooks/execution_configuration_spec.rb +1 -1
- data/spec/lib/pact_broker/webhooks/job_spec.rb +10 -10
- data/spec/lib/pact_broker/webhooks/pact_and_verification_parameters_spec.rb +16 -0
- data/spec/lib/pact_broker/webhooks/redact_logs_spec.rb +1 -1
- data/spec/lib/pact_broker/webhooks/render_spec.rb +19 -10
- data/spec/lib/pact_broker/webhooks/repository_spec.rb +203 -177
- data/spec/lib/pact_broker/webhooks/service_spec.rb +37 -243
- data/spec/lib/pact_broker/webhooks/status_spec.rb +5 -5
- data/spec/lib/pact_broker/webhooks/trigger_service_spec.rb +252 -127
- data/spec/lib/pact_broker/webhooks/triggered_webhook_spec.rb +2 -2
- data/spec/lib/pact_broker/webhooks/webhook_request_logger_spec.rb +11 -11
- data/spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb +70 -28
- data/spec/lib/pact_broker/webhooks/webhook_spec.rb +2 -5
- data/spec/lib/rack/hal_browser/redirect_spec.rb +18 -18
- data/spec/lib/rack/pact_broker/add_pact_broker_version_header_spec.rb +3 -3
- data/spec/lib/rack/pact_broker/database_transaction_spec.rb +10 -15
- data/spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb +2 -2
- data/spec/lib/rack/pact_broker/request_target_spec.rb +5 -5
- data/spec/lib/rack/pact_broker/set_base_url_spec.rb +86 -0
- data/spec/lib/rack/pact_broker/use_when_spec.rb +6 -6
- data/spec/lib/sequel/plugins/insert_ignore_spec.rb +2 -2
- data/spec/lib/sequel/plugins/upsert_spec.rb +3 -3
- data/spec/lib/webmachine/rack_adapter_monkey_patch_spec.rb +7 -8
- data/spec/migrations/23_pact_versions_spec.rb +11 -13
- data/spec/migrations/24_populate_pact_contents_spec.rb +7 -7
- data/spec/migrations/34_latest_tagged_pacts_spec.rb +23 -23
- data/spec/migrations/34_pact_revisions_spec.rb +10 -10
- data/spec/migrations/41_migrate_execution_data_spec.rb +11 -11
- data/spec/migrations/42_delete_ophan_webhook_data_spec.rb +17 -17
- data/spec/migrations/44_add_provider_version_to_verification_spec.rb +9 -9
- data/spec/migrations/50_create_latest_matrix_spec.rb +15 -15
- data/spec/migrations/change_migration_strategy_spec.rb +21 -21
- data/spec/migrations/rollback_spec.rb +2 -0
- data/spec/service_consumers/hal_relation_proxy_app.rb +30 -7
- data/spec/service_consumers/pact_helper.rb +24 -11
- data/spec/service_consumers/provider_states_for_pact_broker_client.rb +101 -18
- data/spec/service_consumers/provider_states_for_pact_broker_client_2.rb +36 -0
- data/spec/service_consumers/provider_states_for_pact_ruby.rb +64 -64
- data/spec/spec_helper.rb +13 -25
- data/spec/support/approvals.rb +9 -7
- data/spec/support/database.rb +8 -4
- data/spec/support/database_cleaner.rb +2 -2
- data/spec/support/fixture_helpers.rb +1 -1
- data/spec/support/logging.rb +2 -2
- data/spec/support/metadata_test_server.rb +7 -7
- data/spec/support/migration_helpers.rb +1 -1
- data/spec/support/rack_helpers.rb +20 -0
- data/spec/support/rspec_matchers.rb +1 -1
- data/spec/support/shared_context.rb +1 -1
- data/spec/support/shared_examples_for_responses.rb +15 -4
- data/spec/support/simplecov.rb +20 -7
- data/spec/support/ssl_pact_broker_server.rb +8 -8
- data/spec/support/ssl_webhook_server.rb +8 -8
- data/spec/support/test_data_builder.rb +1 -1
- data/spec/support/verification_job.rb +8 -8
- data/spec/support/webhook_endpoint_middleware.rb +4 -4
- data/tasks/audit.rake +1 -1
- data/tasks/database.rb +23 -23
- data/tasks/database/annotate.rb +2 -2
- data/tasks/database/table_dependency_calculator.rb +1 -1
- data/tasks/db.rake +34 -39
- data/tasks/development.rake +38 -6
- data/tasks/docker_database.rb +9 -9
- data/tasks/pact.rake +5 -5
- data/tasks/release.rake +2 -2
- data/tasks/rspec.rake +16 -16
- data/tasks/test_db.rake +11 -11
- data/vendor/hal-browser/styles.css +6 -0
- metadata +209 -21
- data/.travis.yml +0 -31
- data/lib/pact_broker/domain/webhook_request_header.rb +0 -13
- data/lib/webmachine/rack_adapter_monkey_patch.rb +0 -38
- data/spec/lib/pact_broker/domain/pacticipant_spec.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46291e7e974e823aee921175212537b972fea3789b7355526a0258903d6cc31c
|
4
|
+
data.tar.gz: fdf706a490c487fa1a7f442864bca233d3c8488cdd688575dcfca0932014c61e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fefcf924101d8e979e0ed1ccb96c7d771cb823e4f7c4d0ac527981414323a6bcddfa9b9cec68086e39da1ab261596e86c0ae808efe21aa621d1364b78be5cd0
|
7
|
+
data.tar.gz: 32c2af6c35ccba62a58273bc8b3f6882969f02ef23d7ada3b0e74054f8b0cdbc284837b96c9f01be6b954bcc1cd4300e0e88c13cc0886fdc88993d6cf865077e
|
data/.github/workflows/test.yml
CHANGED
@@ -16,16 +16,8 @@ jobs:
|
|
16
16
|
with:
|
17
17
|
ruby-version: ${{ matrix.ruby_version }}
|
18
18
|
- run: "bundle install"
|
19
|
-
- name: "Install CodeClimate Test Reporter"
|
20
|
-
run: |
|
21
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
22
|
-
chmod +x ./cc-test-reporter
|
23
19
|
- name: Tests
|
24
|
-
run: bundle exec rake
|
25
|
-
- name: Report test coverage
|
26
|
-
run: ./cc-test-reporter after-build --exit-code 0 || true
|
27
|
-
env:
|
28
|
-
CC_TEST_REPORTER_ID: dc2c30b67c9e2a5309e1aef699c30fdab55ba4f0e4f1beac029ba93e293835db
|
20
|
+
run: "bundle exec rake ci"
|
29
21
|
postgres:
|
30
22
|
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
31
23
|
runs-on: "ubuntu-latest"
|
@@ -50,10 +42,10 @@ jobs:
|
|
50
42
|
- uses: ruby/setup-ruby@v1
|
51
43
|
with:
|
52
44
|
ruby-version: ${{ matrix.ruby_version }}
|
53
|
-
- run: "
|
45
|
+
- run: "bundle install"
|
54
46
|
env:
|
55
47
|
INSTALL_PG: "true"
|
56
|
-
- run: "bundle exec rake"
|
48
|
+
- run: "bundle exec rake ci"
|
57
49
|
env:
|
58
50
|
DATABASE_ADAPTER: github_actions_postgres
|
59
51
|
INSTALL_PG: "true"
|
@@ -67,3 +59,37 @@ jobs:
|
|
67
59
|
steps:
|
68
60
|
- uses: actions/checkout@v2
|
69
61
|
- run: script/test/run-rake-on-docker-compose-mysql.sh
|
62
|
+
rubocop:
|
63
|
+
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
64
|
+
runs-on: "ubuntu-latest"
|
65
|
+
steps:
|
66
|
+
- uses: actions/checkout@v2
|
67
|
+
- uses: ruby/setup-ruby@v1
|
68
|
+
with:
|
69
|
+
ruby-version: "2.7"
|
70
|
+
- run: "bundle install"
|
71
|
+
- run: "bundle exec rubocop"
|
72
|
+
pact-verify:
|
73
|
+
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
74
|
+
runs-on: "ubuntu-latest"
|
75
|
+
steps:
|
76
|
+
- uses: actions/checkout@v2
|
77
|
+
- uses: ruby/setup-ruby@v1
|
78
|
+
with:
|
79
|
+
ruby-version: "2.7"
|
80
|
+
- run: "bundle install"
|
81
|
+
- name: Verify pacts
|
82
|
+
run: "GIT_SHA=${GITHUB_SHA} GIT_BRANCH=${GITHUB_REF##*/} bundle exec rake pact:verify"
|
83
|
+
env:
|
84
|
+
PACTFLOW_PACT_OSS_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }}
|
85
|
+
bundle-audit:
|
86
|
+
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
87
|
+
runs-on: "ubuntu-latest"
|
88
|
+
steps:
|
89
|
+
- uses: actions/checkout@v2
|
90
|
+
- uses: ruby/setup-ruby@v1
|
91
|
+
with:
|
92
|
+
ruby-version: "2.7"
|
93
|
+
- run: "bundle install"
|
94
|
+
- name: Audit
|
95
|
+
run: "bundle exec rake bundle:audit"
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
|
1
4
|
AllCops:
|
2
5
|
DisabledByDefault: true
|
3
6
|
|
4
|
-
#################### Lint ################################
|
5
|
-
|
6
7
|
Lint/AmbiguousOperator:
|
7
8
|
Description: >-
|
8
9
|
Checks for ambiguous operators in the first argument of a
|
@@ -16,12 +17,18 @@ Lint/AmbiguousRegexpLiteral:
|
|
16
17
|
a method invocation without parenthesis.
|
17
18
|
Enabled: true
|
18
19
|
|
20
|
+
Layout/IndentationWidth:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Lint/Syntax:
|
24
|
+
Enabled: true
|
25
|
+
|
19
26
|
Lint/AssignmentInCondition:
|
20
27
|
Description: "Don't use assignment in conditions."
|
21
28
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
22
29
|
Enabled: true
|
23
30
|
|
24
|
-
|
31
|
+
Layout/BlockAlignment:
|
25
32
|
Description: 'Align block ends correctly.'
|
26
33
|
Enabled: true
|
27
34
|
|
@@ -29,7 +36,7 @@ Lint/CircularArgumentReference:
|
|
29
36
|
Description: "Don't refer to the keyword argument in the default value."
|
30
37
|
Enabled: true
|
31
38
|
|
32
|
-
|
39
|
+
Layout/ConditionPosition:
|
33
40
|
Description: >-
|
34
41
|
Checks for condition placed in a confusing position relative to
|
35
42
|
the keyword.
|
@@ -40,7 +47,7 @@ Lint/Debugger:
|
|
40
47
|
Description: 'Check for debugger calls.'
|
41
48
|
Enabled: true
|
42
49
|
|
43
|
-
|
50
|
+
Layout/DefEndAlignment:
|
44
51
|
Description: 'Align ends corresponding to defs correctly.'
|
45
52
|
Enabled: true
|
46
53
|
|
@@ -68,20 +75,16 @@ Lint/EmptyInterpolation:
|
|
68
75
|
Description: 'Checks for empty string interpolation.'
|
69
76
|
Enabled: true
|
70
77
|
|
71
|
-
|
78
|
+
Layout/EndAlignment:
|
72
79
|
Description: 'Align ends correctly.'
|
73
80
|
Enabled: true
|
74
81
|
|
75
|
-
Lint/EndInMethod:
|
76
|
-
Description: 'END blocks should not be placed inside method definitions.'
|
77
|
-
Enabled: true
|
78
|
-
|
79
82
|
Lint/EnsureReturn:
|
80
83
|
Description: 'Do not use return in an ensure block.'
|
81
84
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
82
85
|
Enabled: true
|
83
86
|
|
84
|
-
|
87
|
+
Security/Eval:
|
85
88
|
Description: 'The use of eval represents a serious security risk.'
|
86
89
|
Enabled: true
|
87
90
|
|
@@ -89,18 +92,12 @@ Lint/FormatParameterMismatch:
|
|
89
92
|
Description: 'The number of parameters to format/sprint must match the fields.'
|
90
93
|
Enabled: true
|
91
94
|
|
92
|
-
Lint/
|
95
|
+
Lint/SuppressedException:
|
93
96
|
Description: "Don't suppress exception."
|
94
97
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
95
98
|
Enabled: true
|
96
99
|
|
97
|
-
Lint/
|
98
|
-
Description: >-
|
99
|
-
Checks for invalid character literals with a non-escaped
|
100
|
-
whitespace character.
|
101
|
-
Enabled: true
|
102
|
-
|
103
|
-
Lint/LiteralInCondition:
|
100
|
+
Lint/LiteralAsCondition:
|
104
101
|
Description: 'Checks of literals used in conditions.'
|
105
102
|
Enabled: true
|
106
103
|
|
@@ -148,7 +145,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
148
145
|
for block arguments or block local variables.
|
149
146
|
Enabled: true
|
150
147
|
|
151
|
-
Lint/
|
148
|
+
Lint/RedundantStringCoercion:
|
152
149
|
Description: 'Checks for Object#to_s usage in string interpolation.'
|
153
150
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
154
151
|
Enabled: true
|
@@ -157,7 +154,7 @@ Lint/UnderscorePrefixedVariableName:
|
|
157
154
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
158
155
|
Enabled: true
|
159
156
|
|
160
|
-
Lint/
|
157
|
+
Lint/RedundantCopDisableDirective:
|
161
158
|
Description: >-
|
162
159
|
Checks for rubocop:disable comments that can be removed.
|
163
160
|
Note: this cop is not disabled when disabling all cops.
|
@@ -187,7 +184,7 @@ Lint/UselessAssignment:
|
|
187
184
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
188
185
|
Enabled: true
|
189
186
|
|
190
|
-
Lint/
|
187
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
191
188
|
Description: 'Checks for comparison of something with itself.'
|
192
189
|
Enabled: true
|
193
190
|
|
@@ -205,14 +202,6 @@ Lint/Void:
|
|
205
202
|
|
206
203
|
###################### Metrics ####################################
|
207
204
|
|
208
|
-
Metrics/AbcSize:
|
209
|
-
Description: >-
|
210
|
-
A calculated magnitude based on number of assignments,
|
211
|
-
branches, and conditions.
|
212
|
-
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
213
|
-
Enabled: false
|
214
|
-
Max: 20
|
215
|
-
|
216
205
|
Metrics/BlockNesting:
|
217
206
|
Description: 'Avoid excessive block nesting'
|
218
207
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
@@ -223,39 +212,39 @@ Metrics/ClassLength:
|
|
223
212
|
Description: 'Avoid classes longer than 250 lines of code.'
|
224
213
|
Enabled: true
|
225
214
|
Max: 250
|
215
|
+
Exclude:
|
216
|
+
- lib/pact_broker/test/*.rb
|
226
217
|
|
227
218
|
Metrics/CyclomaticComplexity:
|
228
219
|
Description: >-
|
229
220
|
A complexity metric that is strongly correlated to the number
|
230
221
|
of test cases needed to validate a method.
|
231
222
|
Enabled: true
|
232
|
-
|
233
|
-
|
234
|
-
Description: 'Limit lines to 80 characters.'
|
235
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
236
|
-
Enabled: false
|
223
|
+
Exclude:
|
224
|
+
- ./lib/pact_broker/ui/app.rb
|
237
225
|
|
238
226
|
Metrics/MethodLength:
|
239
227
|
Description: 'Avoid methods longer than 30 lines of code.'
|
240
228
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
241
229
|
Enabled: true
|
242
230
|
Max: 30
|
231
|
+
Exclude:
|
232
|
+
- ./lib/pact_broker/ui/app.rb
|
243
233
|
|
244
234
|
Metrics/ModuleLength:
|
245
235
|
Description: 'Avoid modules longer than 250 lines of code.'
|
246
236
|
Enabled: true
|
247
237
|
Max: 250
|
238
|
+
Exclude:
|
239
|
+
- spec/**/*.rb
|
240
|
+
- lib/pact_broker/api/pact_broker_urls.rb
|
248
241
|
|
249
242
|
Metrics/ParameterLists:
|
250
243
|
Description: 'Avoid parameter lists longer than three or four parameters.'
|
251
244
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
252
245
|
Enabled: true
|
253
|
-
|
254
|
-
|
255
|
-
Description: >-
|
256
|
-
A complexity metric geared towards measuring complexity for a
|
257
|
-
human reader.
|
258
|
-
Enabled: false
|
246
|
+
Exclude:
|
247
|
+
- lib/pact_broker/test/*.rb
|
259
248
|
|
260
249
|
##################### Performance #############################
|
261
250
|
|
@@ -291,13 +280,18 @@ Performance/ReverseEach:
|
|
291
280
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
292
281
|
Enabled: true
|
293
282
|
|
294
|
-
|
283
|
+
Style/Sample:
|
295
284
|
Description: >-
|
296
285
|
Use `sample` instead of `shuffle.first`,
|
297
286
|
`shuffle.last`, and `shuffle[Fixnum]`.
|
298
287
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
299
288
|
Enabled: true
|
300
289
|
|
290
|
+
Style/StringLiterals:
|
291
|
+
Description: Checks if uses of quotes match the configured preference.
|
292
|
+
Enabled: true
|
293
|
+
EnforcedStyle: double_quotes
|
294
|
+
|
301
295
|
Performance/Size:
|
302
296
|
Description: >-
|
303
297
|
Use `size` instead of `count` for counting
|
@@ -313,844 +307,8 @@ Performance/StringReplacement:
|
|
313
307
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
314
308
|
Enabled: true
|
315
309
|
|
316
|
-
|
317
|
-
|
318
|
-
Rails/ActionFilter:
|
319
|
-
Description: 'Enforces consistent use of action filter methods.'
|
320
|
-
Enabled: false
|
321
|
-
|
322
|
-
Rails/Date:
|
323
|
-
Description: >-
|
324
|
-
Checks the correct usage of date aware methods,
|
325
|
-
such as Date.today, Date.current etc.
|
326
|
-
Enabled: false
|
327
|
-
|
328
|
-
Rails/Delegate:
|
329
|
-
Description: 'Prefer delegate method for delegations.'
|
330
|
-
Enabled: false
|
331
|
-
|
332
|
-
Rails/FindBy:
|
333
|
-
Description: 'Prefer find_by over where.first.'
|
334
|
-
Enabled: false
|
335
|
-
|
336
|
-
Rails/FindEach:
|
337
|
-
Description: 'Prefer all.find_each over all.find.'
|
338
|
-
Enabled: false
|
339
|
-
|
340
|
-
Rails/HasAndBelongsToMany:
|
341
|
-
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
342
|
-
Enabled: false
|
343
|
-
|
344
|
-
Rails/Output:
|
345
|
-
Description: 'Checks for calls to puts, print, etc.'
|
346
|
-
Enabled: false
|
347
|
-
|
348
|
-
Rails/ReadWriteAttribute:
|
349
|
-
Description: >-
|
350
|
-
Checks for read_attribute(:attr) and
|
351
|
-
write_attribute(:attr, val).
|
352
|
-
Enabled: false
|
353
|
-
|
354
|
-
Rails/ScopeArgs:
|
355
|
-
Description: 'Checks the arguments of ActiveRecord scopes.'
|
356
|
-
Enabled: false
|
357
|
-
|
358
|
-
Rails/TimeZone:
|
359
|
-
Description: 'Checks the correct usage of time zone aware methods.'
|
360
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
361
|
-
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
362
|
-
Enabled: false
|
363
|
-
|
364
|
-
Rails/Validation:
|
365
|
-
Description: 'Use validates :attribute, hash of validations.'
|
366
|
-
Enabled: false
|
367
|
-
|
368
|
-
################## Style #################################
|
369
|
-
|
370
|
-
Style/AccessModifierIndentation:
|
371
|
-
Description: Check indentation of private/protected visibility modifiers.
|
372
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
|
373
|
-
Enabled: false
|
374
|
-
|
375
|
-
Style/AccessorMethodName:
|
376
|
-
Description: Check the naming of accessor methods for get_/set_.
|
377
|
-
Enabled: false
|
378
|
-
|
379
|
-
Style/Alias:
|
380
|
-
Description: 'Use alias_method instead of alias.'
|
381
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
382
|
-
Enabled: false
|
383
|
-
|
384
|
-
Style/AlignArray:
|
385
|
-
Description: >-
|
386
|
-
Align the elements of an array literal if they span more than
|
387
|
-
one line.
|
388
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
|
389
|
-
Enabled: false
|
390
|
-
|
391
|
-
Style/AlignHash:
|
392
|
-
Description: >-
|
393
|
-
Align the elements of a hash literal if they span more than
|
394
|
-
one line.
|
395
|
-
Enabled: false
|
396
|
-
|
397
|
-
Style/AlignParameters:
|
398
|
-
Description: >-
|
399
|
-
Align the parameters of a method call if they span more
|
400
|
-
than one line.
|
401
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
402
|
-
Enabled: false
|
403
|
-
|
404
|
-
Style/AndOr:
|
405
|
-
Description: 'Use &&/|| instead of and/or.'
|
406
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
|
407
|
-
Enabled: false
|
408
|
-
|
409
|
-
Style/ArrayJoin:
|
410
|
-
Description: 'Use Array#join instead of Array#*.'
|
411
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
412
|
-
Enabled: false
|
413
|
-
|
414
|
-
Style/AsciiComments:
|
415
|
-
Description: 'Use only ascii symbols in comments.'
|
416
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
417
|
-
Enabled: false
|
418
|
-
|
419
|
-
Style/AsciiIdentifiers:
|
420
|
-
Description: 'Use only ascii symbols in identifiers.'
|
421
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
422
|
-
Enabled: false
|
423
|
-
|
424
|
-
Style/Attr:
|
425
|
-
Description: 'Checks for uses of Module#attr.'
|
426
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
427
|
-
Enabled: false
|
428
|
-
|
429
|
-
Style/BeginBlock:
|
430
|
-
Description: 'Avoid the use of BEGIN blocks.'
|
431
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
|
432
|
-
Enabled: false
|
433
|
-
|
434
|
-
Style/BarePercentLiterals:
|
435
|
-
Description: 'Checks if usage of %() or %Q() matches configuration.'
|
436
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
|
437
|
-
Enabled: false
|
438
|
-
|
439
|
-
Style/BlockComments:
|
440
|
-
Description: 'Do not use block comments.'
|
441
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
|
442
|
-
Enabled: false
|
443
|
-
|
444
|
-
Style/BlockEndNewline:
|
445
|
-
Description: 'Put end statement of multiline block on its own line.'
|
446
|
-
Enabled: false
|
447
|
-
|
448
|
-
Style/BlockDelimiters:
|
449
|
-
Description: >-
|
450
|
-
Avoid using {...} for multi-line blocks (multiline chaining is
|
451
|
-
always ugly).
|
452
|
-
Prefer {...} over do...end for single-line blocks.
|
453
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
454
|
-
Enabled: false
|
455
|
-
|
456
|
-
Style/BracesAroundHashParameters:
|
457
|
-
Description: 'Enforce braces style around hash parameters.'
|
458
|
-
Enabled: false
|
459
|
-
|
460
|
-
Style/CaseEquality:
|
461
|
-
Description: 'Avoid explicit use of the case equality operator(===).'
|
462
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
463
|
-
Enabled: false
|
464
|
-
|
465
|
-
Style/CaseIndentation:
|
466
|
-
Description: 'Indentation of when in a case/when/[else/]end.'
|
467
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
|
468
|
-
Enabled: false
|
469
|
-
|
470
|
-
Style/CharacterLiteral:
|
471
|
-
Description: 'Checks for uses of character literals.'
|
472
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
473
|
-
Enabled: false
|
474
|
-
|
475
|
-
Style/ClassAndModuleCamelCase:
|
476
|
-
Description: 'Use CamelCase for classes and modules.'
|
477
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
|
478
|
-
Enabled: false
|
479
|
-
|
480
|
-
Style/ClassAndModuleChildren:
|
481
|
-
Description: 'Checks style of children classes and modules.'
|
482
|
-
Enabled: false
|
483
|
-
|
484
|
-
Style/ClassCheck:
|
485
|
-
Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
|
486
|
-
Enabled: false
|
487
|
-
|
488
|
-
Style/ClassMethods:
|
489
|
-
Description: 'Use self when defining module/class methods.'
|
490
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
|
491
|
-
Enabled: false
|
492
|
-
|
493
|
-
Style/ClassVars:
|
494
|
-
Description: 'Avoid the use of class variables.'
|
495
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
496
|
-
Enabled: false
|
497
|
-
|
498
|
-
Style/ClosingParenthesisIndentation:
|
499
|
-
Description: 'Checks the indentation of hanging closing parentheses.'
|
500
|
-
Enabled: false
|
501
|
-
|
502
|
-
Style/ColonMethodCall:
|
503
|
-
Description: 'Do not use :: for method call.'
|
504
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
505
|
-
Enabled: false
|
506
|
-
|
507
|
-
Style/CommandLiteral:
|
508
|
-
Description: 'Use `` or %x around command literals.'
|
509
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
|
510
|
-
Enabled: false
|
511
|
-
|
512
|
-
Style/CommentAnnotation:
|
513
|
-
Description: 'Checks formatting of annotation comments.'
|
514
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
515
|
-
Enabled: false
|
516
|
-
|
517
|
-
Style/CommentIndentation:
|
518
|
-
Description: 'Indentation of comments.'
|
519
|
-
Enabled: false
|
520
|
-
|
521
|
-
Style/ConstantName:
|
522
|
-
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
523
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
|
524
|
-
Enabled: false
|
525
|
-
|
526
|
-
Style/DefWithParentheses:
|
527
|
-
Description: 'Use def with parentheses when there are arguments.'
|
528
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
529
|
-
Enabled: false
|
530
|
-
|
531
|
-
Style/PreferredHashMethods:
|
532
|
-
Description: 'Checks for use of deprecated Hash methods.'
|
533
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
534
|
-
Enabled: false
|
535
|
-
|
536
|
-
Style/Documentation:
|
537
|
-
Description: 'Document classes and non-namespace modules.'
|
538
|
-
Enabled: false
|
539
|
-
|
540
|
-
Style/DotPosition:
|
541
|
-
Description: 'Checks the position of the dot in multi-line method calls.'
|
542
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
543
|
-
Enabled: false
|
544
|
-
|
545
|
-
Style/DoubleNegation:
|
546
|
-
Description: 'Checks for uses of double negation (!!).'
|
547
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
548
|
-
Enabled: false
|
549
|
-
|
550
|
-
Style/EachWithObject:
|
551
|
-
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
552
|
-
Enabled: false
|
553
|
-
|
554
|
-
Style/ElseAlignment:
|
555
|
-
Description: 'Align elses and elsifs correctly.'
|
556
|
-
Enabled: false
|
557
|
-
|
558
|
-
Style/EmptyElse:
|
559
|
-
Description: 'Avoid empty else-clauses.'
|
560
|
-
Enabled: false
|
561
|
-
|
562
|
-
Style/EmptyLineBetweenDefs:
|
563
|
-
Description: 'Use empty lines between defs.'
|
564
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
565
|
-
Enabled: false
|
566
|
-
|
567
|
-
Style/EmptyLines:
|
568
|
-
Description: "Don't use several empty lines in a row."
|
569
|
-
Enabled: false
|
570
|
-
|
571
|
-
Style/EmptyLinesAroundAccessModifier:
|
572
|
-
Description: "Keep blank lines around access modifiers."
|
573
|
-
Enabled: false
|
574
|
-
|
575
|
-
Style/EmptyLinesAroundBlockBody:
|
576
|
-
Description: "Keeps track of empty lines around block bodies."
|
577
|
-
Enabled: false
|
578
|
-
|
579
|
-
Style/EmptyLinesAroundClassBody:
|
580
|
-
Description: "Keeps track of empty lines around class bodies."
|
581
|
-
Enabled: false
|
582
|
-
|
583
|
-
Style/EmptyLinesAroundModuleBody:
|
584
|
-
Description: "Keeps track of empty lines around module bodies."
|
585
|
-
Enabled: false
|
586
|
-
|
587
|
-
Style/EmptyLinesAroundMethodBody:
|
588
|
-
Description: "Keeps track of empty lines around method bodies."
|
589
|
-
Enabled: false
|
590
|
-
|
591
|
-
Style/EmptyLiteral:
|
592
|
-
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
593
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
594
|
-
Enabled: false
|
595
|
-
|
596
|
-
Style/EndBlock:
|
597
|
-
Description: 'Avoid the use of END blocks.'
|
598
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
|
599
|
-
Enabled: false
|
600
|
-
|
601
|
-
Style/EndOfLine:
|
602
|
-
Description: 'Use Unix-style line endings.'
|
603
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
604
|
-
Enabled: false
|
605
|
-
|
606
|
-
Style/EvenOdd:
|
607
|
-
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
608
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
609
|
-
Enabled: false
|
610
|
-
|
611
|
-
Style/ExtraSpacing:
|
612
|
-
Description: 'Do not use unnecessary spacing.'
|
613
|
-
Enabled: false
|
614
|
-
|
615
|
-
Style/FileName:
|
616
|
-
Description: 'Use snake_case for source file names.'
|
617
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
618
|
-
Enabled: false
|
619
|
-
|
620
|
-
Style/InitialIndentation:
|
621
|
-
Description: >-
|
622
|
-
Checks the indentation of the first non-blank non-comment line in a file.
|
623
|
-
Enabled: false
|
624
|
-
|
625
|
-
Style/FirstParameterIndentation:
|
626
|
-
Description: 'Checks the indentation of the first parameter in a method call.'
|
627
|
-
Enabled: false
|
628
|
-
|
629
|
-
Style/FlipFlop:
|
630
|
-
Description: 'Checks for flip flops'
|
631
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
632
|
-
Enabled: false
|
633
|
-
|
634
|
-
Style/For:
|
635
|
-
Description: 'Checks use of for or each in multiline loops.'
|
636
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
|
637
|
-
Enabled: false
|
638
|
-
|
639
|
-
Style/FormatString:
|
640
|
-
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
641
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
642
|
-
Enabled: false
|
643
|
-
|
644
|
-
Style/GlobalVars:
|
645
|
-
Description: 'Do not introduce global variables.'
|
646
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
647
|
-
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
648
|
-
Enabled: false
|
649
|
-
|
650
|
-
Style/GuardClause:
|
651
|
-
Description: 'Check for conditionals that can be replaced with guard clauses'
|
652
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
653
|
-
Enabled: false
|
654
|
-
|
655
|
-
Style/HashSyntax:
|
656
|
-
Description: >-
|
657
|
-
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
658
|
-
{ :a => 1, :b => 2 }.
|
659
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
660
|
-
Enabled: false
|
661
|
-
|
662
|
-
Style/IfUnlessModifier:
|
663
|
-
Description: >-
|
664
|
-
Favor modifier if/unless usage when you have a
|
665
|
-
single-line body.
|
666
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
667
|
-
Enabled: false
|
668
|
-
|
669
|
-
Style/IfWithSemicolon:
|
670
|
-
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
671
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
672
|
-
Enabled: false
|
673
|
-
|
674
|
-
Style/IndentationConsistency:
|
675
|
-
Description: 'Keep indentation straight.'
|
676
|
-
Enabled: false
|
677
|
-
|
678
|
-
Style/IndentationWidth:
|
679
|
-
Description: 'Use 2 spaces for indentation.'
|
680
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
681
|
-
Enabled: false
|
682
|
-
|
683
|
-
Style/IndentArray:
|
684
|
-
Description: >-
|
685
|
-
Checks the indentation of the first element in an array
|
686
|
-
literal.
|
687
|
-
Enabled: false
|
688
|
-
|
689
|
-
Style/IndentHash:
|
690
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
691
|
-
Enabled: false
|
692
|
-
|
693
|
-
Style/InfiniteLoop:
|
694
|
-
Description: 'Use Kernel#loop for infinite loops.'
|
695
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
|
696
|
-
Enabled: false
|
697
|
-
|
698
|
-
Style/Lambda:
|
699
|
-
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
700
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
701
|
-
Enabled: false
|
702
|
-
|
703
|
-
Style/LambdaCall:
|
704
|
-
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
705
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
706
|
-
Enabled: false
|
707
|
-
|
708
|
-
Style/LeadingCommentSpace:
|
709
|
-
Description: 'Comments should start with a space.'
|
710
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
711
|
-
Enabled: false
|
712
|
-
|
713
|
-
Style/LineEndConcatenation:
|
714
|
-
Description: >-
|
715
|
-
Use \ instead of + or << to concatenate two string literals at
|
716
|
-
line end.
|
717
|
-
Enabled: false
|
718
|
-
|
719
|
-
Style/MethodCallParentheses:
|
720
|
-
Description: 'Do not use parentheses for method calls with no arguments.'
|
721
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
722
|
-
Enabled: false
|
723
|
-
|
724
|
-
Style/MethodDefParentheses:
|
725
|
-
Description: >-
|
726
|
-
Checks if the method definitions have or don't have
|
727
|
-
parentheses.
|
728
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
729
|
-
Enabled: false
|
730
|
-
|
731
|
-
Style/MethodName:
|
732
|
-
Description: 'Use the configured style when naming methods.'
|
733
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
734
|
-
Enabled: false
|
735
|
-
|
736
|
-
Style/ModuleFunction:
|
737
|
-
Description: 'Checks for usage of `extend self` in modules.'
|
738
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
739
|
-
Enabled: false
|
740
|
-
|
741
|
-
Style/MultilineBlockChain:
|
742
|
-
Description: 'Avoid multi-line chains of blocks.'
|
743
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
744
|
-
Enabled: false
|
745
|
-
|
746
|
-
Style/MultilineBlockLayout:
|
747
|
-
Description: 'Ensures newlines after multiline block do statements.'
|
748
|
-
Enabled: false
|
749
|
-
|
750
|
-
Style/MultilineIfThen:
|
751
|
-
Description: 'Do not use then for multi-line if/unless.'
|
752
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
|
753
|
-
Enabled: false
|
754
|
-
|
755
|
-
Style/MultilineOperationIndentation:
|
756
|
-
Description: >-
|
757
|
-
Checks indentation of binary operations that span more than
|
758
|
-
one line.
|
759
|
-
Enabled: false
|
760
|
-
|
761
|
-
Style/MultilineTernaryOperator:
|
762
|
-
Description: >-
|
763
|
-
Avoid multi-line ?: (the ternary operator);
|
764
|
-
use if/unless instead.
|
765
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
766
|
-
Enabled: false
|
767
|
-
|
768
|
-
Style/NegatedIf:
|
769
|
-
Description: >-
|
770
|
-
Favor unless over if for negative conditions
|
771
|
-
(or control flow or).
|
772
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
773
|
-
Enabled: false
|
774
|
-
|
775
|
-
Style/NegatedWhile:
|
776
|
-
Description: 'Favor until over while for negative conditions.'
|
777
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
778
|
-
Enabled: false
|
779
|
-
|
780
|
-
Style/NestedTernaryOperator:
|
781
|
-
Description: 'Use one expression per branch in a ternary operator.'
|
782
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
783
|
-
Enabled: false
|
784
|
-
|
785
|
-
Style/Next:
|
786
|
-
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
787
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
788
|
-
Enabled: false
|
789
|
-
|
790
|
-
Style/NilComparison:
|
791
|
-
Description: 'Prefer x.nil? to x == nil.'
|
792
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
793
|
-
Enabled: false
|
794
|
-
|
795
|
-
Style/NonNilCheck:
|
796
|
-
Description: 'Checks for redundant nil checks.'
|
797
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
|
798
|
-
Enabled: false
|
799
|
-
|
800
|
-
Style/Not:
|
801
|
-
Description: 'Use ! instead of not.'
|
802
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
803
|
-
Enabled: false
|
804
|
-
|
805
|
-
Style/NumericLiterals:
|
806
|
-
Description: >-
|
807
|
-
Add underscores to large numeric literals to improve their
|
808
|
-
readability.
|
809
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
810
|
-
Enabled: false
|
811
|
-
|
812
|
-
Style/OneLineConditional:
|
813
|
-
Description: >-
|
814
|
-
Favor the ternary operator(?:) over
|
815
|
-
if/then/else/end constructs.
|
816
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
817
|
-
Enabled: false
|
818
|
-
|
819
|
-
Style/OpMethod:
|
820
|
-
Description: 'When defining binary operators, name the argument other.'
|
821
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
822
|
-
Enabled: false
|
823
|
-
|
824
|
-
Style/OptionalArguments:
|
825
|
-
Description: >-
|
826
|
-
Checks for optional arguments that do not appear at the end
|
827
|
-
of the argument list
|
828
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
|
829
|
-
Enabled: false
|
830
|
-
|
831
|
-
Style/ParallelAssignment:
|
832
|
-
Description: >-
|
833
|
-
Check for simple usages of parallel assignment.
|
834
|
-
It will only warn when the number of variables
|
835
|
-
matches on both sides of the assignment.
|
836
|
-
This also provides performance benefits
|
837
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
|
838
|
-
Enabled: false
|
839
|
-
|
840
|
-
Style/ParenthesesAroundCondition:
|
841
|
-
Description: >-
|
842
|
-
Don't use parentheses around the condition of an
|
843
|
-
if/unless/while.
|
844
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
|
845
|
-
Enabled: false
|
846
|
-
|
847
|
-
Style/PercentLiteralDelimiters:
|
848
|
-
Description: 'Use `%`-literal delimiters consistently'
|
849
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
850
|
-
Enabled: false
|
851
|
-
|
852
|
-
Style/PercentQLiterals:
|
853
|
-
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
854
|
-
Enabled: false
|
855
|
-
|
856
|
-
Style/PerlBackrefs:
|
857
|
-
Description: 'Avoid Perl-style regex back references.'
|
858
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
859
|
-
Enabled: false
|
860
|
-
|
861
|
-
Style/PredicateName:
|
862
|
-
Description: 'Check the names of predicate methods.'
|
863
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
864
|
-
Enabled: false
|
865
|
-
|
866
|
-
Style/Proc:
|
867
|
-
Description: 'Use proc instead of Proc.new.'
|
868
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
869
|
-
Enabled: false
|
870
|
-
|
871
|
-
Style/RaiseArgs:
|
872
|
-
Description: 'Checks the arguments passed to raise/fail.'
|
873
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
874
|
-
Enabled: false
|
875
|
-
|
876
|
-
Style/RedundantBegin:
|
877
|
-
Description: "Don't use begin blocks when they are not needed."
|
878
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
|
879
|
-
Enabled: false
|
880
|
-
|
881
|
-
Style/RedundantException:
|
882
|
-
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
883
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
|
884
|
-
Enabled: false
|
885
|
-
|
886
|
-
Style/RedundantReturn:
|
887
|
-
Description: "Don't use return where it's not required."
|
888
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
|
889
|
-
Enabled: false
|
890
|
-
|
891
|
-
Style/RedundantSelf:
|
892
|
-
Description: "Don't use self where it's not needed."
|
893
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
|
894
|
-
Enabled: false
|
895
|
-
|
896
|
-
Style/RegexpLiteral:
|
897
|
-
Description: 'Use / or %r around regular expressions.'
|
898
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
899
|
-
Enabled: false
|
900
|
-
|
901
|
-
Style/RescueEnsureAlignment:
|
902
|
-
Description: 'Align rescues and ensures correctly.'
|
903
|
-
Enabled: false
|
904
|
-
|
905
|
-
Style/RescueModifier:
|
906
|
-
Description: 'Avoid using rescue in its modifier form.'
|
907
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
|
908
|
-
Enabled: false
|
909
|
-
|
910
|
-
Style/SelfAssignment:
|
911
|
-
Description: >-
|
912
|
-
Checks for places where self-assignment shorthand should have
|
913
|
-
been used.
|
914
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
915
|
-
Enabled: false
|
916
|
-
|
917
|
-
Style/Semicolon:
|
918
|
-
Description: "Don't use semicolons to terminate expressions."
|
919
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
|
920
|
-
Enabled: false
|
921
|
-
|
922
|
-
Style/SignalException:
|
923
|
-
Description: 'Checks for proper usage of fail and raise.'
|
924
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
925
|
-
Enabled: false
|
926
|
-
|
927
|
-
Style/SingleLineBlockParams:
|
928
|
-
Description: 'Enforces the names of some block params.'
|
929
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
930
|
-
Enabled: false
|
931
|
-
|
932
|
-
Style/SingleLineMethods:
|
933
|
-
Description: 'Avoid single-line methods.'
|
934
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
935
|
-
Enabled: false
|
936
|
-
|
937
|
-
Style/SpaceBeforeFirstArg:
|
310
|
+
Layout/SpaceBeforeFirstArg:
|
938
311
|
Description: >-
|
939
312
|
Checks that exactly one space is used between a method name
|
940
313
|
and the first argument for method calls without parentheses.
|
941
314
|
Enabled: true
|
942
|
-
|
943
|
-
Style/SpaceAfterColon:
|
944
|
-
Description: 'Use spaces after colons.'
|
945
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
946
|
-
Enabled: false
|
947
|
-
|
948
|
-
Style/SpaceAfterComma:
|
949
|
-
Description: 'Use spaces after commas.'
|
950
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
951
|
-
Enabled: false
|
952
|
-
|
953
|
-
Style/SpaceAroundKeyword:
|
954
|
-
Description: 'Use spaces around keywords.'
|
955
|
-
Enabled: false
|
956
|
-
|
957
|
-
Style/SpaceAfterMethodName:
|
958
|
-
Description: >-
|
959
|
-
Do not put a space between a method name and the opening
|
960
|
-
parenthesis in a method definition.
|
961
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
962
|
-
Enabled: false
|
963
|
-
|
964
|
-
Style/SpaceAfterNot:
|
965
|
-
Description: Tracks redundant space after the ! operator.
|
966
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
|
967
|
-
Enabled: false
|
968
|
-
|
969
|
-
Style/SpaceAfterSemicolon:
|
970
|
-
Description: 'Use spaces after semicolons.'
|
971
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
972
|
-
Enabled: false
|
973
|
-
|
974
|
-
Style/SpaceBeforeBlockBraces:
|
975
|
-
Description: >-
|
976
|
-
Checks that the left block brace has or doesn't have space
|
977
|
-
before it.
|
978
|
-
Enabled: false
|
979
|
-
|
980
|
-
Style/SpaceBeforeComma:
|
981
|
-
Description: 'No spaces before commas.'
|
982
|
-
Enabled: false
|
983
|
-
|
984
|
-
Style/SpaceBeforeComment:
|
985
|
-
Description: >-
|
986
|
-
Checks for missing space between code and a comment on the
|
987
|
-
same line.
|
988
|
-
Enabled: false
|
989
|
-
|
990
|
-
Style/SpaceBeforeSemicolon:
|
991
|
-
Description: 'No spaces before semicolons.'
|
992
|
-
Enabled: false
|
993
|
-
|
994
|
-
Style/SpaceInsideBlockBraces:
|
995
|
-
Description: >-
|
996
|
-
Checks that block braces have or don't have surrounding space.
|
997
|
-
For blocks taking parameters, checks that the left brace has
|
998
|
-
or doesn't have trailing space.
|
999
|
-
Enabled: false
|
1000
|
-
|
1001
|
-
Style/SpaceAroundBlockParameters:
|
1002
|
-
Description: 'Checks the spacing inside and after block parameters pipes.'
|
1003
|
-
Enabled: false
|
1004
|
-
|
1005
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
1006
|
-
Description: >-
|
1007
|
-
Checks that the equals signs in parameter default assignments
|
1008
|
-
have or don't have surrounding space depending on
|
1009
|
-
configuration.
|
1010
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
|
1011
|
-
Enabled: false
|
1012
|
-
|
1013
|
-
Style/SpaceAroundOperators:
|
1014
|
-
Description: 'Use a single space around operators.'
|
1015
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
1016
|
-
Enabled: false
|
1017
|
-
|
1018
|
-
Style/SpaceInsideBrackets:
|
1019
|
-
Description: 'No spaces after [ or before ].'
|
1020
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
1021
|
-
Enabled: false
|
1022
|
-
|
1023
|
-
Style/SpaceInsideHashLiteralBraces:
|
1024
|
-
Description: "Use spaces inside hash literal braces - or don't."
|
1025
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
1026
|
-
Enabled: false
|
1027
|
-
|
1028
|
-
Style/SpaceInsideParens:
|
1029
|
-
Description: 'No spaces after ( or before ).'
|
1030
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
1031
|
-
Enabled: false
|
1032
|
-
|
1033
|
-
Style/SpaceInsideRangeLiteral:
|
1034
|
-
Description: 'No spaces inside range literals.'
|
1035
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
|
1036
|
-
Enabled: false
|
1037
|
-
|
1038
|
-
Style/SpaceInsideStringInterpolation:
|
1039
|
-
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
1040
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
|
1041
|
-
Enabled: false
|
1042
|
-
|
1043
|
-
Style/SpecialGlobalVars:
|
1044
|
-
Description: 'Avoid Perl-style global variables.'
|
1045
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
1046
|
-
Enabled: false
|
1047
|
-
|
1048
|
-
Style/StringLiterals:
|
1049
|
-
Description: 'Checks if uses of quotes match the configured preference.'
|
1050
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
1051
|
-
Enabled: false
|
1052
|
-
|
1053
|
-
Style/StringLiteralsInInterpolation:
|
1054
|
-
Description: >-
|
1055
|
-
Checks if uses of quotes inside expressions in interpolated
|
1056
|
-
strings match the configured preference.
|
1057
|
-
Enabled: false
|
1058
|
-
|
1059
|
-
Style/StructInheritance:
|
1060
|
-
Description: 'Checks for inheritance from Struct.new.'
|
1061
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
|
1062
|
-
Enabled: false
|
1063
|
-
|
1064
|
-
Style/SymbolLiteral:
|
1065
|
-
Description: 'Use plain symbols instead of string symbols when possible.'
|
1066
|
-
Enabled: false
|
1067
|
-
|
1068
|
-
Style/SymbolProc:
|
1069
|
-
Description: 'Use symbols as procs instead of blocks when possible.'
|
1070
|
-
Enabled: false
|
1071
|
-
|
1072
|
-
Style/Tab:
|
1073
|
-
Description: 'No hard tabs.'
|
1074
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
1075
|
-
Enabled: false
|
1076
|
-
|
1077
|
-
Style/TrailingBlankLines:
|
1078
|
-
Description: 'Checks trailing blank lines and final newline.'
|
1079
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
1080
|
-
Enabled: false
|
1081
|
-
|
1082
|
-
Style/TrailingCommaInArguments:
|
1083
|
-
Description: 'Checks for trailing comma in parameter lists.'
|
1084
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
1085
|
-
Enabled: false
|
1086
|
-
|
1087
|
-
Style/TrailingCommaInLiteral:
|
1088
|
-
Description: 'Checks for trailing comma in literals.'
|
1089
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
1090
|
-
Enabled: false
|
1091
|
-
|
1092
|
-
Style/TrailingWhitespace:
|
1093
|
-
Description: 'Avoid trailing whitespace.'
|
1094
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
1095
|
-
Enabled: false
|
1096
|
-
|
1097
|
-
Style/TrivialAccessors:
|
1098
|
-
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
1099
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
1100
|
-
Enabled: false
|
1101
|
-
|
1102
|
-
Style/UnlessElse:
|
1103
|
-
Description: >-
|
1104
|
-
Do not use unless with else. Rewrite these with the positive
|
1105
|
-
case first.
|
1106
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
1107
|
-
Enabled: false
|
1108
|
-
|
1109
|
-
Style/UnneededCapitalW:
|
1110
|
-
Description: 'Checks for %W when interpolation is not needed.'
|
1111
|
-
Enabled: false
|
1112
|
-
|
1113
|
-
Style/UnneededPercentQ:
|
1114
|
-
Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
|
1115
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
|
1116
|
-
Enabled: false
|
1117
|
-
|
1118
|
-
Style/TrailingUnderscoreVariable:
|
1119
|
-
Description: >-
|
1120
|
-
Checks for the usage of unneeded trailing underscores at the
|
1121
|
-
end of parallel variable assignment.
|
1122
|
-
Enabled: false
|
1123
|
-
|
1124
|
-
Style/VariableInterpolation:
|
1125
|
-
Description: >-
|
1126
|
-
Don't interpolate global, instance and class variables
|
1127
|
-
directly in strings.
|
1128
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
1129
|
-
Enabled: false
|
1130
|
-
|
1131
|
-
Style/VariableName:
|
1132
|
-
Description: 'Use the configured style when naming variables.'
|
1133
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
1134
|
-
Enabled: false
|
1135
|
-
|
1136
|
-
Style/WhenThen:
|
1137
|
-
Description: 'Use when x then ... for one-line cases.'
|
1138
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
1139
|
-
Enabled: false
|
1140
|
-
|
1141
|
-
Style/WhileUntilDo:
|
1142
|
-
Description: 'Checks for redundant do after while or until.'
|
1143
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
|
1144
|
-
Enabled: false
|
1145
|
-
|
1146
|
-
Style/WhileUntilModifier:
|
1147
|
-
Description: >-
|
1148
|
-
Favor modifier while/until usage when you have a
|
1149
|
-
single-line body.
|
1150
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
1151
|
-
Enabled: false
|
1152
|
-
|
1153
|
-
Style/WordArray:
|
1154
|
-
Description: 'Use %w or %W for arrays of words.'
|
1155
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
1156
|
-
Enabled: false
|