diff --git a/Gemfile b/Gemfile index 19da7320..43c274d0 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/app/forms/hyrax/form_terms_decorator.rb b/app/forms/hyrax/form_terms_decorator.rb index fc39455a..fe324dc6 100644 --- a/app/forms/hyrax/form_terms_decorator.rb +++ b/app/forms/hyrax/form_terms_decorator.rb @@ -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) diff --git a/app/presenters/hyrax/collection_presenter_decorator.rb b/app/presenters/hyrax/collection_presenter_decorator.rb index 161b9084..3ed349ca 100644 --- a/app/presenters/hyrax/collection_presenter_decorator.rb +++ b/app/presenters/hyrax/collection_presenter_decorator.rb @@ -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 diff --git a/app/presenters/hyrax/generic_work_presenter_decorator.rb b/app/presenters/hyrax/generic_work_presenter_decorator.rb index 5f84ab84..7484e507 100644 --- a/app/presenters/hyrax/generic_work_presenter_decorator.rb +++ b/app/presenters/hyrax/generic_work_presenter_decorator.rb @@ -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 +) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index ad917973..16848b17 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -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 diff --git a/spec/factories/works.rb b/spec/factories/works.rb index 7d3b4ac0..285a291e 100755 --- a/spec/factories/works.rb +++ b/spec/factories/works.rb @@ -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