Skip to content

Commit

Permalink
🧹 Appease Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyf committed Oct 4, 2023
1 parent 600de92 commit 9409806
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ gemspec
gemfile_path = File.expand_path("hyrax-webapp/Gemfile", __dir__)
if File.exist?(gemfile_path)
gemfile = File.read(gemfile_path).split("\n").reject { |l| l.match('knapsack') }
# rubocop:disable Security/Eval
eval(gemfile.join("\n"), binding)
# rubocop:enable Security/Eval
end
2 changes: 1 addition & 1 deletion app/forms/hyrax/form_terms_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def primary_terms
Hyrax::FormTerms.prepend(Hyrax::FormTermsDecorator)

# Explicitly prepending to GenericWorkForm and ImageForm since
# .prepend didn’t affect classes that include Hyrax::FormTerms
# .prepend didn't affect classes that include Hyrax::FormTerms
Hyrax::GenericWorkForm.prepend(Hyrax::FormTermsDecorator)
Hyrax::ImageForm.prepend(Hyrax::FormTermsDecorator)
2 changes: 1 addition & 1 deletion app/presenters/hyrax/collection_presenter_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def terms_with_values
# OVERRIDE HYRAX 3.5.0 to hide identifier line
terms = self.class.terms - [:identifier]
terms.select { |t| self[t].present? }
end
end
end
end

Expand Down
11 changes: 10 additions & 1 deletion app/presenters/hyrax/generic_work_presenter_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,13 @@
# end
# end

Hyrax::GenericWorkPresenter.delegate :aark_id, :abstract, :date_issued, :alt, :part_of, :place_of_publication, :remote_url, to: :solr_document
Hyrax::GenericWorkPresenter.delegate(
:aark_id,
:abstract,
:alt,
:date_issued,
:part_of,
:place_of_publication,
:remote_url,
to: :solr_document
)
2 changes: 1 addition & 1 deletion lib/tasks/assets.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace :hyku_knapsack do
Dir.glob(File.join(HykuKnapsack::Engine.root, 'public', '**')).each do |asset|
# skip directories
next unless File.file?(asset)
dest_file = File.join(Rails.root, 'public', File.basename(asset))
dest_file = Rails.root.join('public', File.basename(asset)).to_s
FileUtils.copy_file asset, dest_file, true
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/factories/works.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
rights_description { ['some additional stuff about rights'] }
source { ['tomato'] }
subject { ['Official Heading for Woe'] }

awarding_institution { ['Awarding Institution'] }
based_near { ['Sheffield'] }
end
Expand Down

0 comments on commit 9409806

Please sign in to comment.