about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2023-03-16 02:53:55 +0100
committerGitHub <noreply@github.com>2023-03-16 02:53:55 +0100
commit6fa81ca17e50c2f66a4357fc6866b33b7a606b42 (patch)
treeb98f9c5a18577f1aaf098606baf9c09310437031
parentdbbd462c10e7749cfd8dee8ef5201ae6e0b47917 (diff)
Remove `bullet` and `active_record_query_trace` gems (#24121)
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock7
-rw-r--r--config/environments/development.rb20
3 files changed, 6 insertions, 23 deletions
diff --git a/Gemfile b/Gemfile
index cc039d7e0..e5353a08c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -129,11 +129,9 @@ group :test do
 end
 
 group :development do
-  gem 'active_record_query_trace', '~> 1.8'
   gem 'annotate', '~> 3.2'
   gem 'better_errors', '~> 2.9'
   gem 'binding_of_caller', '~> 1.0'
-  gem 'bullet', '~> 7.0'
   gem 'letter_opener', '~> 1.8'
   gem 'letter_opener_web', '~> 2.0'
   gem 'memory_profiler'
diff --git a/Gemfile.lock b/Gemfile.lock
index 151eba150..c7e1d1750 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -73,7 +73,6 @@ GEM
       activemodel (>= 4.1, < 7.1)
       case_transform (>= 0.2)
       jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
-    active_record_query_trace (1.8)
     activejob (6.1.7.3)
       activesupport (= 6.1.7.3)
       globalid (>= 0.3.6)
@@ -149,9 +148,6 @@ GEM
       concurrent-ruby (~> 1.0, >= 1.0.5)
       redis (>= 1.0, < 6)
     builder (3.2.4)
-    bullet (7.0.7)
-      activesupport (>= 3.0.0)
-      uniform_notifier (~> 1.11)
     bundler-audit (0.9.1)
       bundler (>= 1.2.0, < 3)
       thor (~> 1.0)
@@ -727,7 +723,6 @@ GEM
       unf_ext
     unf_ext (0.0.8.2)
     unicode-display_width (2.4.2)
-    uniform_notifier (1.16.0)
     uri (0.12.0)
     validate_email (0.1.6)
       activemodel (>= 3.0)
@@ -772,7 +767,6 @@ PLATFORMS
 
 DEPENDENCIES
   active_model_serializers (~> 0.10)
-  active_record_query_trace (~> 1.8)
   addressable (~> 2.8)
   annotate (~> 3.2)
   aws-sdk-s3 (~> 1.119)
@@ -782,7 +776,6 @@ DEPENDENCIES
   bootsnap (~> 1.16.0)
   brakeman (~> 5.4)
   browser
-  bullet (~> 7.0)
   bundler-audit (~> 0.9)
   capistrano (~> 3.17)
   capistrano-rails (~> 1.6)
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 29b17a350..f5f6cbed8 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -24,7 +24,6 @@ Rails.application.configure do
     }
   else
     config.action_controller.perform_caching = false
-
     config.cache_store = :null_store
   end
 
@@ -34,9 +33,10 @@ Rails.application.configure do
   end
 
   # Generate random VAPID keys
-  vapid_key = Webpush.generate_key
-  config.x.vapid_private_key = vapid_key.private_key
-  config.x.vapid_public_key = vapid_key.public_key
+  Webpush.generate_key.tap do |vapid_key|
+    config.x.vapid_private_key = vapid_key.private_key
+    config.x.vapid_public_key = vapid_key.public_key
+  end
 
   # Don't care if the mailer can't send.
   config.action_mailer.raise_delivery_errors = false
@@ -76,21 +76,13 @@ Rails.application.configure do
   # Otherwise, use letter_opener, which launches a browser window to view sent mail.
   config.action_mailer.delivery_method = (ENV['HEROKU'] || ENV['VAGRANT'] || ENV['REMOTE_DEV']) ? :letter_opener_web : :letter_opener
 
-  config.after_initialize do
-    Bullet.enable        = true
-    Bullet.bullet_logger = true
-    Bullet.rails_logger  = false
-
-    Bullet.add_safelist type: :n_plus_one_query, class_name: 'User', association: :account
-  end
-
+  # We provide a default secret for the development environment here.
+  # This value should not be used in production environments!
   config.x.otp_secret = ENV.fetch('OTP_SECRET', '1fc2b87989afa6351912abeebe31ffc5c476ead9bf8b3d74cbc4a302c7b69a45b40b1bbef3506ddad73e942e15ed5ca4b402bf9a66423626051104f4b5f05109')
 end
 
 Redis.raise_deprecations = true
 
-ActiveRecordQueryTrace.enabled = ENV['QUERY_TRACE_ENABLED'] == 'true'
-
 module PrivateAddressCheck
   def self.private_address?(*)
     false