From 76010a4c41c059ea1630f8f47c938c071deeb1f1 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Fri, 15 Dec 2023 16:49:08 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Hyrax=205=20get=20additional=20s?= =?UTF-8?q?pecs=20passing=20(#2062)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🧹 Get chrome.hyku.test working * 🧹 Get SitesControllerSpecs working File fixtures were broken. Ref https://github.com/scientist-softserv/hykuup_knapsack/issues/56 * 🧹 Remove google analytics from config reload This is a piece of a fix for analytics that came in via https://github.com/scientist-softserv/palni-palci/pull/946 Additional backporting of analytics work is still needed, but this fixes numerous specs so it is being pulled in earlier. * 🧹 Update ruby version for circleci * 🧹 Update rails version for circleci --- .circleci/config.yml | 8 ++++---- app/models/concerns/account_settings.rb | 2 -- spec/rails_helper.rb | 5 ++--- spec/support/fixtures.rb | 13 ------------- 4 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 spec/support/fixtures.rb diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f08b5735..84e0cf65b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,13 +10,13 @@ jobs: parameters: ruby_version: type: string - default: 2.7.8 + default: 3.2.2 bundler_version: type: string default: 2.4.8 rails_version: type: string - default: '5.1.6' + default: '6.1.7.6' solr_config_path: type: string fcrepo_version: @@ -95,6 +95,6 @@ workflows: ci: jobs: - bundle: - ruby_version: "2.7.8" - name: "ruby2-7-8" + ruby_version: "3.2.2" + name: "ruby3-2-2" solr_config_path: 'solr/conf' diff --git a/app/models/concerns/account_settings.rb b/app/models/concerns/account_settings.rb index dcba12122..54d8df829 100644 --- a/app/models/concerns/account_settings.rb +++ b/app/models/concerns/account_settings.rb @@ -161,8 +161,6 @@ 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 end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 33c069b56..e67ad2d18 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -62,8 +62,7 @@ ENV['WEB_HOST'] ||= `hostname -s`.strip if ENV['CHROME_HOSTNAME'].present? - options = Selenium::WebDriver::Options.chrome(args: ["headless", - "disable-gpu", + options = Selenium::WebDriver::Options.chrome(args: ["disable-gpu", "no-sandbox", "whitelisted-ips", "window-size=1400,1400"]) @@ -105,6 +104,7 @@ RSpec.configure do |config| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures config.fixture_path = "#{::Rails.root}/spec/fixtures" + config.file_fixture_path = "#{::Rails.root}/spec/fixtures" # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false @@ -132,7 +132,6 @@ # config.filter_gems_from_backtrace("gem name") config.include Devise::Test::ControllerHelpers, type: :controller - config.include Fixtures::FixtureFileUpload config.include FactoryBot::Syntax::Methods config.include ApplicationHelper, type: :view config.include Warden::Test::Helpers, type: :feature diff --git a/spec/support/fixtures.rb b/spec/support/fixtures.rb deleted file mode 100644 index 2843b3645..000000000 --- a/spec/support/fixtures.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Fixtures - module FixtureFileUpload - def fixture_file(path) - File.open(fixture_file_path(path)) - end - - def fixture_file_path(path) - Rails.root + 'spec/fixtures' + path - end - end -end