From b7d8df503cf35b3048b273dc0cadb5ec39aac5e1 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 21 Feb 2017 17:32:18 -0600 Subject: Enable Style/MutableConstant --- rubocop/cop/migration/add_column.rb | 4 ++-- rubocop/cop/migration/add_column_with_default.rb | 2 +- rubocop/cop/migration/add_concurrent_foreign_key.rb | 2 +- rubocop/cop/migration/add_index.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'rubocop/cop/migration') diff --git a/rubocop/cop/migration/add_column.rb b/rubocop/cop/migration/add_column.rb index 1490fcdd814..d2cf36c454a 100644 --- a/rubocop/cop/migration/add_column.rb +++ b/rubocop/cop/migration/add_column.rb @@ -8,10 +8,10 @@ module RuboCop class AddColumn < RuboCop::Cop::Cop include MigrationHelpers - WHITELISTED_TABLES = [:application_settings] + WHITELISTED_TABLES = [:application_settings].freeze MSG = '`add_column` with a default value requires downtime, ' \ - 'use `add_column_with_default` instead' + 'use `add_column_with_default` instead'.freeze def on_send(node) return unless in_migration?(node) diff --git a/rubocop/cop/migration/add_column_with_default.rb b/rubocop/cop/migration/add_column_with_default.rb index 747d7caf1ef..54a920d4b49 100644 --- a/rubocop/cop/migration/add_column_with_default.rb +++ b/rubocop/cop/migration/add_column_with_default.rb @@ -9,7 +9,7 @@ module RuboCop include MigrationHelpers MSG = '`add_column_with_default` is not reversible so you must manually define ' \ - 'the `up` and `down` methods in your migration class, using `remove_column` in `down`' + 'the `up` and `down` methods in your migration class, using `remove_column` in `down`'.freeze def on_send(node) return unless in_migration?(node) diff --git a/rubocop/cop/migration/add_concurrent_foreign_key.rb b/rubocop/cop/migration/add_concurrent_foreign_key.rb index e40a7087a47..d1fc94d55be 100644 --- a/rubocop/cop/migration/add_concurrent_foreign_key.rb +++ b/rubocop/cop/migration/add_concurrent_foreign_key.rb @@ -8,7 +8,7 @@ module RuboCop class AddConcurrentForeignKey < RuboCop::Cop::Cop include MigrationHelpers - MSG = '`add_foreign_key` requires downtime, use `add_concurrent_foreign_key` instead' + MSG = '`add_foreign_key` requires downtime, use `add_concurrent_foreign_key` instead'.freeze def on_send(node) return unless in_migration?(node) diff --git a/rubocop/cop/migration/add_index.rb b/rubocop/cop/migration/add_index.rb index 5e6766f6994..fa21a0d6555 100644 --- a/rubocop/cop/migration/add_index.rb +++ b/rubocop/cop/migration/add_index.rb @@ -7,7 +7,7 @@ module RuboCop class AddIndex < RuboCop::Cop::Cop include MigrationHelpers - MSG = '`add_index` requires downtime, use `add_concurrent_index` instead' + MSG = '`add_index` requires downtime, use `add_concurrent_index` instead'.freeze def on_def(node) return unless in_migration?(node) -- cgit v1.2.3