From e6667b7ff5117c101a891c899f1c624f707fa22e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 27 Nov 2019 11:47:16 +0000 Subject: [PATCH] Fix rubocop warnings --- db/migrate/005_tile_tracepoints.rb | 2 +- db/migrate/006_tile_nodes.rb | 4 ++-- db/migrate/008_remove_segments.rb | 4 ++-- db/migrate/013_add_email_valid.rb | 2 +- db/migrate/020_populate_node_tags_and_remove.rb | 2 +- db/migrate/039_add_more_controls_to_gpx_files.rb | 2 +- db/migrate/044_create_user_roles.rb | 4 ++-- db/migrate/046_alter_user_roles_and_blocks.rb | 2 +- db/migrate/051_add_status_to_user.rb | 2 +- db/migrate/20110322001319_add_terms_seen_to_user.rb | 2 +- db/migrate/20120208122334_merge_acl_address_and_mask.rb | 2 +- db/migrate/20120808231205_add_counter_caches.rb | 4 ++-- db/migrate/20121005195010_add_diary_entry_counter_caches.rb | 4 ++-- db/migrate/20121012044047_add_image_use_gravatar_to_users.rb | 2 +- db/migrate/20150222101847_rename_openid_url.rb | 2 +- db/migrate/20180204153242_tile_users.rb | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/db/migrate/005_tile_tracepoints.rb b/db/migrate/005_tile_tracepoints.rb index 7c3bb8d1c..b46fdf25f 100644 --- a/db/migrate/005_tile_tracepoints.rb +++ b/db/migrate/005_tile_tracepoints.rb @@ -1,7 +1,7 @@ require "migrate" class TileTracepoints < ActiveRecord::Migration[4.2] - class Tracepoint < ActiveRecord::Base + class Tracepoint < ApplicationRecord self.table_name = "gps_points" end diff --git a/db/migrate/006_tile_nodes.rb b/db/migrate/006_tile_nodes.rb index 848dc9724..ca898cb37 100644 --- a/db/migrate/006_tile_nodes.rb +++ b/db/migrate/006_tile_nodes.rb @@ -1,11 +1,11 @@ require "migrate" class TileNodes < ActiveRecord::Migration[4.2] - class Node < ActiveRecord::Base + class Node < ApplicationRecord self.table_name = "current_nodes" end - class OldNode < ActiveRecord::Base + class OldNode < ApplicationRecord self.table_name = "nodes" end diff --git a/db/migrate/008_remove_segments.rb b/db/migrate/008_remove_segments.rb index 985a85820..f8a3085c6 100644 --- a/db/migrate/008_remove_segments.rb +++ b/db/migrate/008_remove_segments.rb @@ -14,8 +14,8 @@ class RemoveSegments < ActiveRecord::Migration[4.2] "#{src} -o #{cmd}") || raise end - conn_opts = ActiveRecord::Base.connection - .instance_eval { @connection_options } + conn_opts = ApplicationRecord.connection + .instance_eval { @connection_options } args = conn_opts.map(&:to_s) + [prefix] raise "#{cmd} failed" unless system cmd, *args diff --git a/db/migrate/013_add_email_valid.rb b/db/migrate/013_add_email_valid.rb index b6899f330..e4725b643 100644 --- a/db/migrate/013_add_email_valid.rb +++ b/db/migrate/013_add_email_valid.rb @@ -1,5 +1,5 @@ class AddEmailValid < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base + class User < ApplicationRecord end def self.up diff --git a/db/migrate/020_populate_node_tags_and_remove.rb b/db/migrate/020_populate_node_tags_and_remove.rb index caa355419..fbb5d1af4 100644 --- a/db/migrate/020_populate_node_tags_and_remove.rb +++ b/db/migrate/020_populate_node_tags_and_remove.rb @@ -14,7 +14,7 @@ class PopulateNodeTagsAndRemove < ActiveRecord::Migration[4.2] "#{src} -o #{cmd}") || raise end - conn_opts = ActiveRecord::Base.connection.instance_eval { @connection_options } + conn_opts = ApplicationRecord.connection.instance_eval { @connection_options } args = conn_opts.map(&:to_s) + [prefix] raise "#{cmd} failed" unless system cmd, *args diff --git a/db/migrate/039_add_more_controls_to_gpx_files.rb b/db/migrate/039_add_more_controls_to_gpx_files.rb index 6ce26588e..2c3fee5be 100644 --- a/db/migrate/039_add_more_controls_to_gpx_files.rb +++ b/db/migrate/039_add_more_controls_to_gpx_files.rb @@ -1,7 +1,7 @@ require "migrate" class AddMoreControlsToGpxFiles < ActiveRecord::Migration[4.2] - class Trace < ActiveRecord::Base + class Trace < ApplicationRecord self.table_name = "gpx_files" end diff --git a/db/migrate/044_create_user_roles.rb b/db/migrate/044_create_user_roles.rb index 0098a0086..0039859bf 100644 --- a/db/migrate/044_create_user_roles.rb +++ b/db/migrate/044_create_user_roles.rb @@ -1,10 +1,10 @@ require "migrate" class CreateUserRoles < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base + class User < ApplicationRecord end - class UserRole < ActiveRecord::Base + class UserRole < ApplicationRecord end def self.up diff --git a/db/migrate/046_alter_user_roles_and_blocks.rb b/db/migrate/046_alter_user_roles_and_blocks.rb index cbd95018d..b10fcf144 100644 --- a/db/migrate/046_alter_user_roles_and_blocks.rb +++ b/db/migrate/046_alter_user_roles_and_blocks.rb @@ -1,7 +1,7 @@ require "migrate" class AlterUserRolesAndBlocks < ActiveRecord::Migration[4.2] - class UserRole < ActiveRecord::Base + class UserRole < ApplicationRecord end def self.up diff --git a/db/migrate/051_add_status_to_user.rb b/db/migrate/051_add_status_to_user.rb index 5cf8a920f..23761f248 100644 --- a/db/migrate/051_add_status_to_user.rb +++ b/db/migrate/051_add_status_to_user.rb @@ -1,7 +1,7 @@ require "migrate" class AddStatusToUser < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base + class User < ApplicationRecord end def self.up diff --git a/db/migrate/20110322001319_add_terms_seen_to_user.rb b/db/migrate/20110322001319_add_terms_seen_to_user.rb index f41782d37..824eaceb0 100644 --- a/db/migrate/20110322001319_add_terms_seen_to_user.rb +++ b/db/migrate/20110322001319_add_terms_seen_to_user.rb @@ -1,5 +1,5 @@ class AddTermsSeenToUser < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base + class User < ApplicationRecord end def self.up diff --git a/db/migrate/20120208122334_merge_acl_address_and_mask.rb b/db/migrate/20120208122334_merge_acl_address_and_mask.rb index f05cb4f21..09b0ae3b0 100644 --- a/db/migrate/20120208122334_merge_acl_address_and_mask.rb +++ b/db/migrate/20120208122334_merge_acl_address_and_mask.rb @@ -11,7 +11,7 @@ class IPAddr end class MergeAclAddressAndMask < ActiveRecord::Migration[4.2] - class Acl < ActiveRecord::Base + class Acl < ApplicationRecord end def up diff --git a/db/migrate/20120808231205_add_counter_caches.rb b/db/migrate/20120808231205_add_counter_caches.rb index 330e2cea3..f29bfbb0e 100644 --- a/db/migrate/20120808231205_add_counter_caches.rb +++ b/db/migrate/20120808231205_add_counter_caches.rb @@ -1,8 +1,8 @@ class AddCounterCaches < ActiveRecord::Migration[4.2] - class Changeset < ActiveRecord::Base + class Changeset < ApplicationRecord end - class Trace < ActiveRecord::Base + class Trace < ApplicationRecord self.table_name = "gpx_files" end diff --git a/db/migrate/20121005195010_add_diary_entry_counter_caches.rb b/db/migrate/20121005195010_add_diary_entry_counter_caches.rb index b5e445400..ec05f3464 100644 --- a/db/migrate/20121005195010_add_diary_entry_counter_caches.rb +++ b/db/migrate/20121005195010_add_diary_entry_counter_caches.rb @@ -1,8 +1,8 @@ class AddDiaryEntryCounterCaches < ActiveRecord::Migration[4.2] - class DiaryEntry < ActiveRecord::Base + class DiaryEntry < ApplicationRecord end - class User < ActiveRecord::Base + class User < ApplicationRecord end def self.up diff --git a/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb b/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb index 9e9151a84..dd18b068d 100644 --- a/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb +++ b/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb @@ -1,5 +1,5 @@ class AddImageUseGravatarToUsers < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base + class User < ApplicationRecord end def self.up diff --git a/db/migrate/20150222101847_rename_openid_url.rb b/db/migrate/20150222101847_rename_openid_url.rb index a12303812..06b399615 100644 --- a/db/migrate/20150222101847_rename_openid_url.rb +++ b/db/migrate/20150222101847_rename_openid_url.rb @@ -1,5 +1,5 @@ class RenameOpenidUrl < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base + class User < ApplicationRecord end def change diff --git a/db/migrate/20180204153242_tile_users.rb b/db/migrate/20180204153242_tile_users.rb index 61dbcb4ea..917948d43 100644 --- a/db/migrate/20180204153242_tile_users.rb +++ b/db/migrate/20180204153242_tile_users.rb @@ -1,5 +1,5 @@ class TileUsers < ActiveRecord::Migration[5.1] - class User < ActiveRecord::Base + class User < ApplicationRecord end def up -- 2.39.5