From eb5d1c1f79cc383ec81b783035e3bf0076e2b627 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 12 Dec 2023 08:24:11 -0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=B9=20Remove=20trampling=20of=20Hy?= =?UTF-8?q?rax=20config=20GA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes some Hyrax config trampling done in a previous commit that was causing GA to some times appear and some times not. Ref: - https://github.com/scientist-softserv/palni-palci/issues/910 --- app/models/concerns/account_settings.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/concerns/account_settings.rb b/app/models/concerns/account_settings.rb index 2e251458c..fbba8d765 100644 --- a/app/models/concerns/account_settings.rb +++ b/app/models/concerns/account_settings.rb @@ -161,11 +161,8 @@ def set_smtp_settings def reload_library_config Hyrax.config do |config| config.contact_email = contact_email - config.analytics = google_analytics_id.present? - config.google_analytics_id = google_analytics_id if google_analytics_id.present? config.geonames_username = geonames_username config.uploader[:maxFileSize] = file_size_limit - config.analytics_provider = analytics_provider if analytics_provider.present? end Devise.mailer_sender = contact_email From 4696febfd2583dc60aeec458aa421b814f3d8f72 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Tue, 12 Dec 2023 15:43:32 -0500 Subject: [PATCH 2/2] Rubocop appeasement --- spec/models/concerns/account_settings_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/models/concerns/account_settings_spec.rb b/spec/models/concerns/account_settings_spec.rb index 7550a45c4..258a69811 100644 --- a/spec/models/concerns/account_settings_spec.rb +++ b/spec/models/concerns/account_settings_spec.rb @@ -36,7 +36,6 @@ end context 'when is_superadmin is false' do - # rubocop:disable RSpec/ExampleLength it 'returns all settings except private, disabled, and superadmin settings' do expect(Account::SUPERADMIN_SETTINGS.size).to eq 7 expect(account.public_settings(is_superadmin: false).keys.sort).to eq %i[allow_downloads @@ -57,7 +56,6 @@ ssl_configured] expect(account.public_settings(is_superadmin: false).size).to eq 16 end - # rubocop:enable RSpec/ExampleLength end end end