diff --git a/db/seeds.rb b/db/seeds.rb
index af335e5de..9dd1b0cf7 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -54,7 +54,6 @@ end
num_users = 10 * SEEDS_MULTIPLIER
-# rubocop:disable Metrics/BlockLength
users_in_random_order = seeder.create_if_none(User, num_users) do
roles = %i[trusted workshop_pass]
@@ -181,8 +180,6 @@ users_in_random_order = seeder.create_if_none(User, num_users) do
User.order(Arel.sql("RANDOM()"))
end
-# rubocop:enable Metrics/BlockLength
-
seeder.create_if_doesnt_exist(User, "email", "admin@forem.local") do
user = User.create!(
name: "Admin McAdmin",
@@ -370,7 +367,7 @@ seeder.create_if_none(Broadcast) do
github_connect: "You're on a roll! 🎉 Do you have a GitHub account? " \
"Consider connecting it so you can pin any of your repos to your profile.",
google_oauth2_connect: "You're on a roll! 🎉 Do you have a Google account? " \
- "Consider connecting it.",
+ "Consider connecting it.",
apple_connect: "You're on a roll! 🎉 Do you have an Apple account? " \
"Consider connecting it.",
customize_feed:
diff --git a/lib/data_update_scripts/20220105112823_migrate_logo_svg_data.rb b/lib/data_update_scripts/20220105112823_migrate_logo_svg_data.rb
index 008542d99..d218f332d 100644
--- a/lib/data_update_scripts/20220105112823_migrate_logo_svg_data.rb
+++ b/lib/data_update_scripts/20220105112823_migrate_logo_svg_data.rb
@@ -30,9 +30,9 @@ module DataUpdateScripts
Honeybadger.notify(e, context: {
community_name: Settings::Community.community_name,
- app_domain: Settings::General.app_domain,
+ app_domain: Settings::General.app_domain
},
- tags: "failed_svg_conversion")
+ tags: "failed_svg_conversion")
end
end
end
diff --git a/spec/requests/pages_spec.rb b/spec/requests/pages_spec.rb
index e98f08047..f6cdbf9ac 100644
--- a/spec/requests/pages_spec.rb
+++ b/spec/requests/pages_spec.rb
@@ -128,7 +128,7 @@ RSpec.describe "Pages", type: :request do
it "redirects to the latest welcome thread" do
earlier_welcome_thread = create(:article, user: user, tags: "welcome")
- earlier_welcome_thread.update(published_at: Time.current - 1.week)
+ earlier_welcome_thread.update(published_at: 1.week.ago)
latest_welcome_thread = create(:article, user: user, tags: "welcome")
get "/welcome"
@@ -160,7 +160,7 @@ RSpec.describe "Pages", type: :request do
it "redirects to the latest challenge thread" do
earlier_challenge_thread = create(:article, user: user, tags: "challenge")
- earlier_challenge_thread.update(published_at: Time.current - 1.week)
+ earlier_challenge_thread.update(published_at: 1.week.ago)
latest_challenge_thread = create(:article, user: user, tags: "challenge")
get "/challenge"
diff --git a/spec/services/notifications/reactions/send_spec.rb b/spec/services/notifications/reactions/send_spec.rb
index 0a0f0c99e..5e6446eb8 100644
--- a/spec/services/notifications/reactions/send_spec.rb
+++ b/spec/services/notifications/reactions/send_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe Notifications::Reactions::Send, type: :service do
context "when a reaction is persisted and has siblings" do
before do
- create(:reaction, reactable: article, user: user3, created_at: Time.current - 1.day)
+ create(:reaction, reactable: article, user: user3, created_at: 1.day.ago)
end
it "creates a notification" do
diff --git a/spec/services/rate_limit_checker_spec.rb b/spec/services/rate_limit_checker_spec.rb
index 9fd265771..0df6a016b 100644
--- a/spec/services/rate_limit_checker_spec.rb
+++ b/spec/services/rate_limit_checker_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe RateLimitChecker, type: :service do
let(:rate_limit_checker) { described_class.new(user) }
def cache_key(action)
- rate_limit_checker.__send__("limit_cache_key", action)
+ rate_limit_checker.__send__(:limit_cache_key, action)
end
describe "#limit_by_action" do
diff --git a/spec/system/authentication/user_logs_in_with_apple_spec.rb b/spec/system/authentication/user_logs_in_with_apple_spec.rb
index 810b949e1..f5bf751aa 100644
--- a/spec/system/authentication/user_logs_in_with_apple_spec.rb
+++ b/spec/system/authentication/user_logs_in_with_apple_spec.rb
@@ -64,7 +64,7 @@ RSpec.describe "Authenticating with Apple", vcr: { cassette_name: "fastly_sloan"
end
after do
- OmniAuth.config.on_failure = OmniauthHelpers.const_get("OMNIAUTH_DEFAULT_FAILURE_HANDLER")
+ OmniAuth.config.on_failure = OmniauthHelpers.const_get(:OMNIAUTH_DEFAULT_FAILURE_HANDLER)
end
it "does not create a new user" do
diff --git a/spec/system/authentication/user_logs_in_with_facebook_spec.rb b/spec/system/authentication/user_logs_in_with_facebook_spec.rb
index 4c712548e..267da16fc 100644
--- a/spec/system/authentication/user_logs_in_with_facebook_spec.rb
+++ b/spec/system/authentication/user_logs_in_with_facebook_spec.rb
@@ -96,7 +96,7 @@ RSpec.describe "Authenticating with Facebook" do
end
after do
- OmniAuth.config.on_failure = OmniauthHelpers.const_get("OMNIAUTH_DEFAULT_FAILURE_HANDLER")
+ OmniAuth.config.on_failure = OmniauthHelpers.const_get(:OMNIAUTH_DEFAULT_FAILURE_HANDLER)
end
it "does not create a new user" do
diff --git a/spec/system/authentication/user_logs_in_with_forem_spec.rb b/spec/system/authentication/user_logs_in_with_forem_spec.rb
index b54afbdad..c2982acab 100644
--- a/spec/system/authentication/user_logs_in_with_forem_spec.rb
+++ b/spec/system/authentication/user_logs_in_with_forem_spec.rb
@@ -95,7 +95,7 @@ RSpec.describe "Authenticating with Forem" do
end
after do
- OmniAuth.config.on_failure = OmniauthHelpers.const_get("OMNIAUTH_DEFAULT_FAILURE_HANDLER")
+ OmniAuth.config.on_failure = OmniauthHelpers.const_get(:OMNIAUTH_DEFAULT_FAILURE_HANDLER)
end
it "does not create a new user" do
diff --git a/spec/system/authentication/user_logs_in_with_github_spec.rb b/spec/system/authentication/user_logs_in_with_github_spec.rb
index 02925fdfa..cb2e91c31 100644
--- a/spec/system/authentication/user_logs_in_with_github_spec.rb
+++ b/spec/system/authentication/user_logs_in_with_github_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe "Authenticating with GitHub" do
end
after do
- OmniAuth.config.on_failure = OmniauthHelpers.const_get("OMNIAUTH_DEFAULT_FAILURE_HANDLER")
+ OmniAuth.config.on_failure = OmniauthHelpers.const_get(:OMNIAUTH_DEFAULT_FAILURE_HANDLER)
end
it "does not create a new user" do
diff --git a/spec/system/authentication/user_logs_in_with_twitter_spec.rb b/spec/system/authentication/user_logs_in_with_twitter_spec.rb
index 5d4315520..de46e833e 100644
--- a/spec/system/authentication/user_logs_in_with_twitter_spec.rb
+++ b/spec/system/authentication/user_logs_in_with_twitter_spec.rb
@@ -59,7 +59,7 @@ RSpec.describe "Authenticating with Twitter" do
end
after do
- OmniAuth.config.on_failure = OmniauthHelpers.const_get("OMNIAUTH_DEFAULT_FAILURE_HANDLER")
+ OmniAuth.config.on_failure = OmniauthHelpers.const_get(:OMNIAUTH_DEFAULT_FAILURE_HANDLER)
end
it "does not create a new user" do