diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 358dde38e..e95dd6f49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.6.9'] + ruby-version: ['2.7.5'] node: ['10', '12'] env: RAILS_ENV: test diff --git a/.gitignore b/.gitignore index 5e3b29d6a..dbd6079f9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ tmp/*_visits tmp/*_visitors config/database.yml config/solr.yml +config/solr_wrapper.yml config/fedora.yml config/*.sphinx.conf config/s3_credentials.yml diff --git a/.rubocop.yml b/.rubocop.yml index dc452b97f..a907a7683 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,5 +4,5 @@ inherit_gem: inherit_from: .rubocop_todo.yml AllCops: - TargetRubyVersion: 2.5.3 - TargetRailsVersion: 5.2.3 + TargetRubyVersion: 2.7.5 + TargetRailsVersion: 6.0.4 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0356d1c02..eb90f1fc2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,23 +1,21 @@ # This configuration was generated by -# `rubocop --auto-gen-config --exclude-limit 10000` -# on 2020-06-17 16:50:53 -0400 using RuboCop version 0.63.1. +# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000` +# on 2022-10-18 21:05:49 UTC using RuboCop version 1.36.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 3 -# Cop supports --auto-correct. +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, IndentationWidth. -# SupportedStyles: with_first_parameter, with_fixed_indentation -Layout/AlignParameters: +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/ArgumentAlignment: Exclude: - - 'bin/webpack' - - 'bin/webpack-dev-server' - 'config/initializers/mime_types.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleAlignWith. # SupportedStylesAlignWith: either, start_of_block, start_of_line Layout/BlockAlignment: @@ -25,30 +23,81 @@ Layout/BlockAlignment: - 'app/api/auth/token.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Layout/ElseAlignment: Exclude: - 'config/initializers/patch_failure_app.rb' -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines. -Layout/EmptyLineBetweenDefs: +# Offense count: 49 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLineAfterGuardClause: Exclude: - - 'app/controllers/info_controller.rb' + - 'Rakefile' + - 'app/controllers/agreements_controller.rb' + - 'app/controllers/assets_controller.rb' + - 'app/controllers/catalog_controller.rb' + - 'app/controllers/collections_controller.rb' + - 'app/controllers/uploads_controller.rb' + - 'app/forms/usage_statistics_reports_form.rb' + - 'app/helpers/use_and_reproduction_helper.rb' + - 'app/models/ability.rb' + - 'app/models/concerns/academic_commons/desc_metadata.rb' + - 'app/models/concerns/academic_commons/generic_resource.rb' + - 'app/models/content_aggregator.rb' + - 'app/models/featured_search.rb' + - 'app/models/solr_document.rb' + - 'app/presenters/rendering/auto_link.rb' + - 'app/presenters/rendering/preserve_new_lines.rb' + - 'lib/academic_commons/embargoes.rb' + - 'lib/academic_commons/featured_searches.rb' + - 'lib/academic_commons/indexer.rb' + - 'lib/academic_commons/metrics/item_stats.rb' + - 'lib/academic_commons/metrics/usage_statistics.rb' + - 'lib/academic_commons/search_parameters.rb' + - 'lib/tasks/ac/featured.rake' + +# Offense count: 18 +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLineAfterMagicComment: + Exclude: + - 'app/controllers/admin/featured_searches_controller.rb' + - 'app/controllers/featured_searches_controller.rb' + - 'app/helpers/ac/layout_helper_behavior.rb' + - 'app/models/feature_category.rb' + - 'app/models/featured_search.rb' + - 'app/models/featured_search_value.rb' + - 'lib/academic_commons/featured_searches.rb' + - 'lib/tasks/ac/featured.rake' + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/catalog_helper_spec.rb' + - 'spec/controllers/admin/featured_searches_controller_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/factories/feature_category.rb' + - 'spec/factories/feature_search_value.rb' + - 'spec/factories/featured_search.rb' + - 'spec/features/admin/featured_search_form_spec.rb' + - 'spec/models/featured_search_spec.rb' + - 'spec/routing/featured_searches_controller_spec.rb' -# Offense count: 8 -# Cop supports --auto-correct. +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). Layout/EmptyLines: Exclude: - 'app/controllers/catalog_controller.rb' - - 'app/models/solr_document.rb' - 'config/deploy/prod.rb' - 'config/deploy/test.rb' - 'config/initializers/mime_types.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowAliasSyntax, AllowedMethods. +# AllowedMethods: alias_method, public, protected, private +Layout/EmptyLinesAroundAttributeAccessor: + Exclude: + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' + # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, no_empty_lines Layout/EmptyLinesAroundBlockBody: @@ -60,7 +109,7 @@ Layout/EmptyLinesAroundBlockBody: - 'spec/models/statistic_spec.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only Layout/EmptyLinesAroundClassBody: @@ -70,22 +119,28 @@ Layout/EmptyLinesAroundClassBody: - 'lib/ok_computer/fedora_object_check.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). +Layout/EmptyLinesAroundExceptionHandlingKeywords: + Exclude: + - 'app/models/concerns/academic_commons/resource.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). Layout/EmptyLinesAroundMethodBody: Exclude: - 'app/controllers/logs_controller.rb' # Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleAlignWith, Severity. # SupportedStylesAlignWith: keyword, variable, start_of_line Layout/EndAlignment: Exclude: - 'config/initializers/patch_failure_app.rb' -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. Layout/ExtraSpacing: Exclude: - 'app/controllers/catalog_controller.rb' @@ -93,72 +148,71 @@ Layout/ExtraSpacing: - 'config/deploy.rb' - 'config/routes.rb' -# Offense count: 5 -# Cop supports --auto-correct. +# Offense count: 93 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/HashAlignment: + Exclude: + - 'app/controllers/admin/email_author_reports_controller.rb' + - 'app/controllers/catalog_controller.rb' + - 'app/controllers/user_controller.rb' + - 'app/forms/usage_statistics_reports_form.rb' + - 'app/helpers/homepage_helper.rb' + - 'app/models/concerns/academic_commons/desc_metadata.rb' + - 'app/models/concerns/document/schema_org.rb' + - 'app/models/deposit.rb' + - 'config/application.rb' + - 'config/routes.rb' + +# Offense count: 8 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. -# SupportedStyles: normal, rails +# SupportedStyles: normal, indented_internal_methods Layout/IndentationConsistency: Exclude: + - 'app/controllers/admin/featured_searches_controller.rb' + - 'app/controllers/logs_controller.rb' - 'lib/academic_commons/metrics/author_affiliation_report.rb' -# Offense count: 27 -# Cop supports --auto-correct. -# Configuration parameters: Width, IgnoredPatterns. +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Width, AllowedPatterns, IgnoredPatterns. Layout/IndentationWidth: Exclude: - - 'app/api/auth/token.rb' - - 'app/controllers/admin/alert_messages_controller.rb' - - 'app/controllers/admin/email_author_reports_controller.rb' - - 'app/controllers/admin/email_preferences_controller.rb' - - 'app/controllers/admin_controller.rb' - - 'app/controllers/agreements_controller.rb' - - 'app/controllers/application_controller.rb' - - 'app/controllers/assets_controller.rb' + - 'app/controllers/admin/featured_searches_controller.rb' - 'app/controllers/catalog_controller.rb' - - 'app/controllers/collections_controller.rb' - - 'app/controllers/solr_documents_controller.rb' - - 'app/controllers/uploads_controller.rb' - - 'app/controllers/user_controller.rb' - - 'app/forms/email_author_reports_form.rb' - - 'app/forms/usage_statistics_reports_form.rb' - - 'app/models/deposit.rb' - - 'app/models/solr_document.rb' + - 'app/controllers/logs_controller.rb' - 'app/models/statistic.rb' - - 'app/presenters/rendering/auto_link.rb' - - 'app/presenters/rendering/custom_join.rb' - - 'app/presenters/rendering/preserve_new_lines.rb' - - 'app/presenters/usage_statistics_presenter.rb' - 'config/initializers/patch_failure_app.rb' - - 'lib/academic_commons/indexer.rb' - - 'lib/academic_commons/metrics/output.rb' - - 'lib/academic_commons/metrics/usage_statistics.rb' # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. Layout/LeadingCommentSpace: Exclude: - 'app/helpers/catalog_helper.rb' - 'config/environments/development.rb' - 'config/environments/test.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineHashBraceLayout: +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Layout/LeadingEmptyLines: Exclude: - - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' + - 'config/initializers/gaffe.rb' -# Offense count: 1 -# Cop supports --auto-correct. +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineMethodCallBraceLayout: +Layout/MultilineHashBraceLayout: Exclude: - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Layout/SpaceAfterComma: Exclude: - 'app/helpers/catalog_helper.rb' @@ -166,18 +220,17 @@ Layout/SpaceAfterComma: - 'config/deploy.rb' - 'lib/tasks/load.rake' -# Offense count: 6 -# Cop supports --auto-correct. +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space Layout/SpaceAroundEqualsInParameterDefault: Exclude: - 'app/models/concerns/academic_commons/aggregator.rb' - 'app/models/concerns/academic_commons/resource.rb' - - 'app/models/resource.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Layout/SpaceAroundKeyword: Exclude: - 'lib/academic_commons/embargoes.rb' @@ -185,14 +238,15 @@ Layout/SpaceAroundKeyword: - 'lib/tasks/ac.rake' # Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. +# SupportedStylesForExponentOperator: space, no_space Layout/SpaceAroundOperators: Exclude: - 'app/helpers/catalog_helper.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space @@ -203,7 +257,7 @@ Layout/SpaceBeforeBlockBraces: - 'spec/academic_commons/metrics/item_stats_spec.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. # SupportedStyles: space, no_space, compact # SupportedStylesForEmptyBrackets: space, no_space @@ -212,7 +266,7 @@ Layout/SpaceInsideArrayLiteralBrackets: - 'app/helpers/catalog_helper.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space @@ -223,7 +277,7 @@ Layout/SpaceInsideBlockBraces: - 'spec/controllers/logs_controller_spec.rb' # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. # SupportedStyles: space, no_space, compact # SupportedStylesForEmptyBraces: space, no_space @@ -235,42 +289,72 @@ Layout/SpaceInsideHashLiteralBraces: - 'spec/academic_commons/embargoes_spec.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: final_newline, final_blank_line -Layout/TrailingBlankLines: +Layout/TrailingEmptyLines: Exclude: - 'app/models/generic_resource.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowInHeredoc. Layout/TrailingWhitespace: Exclude: - 'config/initializers/mime_types.rb' +# Offense count: 1 +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. +Lint/AmbiguousBlockAssociation: + Exclude: + - 'app/helpers/use_and_reproduction_helper.rb' + # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Lint/DeprecatedClassMethods: Exclude: - 'app/models/uploaded_file.rb' - 'lib/tasks/ac/bots.rake' -# Offense count: 5 -Lint/RescueException: +# Offense count: 1 +Lint/MissingSuper: Exclude: - - 'app/controllers/solr_documents_controller.rb' - - 'app/models/concerns/academic_commons/resource.rb' + - 'lib/ok_computer/fedora_object_check.rb' + +# Offense count: 1 +Lint/MixedRegexpCaptureTypes: + Exclude: + - 'app/models/deposit.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Lint/NonDeterministicRequireOrder: + Exclude: + - 'spec/rails_helper.rb' + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +Lint/RedundantCopDisableDirective: + Exclude: + - 'app/helpers/use_and_reproduction_helper.rb' - 'lib/academic_commons/indexer.rb' + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' # Offense count: 1 -# Cop supports --auto-correct. -Lint/StringConversionInInterpolation: +# This cop supports safe autocorrection (--autocorrect). +Lint/RedundantStringCoercion: + Exclude: + - 'lib/academic_commons/indexer.rb' + +# Offense count: 5 +Lint/RescueException: Exclude: + - 'app/controllers/solr_documents_controller.rb' + - 'app/models/concerns/academic_commons/resource.rb' - 'lib/academic_commons/indexer.rb' # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: Exclude: @@ -280,8 +364,8 @@ Lint/UnusedBlockArgument: - 'lib/tasks/duplicate_records.rake' # Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. Lint/UnusedMethodArgument: Exclude: - 'app/controllers/application_controller.rb' @@ -294,80 +378,88 @@ Lint/UselessAssignment: - 'app/models/statistic.rb' - 'lib/tasks/load.rake' -# Offense count: 11 -# Configuration parameters: Max. +# Offense count: 43 +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes, Max. Metrics/AbcSize: Exclude: - 'app/api/v1/helpers/solr.rb' + - 'app/controllers/admin/alert_messages_controller.rb' + - 'app/controllers/admin/email_preferences_controller.rb' + - 'app/controllers/admin/usage_statistics_reports_controller.rb' - 'app/controllers/agreements_controller.rb' - 'app/controllers/collections_controller.rb' - 'app/controllers/logs_controller.rb' + - 'app/controllers/solr_documents_controller.rb' + - 'app/controllers/uploads_controller.rb' + - 'app/controllers/user_controller.rb' - 'app/forms/email_author_reports_form.rb' + - 'app/forms/request_agreements_form.rb' - 'app/forms/usage_statistics_reports_form.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/catalog_helper.rb' + - 'app/helpers/homepage_helper.rb' + - 'app/helpers/use_and_reproduction_helper.rb' - 'app/jobs/sword_deposit_job.rb' + - 'app/mailers/user_mailer.rb' - 'app/models/concerns/academic_commons/desc_metadata.rb' + - 'app/models/concerns/academic_commons/generic_resource.rb' + - 'app/models/concerns/academic_commons/resource.rb' - 'app/models/deposit.rb' - - 'app/models/resource.rb' + - 'app/models/featured_search.rb' + - 'app/models/solr_document.rb' + - 'app/models/statistic.rb' + - 'app/models/user.rb' + - 'app/presenters/usage_statistics_presenter.rb' + - 'lib/academic_commons/featured_searches.rb' + - 'lib/academic_commons/indexer.rb' - 'lib/academic_commons/metrics/author_affiliation_report.rb' + - 'lib/academic_commons/metrics/output.rb' -# Offense count: 19 -# Configuration parameters: CountComments, Max, ExcludedMethods. -# ExcludedMethods: refine +# Offense count: 12 +# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, inherit_mode. +# AllowedMethods: refine Metrics/BlockLength: Exclude: - - '**/*.gemspec' - - 'config/**/*' - - '**/*/catalog_controller.rb' - - 'spec/**/*' + - 'app/controllers/catalog_controller.rb' - 'app/forms/email_author_reports_form.rb' - 'app/models/deposit.rb' + - 'config/environments/academiccommons_prod.rb' + - 'config/environments/development.rb' + - 'config/routes.rb' - 'lib/academic_commons/metrics/author_affiliation_report.rb' - - 'lib/tasks/ac.rake' - - 'lib/tasks/ac/bots.rake' - - 'lib/tasks/ac/migrate.rake' - - 'lib/tasks/ac/reindex.rake' - - 'lib/tasks/duplicate_records.rake' - - 'lib/tasks/load.rake' -# Offense count: 4 -# Configuration parameters: CountComments, Max. +# Offense count: 5 +# Configuration parameters: CountComments, Max, CountAsOne. Metrics/ClassLength: Exclude: - - '**/*/catalog_controller.rb' + - 'app/controllers/catalog_controller.rb' - 'app/forms/email_author_reports_form.rb' - 'app/models/deposit.rb' - 'app/models/solr_document.rb' - 'lib/academic_commons/metrics/usage_statistics.rb' -# Offense count: 7 -# Configuration parameters: Max. +# Offense count: 9 +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, Max. Metrics/CyclomaticComplexity: Exclude: + - 'app/controllers/collections_controller.rb' + - 'app/controllers/user_controller.rb' - 'app/forms/email_author_reports_form.rb' - 'app/forms/usage_statistics_reports_form.rb' - 'app/models/concerns/academic_commons/desc_metadata.rb' - - 'app/models/concerns/academic_commons/resource.rb' - 'app/models/deposit.rb' - 'app/models/statistic.rb' - 'app/models/user.rb' + - 'lib/academic_commons/metrics/author_affiliation_report.rb' -# Offense count: 8 -# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. -# URISchemes: http, https -Metrics/LineLength: - Exclude: - - '**/*.gemspec' - - 'app/controllers/catalog_controller.rb' - - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' - - 'spec/academic_commons/metrics/usage_statistics_spec.rb' - - 'spec/features/item_page_spec.rb' - -# Offense count: 22 -# Configuration parameters: CountComments, Max, ExcludedMethods. +# Offense count: 42 +# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/MethodLength: Exclude: - 'app/api/v1/helpers/solr.rb' + - 'app/controllers/admin/alert_messages_controller.rb' - 'app/controllers/admin/email_preferences_controller.rb' + - 'app/controllers/admin/usage_statistics_reports_controller.rb' - 'app/controllers/agreements_controller.rb' - 'app/controllers/collections_controller.rb' - 'app/controllers/logs_controller.rb' @@ -375,70 +467,108 @@ Metrics/MethodLength: - 'app/controllers/uploads_controller.rb' - 'app/controllers/user_controller.rb' - 'app/forms/email_author_reports_form.rb' + - 'app/forms/request_agreements_form.rb' - 'app/forms/usage_statistics_reports_form.rb' + - 'app/helpers/application_helper.rb' - 'app/helpers/catalog_helper.rb' + - 'app/helpers/homepage_helper.rb' + - 'app/helpers/use_and_reproduction_helper.rb' - 'app/jobs/sword_deposit_job.rb' - 'app/mailers/user_mailer.rb' + - 'app/models/concerns/academic_commons/generic_resource.rb' - 'app/models/concerns/academic_commons/resource.rb' - 'app/models/deposit.rb' - - 'app/models/resource.rb' + - 'app/models/featured_search.rb' + - 'app/models/solr_document.rb' - 'app/models/statistic.rb' + - 'app/models/uploaded_file.rb' - 'app/models/user.rb' + - 'app/presenters/usage_statistics_presenter.rb' + - 'config/initializers/patch_failure_app.rb' - 'lib/academic_commons/indexer.rb' - 'lib/academic_commons/metrics/author_affiliation_report.rb' + - 'lib/academic_commons/metrics/output.rb' + - 'lib/academic_commons/metrics/usage_statistics.rb' -# Offense count: 7 -# Configuration parameters: Max. +# Offense count: 9 +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, Max. Metrics/PerceivedComplexity: Exclude: - - 'app/controllers/agreements_controller.rb' + - 'app/controllers/collections_controller.rb' + - 'app/controllers/user_controller.rb' - 'app/forms/email_author_reports_form.rb' - 'app/forms/usage_statistics_reports_form.rb' - 'app/models/concerns/academic_commons/desc_metadata.rb' - 'app/models/deposit.rb' - 'app/models/statistic.rb' - 'app/models/user.rb' + - 'lib/academic_commons/metrics/author_affiliation_report.rb' + +# Offense count: 10 +# Configuration parameters: EnforcedStyleForLeadingUnderscores. +# SupportedStylesForLeadingUnderscores: disallowed, required, optional +Naming/MemoizedInstanceVariableName: + Exclude: + - 'app/controllers/admin/alert_messages_controller.rb' + - 'app/controllers/admin/email_author_reports_controller.rb' + - 'app/controllers/admin/email_preferences_controller.rb' + - 'app/controllers/admin/featured_searches_controller.rb' + - 'app/controllers/admin/request_agreements_controller.rb' + - 'app/controllers/admin/usage_statistics_reports_controller.rb' + - 'app/controllers/uploads_controller.rb' # Offense count: 3 -# Configuration parameters: EnforcedStyle. +# Configuration parameters: EnforcedStyle, AllowedPatterns, IgnoredPatterns. # SupportedStyles: snake_case, camelCase Naming/MethodName: Exclude: - 'app/controllers/logs_controller.rb' - 'app/models/content_aggregator.rb' +# Offense count: 5 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: as, at, by, db, id, in, io, ip, of, on, os, pp, to +Naming/MethodParameterName: + Exclude: + - 'app/models/notification.rb' + - 'app/models/statistic.rb' + - 'lib/academic_commons/metrics/usage_statistics.rb' + - 'lib/academic_commons/search_parameters.rb' + - 'lib/ok_computer/fedora_object_check.rb' + # Offense count: 1 -# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros. +# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. # NamePrefix: is_, has_, have_ -# NamePrefixBlacklist: is_, has_, have_ -# NameWhitelist: is_a? +# ForbiddenPrefixes: is_, has_, have_ +# AllowedMethods: is_a? # MethodDefinitionMacros: define_method, define_singleton_method Naming/PredicateName: Exclude: - - 'spec/**/*' - 'app/controllers/application_controller.rb' -# Offense count: 1 -# Configuration parameters: EnforcedStyle. +# Offense count: 3 +# Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns. # SupportedStyles: snake_case, camelCase Naming/VariableName: Exclude: - 'app/models/content_aggregator.rb' # Offense count: 1 -# Cop supports --auto-correct. -Performance/RedundantMatch: +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: SafeMultiline. +Performance/DeletePrefix: Exclude: - - 'config/deploy.rb' + - 'spec/support/task.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Performance/RegexpMatch: +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +Performance/InefficientHashSearch: Exclude: - - 'config/deploy.rb' + - 'app/controllers/collections_controller.rb' + - 'app/models/content_aggregator.rb' -# Offense count: 2 -# Cop supports --auto-correct. +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). Performance/StringReplacement: Exclude: - 'app/helpers/catalog_helper.rb' @@ -451,31 +581,167 @@ RSpec/AnyInstance: - 'spec/controllers/users/omniauth_callbacks_controller_spec.rb' - 'spec/support/ldap_mock.rb' -# Offense count: 1 -RSpec/DescribeClass: +# Offense count: 15 +RSpec/Capybara/VisibilityMatcher: Exclude: - - 'spec/tasks/sitemap_spec.rb' + - 'spec/features/item_page_spec.rb' + - 'spec/features/upload_spec.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). +RSpec/ContextMethod: + Exclude: + - 'spec/models/email_preference_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 98 +# Configuration parameters: Prefixes, AllowedPatterns. +# Prefixes: when, with, without +RSpec/ContextWording: + Exclude: + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' + - 'spec/api/v1/data_feed_spec.rb' + - 'spec/api/v1/search_spec.rb' + - 'spec/catalog_helper_spec.rb' + - 'spec/controllers/admin/deposits_controller_spec.rb' + - 'spec/controllers/admin/email_preferences_controller_spec.rb' + - 'spec/controllers/admin/featured_searches_controller_spec.rb' + - 'spec/controllers/admin/usage_statistics_reports_controller_spec.rb' + - 'spec/controllers/agreements_controller_spec.rb' + - 'spec/controllers/application_controller_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' + - 'spec/controllers/user_controller_spec.rb' + - 'spec/features/agreement_spec.rb' + - 'spec/features/myaccount_spec.rb' + - 'spec/features/search_results_page_spec.rb' + - 'spec/features/static_pages_spec.rb' + - 'spec/features/unsubscribe_spec.rb' + - 'spec/forms/email_author_reports_form_spec.rb' + - 'spec/helpers/catalog_helper_spec.rb' + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + - 'spec/models/concerns/academic_commons/desc_metadata_spec.rb' + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' + - 'spec/models/email_preference_spec.rb' + - 'spec/models/resource_spec.rb' + - 'spec/models/solr_document_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/support/authorization_for_controller_tests.rb' + - 'spec/support/authorization_for_feature_tests.rb' + - 'spec/support/ldap_mock.rb' + - 'spec/support/test_log.rb' + +# Offense count: 29 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: SkipBlocks, EnforcedStyle. # SupportedStyles: described_class, explicit RSpec/DescribedClass: Exclude: - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' - 'spec/academic_commons/metrics/item_stats_spec.rb' + - 'spec/forms/email_author_reports_form_spec.rb' + - 'spec/jobs/sword_deposit_job_spec.rb' + - 'spec/mailers/statistics_mailer_spec.rb' + - 'spec/models/email_preference_spec.rb' + - 'spec/models/featured_search_spec.rb' - 'spec/models/resource_spec.rb' + - 'spec/models/statistic_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowConsecutiveOneLiners. +RSpec/EmptyLineAfterExample: + Exclude: + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/helpers/catalog_helper_spec.rb' + - 'spec/models/concerns/academic_commons/desc_metadata_spec.rb' + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' + - 'spec/models/featured_search_spec.rb' + - 'spec/models/resource_spec.rb' + - 'spec/routing/solr_documents_controller_spec.rb' + +# Offense count: 20 +# This cop supports safe autocorrection (--autocorrect). +RSpec/EmptyLineAfterExampleGroup: + Exclude: + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/controllers/admin/featured_searches_controller_spec.rb' + - 'spec/controllers/assets_controller_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' + - 'spec/helpers/catalog_helper_spec.rb' + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + - 'spec/models/featured_search_spec.rb' + +# Offense count: 43 +# This cop supports safe autocorrection (--autocorrect). +RSpec/EmptyLineAfterFinalLet: + Exclude: + - 'spec/academic_commons/embargoes_spec.rb' + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/academic_commons/metrics/usage_statistics_spec.rb' + - 'spec/catalog_helper_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' + - 'spec/features/admin/featured_search_form_spec.rb' + - 'spec/helpers/catalog_helper_spec.rb' + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + - 'spec/models/concerns/academic_commons/desc_metadata_spec.rb' + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' + - 'spec/models/featured_search_spec.rb' + - 'spec/models/search_builder_spec.rb' + - 'spec/models/solr_document_spec.rb' + - 'spec/support/authorization_for_controller_tests.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowConsecutiveOneLiners. +RSpec/EmptyLineAfterHook: + Exclude: + - 'spec/api/v1/search_spec.rb' + - 'spec/controllers/admin/featured_searches_controller_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' + - 'spec/helpers/catalog_helper_spec.rb' + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' + - 'spec/models/featured_search_spec.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +RSpec/EmptyLineAfterSubject: + Exclude: + - 'spec/catalog_helper_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' # Offense count: 5 -# Configuration parameters: Max. +# Configuration parameters: Max, CountAsOne. RSpec/ExampleLength: Exclude: - 'spec/academic_commons/metrics/item_stats_spec.rb' - 'spec/academic_commons/metrics/usage_statistics_spec.rb' - 'spec/apis/solr_documents_controller_spec.rb' +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Include. +# Include: spec/factories.rb, spec/factories/**/*.rb, features/support/factories/**/*.rb +RSpec/FactoryBot/FactoryClassName: + Exclude: + - 'spec/factories/featured_search.rb' + - 'spec/factories/user.rb' + +# Offense count: 1 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. +# Include: **/*_spec*rb*, **/spec/**/* +RSpec/FilePath: + Exclude: + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + # Offense count: 22 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: implicit, each, example RSpec/HookArgument: @@ -499,8 +765,8 @@ RSpec/InstanceVariable: - 'spec/controllers/users/omniauth_callbacks_controller_spec.rb' - 'spec/controllers/users/sessions_controller_spec.rb' -# Offense count: 6 -# Cop supports --auto-correct. +# Offense count: 7 +# This cop supports safe autocorrection (--autocorrect). RSpec/LeadingSubject: Exclude: - 'spec/academic_commons/embargoes_spec.rb' @@ -509,6 +775,42 @@ RSpec/LeadingSubject: - 'spec/academic_commons/metrics/usage_statistics_spec.rb' - 'spec/controllers/solr_documents_controller_spec.rb' +# Offense count: 14 +# Configuration parameters: . +# SupportedStyles: have_received, receive +RSpec/MessageSpies: + EnforcedStyle: receive + +# Offense count: 63 +# Configuration parameters: Max. +RSpec/MultipleExpectations: + Exclude: + - 'spec/academic_commons/metrics/usage_statistics_spec.rb' + - 'spec/api/v1/search_spec.rb' + - 'spec/apis/solr_documents_controller_spec.rb' + - 'spec/controllers/admin/email_preferences_controller_spec.rb' + - 'spec/controllers/admin/usage_statistics_reports_controller_spec.rb' + - 'spec/controllers/agreements_controller_spec.rb' + - 'spec/controllers/application_controller_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' + - 'spec/controllers/uploads_controller_spec.rb' + - 'spec/controllers/user_controller_spec.rb' + - 'spec/controllers/users/omniauth_callbacks_controller_spec.rb' + - 'spec/features/admin/usage_statistics_form_spec.rb' + - 'spec/features/explore_spec.rb' + - 'spec/features/homepage_spec.rb' + - 'spec/features/item_page_spec.rb' + - 'spec/features/myaccount_spec.rb' + - 'spec/features/myworks_spec.rb' + - 'spec/features/search_results_page_spec.rb' + - 'spec/features/upload_spec.rb' + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + - 'spec/jobs/sword_deposit_job_spec.rb' + - 'spec/models/featured_search_spec.rb' + - 'spec/models/solr_document_spec.rb' + - 'spec/models/statistic_spec.rb' + - 'spec/support/authorization_for_controller_tests.rb' + # Offense count: 17 # Configuration parameters: IgnoreSharedExamples. RSpec/NamedSubject: @@ -518,6 +820,22 @@ RSpec/NamedSubject: - 'spec/academic_commons/metrics/usage_statistics_spec.rb' - 'spec/controllers/solr_documents_controller_spec.rb' +# Offense count: 13 +# Configuration parameters: Max, AllowedGroups. +RSpec/NestedGroups: + Exclude: + - 'spec/academic_commons/metrics/usage_statistics_spec.rb' + - 'spec/controllers/solr_documents_controller_spec.rb' + - 'spec/features/admin/usage_statistics_form_spec.rb' + - 'spec/models/resource_spec.rb' + - 'spec/models/solr_document_spec.rb' + +# Offense count: 9 +RSpec/StubbedMock: + Exclude: + - 'spec/api/v1/search_spec.rb' + - 'spec/models/solr_document_spec.rb' + # Offense count: 11 # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames. RSpec/VerifiedDoubles: @@ -526,37 +844,101 @@ RSpec/VerifiedDoubles: - 'spec/controllers/solr_documents_controller_spec.rb' # Offense count: 2 -# Configuration parameters: EnforcedStyle. -# SupportedStyles: strict, flexible -Rails/Date: +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/ActiveRecordAliases: + Exclude: + - 'app/controllers/admin/email_preferences_controller.rb' + - 'app/controllers/admin/featured_searches_controller.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +Rails/ApplicationRecord: + Exclude: + - 'app/models/feature_category.rb' + - 'app/models/featured_search.rb' + - 'app/models/featured_search_value.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. +Rails/Blank: + Exclude: + - 'app/helpers/use_and_reproduction_helper.rb' + - 'lib/academic_commons/featured_searches.rb' + - 'lib/academic_commons/search_parameters.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +Rails/ContentTag: + Exclude: + - 'app/helpers/application_helper.rb' + - 'app/helpers/use_and_reproduction_helper.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Whitelist, AllowedMethods, AllowedReceivers. +# Whitelist: find_by_sql +# AllowedMethods: find_by_sql +# AllowedReceivers: Gem::Specification +Rails/DynamicFindBy: Exclude: - - 'app/models/statistic.rb' + - 'app/controllers/solr_documents_controller.rb' + - 'app/models/user.rb' + - 'lib/academic_commons/metrics/author_affiliation_report.rb' -# Offense count: 11 +# Offense count: 16 # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments Rails/FilePath: Exclude: + - 'Rakefile' - 'app/controllers/logs_controller.rb' - - 'config/environments/ac4_dev.rb' - - 'config/environments/ac4_test.rb' - - 'config/environments/academiccommons_dev.rb' - - 'config/environments/academiccommons_test.rb' + - 'app/forms/email_author_reports_form.rb' + - 'config/application.rb' + - 'config/environments/development.rb' - 'lib/academic_commons/indexer.rb' - 'lib/tasks/ac/bots.rake' - - 'spec/rails_helper.rb' + - 'lib/tasks/load.rake' + - 'spec/factories/deposit.rb' - 'spec/support/test_log.rb' + - 'spec/tasks/sitemap_spec.rb' # Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: Include. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Include, AllowedMethods, AllowedPatterns, IgnoredMethods. # Include: app/models/**/*.rb +# AllowedMethods: order, limit, select, lock +# IgnoredMethods: order, limit, select, lock Rails/FindEach: Exclude: - 'app/models/agreement.rb' - 'app/models/statistic.rb' +# Offense count: 1 +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/HasManyOrHasOneDependent: + Exclude: + - 'app/models/eventlog.rb' + +# Offense count: 1 +# Configuration parameters: Include. +# Include: app/helpers/**/*.rb +Rails/HelperInstanceVariable: + Exclude: + - 'app/helpers/catalog_helper.rb' + +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: numeric, symbolic +Rails/HttpStatus: + Exclude: + - 'app/controllers/admin/email_preferences_controller.rb' + - 'app/controllers/assets_controller.rb' + # Offense count: 6 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Include. # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb Rails/Output: @@ -571,24 +953,47 @@ Rails/OutputSafety: - 'app/presenters/rendering/custom_join.rb' - 'app/presenters/rendering/preserve_new_lines.rb' +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Rails/Presence: + Exclude: + - 'app/models/concerns/academic_commons/generic_resource.rb' + - 'app/models/featured_search.rb' + - 'app/models/solr_document.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. +Rails/Present: + Exclude: + - 'app/models/notification.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Include. +# Include: **/Rakefile, **/*.rake +Rails/RakeEnvironment: + Exclude: + - 'Rakefile' + # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: referer, referrer Rails/RequestReferer: Exclude: - 'config/initializers/patch_failure_app.rb' -# Offense count: 8 +# Offense count: 6 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: strict, flexible Rails/TimeZone: Exclude: - - 'app/models/statistic.rb' - 'spec/models/statistic_spec.rb' # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/Validation: @@ -596,46 +1001,90 @@ Rails/Validation: - 'app/models/content_block.rb' - 'app/models/notification.rb' +# Offense count: 4 +Security/Open: + Exclude: + - 'app/models/featured_search.rb' + - 'lib/tasks/ac/index.rake' + - 'lib/tasks/ac/reindex.rake' + # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Security/YAMLLoad: Exclude: - 'config/initializers/resque.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/BlockComments: Exclude: - 'spec/spec_helper.rb' -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: braces, no_braces, context_dependent -Style/BracesAroundHashParameters: +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. +# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces +# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object +# FunctionalMethods: let, let!, subject, watch +# AllowedMethods: lambda, proc, it +Style/BlockDelimiters: Exclude: - - 'config/deploy/prod.rb' - - 'config/deploy/test.rb' - - 'spec/controllers/users/omniauth_callbacks_controller_spec.rb' + - 'app/presenters/usage_statistics_presenter.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CaseLikeIf: + Exclude: + - 'app/api/v1/data_feed.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). Style/ColonMethodCall: Exclude: - 'config/initializers/resque.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Keywords, RequireColon. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE +Style/CommentAnnotation: + Exclude: + - 'Rakefile' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CommentedKeyword: + Exclude: + - 'lib/academic_commons/indexer.rb' + - 'lib/academic_commons/metrics/item_stats.rb' + +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Style/ExpandPathArguments: + Exclude: + - 'Rakefile' + - 'config.ru' + - 'spec/rails_helper.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: format, sprintf, percent Style/FormatString: Exclude: - 'app/api/auth/token.rb' -# Offense count: 211 -# Cop supports --auto-correct. +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods. +# SupportedStyles: annotated, template, unannotated +Style/FormatStringToken: + EnforcedStyle: unannotated + +# Offense count: 199 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. -# SupportedStyles: when_needed, always, never +# SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: Exclude: - 'Capfile' @@ -717,26 +1166,14 @@ Style/FrozenStringLiteralComment: - 'app/presenters/rendering/custom_join.rb' - 'app/presenters/rendering/preserve_new_lines.rb' - 'app/presenters/usage_statistics_presenter.rb' - - 'bin/bundle' - - 'bin/rails' - - 'bin/rake' - - 'bin/setup' - - 'bin/update' - - 'bin/webpack' - - 'bin/webpack-dev-server' - - 'bin/yarn' - 'config.ru' - 'config/application.rb' - 'config/boot.rb' - 'config/deploy.rb' - - 'config/deploy/ac4_dev.rb' - - 'config/deploy/ac4_test.rb' - 'config/deploy/dev.rb' - 'config/deploy/prod.rb' - 'config/deploy/test.rb' - 'config/environment.rb' - - 'config/environments/ac4_dev.rb' - - 'config/environments/ac4_test.rb' - 'config/environments/academiccommons_dev.rb' - 'config/environments/academiccommons_prod.rb' - 'config/environments/academiccommons_test.rb' @@ -850,8 +1287,14 @@ Style/FrozenStringLiteralComment: - 'spec/support/test_log.rb' - 'spec/tasks/sitemap_spec.rb' -# Offense count: 5 -# Configuration parameters: MinBodyLength. +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/GlobalStdStream: + Exclude: + - 'lib/tasks/duplicate_records.rake' + +# Offense count: 6 +# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. Style/GuardClause: Exclude: - 'app/controllers/application_controller.rb' @@ -860,23 +1303,57 @@ Style/GuardClause: - 'app/models/statistic.rb' - 'lib/academic_commons/metrics/item_stats.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: braces, no_braces +Style/HashAsLastArrayItem: + Exclude: + - 'app/models/featured_search.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedReceivers. +Style/HashEachMethods: + Exclude: + - 'app/controllers/collections_controller.rb' + # Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +# SupportedShorthandSyntax: always, never, either, consistent Style/HashSyntax: Exclude: - 'lib/tasks/ac.rake' - 'lib/tasks/ac/bots.rake' -# Offense count: 1 -# Cop supports --auto-correct. +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). Style/IfUnlessModifier: Exclude: + - 'app/controllers/agreements_controller.rb' + - 'app/controllers/user_controller.rb' + - 'app/forms/usage_statistics_reports_form.rb' + - 'app/models/concerns/academic_commons/desc_metadata.rb' - 'app/models/statistic.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: InverseMethods, InverseBlocks. +Style/InverseMethods: + Exclude: + - 'lib/tasks/ac/bots.rake' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowMethodComparison. +Style/MultipleComparison: + Exclude: + - 'config/initializers/resque.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: both, prefix, postfix Style/NegatedIf: @@ -884,15 +1361,15 @@ Style/NegatedIf: - 'spec/spec_helper.rb' # Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: Whitelist. -# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods. +# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with Style/NestedParenthesizedCalls: Exclude: - 'spec/controllers/application_controller_spec.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, MinBodyLength. # SupportedStyles: skip_modifier_ifs, always Style/Next: @@ -900,7 +1377,7 @@ Style/Next: - 'app/models/statistic.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedOctalStyle. # SupportedOctalStyles: zero_with_o, zero_only Style/NumericLiteralPrefix: @@ -908,89 +1385,175 @@ Style/NumericLiteralPrefix: - 'app/models/uploaded_file.rb' # Offense count: 2 -# Cop supports --auto-correct. +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'app/models/concerns/academic_commons/aggregator.rb' + - 'app/models/concerns/academic_commons/resource.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). Style/ParallelAssignment: Exclude: - 'lib/academic_commons/indexer.rb' - 'lib/tasks/duplicate_records.rake' -# Offense count: 4 -# Cop supports --auto-correct. +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. Style/ParenthesesAroundCondition: Exclude: - 'app/models/concerns/academic_commons/resource.rb' - - 'app/models/resource.rb' - 'lib/tasks/ac.rake' -# Offense count: 9 -# Cop supports --auto-correct. +# Offense count: 6 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: Exclude: - 'app/api/auth/token.rb' - 'config/application.rb' - - 'config/deploy/ac4_dev.rb' - - 'config/deploy/ac4_test.rb' - 'config/deploy/dev.rb' - 'config/deploy/prod.rb' - 'config/deploy/test.rb' - - 'config/initializers/assets.rb' - 'config/initializers/okcomputer.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/PerlBackrefs: Exclude: - 'lib/academic_commons.rb' # Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: short, verbose -Style/PreferredHashMethods: - Exclude: - - 'app/models/resource.rb' - -# Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RedundantBegin: Exclude: - 'app/forms/email_author_reports_form.rb' - 'app/models/concerns/academic_commons/resource.rb' - - 'bin/yarn' -# Offense count: 3 -# Cop supports --auto-correct. -Style/RedundantParentheses: +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: SafeForConstants. +Style/RedundantFetchBlock: Exclude: - - 'app/models/resource.rb' - - 'config/deploy.rb' + - 'config/puma.rb' -# Offense count: 8 -# Cop supports --auto-correct. +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/RedundantInterpolation: + Exclude: + - 'app/helpers/catalog_helper.rb' + +# Offense count: 20 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantRegexpEscape: + Exclude: + - 'app/controllers/assets_controller.rb' + - 'app/helpers/catalog_helper.rb' + - 'app/models/deposit.rb' + - 'app/models/solr_document.rb' + - 'app/models/statistic.rb' + - 'lib/academic_commons/search_parameters.rb' + - 'spec/features/item_page_spec.rb' + - 'spec/models/solr_document_spec.rb' + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: Exclude: - 'app/controllers/logs_controller.rb' + - 'app/forms/email_author_reports_form.rb' - 'app/helpers/catalog_helper.rb' + - 'app/models/concerns/academic_commons/resource.rb' - 'app/models/content_aggregator.rb' - - 'app/models/resource.rb' - 'app/models/solr_document.rb' -# Offense count: 10 -# Cop supports --auto-correct. -Style/RedundantSelf: - Enabled: false +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, AllowInnerSlashes. +# SupportedStyles: slashes, percent_r, mixed +Style/RegexpLiteral: + Exclude: + - 'app/api/auth/token.rb' + - 'app/controllers/assets_controller.rb' + - 'app/models/statistic.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: implicit, explicit +Style/RescueStandardError: + Exclude: + - 'app/helpers/catalog_helper.rb' + - 'lib/ok_computer/fedora_object_check.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/SelfAssignment: Exclude: - 'app/models/concerns/academic_commons/resource.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/SingleArgumentDig: + Exclude: + - 'app/models/search_builder.rb' + - 'lib/hyacinth.rb' + +# Offense count: 20 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Mode. +Style/StringConcatenation: + Exclude: + - 'app/controllers/assets_controller.rb' + - 'app/forms/email_author_reports_form.rb' + - 'app/helpers/catalog_helper.rb' + - 'app/models/concerns/academic_commons/desc_metadata.rb' + - 'app/models/solr_document.rb' + - 'app/presenters/usage_statistics_presenter.rb' + - 'config/initializers/resque.rb' + - 'lib/hyacinth.rb' + - 'lib/tasks/load.rake' + +# Offense count: 106 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Exclude: + - 'Rakefile' + - 'app/controllers/admin/featured_searches_controller.rb' + - 'app/controllers/collections_controller.rb' + - 'app/helpers/use_and_reproduction_helper.rb' + - 'config/application.rb' + - 'config/deploy.rb' + - 'config/environments/academiccommons_dev.rb' + - 'config/environments/academiccommons_test.rb' + - 'config/initializers/mime_types.rb' + - 'config/puma.rb' + - 'config/routes.rb' + - 'lib/tasks/ac.rake' + - 'lib/tasks/ac/bots.rake' + - 'lib/tasks/ac/featured.rake' + - 'lib/tasks/duplicate_records.rake' + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/academic_commons/metrics/usage_statistics_spec.rb' + - 'spec/catalog_helper_spec.rb' + - 'spec/controllers/featured_searches_controller_spec.rb' + - 'spec/factories/featured_search.rb' + - 'spec/helpers/catalog_helper_spec.rb' + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + - 'spec/models/concerns/academic_commons/desc_metadata_spec.rb' + - 'spec/models/concerns/academic_commons/generic_resource_spec.rb' + - 'spec/models/featured_search_spec.rb' + - 'spec/models/resource_spec.rb' + - 'spec/models/search_builder_spec.rb' + - 'spec/models/solr_document_spec.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: single_quotes, double_quotes Style/StringLiteralsInInterpolation: @@ -999,25 +1562,24 @@ Style/StringLiteralsInInterpolation: - 'lib/academic_commons/indexer.rb' # Offense count: 13 -# Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. -# IgnoredMethods: respond_to, define_method +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowComments. +# AllowedMethods: respond_to, define_method Style/SymbolProc: Exclude: - 'app/api/v1/entities/short_record.rb' - 'app/models/statistic.rb' -# Offense count: 2 -# Cop supports --auto-correct. +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowSafeAssignment. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex Style/TernaryParentheses: Exclude: - 'app/controllers/solr_documents_controller.rb' - - 'config/deploy.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInArguments: @@ -1025,7 +1587,7 @@ Style/TrailingCommaInArguments: - 'config/deploy.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInArrayLiteral: @@ -1033,22 +1595,74 @@ Style/TrailingCommaInArrayLiteral: - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInHashLiteral: Exclude: - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/UnneededInterpolation: - Exclude: - - 'app/helpers/catalog_helper.rb' - # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/WhileUntilDo: Exclude: - 'lib/academic_commons/metrics/author_affiliation_report.rb' - 'lib/tasks/ac.rake' + +# Offense count: 164 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns. +# URISchemes: http, https +Layout/LineLength: + Exclude: + - 'Rakefile' + - 'app/api/v1/search.rb' + - 'app/controllers/admin/alert_messages_controller.rb' + - 'app/controllers/admin/email_author_reports_controller.rb' + - 'app/controllers/admin/featured_searches_controller.rb' + - 'app/controllers/admin/usage_statistics_reports_controller.rb' + - 'app/controllers/agreements_controller.rb' + - 'app/controllers/assets_controller.rb' + - 'app/controllers/catalog_controller.rb' + - 'app/controllers/collections_controller.rb' + - 'app/controllers/logs_controller.rb' + - 'app/controllers/solr_documents_controller.rb' + - 'app/controllers/uploads_controller.rb' + - 'app/controllers/user_controller.rb' + - 'app/forms/email_author_reports_form.rb' + - 'app/forms/usage_statistics_reports_form.rb' + - 'app/helpers/asset_helper.rb' + - 'app/helpers/catalog_helper.rb' + - 'app/helpers/use_and_reproduction_helper.rb' + - 'app/jobs/sword_deposit_job.rb' + - 'app/models/concerns/academic_commons/desc_metadata.rb' + - 'app/models/deposit.rb' + - 'app/models/featured_search.rb' + - 'app/models/solr_document.rb' + - 'app/models/statistic.rb' + - 'config/initializers/devise.rb' + - 'config/routes.rb' + - 'lib/academic_commons/featured_searches.rb' + - 'lib/academic_commons/indexer.rb' + - 'lib/academic_commons/metrics/usage_statistics.rb' + - 'lib/hyacinth.rb' + - 'spec/academic_commons/featured_searches_spec.rb' + - 'spec/academic_commons/metrics/author_affiliation_report_spec.rb' + - 'spec/academic_commons/metrics/usage_statistics_spec.rb' + - 'spec/api/v1/data_feed_spec.rb' + - 'spec/api/v1/record_spec.rb' + - 'spec/api/v1/search_spec.rb' + - 'spec/controllers/admin/email_author_reports_controller_spec.rb' + - 'spec/controllers/admin/email_preferences_controller_spec.rb' + - 'spec/controllers/agreements_controller_spec.rb' + - 'spec/controllers/assets_controller_spec.rb' + - 'spec/controllers/user_controller_spec.rb' + - 'spec/controllers/users/omniauth_callbacks_controller_spec.rb' + - 'spec/features/item_page_spec.rb' + - 'spec/features/myworks_spec.rb' + - 'spec/features/unsubscribe_spec.rb' + - 'spec/features/upload_spec.rb' + - 'spec/forms/email_author_reports_form_spec.rb' + - 'spec/helpers/use_and_reproduction_display_helper_spec.rb' + - 'spec/mailers/statistics_mailer_spec.rb' + - 'spec/models/statistic_spec.rb' diff --git a/.ruby-version b/.ruby-version index d48d3702a..a603bb50a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.9 +2.7.5 diff --git a/.solr_wrapper b/.solr_wrapper deleted file mode 100644 index 63e223099..000000000 --- a/.solr_wrapper +++ /dev/null @@ -1,10 +0,0 @@ -# -# Defaults for solr_wrapper - -port: 9983 -version: 6.3.0 -verbose: false -managed: true -collection: - dir: solr/conf - name: development \ No newline at end of file diff --git a/Gemfile b/Gemfile index f8b26e947..6ab037341 100644 --- a/Gemfile +++ b/Gemfile @@ -2,24 +2,24 @@ source 'https://rubygems.org' -gem 'rails', '5.2.4.3' +gem 'rails', '6.0.4' gem 'active-fedora', '~> 8.2' gem 'addressable' -gem 'blacklight', '~> 6.0' +gem 'blacklight', '~> 7.25' gem 'blacklight_oai_provider' -gem 'blacklight_range_limit' +gem 'blacklight_range_limit', + git: 'https://github.com/JackBlackLight/blacklight_range_limit.git', branch: 'use_blacklight_component' gem 'bootsnap' -gem 'bootstrap-sass', '~> 3.3.0' -gem 'cancancan', '~> 2.0' +gem 'cancancan' gem 'cul-ldap' -gem 'cul_omniauth', '~> 0.6.1' +gem 'cul_omniauth', '>= 0.7.0' gem 'devise' gem 'fancybox2-rails' # Used in helper classes. TODO: Confirm that this is needed and used by the application. gem 'gaffe' gem 'grape' gem 'grape-entity' -gem 'grape-swagger', git: 'https://github.com/ruby-grape/grape-swagger', ref: 'da351d0f99228f31329210d21b975a64500e73ab' +gem 'grape-swagger', '0.31.0' gem 'http' gem 'jbuilder' gem 'jquery-rails' @@ -32,15 +32,12 @@ gem 'resque', '~> 1.27' gem 'rinku' gem 'rsolr-ext' gem 'rubyzip', require: 'zip' -gem 'sass-rails' gem 'sitemap_generator' -gem 'social-share-button' -gem 'therubyracer' gem 'turbolinks' gem 'uglifier' gem 'unicode' gem 'voight_kampff' -gem 'webpacker', '~> 4.x' +gem 'webpacker', '~> 5.4.0' gem 'whenever', require: false gem 'wowza-secure_token' @@ -49,6 +46,7 @@ gem 'mysql2' gem 'sqlite3', '>= 1.3.5' group :development do + gem 'listen' gem 'spring' end @@ -62,20 +60,23 @@ group :development, :test do gem 'capistrano-resque', '~> 0.2.2', require: false gem 'capistrano-rvm', '~> 0.1', require: false - gem 'rubocul', '2.0.0', require: false + gem 'rubocul', '~> 4.0', require: false gem 'byebug' gem 'capybara', '~> 3.0' - gem 'coveralls', require: false gem 'database_cleaner' gem 'equivalent-xml' gem 'factory_bot_rails' gem 'jettywrapper', '>=1.4.0', git: 'https://github.com/samvera-deprecated/jettywrapper.git', branch: 'master' gem 'json_spec' gem 'rspec-its' - gem 'rspec-rails', '~> 3.5' + gem 'rspec-rails' gem 'selenium-webdriver' - gem 'solr_wrapper', '>= 0.18.0' - gem 'webdrivers', '~> 4.0' + gem 'simplecov', require: false + gem 'solr_wrapper', '~> 4.0' + gem 'webdrivers', '~> 5.2', require: false gem 'webmock' end + +# Use Puma for local development +gem 'puma', '~> 5.2' diff --git a/Gemfile.lock b/Gemfile.lock index 2a17c9747..1e376b102 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,10 @@ GIT - remote: https://github.com/ruby-grape/grape-swagger - revision: da351d0f99228f31329210d21b975a64500e73ab - ref: da351d0f99228f31329210d21b975a64500e73ab + remote: https://github.com/JackBlackLight/blacklight_range_limit.git + revision: d2a3c9402fa00bcfe28873437e27540a2a409fa3 + branch: use_blacklight_component specs: - grape-swagger (0.30.1) - grape (>= 0.16.2) + blacklight_range_limit (8.2.4) + blacklight (>= 7.25.2, < 9) GIT remote: https://github.com/samvera-deprecated/jettywrapper.git @@ -20,30 +20,43 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (5.2.4.3) - actionpack (= 5.2.4.3) + actioncable (6.0.4) + actionpack (= 6.0.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.3) - actionpack (= 5.2.4.3) - actionview (= 5.2.4.3) - activejob (= 5.2.4.3) + actionmailbox (6.0.4) + actionpack (= 6.0.4) + activejob (= 6.0.4) + activerecord (= 6.0.4) + activestorage (= 6.0.4) + activesupport (= 6.0.4) + mail (>= 2.7.1) + actionmailer (6.0.4) + actionpack (= 6.0.4) + actionview (= 6.0.4) + activejob (= 6.0.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.3) - actionview (= 5.2.4.3) - activesupport (= 5.2.4.3) + actionpack (6.0.4) + actionview (= 6.0.4) + activesupport (= 6.0.4) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.3) - activesupport (= 5.2.4.3) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.0.4) + actionpack (= 6.0.4) + activerecord (= 6.0.4) + activestorage (= 6.0.4) + activesupport (= 6.0.4) + nokogiri (>= 1.8.5) + actionview (6.0.4) + activesupport (= 6.0.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - active-fedora (8.5.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + active-fedora (8.7.0) active-triples (~> 0.4.0) activesupport (>= 4.2.10) deprecation @@ -58,80 +71,71 @@ GEM deprecation (~> 0.1) rdf (~> 1.1) rdf-vocab (~> 0.8) - activejob (5.2.4.3) - activesupport (= 5.2.4.3) + activejob (6.0.4) + activesupport (= 6.0.4) globalid (>= 0.3.6) - activemodel (5.2.4.3) - activesupport (= 5.2.4.3) - activerecord (5.2.4.3) - activemodel (= 5.2.4.3) - activesupport (= 5.2.4.3) - arel (>= 9.0) - activestorage (5.2.4.3) - actionpack (= 5.2.4.3) - activerecord (= 5.2.4.3) - marcel (~> 0.3.1) - activesupport (5.2.4.3) + activemodel (6.0.4) + activesupport (= 6.0.4) + activerecord (6.0.4) + activemodel (= 6.0.4) + activesupport (= 6.0.4) + activestorage (6.0.4) + actionpack (= 6.0.4) + activejob (= 6.0.4) + activerecord (= 6.0.4) + marcel (~> 1.0.0) + activesupport (6.0.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.7.0) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - airbrussh (1.3.0) + airbrussh (1.4.0) sshkit (>= 1.6.1, != 1.7.0) - arel (9.0.0) - ast (2.4.0) - autoprefixer-rails (9.6.1) - execjs - bcrypt (3.1.13) - bixby (2.0.0) - rubocop (= 0.63.1) - rubocop-rspec (= 1.31.0) - blacklight (6.15.0) - bootstrap-sass (~> 3.2) + ast (2.4.2) + bcrypt (3.1.18) + bcrypt_pbkdf (1.1.0) + blacklight (7.29.0) deprecation globalid - jbuilder + hashdiff + i18n (>= 1.7.0) + jbuilder (~> 2.7) kaminari (>= 0.15) - nokogiri (~> 1.6) - rails (>= 4.2, < 6) - rsolr (>= 1.0.6, < 3) - twitter-typeahead-rails (= 0.11.1.pre.corejavascript) - blacklight_oai_provider (6.0.0) - blacklight (~> 6.0) - oai (~> 0.4) - rails (>= 4.2, < 6) - blacklight_range_limit (6.3.3) - blacklight (>= 6.0.2) - jquery-rails - rails (>= 3.0) - bootsnap (1.3.0) - msgpack (~> 1.0) - bootstrap-sass (3.3.7) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) + ostruct (>= 0.3.2) + rails (>= 5.1, < 7.1) + view_component (~> 2.43) + blacklight_oai_provider (7.0.2) + blacklight (~> 7.0) + oai (~> 1.2) + rexml + bootsnap (1.11.1) + msgpack (~> 1.2) builder (3.2.4) - byebug (10.0.2) - cancancan (2.2.0) + byebug (11.1.3) + cancancan (3.4.0) capistrano (3.8.0) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) sshkit (>= 1.9.0) - capistrano-bundler (1.3.0) + capistrano-bundler (2.0.1) capistrano (~> 3.1) - sshkit (~> 1.2) - capistrano-cul (0.1.1) + capistrano-cul (0.1.6) + bcrypt_pbkdf (>= 1.0.1) capistrano (~> 3.1) capistrano-git-with-submodules (~> 2.0) - capistrano-git-with-submodules (2.0.3) + ed25519 (>= 1.2.4) + net-ssh (>= 5) + capistrano-git-with-submodules (2.0.6) capistrano (~> 3.7) - capistrano-passenger (0.2.0) + capistrano-passenger (0.2.1) capistrano (~> 3.0) - capistrano-rails (1.4.0) + capistrano-rails (1.6.2) capistrano (~> 3.1) - capistrano-bundler (~> 1.1) + capistrano-bundler (>= 1.1, < 3) capistrano-resque (0.2.3) capistrano resque @@ -139,287 +143,292 @@ GEM capistrano-rvm (0.1.2) capistrano (~> 3.0) sshkit (~> 1.2) - capybara (3.32.2) + capybara (3.36.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.5) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - childprocess (3.0.0) + childprocess (4.1.0) chronic (0.10.2) - coffee-rails (4.2.2) - coffee-script (>= 2.2.0) - railties (>= 4.0.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) - concurrent-ruby (1.1.6) - coveralls (0.8.22) - json (>= 1.8, < 3) - simplecov (~> 0.16.1) - term-ansicolor (~> 1.3) - thor (~> 0.19.4) - tins (~> 1.6) - crack (0.4.3) - safe_yaml (~> 1.0.0) + concurrent-ruby (1.1.10) + crack (0.4.5) + rexml crass (1.0.6) - css_parser (1.6.0) + css_parser (1.11.0) addressable cul-ldap (0.0.1) net-ldap (~> 0.16) - cul_omniauth (0.6.1) - cancancan (~> 2.0) + cul_omniauth (0.7.0) + cancancan (~> 3.0) devise-guests (~> 0.3) omniauth-cas - rails (~> 5.0) - daemons (1.2.6) - database_cleaner (1.7.0) + rails (~> 6.0) + daemons (1.4.1) + database_cleaner (2.0.1) + database_cleaner-active_record (~> 2.0.0) + database_cleaner-active_record (2.0.1) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0.0) + database_cleaner-core (2.0.1) deprecation (0.99.0) activesupport - devise (4.7.2) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-guests (0.7.0) + devise-guests (0.8.1) devise - diff-lcs (1.3) - docile (1.3.1) - domain_name (0.5.20180417) + diff-lcs (1.5.0) + docile (1.4.0) + domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - dry-configurable (0.11.6) + dry-configurable (0.13.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.4, >= 0.4.7) - dry-equalizer (~> 0.2) - dry-container (0.7.2) + dry-core (~> 0.6) + dry-container (0.9.0) concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.4.9) + dry-configurable (~> 0.13, >= 0.13.0) + dry-core (0.7.1) concurrent-ruby (~> 1.0) - dry-equalizer (0.3.0) - dry-inflector (0.2.0) - dry-logic (1.0.6) + dry-inflector (0.2.1) + dry-logic (1.2.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.2) - dry-equalizer (~> 0.2) - dry-types (1.4.0) + dry-core (~> 0.5, >= 0.5) + dry-types (1.5.1) concurrent-ruby (~> 1.0) dry-container (~> 0.3) - dry-core (~> 0.4, >= 0.4.4) - dry-equalizer (~> 0.3) + dry-core (~> 0.5, >= 0.5) dry-inflector (~> 0.1, >= 0.1.2) dry-logic (~> 1.0, >= 1.0.2) + ed25519 (1.3.0) equivalent-xml (0.6.0) nokogiri (>= 1.4.3) - erubi (1.9.0) - et-orbi (1.1.4) + erubi (1.11.0) + et-orbi (1.2.7) tzinfo - execjs (2.7.0) - factory_bot (4.10.0) - activesupport (>= 3.0.0) - factory_bot_rails (4.10.0) - factory_bot (~> 4.10.0) - railties (>= 3.0.0) + execjs (2.8.1) + factory_bot (6.2.1) + activesupport (>= 5.0.0) + factory_bot_rails (6.2.0) + factory_bot (~> 6.2.0) + railties (>= 5.0.0) fancybox2-rails (0.2.7) railties (>= 3.1.0) - faraday (0.15.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.12.2) - faraday (>= 0.7.4, < 1.0) - ffi (1.13.1) - fugit (1.1.4) - et-orbi (~> 1.1, >= 1.1.3) - raabro (~> 1.1) + faraday (2.3.0) + faraday-net_http (~> 2.0) + ruby2_keywords (>= 0.0.4) + faraday-follow_redirects (0.3.0) + faraday (>= 1, < 3) + faraday-net_http (2.0.3) + ffi (1.15.5) + ffi-compiler (1.0.1) + ffi (>= 1.0.0) + rake + fugit (1.5.3) + et-orbi (~> 1, >= 1.2.7) + raabro (~> 1.4) gaffe (1.2.0) rails (>= 4.0.0) - globalid (0.4.2) - activesupport (>= 4.2.0) - grape (1.3.3) + globalid (1.0.0) + activesupport (>= 5.0) + grape (1.6.2) activesupport builder dry-types (>= 1.1) mustermann-grape (~> 1.0.0) rack (>= 1.3.0) rack-accept - grape-entity (0.7.1) - activesupport (>= 4.0) + grape-entity (0.10.1) + activesupport (>= 3.0.0) multi_json (>= 1.3.2) - haml (5.0.4) + grape-swagger (0.31.0) + grape (>= 0.16.2) + haml (5.2.2) temple (>= 0.8.0) tilt hashdiff (1.0.1) - hashie (4.1.0) + hashie (5.0.0) hooks (0.4.1) uber (~> 0.0.14) htmlentities (4.3.4) - http (3.3.0) - addressable (~> 2.3) + http (5.0.4) + addressable (~> 2.8) http-cookie (~> 1.0) - http-form_data (~> 2.0) - http_parser.rb (~> 0.6.0) - http-cookie (1.0.3) + http-form_data (~> 2.2) + llhttp-ffi (~> 0.4.0) + http-accept (1.7.0) + http-cookie (1.0.5) domain_name (~> 0.5) - http-form_data (2.1.1) - http_parser.rb (0.6.0) - i18n (1.8.3) + http-form_data (2.3.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.4) - jbuilder (2.7.0) - activesupport (>= 4.2.0) - multi_json (>= 1.2) - jquery-rails (4.3.3) + jbuilder (2.11.5) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (2.1.0) + json (2.6.2) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) - kaminari (1.2.1) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - libv8 (3.16.14.19) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) link_header (0.0.8) - loofah (2.6.0) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + llhttp-ffi (0.4.0) + ffi-compiler (~> 1.0) + rake (~> 13.0) + loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.2) + matrix (0.4.2) method_source (1.0.0) - mime-types (3.1) + mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mimemagic (0.3.10) - nokogiri (~> 1) - rake - mini_mime (1.0.2) + mime-types-data (3.2022.0105) + mini_mime (1.1.2) mini_portile2 (2.4.0) - minitest (5.14.1) - mono_logger (1.1.0) - msgpack (1.2.4) - multi_json (1.13.1) + minitar (0.9) + minitest (5.16.3) + mono_logger (1.1.1) + msgpack (1.5.1) + multi_json (1.15.0) multipart-post (2.0.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - mustermann-grape (1.0.1) + mustermann-grape (1.0.2) mustermann (>= 1.0.0) - mysql2 (0.5.1) - net-ldap (0.16.1) - net-scp (1.2.1) - net-ssh (>= 2.6.5) - net-ssh (5.0.2) + mysql2 (0.5.4) + net-ldap (0.17.0) + net-scp (3.0.0) + net-ssh (>= 2.6.5, < 7.0.0) + net-ssh (6.1.0) netrc (0.11.0) - nio4r (2.5.2) - nokogiri (1.10.9) + nio4r (2.5.8) + nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - nom-xml (0.6.0) - activesupport (>= 3.2.18) + nom-xml (1.2.0) i18n nokogiri - oai (0.4.0) + oai (1.2.1) builder (>= 3.1.0) - faraday - faraday_middleware - okcomputer (1.17.2) - om (3.1.1) - activemodel + faraday (< 3) + faraday-follow_redirects (>= 0.3.0, < 2) + okcomputer (1.18.4) + om (3.2.0) + activemodel (>= 5.1, < 7) activesupport nokogiri (>= 1.4.2) solrizer (~> 3.3) omniauth (1.9.1) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-cas (1.1.1) + omniauth-cas (2.0.0) addressable (~> 2.3) nokogiri (~> 1.5) omniauth (~> 1.2) orm_adapter (0.5.0) - parallel (1.12.1) - parser (2.5.1.0) - ast (~> 2.4.0) - powerpack (0.1.2) - premailer (1.11.1) + ostruct (0.5.5) + parallel (1.22.1) + parser (3.1.2.1) + ast (~> 2.4.1) + premailer (1.15.0) addressable css_parser (>= 1.6.0) htmlentities (>= 4.0.0) - premailer-rails (1.10.2) - actionmailer (>= 3, < 6) + premailer-rails (1.11.1) + actionmailer (>= 3) premailer (~> 1.7, >= 1.7.9) - public_suffix (4.0.5) - raabro (1.1.6) - rack (2.2.3) + public_suffix (4.0.7) + puma (5.6.4) + nio4r (~> 2.0) + raabro (1.4.0) + rack (2.2.4) rack-accept (0.4.5) rack (>= 0.4) - rack-protection (2.0.3) + rack-protection (2.2.0) rack - rack-proxy (0.6.5) + rack-proxy (0.7.2) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.4.3) - actioncable (= 5.2.4.3) - actionmailer (= 5.2.4.3) - actionpack (= 5.2.4.3) - actionview (= 5.2.4.3) - activejob (= 5.2.4.3) - activemodel (= 5.2.4.3) - activerecord (= 5.2.4.3) - activestorage (= 5.2.4.3) - activesupport (= 5.2.4.3) + rack-test (2.0.2) + rack (>= 1.3) + rails (6.0.4) + actioncable (= 6.0.4) + actionmailbox (= 6.0.4) + actionmailer (= 6.0.4) + actionpack (= 6.0.4) + actiontext (= 6.0.4) + actionview (= 6.0.4) + activejob (= 6.0.4) + activemodel (= 6.0.4) + activerecord (= 6.0.4) + activestorage (= 6.0.4) + activesupport (= 6.0.4) bundler (>= 1.3.0) - railties (= 5.2.4.3) + railties (= 6.0.4) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (5.2.4.3) - actionpack (= 5.2.4.3) - activesupport (= 5.2.4.3) + railties (6.0.4) + actionpack (= 6.0.4) + activesupport (= 6.0.4) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rainbow (3.0.0) - rake (13.0.1) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + thor (>= 0.20.3, < 2.0) + rainbow (3.1.1) + rake (13.0.6) + rb-fsevent (0.11.1) + rb-inotify (0.10.1) ffi (~> 1.0) rdf (1.99.1) link_header (~> 0.0, >= 0.0.8) - rdf-rdfa (1.1.2) - haml (>= 4.0) - htmlentities (>= 4.3.1) - rdf (>= 1.1.0) - rdf-xsd (>= 1.1) - rdf-rdfxml (1.1.1) - rdf (~> 1.1) - rdf-rdfa (~> 1.1) + rdf-aggregate-repo (1.99.0) + rdf (~> 1.99) + rdf-rdfa (1.99.3) + haml (>= 4.0, < 6.0) + htmlentities (~> 4.3) + rdf (~> 1.99) + rdf-aggregate-repo (~> 1.1) rdf-xsd (~> 1.1) + rdf-rdfxml (1.99.1) + htmlentities (~> 4.3) + rdf (~> 1.99) + rdf-rdfa (~> 1.99) + rdf-xsd (~> 1.99) rdf-vocab (0.8.8) rdf (~> 1.1, >= 1.1.10) rdf-xsd (1.99.0) rdf (~> 1.99) - redis (4.0.1) - redis-namespace (1.6.0) + redis (4.6.0) + redis-namespace (1.8.2) redis (>= 3.0.4) - ref (2.0.0) - regexp_parser (1.7.1) + regexp_parser (2.6.0) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) @@ -429,60 +438,80 @@ GEM redis-namespace (~> 1.3) sinatra (>= 0.9.2) vegas (~> 0.1.2) - resque-scheduler (4.3.1) + resque-scheduler (4.5.0) mono_logger (~> 1.0) - redis (>= 3.3, < 5) - resque (~> 1.26) - rufus-scheduler (~> 3.2) - rest-client (2.0.2) + redis (>= 3.3) + resque (>= 1.27) + rufus-scheduler (~> 3.2, < 3.7) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rinku (2.0.4) - rsolr (2.2.1) + rexml (3.2.5) + rinku (2.0.6) + rsolr (2.5.0) builder (>= 2.1.2) - faraday (>= 0.9.0) + faraday (>= 0.9, < 3, != 2.0.0) rsolr-ext (1.0.3) rsolr (>= 1.0.2) - rspec (3.7.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-core (3.7.1) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.3) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.4) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-its (1.2.0) + rspec-support (~> 3.9.0) + rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.7.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-rails (3.7.2) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.1) - rubocop (0.63.1) - jaro_winkler (~> 1.5.1) + rspec-support (~> 3.9.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) + rspec-support (3.9.4) + rubocop (1.36.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.20.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.4.0) - rubocop-rspec (1.31.0) - rubocop (>= 0.60.0) - rubocul (2.0.0) - bixby (= 2.0.0) - ruby-progressbar (1.9.0) - ruby2_keywords (0.0.2) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.22.0) + parser (>= 3.1.1.0) + rubocop-graphql (0.15.1) + rubocop (>= 0.87, < 2) + rubocop-performance (1.15.0) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + rubocop-rails (2.16.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-rspec (2.13.2) + rubocop (~> 1.33) + rubocul (4.0.6) + rubocop (~> 1.26) + rubocop-ast + rubocop-graphql + rubocop-performance + rubocop-rails + rubocop-rspec + ruby-progressbar (1.11.0) + ruby2_keywords (0.0.5) rubydora (2.1.0) activemodel (>= 4.2.10) activesupport @@ -493,130 +522,118 @@ GEM nokogiri rest-client rubyzip (1.3.0) - rufus-scheduler (3.5.1) - fugit (~> 1.1, >= 1.1.4) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - simplecov (0.16.1) + rufus-scheduler (3.6.0) + fugit (~> 1.1, >= 1.1.6) + selenium-webdriver (4.5.0) + childprocess (>= 0.5, < 5.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + semantic_range (3.0.0) + simplecov (0.21.2) docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) - sinatra (2.0.3) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sinatra (2.2.0) mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.3) + rack (~> 2.2) + rack-protection (= 2.2.0) tilt (~> 2.0) - sitemap_generator (6.0.1) + sitemap_generator (6.2.1) builder (~> 3.0) - social-share-button (1.1.0) - coffee-rails - solr_wrapper (2.0.0) - faraday + solr_wrapper (4.0.2) + http + minitar retriable ruby-progressbar - rubyzip solrizer (3.4.1) activesupport daemons nokogiri stomp xml-simple - spring (2.0.2) - activesupport (>= 4.2) - sprockets (3.7.2) + spring (3.1.1) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.3.13) - sshkit (1.16.1) + sqlite3 (1.4.2) + sshkit (1.21.2) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - stomp (1.4.4) - temple (0.8.0) - term-ansicolor (1.7.0) - tins (~> 1.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref - thor (0.19.4) + stomp (1.4.10) + temple (0.8.2) + thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.9) - tins (1.19.0) - turbolinks (5.1.1) - turbolinks-source (~> 5.1) - turbolinks-source (5.1.0) - twitter-typeahead-rails (0.11.1.pre.corejavascript) - actionpack (>= 3.1) - jquery-rails - railties (>= 3.1) - tzinfo (1.2.7) + tilt (2.0.10) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.10) thread_safe (~> 0.1) uber (0.0.15) - uglifier (4.1.12) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext - unf_ext (0.0.7.5) + unf_ext (0.0.8.2) unicode (0.4.4.4) - unicode-display_width (1.4.0) + unicode-display_width (2.3.0) vegas (0.1.11) rack (>= 1.0.0) - voight_kampff (1.1.2) + view_component (2.71.0) + activesupport (>= 5.0.0, < 8.0) + concurrent-ruby (~> 1.0) + method_source (~> 1.0) + voight_kampff (1.1.4) rack (>= 1.4, < 3.0) - warden (1.2.8) - rack (>= 2.0.6) - webdrivers (4.1.2) + warden (1.2.9) + rack (>= 2.0.9) + webdrivers (5.2.0) nokogiri (~> 1.6) - rubyzip (~> 1.0) - selenium-webdriver (>= 3.0, < 4.0) - webmock (3.8.3) - addressable (>= 2.3.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0) + webmock (3.14.0) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webpacker (4.0.7) - activesupport (>= 4.2) + webpacker (5.4.3) + activesupport (>= 5.2) rack-proxy (>= 0.6.1) - railties (>= 4.2) - websocket-driver (0.7.2) + railties (>= 5.2) + semantic_range (>= 2.3.0) + websocket (1.2.9) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - whenever (0.10.0) + whenever (1.0.0) chronic (>= 0.6.3) wowza-secure_token (0.0.1) - xml-simple (1.1.5) + xml-simple (1.1.9) + rexml xpath (3.2.0) nokogiri (~> 1.8) + zeitwerk (2.6.1) PLATFORMS ruby + x86_64-darwin-19 + x86_64-darwin-21 DEPENDENCIES active-fedora (~> 8.2) addressable - blacklight (~> 6.0) + blacklight (~> 7.25) blacklight_oai_provider - blacklight_range_limit + blacklight_range_limit! bootsnap - bootstrap-sass (~> 3.3.0) byebug - cancancan (~> 2.0) + cancancan capistrano (= 3.8) capistrano-cul capistrano-passenger (~> 0.1) @@ -624,9 +641,8 @@ DEPENDENCIES capistrano-resque (~> 0.2.2) capistrano-rvm (~> 0.1) capybara (~> 3.0) - coveralls cul-ldap - cul_omniauth (~> 0.6.1) + cul_omniauth (>= 0.7.0) database_cleaner devise equivalent-xml @@ -635,43 +651,43 @@ DEPENDENCIES gaffe grape grape-entity - grape-swagger! + grape-swagger (= 0.31.0) http jbuilder jettywrapper (>= 1.4.0)! jquery-rails json_spec + listen multipart-post (~> 2.0.0) mysql2 nokogiri (~> 1.10.8) okcomputer premailer-rails - rails (= 5.2.4.3) + puma (~> 5.2) + rails (= 6.0.4) rainbow resque (~> 1.27) rinku rsolr-ext rspec-its - rspec-rails (~> 3.5) - rubocul (= 2.0.0) + rspec-rails + rubocul (~> 4.0) rubyzip - sass-rails selenium-webdriver + simplecov sitemap_generator - social-share-button - solr_wrapper (>= 0.18.0) + solr_wrapper (~> 4.0) spring sqlite3 (>= 1.3.5) - therubyracer turbolinks uglifier unicode voight_kampff - webdrivers (~> 4.0) + webdrivers (~> 5.2) webmock - webpacker (~> 4.x) + webpacker (~> 5.4.0) whenever wowza-secure_token BUNDLED WITH - 2.0.2 + 2.3.13 diff --git a/Rakefile b/Rakefile index 8c9c35572..da80349e9 100644 --- a/Rakefile +++ b/Rakefile @@ -26,6 +26,25 @@ begin require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) + # Note: Don't include Rails environment for this task, since enviroment includes a check for the presence of database.yml + task :config_files do + # yml templates + Dir.glob(Rails.root.join("config", "*.template.yml")).each do |template_yml_path| + target_yml_path = Rails.root.join('config', File.basename(template_yml_path).sub(".template.yml", ".yml")) + next if File.exist?(target_yml_path) + FileUtils.touch(target_yml_path) # Create if it doesn't exist + target_yml = YAML.load_file(target_yml_path) || YAML.load_file(template_yml_path) + File.open(target_yml_path, 'w') { |f| f.write target_yml.to_yaml } + end + Dir.glob(Rails.root.join("config", "*.template.yml.erb")).each do |template_yml_path| + target_yml_path = Rails.root.join('config', File.basename(template_yml_path).sub(".template.yml.erb", ".yml")) + next if File.exist?(target_yml_path) + FileUtils.touch(target_yml_path) # Create if it doesn't exist + target_yml = YAML.load_file(target_yml_path) || YAML.safe_load(ERB.new(File.read(template_yml_path)).result(binding), aliases: true) + File.open(target_yml_path, 'w') { |f| f.write target_yml.to_yaml } + end + end + desc 'Start Solr' task :solr do puts "Unpacking and starting solr...\n" @@ -41,16 +60,38 @@ begin end desc 'Run all tests regardless of tags' - task ci: ['jetty:clean'] do - jetty_params = Jettywrapper.load_config + task ci: [:config_files, 'jetty:clean'] do + ENV['RAILS_ENV'] = 'test' + Rails.env = ENV['RAILS_ENV'] + rspec_system_exit_failure_exception = nil - error = Jettywrapper.wrap(jetty_params) do - SolrWrapper.wrap do |solr_wrapper_instance| - solr_wrapper_instance.with_collection(name: 'test', dir: 'solr/conf') do + error = Jettywrapper.wrap(Jettywrapper.load_config) do + solr_wrapper_config = Rails.application.config_for(:solr_wrapper).deep_symbolize_keys + if File.exist?(solr_wrapper_config[:instance_dir]) + # Delete old solr if it exists because we want a fresh solr instance + puts "Deleting old test solr instance at #{solr_wrapper_config[:instance_dir]}...\n" + FileUtils.rm_rf(solr_wrapper_config[:instance_dir]) + end + SolrWrapper.wrap(solr_wrapper_config) do |solr_wrapper_instance| + # Create collections + # create is stricter about solr options being in [c,d,n,p,shards,replicationFactor] + original_solr_options = solr_wrapper_instance.config.static_config.options[:solr_options].dup + solr_wrapper_instance.config.static_config.options[:solr_options]&.slice!(:c, :d, :n, :p, :shards, :replicationFactor) + solr_wrapper_config[:collection].each { |c| solr_wrapper_instance.create(c) } + solr_wrapper_instance.config.static_config.options[:solr_options] = original_solr_options + begin system 'RAILS_ENV=test rake ac:populate_solr' Rake::Task['spec_all'].invoke + rescue SystemExit => e + rspec_system_exit_failure_exception = e end + + print 'Stopping solr...' end + puts 'stopped.' + # Re-raise caught exit exception (if present) AFTER solr shutdown and CI duration display. + # This exception triggers an exit call with the original error code sent out by rspec failure. + raise rspec_system_exit_failure_exception unless rspec_system_exit_failure_exception.nil? end raise "test failures: #{error}" if error @@ -58,6 +99,6 @@ begin task default: [:rubocop, :ci] rescue LoadError - puts 'No jettywrapper, rspec or rubocop avaiable.' + puts 'No jettywrapper, rspec or rubocop available.' puts 'This is expected in production environments.' end diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js deleted file mode 100755 index c254993ac..000000000 --- a/app/assets/javascripts/application.js +++ /dev/null @@ -1,33 +0,0 @@ -// Place your application-specific JavaScript functions and classes here -// This file is automatically included by javascript_include_tag :defaults -// - -//= require jquery -//= require rails-ujs -//= require blacklight/blacklight -//= require blacklight_range_limit -//= require bootstrap/affix -//= require readmore-js/readmore -//= require read-more -//= require sticky-sidebar -//= require smooth-scroll -//= require social-share-button -//= require activestorage -//= require dropzone -//= require upload/file-upload -//= require upload/add-creator -//= require upload/license-options -//= require upload/disable-form -//= require jquery-ui-sortable -//= require upload/author-reorder -//= require admin/enable-optional-fields -//= require clipboard/dist/clipboard.min -//= require copy-to-clipboard -//= require @fortawesome/fontawesome-free/js/all -//= require duplicate-input-fields -//= require datatables.net/js/jquery.dataTables.min -//= require datatables.net-bs/js/dataTables.bootstrap.min -//= require admin/datatables -//= require admin/usage-statistics -//= require flash-messages-for-ajax-requests -//= require skip-link-focus-fix diff --git a/app/assets/javascripts/smooth-scroll.js b/app/assets/javascripts/smooth-scroll.js deleted file mode 100644 index d8ae6cde8..000000000 --- a/app/assets/javascripts/smooth-scroll.js +++ /dev/null @@ -1,24 +0,0 @@ -$(document).ready(function(){ - $('a[href*="#"]') - .not('[href="#"]') - .not('[href="#0"]') - .click(function(event) { - if ( - location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') - && - location.hostname == this.hostname - ) { - var target = $(this.hash); - target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); - if (target.length) { - event.preventDefault(); - $('html, body').animate({ - scrollTop: target.offset().top -20 - }, 600, function() { - var $target = $(target); - $target.addClass('active'); - }); - } - } - }); -}); diff --git a/app/assets/javascripts/sticky-sidebar.js b/app/assets/javascripts/sticky-sidebar.js deleted file mode 100644 index 74863ae64..000000000 --- a/app/assets/javascripts/sticky-sidebar.js +++ /dev/null @@ -1,8 +0,0 @@ -$(document).ready(function(){ - $('#main-page #sidebar').affix({ - offset: { - top: 251, - bottom: 240 - } - }); -}); diff --git a/app/assets/javascripts/upload/license-options.js b/app/assets/javascripts/upload/license-options.js deleted file mode 100644 index ee6b14c22..000000000 --- a/app/assets/javascripts/upload/license-options.js +++ /dev/null @@ -1,63 +0,0 @@ -// Change license options based on the copyright status that is selected. - -$(document).ready(function(){ - function addLicenseDropdown(div, licenses, prompt) { - var s = $('').appendTo(range_element); + + // make sure slider is loaded + if (placeholder_input.slider !== undefined) { + placeholder_input.slider({ + min: min, + max: max, + value: [min, max], + tooltip: "hide" + }); + + // try to make slider width/orientation match chart's + var container = range_element.closest(".range_limit"); + var plot_el = container.find(".chart_js"); + var plot = plot_el.data("plot"); + var slider_el = container.find(".slider"); + + if (plot_el) { + plot_el.attr('aria-hidden', 'true'); + } + + if (slider_el) { + slider_el.attr('aria-hidden', 'true'); + } + + if (plot && slider_el) { + slider_el.width(plot.width()); + slider_el.css("display", "block") + } else if (slider_el) { + slider_el.css("width", "100%"); + } + } + + // Slider change should update text input values. + var parent = $(thisContext).parent(); + var form = $(parent).closest(".limit_content").find("form.range_limit"); + $(parent).closest(".limit_content").find(".profile .range").on("slide", function(event, ui) { + var values = $(event.target).data("slider").getValue(); + form.find("input.range_begin").val(values[0]); + form.find("input.range_end").val(values[1]); + }); + } + + begin_el.val(min); + end_el.val(max); + + begin_el.on('input', function() { + var val = BlacklightRangeLimit.parseNum(this.value); + if (isNaN(val) || val < min) { + //for weird data, set slider at min + val = min; + } + var values = placeholder_input.data("slider").getValue(); + values[0] = val; + placeholder_input.slider("setValue", values); + }); + + end_el.on('input', function() { + var val = BlacklightRangeLimit.parseNum(this.value); + if (isNaN(val) || val > max) { + //weird entry, set slider to max + val = max; + } + var values = placeholder_input.data("slider").getValue(); + values[1] = val; + placeholder_input.slider("setValue", values); + }); + + begin_el.change(function() { + var val1 = BlacklightRangeLimit.parseNum(begin_el.val()); + var val2 = BlacklightRangeLimit.parseNum(end_el.val()); + + if (val2 < val1) { + begin_el.val(val2); + end_el.val(val1); + } + }); + + end_el.change(function() { + var val1 = BlacklightRangeLimit.parseNum(begin_el.val()); + var val2 = BlacklightRangeLimit.parseNum(end_el.val()); + + if (val2 < val1) { + begin_el.val(val2); + end_el.val(val1); + } + }); + } diff --git a/app/assets/javascripts/copy-to-clipboard.js b/app/javascript/src/copy-to-clipboard.js similarity index 100% rename from app/assets/javascripts/copy-to-clipboard.js rename to app/javascript/src/copy-to-clipboard.js diff --git a/app/assets/javascripts/duplicate-input-fields.js b/app/javascript/src/duplicate-input-fields.js similarity index 100% rename from app/assets/javascripts/duplicate-input-fields.js rename to app/javascript/src/duplicate-input-fields.js diff --git a/app/assets/javascripts/flash-messages-for-ajax-requests.js b/app/javascript/src/flash-messages-for-ajax-requests.js similarity index 100% rename from app/assets/javascripts/flash-messages-for-ajax-requests.js rename to app/javascript/src/flash-messages-for-ajax-requests.js diff --git a/app/assets/javascripts/jquery-ui-sortable.js b/app/javascript/src/jquery-ui-sortable.js similarity index 100% rename from app/assets/javascripts/jquery-ui-sortable.js rename to app/javascript/src/jquery-ui-sortable.js diff --git a/app/assets/javascripts/logs/logs.js b/app/javascript/src/logs/logs.js similarity index 100% rename from app/assets/javascripts/logs/logs.js rename to app/javascript/src/logs/logs.js diff --git a/app/assets/javascripts/read-more.js b/app/javascript/src/read-more.js similarity index 71% rename from app/assets/javascripts/read-more.js rename to app/javascript/src/read-more.js index 20a0da8ca..9c8ea7dea 100644 --- a/app/assets/javascripts/read-more.js +++ b/app/javascript/src/read-more.js @@ -1,12 +1,12 @@ $(document).ready(function(){ - $('#document .blacklight-author_ssim').readmore({ + new Readmore.default('#document .blacklight-author_ssim', { collapsedHeight: 25, lessLink: 'View fewer authors', moreLink: 'View all authors', blockCSS: 'display: inline-block; width: auto;' }); - $('.featured-searches .featured-search .description').readmore({ + new Readmore.default('.featured-searches .featured-search .description', { collapsedHeight: 0, lessLink: 'Read less', moreLink: 'Read more', diff --git a/app/assets/javascripts/skip-link-focus-fix.js b/app/javascript/src/skip-link-focus-fix.js similarity index 100% rename from app/assets/javascripts/skip-link-focus-fix.js rename to app/javascript/src/skip-link-focus-fix.js diff --git a/app/assets/javascripts/upload/add-creator.js b/app/javascript/src/upload/add-creator.js similarity index 100% rename from app/assets/javascripts/upload/add-creator.js rename to app/javascript/src/upload/add-creator.js diff --git a/app/assets/javascripts/upload/author-reorder.js b/app/javascript/src/upload/author-reorder.js similarity index 100% rename from app/assets/javascripts/upload/author-reorder.js rename to app/javascript/src/upload/author-reorder.js diff --git a/app/javascript/src/upload/current-student.js b/app/javascript/src/upload/current-student.js new file mode 100644 index 000000000..3b19ce4f3 --- /dev/null +++ b/app/javascript/src/upload/current-student.js @@ -0,0 +1,10 @@ +$(document).ready(function () { + + $('form#upload input#deposit_current_student').change(function () { + document.getElementsByClassName('student-section')[0].style.display = "none"; + if (document.getElementById('deposit_current_student').checked == true) { + document.getElementsByClassName('student-section')[0].style.display = "block"; + } + }).change(); + +}); diff --git a/app/assets/javascripts/upload/disable-form.js b/app/javascript/src/upload/disable-form.js similarity index 100% rename from app/assets/javascripts/upload/disable-form.js rename to app/javascript/src/upload/disable-form.js diff --git a/app/assets/javascripts/upload/file-upload.js b/app/javascript/src/upload/file-upload.js similarity index 93% rename from app/assets/javascripts/upload/file-upload.js rename to app/javascript/src/upload/file-upload.js index c2589b935..6092227c3 100644 --- a/app/assets/javascripts/upload/file-upload.js +++ b/app/javascript/src/upload/file-upload.js @@ -20,7 +20,8 @@ $(document).ready(function() { input.remove(); // Initializing dropzone, when a file is added use activestorage to upload it. - $("div#deposit-drop").dropzone({ + // via https://stackoverflow.com/questions/45800079/dropzone-js-error-uncaught-typeerror-dropzone-is-not-a-function + var myDropzone = new Dropzone("div#deposit-drop", { dictDefaultMessage: "Select a file or drag and drop here", url: directUploadUrl, paramName: fileVariableName, diff --git a/app/assets/stylesheets/global.scss b/app/javascript/stylesheets/global.scss similarity index 86% rename from app/assets/stylesheets/global.scss rename to app/javascript/stylesheets/global.scss index 9a372fc71..5a68c95de 100644 --- a/app/assets/stylesheets/global.scss +++ b/app/javascript/stylesheets/global.scss @@ -1,8 +1,25 @@ +/* layout */ + +@include media-breakpoint-down(sm) { + + .container { + max-width: 100%; + } +} + +/* smooth scrolling */ + +html { + scroll-behavior: smooth; +} + +/* color */ + body { color: $gray-base; } -/* headings */ +/* typography */ h1, h2, @@ -73,7 +90,7 @@ p.summary strong { font-weight: 500; } -@media screen and (min-width: $screen-md ) { +@include media-breakpoint-up(md) { p.summary, #main-page p.summary { diff --git a/app/assets/stylesheets/modules/animation.scss b/app/javascript/stylesheets/modules/animation.scss similarity index 100% rename from app/assets/stylesheets/modules/animation.scss rename to app/javascript/stylesheets/modules/animation.scss diff --git a/app/assets/stylesheets/modules/bootstrap-variables.scss b/app/javascript/stylesheets/modules/bootstrap-variables.scss similarity index 71% rename from app/assets/stylesheets/modules/bootstrap-variables.scss rename to app/javascript/stylesheets/modules/bootstrap-variables.scss index 0d015f6b6..f21880245 100644 --- a/app/assets/stylesheets/modules/bootstrap-variables.scss +++ b/app/javascript/stylesheets/modules/bootstrap-variables.scss @@ -1,12 +1,12 @@ -/* bootstrap variables */ +//* bootstrap variables */ /* typography */ $font-family-sans-serif: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -$font-size-base: 16px; +$font-size-base: 1rem; -$font-size-large: 18px; +$font-size-large: $font-size-base * 1.125; /* colors */ @@ -32,6 +32,8 @@ $gray-lighter-custom: #f3f5f3; $state-success-text: #5cb85c; +$green: #2b913f; + /* wells */ $well-bg: #fff; @@ -42,10 +44,8 @@ $panel-default-heading-bg: $gray-lighter-custom; /* logos */ -$logo-cul-banner: image_url('logo-cul-banner.png'); - -$logo-image: image_url('logo-ac.png'); +$logo-image: "../images/logo-ac.png"; -$logo-browse: image_url('logo-browse.svg'); +$logo-cul-banner: url("../images/logo-cul-banner.png"); -$logo-share: image_url('logo-share.svg'); +$logo-browse: url("../images/icon-browse.svg"); diff --git a/app/assets/stylesheets/modules/mixins.scss b/app/javascript/stylesheets/modules/mixins.scss similarity index 100% rename from app/assets/stylesheets/modules/mixins.scss rename to app/javascript/stylesheets/modules/mixins.scss diff --git a/app/assets/stylesheets/modules/variables.scss b/app/javascript/stylesheets/modules/variables.scss similarity index 79% rename from app/assets/stylesheets/modules/variables.scss rename to app/javascript/stylesheets/modules/variables.scss index bca0af683..3e3a3c742 100644 --- a/app/assets/stylesheets/modules/variables.scss +++ b/app/javascript/stylesheets/modules/variables.scss @@ -3,3 +3,5 @@ $box-shadow: 0 15px 35px rgba(50,50,90,.1), 0 5px 10px rgba(0,0,0,.05); $border: 1px solid $gray-lighter; + +$font-size-small: 1rem * .875; diff --git a/app/assets/stylesheets/partials/admin.scss b/app/javascript/stylesheets/partials/admin.scss similarity index 68% rename from app/assets/stylesheets/partials/admin.scss rename to app/javascript/stylesheets/partials/admin.scss index 7639ef1af..6e1ddd18c 100644 --- a/app/assets/stylesheets/partials/admin.scss +++ b/app/javascript/stylesheets/partials/admin.scss @@ -13,7 +13,7 @@ p.admin-intro-message:before { content: '\2191'; } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(md) { p.admin-intro-message:before { content: '\2190'; @@ -23,56 +23,49 @@ p.admin-intro-message:before { /* admin sidebar */ #main-page #dashboard .admin-sidebar { - background: $gray-lighter-custom; - border: 0; border-bottom: $border; - margin: 0 -15px; + padding: 15px 0; + + & .admin-sidebar-content { + column-count: 2; + } & h3 { - margin: 9px 15px; + display: none; } & h4 { font-size: $font-size-small; - line-height: 1.4; - margin: 0; + margin: 5px 0; } & ul { - margin: 6px 0 25px 0; + margin: 0 0 10px 0; + padding: 0; } & li { + list-style: none; font-size: $font-size-small; - line-height: 1.4; + margin-bottom: 6px; } & li a { - color: $link-color; - padding: 3px 0; text-decoration: none; } - - & li a:hover { - text-decoration: underline; - } } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(md) { #main-page #dashboard .admin-sidebar { - background: $body-bg; - border: 0; - margin: 0; + border-bottom: 0; - & h3 { - margin-top: 31px; + & .admin-sidebar-content { + column-count: 1; } - & .admin-sidebar-header, - & ul, - & li { - float: none; + & h3 { + display: block; } } } @@ -87,7 +80,7 @@ p.admin-intro-message:before { } } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(md) { #main-page #dashboard .admin-content { border-bottom: $border; @@ -117,7 +110,7 @@ p.admin-intro-message:before { } } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(md) { #main-page .usage-stats { diff --git a/app/assets/stylesheets/partials/alert-box.scss b/app/javascript/stylesheets/partials/alert-box.scss similarity index 100% rename from app/assets/stylesheets/partials/alert-box.scss rename to app/javascript/stylesheets/partials/alert-box.scss diff --git a/app/assets/stylesheets/partials/cul-banner.scss b/app/javascript/stylesheets/partials/cul-banner.scss similarity index 91% rename from app/assets/stylesheets/partials/cul-banner.scss rename to app/javascript/stylesheets/partials/cul-banner.scss index d604cf73e..285c1b075 100644 --- a/app/assets/stylesheets/partials/cul-banner.scss +++ b/app/javascript/stylesheets/partials/cul-banner.scss @@ -20,7 +20,7 @@ } } -@media screen and (min-width: $screen-md ) { +@include media-breakpoint-up(sm) { .cul-banner { text-align: left; diff --git a/app/assets/stylesheets/partials/dashboard.scss b/app/javascript/stylesheets/partials/dashboard.scss similarity index 77% rename from app/assets/stylesheets/partials/dashboard.scss rename to app/javascript/stylesheets/partials/dashboard.scss index bc39dfc4a..92bb5d8ba 100644 --- a/app/assets/stylesheets/partials/dashboard.scss +++ b/app/javascript/stylesheets/partials/dashboard.scss @@ -1,3 +1,9 @@ +/* outer wrapper */ + +#main-page { + width: 100%; +} + /* dashboard top nav */ #main-page #dashboard-nav { @@ -7,12 +13,9 @@ margin: 30px 0 0 0; padding: 0 10px 10px 10px; - & ul { + & ul.nav-tabs { font-weight: bold; max-width: none; - } - - & .nav-tabs { border-bottom: 0; margin: -30px 0 1px 0; } @@ -21,7 +24,8 @@ border-bottom: $border; border-color: transparent; color: $gray-light; - padding: 8px 5px; + display: inline-block; + padding: 8px; text-decoration: none; } @@ -40,17 +44,16 @@ } } -@media screen and (min-width: $screen-sm ) { - +@include media-breakpoint-up(md) { + #main-page #dashboard-nav { background-image: none; border: 0; font-size: $font-size-base; - margin: 10px 10px 0 10px; - padding: 0 10px; + margin: 15px 15px 0 15px; + padding: 0; - & .nav-tabs { - border-bottom: $border; + & ul.nav-tabs { margin: 0 0 -1px 0; } @@ -58,10 +61,6 @@ padding: 15px 20px; } - & li a:hover { - border-bottom: $border; - } - & li.active a { border: $border; border-bottom-color: $body-bg; @@ -91,13 +90,22 @@ & p.note { margin: 0 0 10px 0; } + + /* for usage statistics page in admin */ + & .date-ranges { + margin: 10px 0 0 20px; + + & .form-group { + margin-bottom: 0; + } + } } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(md) { #main-page #dashboard { border: $border; - margin: 0 20px 15px 20px; + margin: 0 15px 15px 15px; & h3 { margin-top: 15px; diff --git a/app/javascript/stylesheets/partials/facets-sidenav.scss b/app/javascript/stylesheets/partials/facets-sidenav.scss new file mode 100644 index 000000000..8c109d023 --- /dev/null +++ b/app/javascript/stylesheets/partials/facets-sidenav.scss @@ -0,0 +1,76 @@ +/* facets sidenav */ + +#facets { + + & .navbar { + border: $border; + border-radius: 4px; + margin: 0 0 5px 0; + padding-left: 10px; + } + + & .facets-heading { + font-size: $font-size-small; + font-weight: bold; + margin: 0; + text-transform: uppercase; + } + + & .facet-limit { + border-radius: 0; + margin-bottom: 5px; + } + + & .facet-field-heading { + background-color: $body-bg; + font-size: $font-size-small; + } + + .facet-field-heading:first-child { + border-radius: 0; + } + + & .facet-limit-active .facet-field-heading .btn { + color: white; + } + + & .panel-heading.collapse-toggle .panel-title:after { + color: $gray-base; + } + + & .facet-count { + width: 3.5em; + } + + & .remove .glyphicon { + top: 0.15em; + } + + & .remove { + text-indent: 7px; + } +} + +@include media-breakpoint-up(md) { + + #facets { + + & .navbar { + border: 0; + border-radius: 0; + } + + & .facets-heading { + margin: 6px 0 0 0; + } + } + + .facets-toggleable-md .navbar-toggler { + display: none; + } + + .facets-toggleable-md .facets-collapse { + display: block; + width: 100%; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/partials/featured-searches.scss b/app/javascript/stylesheets/partials/featured-searches.scss similarity index 100% rename from app/assets/stylesheets/partials/featured-searches.scss rename to app/javascript/stylesheets/partials/featured-searches.scss diff --git a/app/assets/stylesheets/partials/file-upload.scss b/app/javascript/stylesheets/partials/file-upload.scss similarity index 100% rename from app/assets/stylesheets/partials/file-upload.scss rename to app/javascript/stylesheets/partials/file-upload.scss diff --git a/app/assets/stylesheets/partials/footer.scss b/app/javascript/stylesheets/partials/footer.scss similarity index 90% rename from app/assets/stylesheets/partials/footer.scss rename to app/javascript/stylesheets/partials/footer.scss index 0eeb92d0f..0cbc7813f 100644 --- a/app/assets/stylesheets/partials/footer.scss +++ b/app/javascript/stylesheets/partials/footer.scss @@ -4,7 +4,7 @@ footer[role="contentinfo"] { border-top: $border; color: $gray-light; font-size: $font-size-small; - line-height: 1.8; + line-height: 1.6; padding: 15px 0; & .footer-links { @@ -31,7 +31,6 @@ footer[role="contentinfo"] { border-top: $border; color: $gray-light; font-size: $font-size-small; - line-height: 1.8; margin-top: 15px; padding: 15px 0 90px 0; @@ -45,7 +44,7 @@ footer[role="contentinfo"] { } } -@media screen and (min-width: $screen-xs ) { +@include media-breakpoint-up(sm) { footer[role="contentinfo"] { diff --git a/app/assets/stylesheets/partials/forms.scss b/app/javascript/stylesheets/partials/forms.scss similarity index 97% rename from app/assets/stylesheets/partials/forms.scss rename to app/javascript/stylesheets/partials/forms.scss index 2e8110e3c..4b2605ab6 100644 --- a/app/assets/stylesheets/partials/forms.scss +++ b/app/javascript/stylesheets/partials/forms.scss @@ -2,6 +2,10 @@ form, #main-page form, #main-page #dashboard form { + & .student-section { + display: none; + } + & .btn-add { font-size: $font-size-small; margin-top: 8px; @@ -13,10 +17,6 @@ form, margin: 0 0 5px 0; } - & .form-group { - margin: 30px 0; - } - & input::placeholder, & textarea::placeholder { font-style: italic; @@ -212,7 +212,7 @@ form, } } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(sm) { .admin-form, #main-page #dashboard .admin-form { diff --git a/app/javascript/stylesheets/partials/header.scss b/app/javascript/stylesheets/partials/header.scss new file mode 100644 index 000000000..00ae448cf --- /dev/null +++ b/app/javascript/stylesheets/partials/header.scss @@ -0,0 +1,103 @@ +/* header */ + +/* banner */ + +#header-navbar { + border-bottom: 1px dotted $gray-lighter; + padding: 5px 0; + + & .navbar-brand { + background: transparent url($logo-image) no-repeat; + background-size: contain; + background-position: center center; + height: 50px; + overflow: hidden; + text-indent: 100%; + width: 100%; + } + + & .logo { + line-height: 1; + overflow: hidden; + } + + & .row { + align-items: center; + } + + & .input-group-append svg { + max-height: 20px; + } + + & .submit-search-text { + @include visually-hidden; + } +} + +@include media-breakpoint-up(md) { + + #header-navbar { + padding: 20px 0; + + & .navbar-brand { + background-position: left center; + } + } +} + +/* links navbar */ + +#links-navbar { + font-size: $font-size-small; + border-bottom: $border; + box-shadow: 0 1px 2px $gray-lighter; + + & nav { + display: flex; + justify-content: space-between; + margin-left: -5px; + } + + & nav ul { + margin: 0; + padding: 0; + } + + & nav li { + display: inline; + } + + & nav li a { + display: inline-block; + padding: 10px 5px; + } + + & .navbar-nav > li a:hover { + background: $gray-lighter-custom; + color: $link-hover-color; + } + + & .navbar-nav .open .dropdown-menu { + position: absolute; + float: left; + background-color: $body-bg; + border: $border; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + padding: 0; + } + + & .share-button span { + display: none; + } + + & .dropdown-menu > li > a { + padding: 5px 20px; + } +} + +@include media-breakpoint-up(sm) { + + #links-navbar { + font-size: $font-size-base; + } +} diff --git a/app/assets/stylesheets/partials/homepage.scss b/app/javascript/stylesheets/partials/homepage.scss similarity index 89% rename from app/assets/stylesheets/partials/homepage.scss rename to app/javascript/stylesheets/partials/homepage.scss index f358dbccd..6d04afd1c 100644 --- a/app/assets/stylesheets/partials/homepage.scss +++ b/app/javascript/stylesheets/partials/homepage.scss @@ -5,7 +5,7 @@ & p.summary { font-size: 18px; - margin: 0; + margin: 0 0 25px 0; max-width: 900px; } @@ -26,7 +26,7 @@ & .stats span { display: inline-block; - font-size: 2rem; + font-size: 1.2rem; font-weight: 500; min-width: 75px; padding: 0 8px 0 0; @@ -65,9 +65,10 @@ } } -@media screen and (min-width: $screen-sm ) { -#home-content { - padding-top: 15px; +@include media-breakpoint-up(sm) { + + #home-content { + padding-top: 15px; & p.summary { font-size: 21px; diff --git a/app/assets/stylesheets/partials/item-page-sidebar.scss b/app/javascript/stylesheets/partials/item-page-sidebar.scss similarity index 77% rename from app/assets/stylesheets/partials/item-page-sidebar.scss rename to app/javascript/stylesheets/partials/item-page-sidebar.scss index c4ef489c2..01be8a3b8 100644 --- a/app/assets/stylesheets/partials/item-page-sidebar.scss +++ b/app/javascript/stylesheets/partials/item-page-sidebar.scss @@ -3,21 +3,23 @@ .show-tools { border: $border; box-shadow: none; - padding: 10px; + margin-bottom: 15px; + padding: 10px 10px 0 10px; - & .panel-body { - padding: 0; + & .list-group-item { + border: none; + padding: 10px; } } -.asset-buttons, +.asset_buttons, .doi { animation: slideInUp; animation-duration: .7s; animation-fill-mode: both; } -.asset-buttons { +.show-tools .asset_buttons { align-items: center; background: $body-bg; border-top: 1px solid $brand-dark; @@ -47,17 +49,18 @@ .doi { animation-duration: .9s; align-items: center; - bottom: 11px; + bottom: 2px; display: flex; font-size: 14px; position: fixed; - right: 8px; + right: 0; width: 63%; z-index: 900; & label.doi-label { flex: 0 1 auto; - margin-right: 5px; + font-weight: bold; + margin: 0 5px 0 0; } & input#doi { @@ -87,20 +90,29 @@ } } -.social-buttons { +.social_buttons { + font-size: 1.7rem; line-height: 1; } -.social-buttons a { - margin: 0 6px 0 0; +.social_buttons a { + margin: 0 4px 0 0; } -.use-and-reproduction { - font-size: 12px; +.social_buttons a.twitter-button { + color: #1DA1F2; +} - & a { - margin: 10px 0 0 0; - } +.social_buttons a.facebook-button { + color: #4267B2; +} + +.social_buttons a.email-button { + color: #999; +} + +.use_and_reproduction { + font-size: 12px; & a.license, & a.in-copyright { @@ -118,16 +130,20 @@ } } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(sm) { .show-tools { margin-top: 15px; + + & .list-group-item { + padding: 0 0 8px 0; + } } - .asset-buttons { + .show-tools .asset_buttons { animation: none; background: transparent; - border: 0; + border: none; bottom: auto; box-shadow: none; display: block; @@ -145,7 +161,7 @@ } } - .doi { + .show-tools .doi { animation: none; bottom: auto; flex-wrap: wrap; @@ -156,8 +172,7 @@ & label.doi-label { flex: none; - margin-bottom: 2px; - margin-right: 0; + margin: 2px 0; width: 100%; } diff --git a/app/assets/stylesheets/partials/item-page.scss b/app/javascript/stylesheets/partials/item-page.scss similarity index 89% rename from app/assets/stylesheets/partials/item-page.scss rename to app/javascript/stylesheets/partials/item-page.scss index 6e2bf960c..21a936774 100644 --- a/app/assets/stylesheets/partials/item-page.scss +++ b/app/javascript/stylesheets/partials/item-page.scss @@ -70,6 +70,8 @@ } & .panel { + border: 1px solid $gray-lighter; + border-radius: 4px; box-shadow: none; margin-bottom: 20px; } @@ -78,12 +80,16 @@ color: $gray-base; font-size: $font-size-base; font-weight: bold; + margin: 0; } & .panel-heading { align-items: center; + background-color: $gray-lighter-custom; + border-bottom: $border; display: flex; justify-content: space-between; + padding: 10px 15px; } & .panel-heading .download-all { @@ -95,6 +101,10 @@ padding: 15px; } + & .panel-body { + padding: 10px 15px; + } + & .list-group { border-bottom: 1px dotted $gray-lighter; } @@ -110,6 +120,7 @@ flex-wrap: wrap; font-size: $font-size-small; justify-content: space-between; + padding: 10px 15px; position: relative; } @@ -153,7 +164,6 @@ & dl { font-size: $font-size-small; - line-height: 1.7; margin: 0; } @@ -166,7 +176,7 @@ } } -@media screen and (min-width: $screen-md ) { +@include media-breakpoint-up(md) { #document { @@ -213,16 +223,21 @@ position: relative; } + & dl { + display: grid; + grid-template-columns: 25% auto; + row-gap: 5px; + } + & dt, & dt:first-child { - float: left; - line-height: 1.8; + grid-column: 1; padding: 0; } & dd { - line-height: 1.8; - margin-left: 18%; + grid-column: 2; + margin: 0; } } } diff --git a/app/assets/stylesheets/partials/main-page.scss b/app/javascript/stylesheets/partials/main-page.scss similarity index 83% rename from app/assets/stylesheets/partials/main-page.scss rename to app/javascript/stylesheets/partials/main-page.scss index 80eebd3d1..bdaee08ee 100644 --- a/app/assets/stylesheets/partials/main-page.scss +++ b/app/javascript/stylesheets/partials/main-page.scss @@ -2,11 +2,6 @@ #main-page { - & .affix-top, - & .affix { - position: relative; - } - /* side-nav */ & .side-nav { @@ -20,7 +15,7 @@ list-style: none; margin: 0; max-width: none; - padding: 10px 0 0 0; + padding: 10px 0 0 15px; width: auto; & a { @@ -43,7 +38,7 @@ /* main-page content */ & .post-content { - padding: 20px 15px; + padding: 20px 30px; } & a { @@ -85,12 +80,12 @@ & h3, & h4 { line-height: 1.3; - margin: 0 0 25px 0; + margin: 0 0 15px 0; } & h3, & h4 { - margin: 25px 0 2px 0; + margin: 15px 0 2px 0; } & blockquote { @@ -111,6 +106,10 @@ word-wrap: break-word; } + & li { + line-height: 1.7; + } + & p.alert { margin-top: 0; } @@ -146,11 +145,15 @@ } } -@media screen and (min-width: $screen-md ) { +@include media-breakpoint-up(md) { #main-page { & .side-nav { + bottom: auto; + height: 100%; + position: sticky; + top: 10px; width: 22%; } @@ -160,34 +163,15 @@ width: 78%; } - & ul.affix-top, - & ul.affix { - max-width: 184px; - padding: 30px 0 0 0; - position: static; - } - - & ul.affix-top, - & ul.affix-bottom { - width: 100%; - } - - & ul.affix-bottom { - position: absolute; - } - - & ul.affix { - position: fixed; - top: 0; - } - & ul.anchor-links { font-size: $font-size-base; + padding-top: 15px; } & ul.anchor-links li { display: block; - margin-bottom: 8px; + line-height: 1.3; + margin-bottom: 12px; } & ul.anchor-links li::after { diff --git a/app/assets/stylesheets/partials/media-player-branding.scss b/app/javascript/stylesheets/partials/media-player-branding.scss similarity index 67% rename from app/assets/stylesheets/partials/media-player-branding.scss rename to app/javascript/stylesheets/partials/media-player-branding.scss index e5bc02413..ddf8738cd 100644 --- a/app/assets/stylesheets/partials/media-player-branding.scss +++ b/app/javascript/stylesheets/partials/media-player-branding.scss @@ -1,5 +1,5 @@ .mejs__branding-button { - background: image_url('logo-media-player-badge.svg') 0 12px no-repeat; + background: image_url('../images/logo-media-player-badge.svg') 0 12px no-repeat; background-size: contain; cursor: pointer; margin-left: 15px; @@ -15,7 +15,7 @@ @media screen and (max-width: 680px) { .mejs__branding-button { - background: image_url('logo-media-player-badge-small.svg') 0 8px no-repeat; + background: image_url('../images/logo-media-player-badge-small.svg') 0 8px no-repeat; background-size: 60px; width: 60px; } diff --git a/app/assets/stylesheets/partials/media-player.scss b/app/javascript/stylesheets/partials/media-player.scss similarity index 100% rename from app/assets/stylesheets/partials/media-player.scss rename to app/javascript/stylesheets/partials/media-player.scss diff --git a/app/assets/stylesheets/partials/menu.scss b/app/javascript/stylesheets/partials/menu.scss similarity index 65% rename from app/assets/stylesheets/partials/menu.scss rename to app/javascript/stylesheets/partials/menu.scss index 929a8c19c..f976d52ae 100644 --- a/app/assets/stylesheets/partials/menu.scss +++ b/app/javascript/stylesheets/partials/menu.scss @@ -1,25 +1,15 @@ /* menu */ .menu, -.menu-small, -#main-page .menu, -#main-page .menu-small { - margin: 15px 0; - - & .row { - display: flex; - flex-wrap: wrap; - margin: 0 -10px 60px -10px; - } +#main-page .menu { + margin: 25px 0; + gap: 10px; & .tile { background: $body-bg; border: $border; border-radius: 3px; - display: block; - margin: 10px; padding: 20px 25px; - width: 100%; } & .logo img { @@ -38,7 +28,7 @@ & p { font-weight: 300; line-height: 1.5; - margin: 3px 0; + margin: 7px 0; } & a { @@ -46,15 +36,9 @@ } } -.menu-small, -#main-page .menu-small { - max-width: 700px; -} - /* homepage menu */ .homepage-menu { - margin: 10px -10px 0 -10px; & .collections, & .upload { @@ -107,17 +91,6 @@ } } -.homepage-info:before { - border-bottom: $border; - height: auto; - left: 50%; - margin-bottom: 20px; - margin-left: -50vw; - padding-top: 20px; - position: relative; - width: 100vw; -} - /* upload your research menu */ .menu .log-in { @@ -128,26 +101,14 @@ .menu .no-log-in { background: $gray-lighter-custom; border: 0; - color: $gray; + color: $gray-base; } /* media queries for large screens */ -@media screen and (min-width: $screen-md ) { +@include media-breakpoint-up(md) { - .menu, - .menu-small, - #main-page .menu, - #main-page .menu-small, .homepage-menu { - - & .tile { - width: 45%; - } - } - - .homepage-menu { - display: flex; - margin-top: 20px; + flex-wrap: nowrap; } -} +} \ No newline at end of file diff --git a/app/assets/stylesheets/partials/search-results.scss b/app/javascript/stylesheets/partials/search-results.scss similarity index 62% rename from app/assets/stylesheets/partials/search-results.scss rename to app/javascript/stylesheets/partials/search-results.scss index c2a14921b..38734df85 100644 --- a/app/assets/stylesheets/partials/search-results.scss +++ b/app/javascript/stylesheets/partials/search-results.scss @@ -1,61 +1,53 @@ /* search results */ -/* top */ +/* constraints container */ .constraints-container { background: $gray-lighter-custom; border: 0; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - box-shadow: none; - line-height: 2.2; - margin: 0; - padding: 7px 10px 9px 10px; + border-radius: 3px; + line-height: 2.5; + margin-top: 15px; + padding: 10px 15px; + + & .constraint-value, + & .remove { + background-color: $well-bg; + border-color: $gray-lighter; + font-size: $font-size-small; + } + + & a.catalog_startOverLink, + & a.catalog_startOverLink:active { + font-size: $font-size-small; + } } -#startOverLink { - display: none; +/* facets header */ + +.facets-header { + align-items: center; + border: $border; + border-radius: 3px; + margin-bottom: 5px; + padding: 10px; } +/* sort box */ + #sortAndPerPage { border-bottom-style: dotted; margin: 0; padding: 0; } -#sortAndPerPage .pull-right { - width: 100%; -} - -span.constraints-label { - font-size: $font-size-small; - margin: 0; -} - -.constraint-value, -.appliedFilter .constraint-value:hover { - border-color: $gray-lighter; - font-size: $font-size-small; - line-height: 1.2; -} - -.constraint .remove { - border-color: $gray-lighter; - line-height: 1; -} - -.page_links { - background: darken($gray-lighter-custom, 5%); - border-top-width: 1px; - border-radius: 3px; - border-top-left-radius: 0; - border-top-right-radius: 0; +.page-links { display: block; font-size: $font-size-small; - padding: 7px 10px; + width: 100%; } -.page_links a { +.page-links a { font-weight: bold; } @@ -65,35 +57,25 @@ span.constraints-label { #sort-dropdown .dropdown-toggle, #per_page-dropdown .dropdown-toggle { - border-color: $gray-lighter; - color: $gray-base; - font-size: 13px; + font-size: $font-size-small; } -@media screen and (min-width: $screen-sm ) { +@include media-breakpoint-up(md) { - .constraints-container { - background: $gray-lighter-custom; - border: 0; - border-radius: 3px; - margin-top: 15px; - padding: 6px 15px; + #sidebar { + margin-bottom: 20px; } - #startOverLink { - display: block; + .facets-header { + border-color: transparent; } - - .page_links { + + .page-links { background: transparent; border: 0; display: inline-block; padding: 17px 0 0 0; } - - #sortAndPerPage .pull-right { - width: auto; - } } /* main-page content */ @@ -121,6 +103,10 @@ span.constraints-label { margin: 0 0 8px 0; } + & .document-metadata dt { + display: none; + } + & .document-metadata dd { font-size: $font-size-small; margin: 0; @@ -133,6 +119,7 @@ span.constraints-label { & dd.blacklight-author_ssim { margin-bottom: 6px; overflow: hidden; + padding: 0; text-overflow: ellipsis; white-space: nowrap; } @@ -141,11 +128,23 @@ span.constraints-label { & dd.blacklight-genre_ssim { @include tag-label; margin-bottom: 6px; + padding: 0; } - & dt.blacklight-genre_ssim, - & dt.blacklight-pub_date_isi { - display: none; + /* this is to get pub_date and genre to display inline */ + & dd.col-md-9 { + flex: 0 0 100%; + max-width: 100%; + } + + & dd:nth-of-type(2), + & dd:nth-of-type(3) { + flex: none; + width: auto; + } + + & dd.blacklight-subject_ssim { + padding: 0; } & dd.blacklight-subject_ssim span { diff --git a/app/assets/stylesheets/partials/tables.scss b/app/javascript/stylesheets/partials/tables.scss similarity index 100% rename from app/assets/stylesheets/partials/tables.scss rename to app/javascript/stylesheets/partials/tables.scss diff --git a/app/assets/stylesheets/vendor/blacklight.scss b/app/javascript/stylesheets/vendor/blacklight.scss similarity index 100% rename from app/assets/stylesheets/vendor/blacklight.scss rename to app/javascript/stylesheets/vendor/blacklight.scss diff --git a/app/javascript/stylesheets/vendor/blacklight_range_limit.scss b/app/javascript/stylesheets/vendor/blacklight_range_limit.scss new file mode 100644 index 000000000..1c1e9f989 --- /dev/null +++ b/app/javascript/stylesheets/vendor/blacklight_range_limit.scss @@ -0,0 +1,60 @@ +form.range_limit { + /* leave room for buttons not to collide on line wrap */ + line-height: 3; +} + +.range_limit .range-limit-input-group { + max-width: 350px; + width: 100% !important; +} + +.range_limit input.range_begin, .range_limit input.range_end { + display: inline-block; + width: 4.5em; +} + +.limit_content .subsection { + margin-top: 0.5em; +} + +.hover_legend { + padding: 0.25em; +} + +.slider_js .slider-selection { + /* color from flot selection */ + background: #e8cfac; +} + +.slider_js .slider-horizontal { + margin-left: 5px; + margin-right: 5px; +} + +.chart_js .flot-x-axis { + font-size: 14px; +} + +.modal-body .view_larger { + display: none; +} + +/* Prevent an unstyled flash of content for values we'll replace with a chart */ +.js .distribution .facet-values { + display: none; +} + +.modal-body .range_limit { + justify-content: center; +} + +.view_larger { + display: block; + text-align: center; +} + +.range_limit .chart_js { + min-height: 80px; + margin-left: -12px; + margin-right: -14px; +} diff --git a/app/jobs/sword_deposit_job.rb b/app/jobs/sword_deposit_job.rb index c8d314be2..0114eda14 100644 --- a/app/jobs/sword_deposit_job.rb +++ b/app/jobs/sword_deposit_job.rb @@ -11,7 +11,7 @@ def perform(deposit) # Send request to SWORD begin - response = HTTP.timeout(:global, write: 60, connect: 60, read: 60) + response = HTTP.timeout(write: 60, connect: 60, read: 60) .basic_auth(user: credentials['user'], pass: credentials['password']) .headers(content_type: 'application/zip') .post(credentials['url'], body: deposit.sword_zip) diff --git a/app/models/deposit.rb b/app/models/deposit.rb index c9367f41d..1995aee84 100644 --- a/app/models/deposit.rb +++ b/app/models/deposit.rb @@ -15,7 +15,20 @@ class Deposit < ApplicationRecord 'https://creativecommons.org/publicdomain/zero/1.0/' ].freeze + ARTICLE_VERSION = { + 'Author\'s manuscript/preprint' => 'preprint', + 'Accepted manuscript/postprint' => 'postprint', + 'Final published version' => 'final' + }.freeze + + THESIS_EMBARGO = { + '1 year' => '1', + '2 years' => '2', + 'No embargo' => '0' + }.freeze + before_validation :clean_up_creators + before_save :convert_embargo_value_to_date_string, :finalize_notes_contents # validates_presence_of :agreement_version # validates_presence_of :name @@ -28,9 +41,11 @@ class Deposit < ApplicationRecord validate :one_creator_must_be_present, on: :create validate :cco_must_be_selected, if: proc { |a| a.rights == RIGHTS_OPTIONS['No Copyright'] } validates :title, :abstract, :year, :rights, :files, presence: true, on: :create + validates :previously_published, inclusion: { in: [true, false] }, on: :create validates :rights, inclusion: { in: RIGHTS_OPTIONS.values }, on: :create validates :license, inclusion: { in: LICENSE_OPTIONS }, on: :create, if: proc { |a| a.license.present? } - + validates :degree_program, :academic_advisor, :thesis_or_dissertation, + presence: true, on: :create, if: proc { |a| a.current_student == true } has_many_attached :files belongs_to :user, optional: true @@ -157,3 +172,29 @@ def clean_up_creators end end end + +def finalize_notes_contents + return unless self.current_student + + self.notes = <<-TEXT + #{self.notes} + + Degree Program: #{self.degree_program} + Advisor Name: #{self.academic_advisor} + Thesis or Dissertation: #{self.thesis_or_dissertation} + Degree Earned: #{self.degree_earned} + Embargo Date: #{self.embargo_date} + Previously Published: #{self.previously_published} + Article Version: #{self.article_version} + Keywords: #{self.keywords} + TEXT +end + +def convert_embargo_value_to_date_string + return self.embargo_date = '' unless embargo_date&.present? + + embargo_date_int = Integer(self.embargo_date) + return self.embargo_date = '' unless embargo_date_int.positive? + + self.embargo_date = embargo_date_int.year.from_now.strftime('%-Y-%-m-%-y') +end diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index 95c4de82a..55864a3ae 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -92,7 +92,7 @@ def assets if free_to_read?(self) # check if solr response already included assets if (asset_response = fetch('assets', nil)) - @assets = Blacklight::Solr::Response.new({ response: asset_response }, {}).docs + @assets = Blacklight::Solr::Response.new({ response: asset_response }, {}, blacklight_config: Blacklight::Configuration.new).docs else item_pid = fetch('fedora3_pid_ssi', nil) diff --git a/app/views/_flash_msg.html.erb b/app/views/_flash_msg.html.erb new file mode 100644 index 000000000..1c99ec78e --- /dev/null +++ b/app/views/_flash_msg.html.erb @@ -0,0 +1,17 @@ +
+ <% [:success, :notice, :error, :alert].each do |type| %> + <%- alert_class = case type + when :success then "alert-success" + when :notice then "alert-info" + when :alert then "alert-warning" + when :error then "alert-danger" + else "alert-#{type}" + end + -%> + <% if flash[type] %> +
<%= flash[type] %> + × +
+ <% end %> + <% end %> +
diff --git a/app/views/admin/deposits/show.html.erb b/app/views/admin/deposits/show.html.erb index b52b176df..c82ec2fa3 100644 --- a/app/views/admin/deposits/show.html.erb +++ b/app/views/admin/deposits/show.html.erb @@ -52,8 +52,32 @@
DOI/URL
<%= (@deposit.doi.blank?) ? 'None' : @deposit.doi %>
+
Deposit Program
+
<%= (@deposit.degree_program.blank?) ? 'None' : @deposit.degree_program %>
+ +
Academic Advisor
+
<%= (@deposit.academic_advisor.blank?) ? 'None' : @deposit.academic_advisor %>
+ +
Thesis or Dissertation
+
<%= (@deposit.thesis_or_dissertation.blank?) ? 'None' : @deposit.thesis_or_dissertation %>
+ +
Degree Earned
+
<%= (@deposit.degree_earned.blank?) ? 'None' : @deposit.degree_earned %>
+ +
Thesis Embargo
+
<%= (@deposit.embargo_date.blank?) ? 'None' : @deposit.embargo_date %>
+ +
Previously Published
+
<%= (@deposit.previously_published.blank?) ? 'None' : @deposit.previously_published %>
+ +
Article Version
+
<%= (@deposit.article_version.blank?) ? 'None' : @deposit.article_version %>
+ +
Keywords
+
<%= (@deposit.keywords.blank?) ? 'None' : @deposit.keywords %>
+
Notes
-
<%= (@deposit.notes.blank?) ? 'None' : @deposit.notes %>
+
<%= (@deposit.notes.blank?) ? 'None' : @deposit.notes %>
Rights Statement
<%= (@deposit.rights.blank?) ? 'None' : @deposit.rights %>
diff --git a/app/views/admin/email_author_reports/new.html.erb b/app/views/admin/email_author_reports/new.html.erb index b6150e8ee..9dd886e3a 100644 --- a/app/views/admin/email_author_reports/new.html.erb +++ b/app/views/admin/email_author_reports/new.html.erb @@ -3,66 +3,86 @@
<%= form_with model: @email_author_reports_form, url: admin_email_author_reports_path, class: 'form-horizontal admin-form', local: true do |f| %> -
- <%= f.label :reports_for, 'For', class: 'col-sm-3 control-label' %> -
- <%= f.radio_button(:reports_for, 'all') %> - <%= f.label(:reports_for_all_authors, 'All authors') %> - <%= f.radio_button(:reports_for, 'one') %> - <%= f.label(:reports_for_one_author, 'One author') %> -
- <%= f.label(:uni, 'UNI', class: 'control-label visually-hidden') %> - <%= f.text_field(:uni, disabled: true, placeholder: 'UNI', class: 'col-sm-3 form-control') %> + +
+
+ <%= f.label :reports_for, 'For', class: 'control-label col-form-label col-sm-2 pt-0' %> +
+
+ <%= f.radio_button(:reports_for, 'all', class: 'form-check-input') %> + <%= f.label(:reports_for_all_authors, 'All authors', class: 'form-check-label') %> +
+
+ <%= f.radio_button(:reports_for, 'one', class: 'form-check-input') %> + <%= f.label(:reports_for_one_author, 'One author', class: 'form-check-label') %> +
+ <%= f.label(:uni, 'UNI', class: 'control-label visually-hidden') %> + <%= f.text_field(:uni, disabled: true, placeholder: 'UNI', class: 'col-sm-5 form-control') %> +
+
+ +
-
- <%= f.label :month, 'Report Month', class: 'col-sm-3 control-label' %> -