Skip to content

Commit 728680a

Browse files
committed
No longer excluding db schema and migrations from string literal rubocop enforcement
1 parent fdc0f66 commit 728680a

9 files changed

+1057
-978
lines changed

.rubocop.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ AllCops:
22
Exclude:
33
- 'bin/*'
44
- 'node_modules/**/*'
5-
- 'spec/dummy/db/schema.rb'
5+
# - 'spec/dummy/db/schema.rb'
66
- 'vendor/**/*'
77
NewCops: enable
8-
Style/StringLiterals:
9-
Exclude:
10-
- 'db/migrate/*'
8+
# Style/StringLiterals:
9+
# Exclude:
10+
# - 'db/migrate/*'

db/migrate/20190301040948_create_better_together_invitations.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class CreateBetterTogetherInvitations < ActiveRecord::Migration[7.0]
55
def change # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
66
create_bt_table :invitations do |t| # rubocop:todo Metrics/BlockLength
7-
t.string "type", default: "BetterTogether::Invitation", null: false
7+
t.string 'type', default: 'BetterTogether::Invitation', null: false
88
t.string :status,
99
limit: 20,
1010
null: false,
@@ -65,11 +65,11 @@ def change # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
6565

6666
add_index :better_together_invitations, %i[invitee_email invitable_id], unique: true,
6767
# rubocop:todo Layout/LineLength
68-
name: "invitations_on_invitee_email_and_invitable_id"
68+
name: 'invitations_on_invitee_email_and_invitable_id'
6969
# rubocop:enable Layout/LineLength
7070
add_index :better_together_invitations, %i[invitable_id status],
71-
name: "invitations_on_invitable_id_and_status"
71+
name: 'invitations_on_invitable_id_and_status'
7272
add_index :better_together_invitations, :invitee_email, where: "status = 'pending'",
73-
name: "pending_invites_on_invitee_email"
73+
name: 'pending_invites_on_invitee_email'
7474
end
7575
end

db/migrate/20190425130144_create_better_together_posts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class CreateBetterTogetherPosts < ActiveRecord::Migration[7.0]
55
def change # rubocop:todo Metrics/MethodLength
66
create_bt_table :posts do |t|
7-
t.string "type", default: "BetterTogether::Post", null: false
7+
t.string 'type', default: 'BetterTogether::Post', null: false
88
t.bt_identifier
99
t.bt_protected
1010
t.bt_privacy

db/migrate/20240522200922_add_primary_community_to_people.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def change
66
unless column_exists?(:better_together_people, :community_id, :uuid)
77
# Custom community reference here to allow for null references for existing records
88
t.bt_references :community, target_table: :better_together_communities, null: true,
9-
index: { name: "by_person_community" }
9+
index: { name: 'by_person_community' }
1010
end
1111
end
1212
end

db/migrate/20240826143510_create_better_together_platform_invitations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def change # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
7474

7575
add_index :better_together_platform_invitations, %i[invitee_email invitable_id], unique: true
7676
add_index :better_together_platform_invitations, %i[invitable_id status],
77-
name: "index_platform_invitations_on_invitable_id_and_status"
77+
name: 'index_platform_invitations_on_invitable_id_and_status'
7878
add_index :better_together_platform_invitations, :invitee_email, where: "status = 'pending'",
79-
name: "index_pending_invitations_on_invitee_email"
79+
name: 'index_pending_invitations_on_invitee_email'
8080
end
8181
end

db/migrate/20250227163308_create_better_together_metrics_page_view_reports.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def change
66
create_bt_table :page_view_reports, prefix: :better_together_metrics do |t|
77
t.jsonb :filters, null: false, default: {}
88
t.boolean :sort_by_total_views, null: false, default: false
9-
t.string :file_format, null: false, default: "csv"
9+
t.string :file_format, null: false, default: 'csv'
1010
t.jsonb :report_data, null: false, default: {}
1111
end
1212

db/migrate/20250228154526_create_better_together_metrics_link_click_reports.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def change
66
create_bt_table :link_click_reports, prefix: :better_together_metrics do |t|
77
t.jsonb :filters, null: false, default: {}
88
t.boolean :sort_by_total_clicks, null: false, default: false
9-
t.string :file_format, null: false, default: "csv"
9+
t.string :file_format, null: false, default: 'csv'
1010
t.jsonb :report_data, null: false, default: {}
1111
end
1212

db/migrate/20250304142407_set_privacy_default_private.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

3-
# Ensures that all tables with the privacy column default to private and replaces existing 'unlisted' values with 'private'
3+
# Ensures that all tables with the privacy column default to private
4+
# Replaces existing 'unlisted' values with 'private'
45
class SetPrivacyDefaultPrivate < ActiveRecord::Migration[7.1]
56
def up
67
ActiveRecord::Base.connection.tables.each do |table|

0 commit comments

Comments
 (0)