From 6aeed03385f1128f30c51af039cc09f6430a7fd5 Mon Sep 17 00:00:00 2001 From: Sarah Proctor Date: Mon, 29 Jul 2024 11:30:38 -0700 Subject: [PATCH 1/2] :gift: Remove featured collections block This commit removes all references to the feature collections from the home page. Ref: - https://github.com/scientist-softserv/utk-hyku/issues/654 --- app/views/hyrax/homepage/_home_content.html.erb | 2 +- .../themes/dc_repository/hyrax/homepage/_home_content.html.erb | 2 +- .../institutional_repository/_ir_below_stats_layout.html.erb | 2 +- app/views/themes/neutral_repository/_theme_container.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/hyrax/homepage/_home_content.html.erb b/app/views/hyrax/homepage/_home_content.html.erb index ec03f25d..bc7ed67f 100644 --- a/app/views/hyrax/homepage/_home_content.html.erb +++ b/app/views/hyrax/homepage/_home_content.html.erb @@ -45,7 +45,7 @@

<%= t('hyrax.homepage.admin_sets.title') %>

- <%= render 'featured_collection_section' %> + <%#= render 'featured_collection_section' %>
<%# add check for featured researcher %> <% if @presenter.display_featured_researcher? %> diff --git a/app/views/themes/dc_repository/hyrax/homepage/_home_content.html.erb b/app/views/themes/dc_repository/hyrax/homepage/_home_content.html.erb index 2720938e..b3f33460 100644 --- a/app/views/themes/dc_repository/hyrax/homepage/_home_content.html.erb +++ b/app/views/themes/dc_repository/hyrax/homepage/_home_content.html.erb @@ -19,7 +19,7 @@ <%# OVERRIDE: Hyrax v3.4.2 - add featured collections section, remove div classes %>

<%= t('hyrax.homepage.admin_sets.title') %>

- <%= render 'featured_collection_section' %> + <%#= render 'featured_collection_section' %>
<%# OVERRIDE: Hyrax v3.4.2 - add browse collection section, remove div classes %>
diff --git a/app/views/themes/institutional_repository/_ir_below_stats_layout.html.erb b/app/views/themes/institutional_repository/_ir_below_stats_layout.html.erb index 8a952d04..4e00a43f 100644 --- a/app/views/themes/institutional_repository/_ir_below_stats_layout.html.erb +++ b/app/views/themes/institutional_repository/_ir_below_stats_layout.html.erb @@ -2,7 +2,7 @@

Featured Collections

- <%= render 'featured_collection_section' %> + <%#= render 'featured_collection_section' %>
diff --git a/app/views/themes/neutral_repository/_theme_container.html.erb b/app/views/themes/neutral_repository/_theme_container.html.erb index 578944cd..3e60d70b 100644 --- a/app/views/themes/neutral_repository/_theme_container.html.erb +++ b/app/views/themes/neutral_repository/_theme_container.html.erb @@ -18,7 +18,7 @@
From 5403a4163e4389dd3fb7c59f6554fd64fbe84e9d Mon Sep 17 00:00:00 2001 From: Sarah Proctor Date: Mon, 29 Jul 2024 16:30:33 -0700 Subject: [PATCH 2/2] :lipstick: This commit fixes linting errors. --- lib/reprocessor.rb | 18 +++++++++++++----- spec/indexers/uri_to_string_behavior_spec.rb | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/reprocessor.rb b/lib/reprocessor.rb index 0ed7d9b2..aedf3106 100644 --- a/lib/reprocessor.rb +++ b/lib/reprocessor.rb @@ -6,11 +6,15 @@ ## Reprocessor for iterating through large sets of ids # There are two steps for any reprocessing. The first is to store all the ids to processin a ids.log file. # The second to to run a lambda against every id -# No matter whether it is the first run or not, a run of the Reprocessor should always start with Reprocessor.load('tmp/imports/SOME_UNIQUE_NAME') -# This creates a context for the Reprocessor to run. After that, calling Reprocessor.capture_ids (or capture_work_ids, capture_file_set_ids or capture collection_ids) +# No matter whether it is the first run or not, a run of the Reprocessor should +# always start with Reprocessor.load('tmp/imports/SOME_UNIQUE_NAME') +# This creates a context for the Reprocessor to run. +# After that, calling Reprocessor.capture_ids (or capture_work_ids, capture_file_set_ids or capture collection_ids) # will record all the ids in a file -# finally, once all the ids are split, then calling Reprocessor.process_ids with a lambda (like Reprocessor.process_ids(Reprocessor.save)) to call the process on each item -# At any point, the process can be stopped (or killed) and then resumed by doing Reprocessor.load(SAME_PATH) and then calling the process_ids again. +# finally, once all the ids are split, then calling Reprocessor.process_ids with a lambda +# (like Reprocessor.process_ids(Reprocessor.save)) to call the process on each item +# At any point, the process can be stopped (or killed) and then resumed by doing Reprocessor.load(SAME_PATH) +# and then calling the process_ids again. class Reprocessor # rubocop:disable Metrics/ClassLength include Singleton @@ -29,7 +33,8 @@ def initialize # Missing methods will be delegated to `instance` if an implementation is available. # Else `NoMethodError` will be raised via call to `super` - def self.method_missing method_name, *args + # rubocop:disable Style/MethodMissing, Lint/ShadowingOuterLocalVariable, Rails/Output + def self.method_missing(method_name, *args) if instance.respond_to? method_name puts "** Defining new method: '#{method_name}'" (class << self; self; end).instance_eval do @@ -42,6 +47,7 @@ def self.method_missing method_name, *args super end end + # rubocop:enable Style/MethodMissing, Lint/ShadowingOuterLocalVariable, Rails/Output SETTINGS.each do |method| define_singleton_method(method) do |*args| @@ -125,6 +131,7 @@ def capture_bulkrax_entry_ids(query) end end + # rubocop:disable Style/RescueStandardError def process_ids(lamb) progress(id_line_size) line_counter = 0 @@ -149,6 +156,7 @@ def process_ids(lamb) break if limit && current_location >= limit end end + # rubocop:enable Style/RescueStandardError def error(line, exception) msg = "#{line} - #{exception.message[0..200]}" diff --git a/spec/indexers/uri_to_string_behavior_spec.rb b/spec/indexers/uri_to_string_behavior_spec.rb index e7841cf9..2fafce8b 100644 --- a/spec/indexers/uri_to_string_behavior_spec.rb +++ b/spec/indexers/uri_to_string_behavior_spec.rb @@ -112,7 +112,7 @@ 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Ruby RDF.rb/3.1.15' } - # rubocop:enable Matrics/LineLength + # rubocop:enable Metrics/LineLength ) .to_return(status: 200, body: "", headers: {}) end