Skip to content

Instantly share code, notes, and snippets.

@cjcolvar
Last active February 11, 2022 16:24
Show Gist options
  • Save cjcolvar/c970306a192711da0bed805780b19089 to your computer and use it in GitHub Desktop.
Save cjcolvar/c970306a192711da0bed805780b19089 to your computer and use it in GitHub Desktop.
Hyrax offenses on rubocop1-plus branch of bixby
[cjcolvar@trogglus-assistus hyrax]$ git diff
diff --git a/.rubocop.yml b/.rubocop.yml
index 75f33f3bf..f91fbd708 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -5,7 +5,7 @@ inherit_gem:
bixby: bixby_default.yml
AllCops:
- TargetRubyVersion: 2.4
+ TargetRubyVersion: 2.5
DisplayCopNames: true
Exclude:
- 'db/**/*'
diff --git a/.rubocop_fixme.yml b/.rubocop_fixme.yml
index 4ef63b9fb..969bafc1b 100644
--- a/.rubocop_fixme.yml
+++ b/.rubocop_fixme.yml
@@ -179,6 +179,6 @@ Rails/HasManyOrHasOneDependent:
- 'app/models/admin_set.rb'
# Offense count: 1
-Style/MethodMissingSuper:
+Lint/MissingSuper:
Exclude:
- 'app/models/concerns/hyrax/file_set/characterization.rb'
diff --git a/Gemfile b/Gemfile
index 341ed79b4..4eec96b90 100644
--- a/Gemfile
+++ b/Gemfile
@@ -12,6 +12,7 @@ group :development, :test do
gem 'pry-byebug' unless ENV['CI']
gem 'ruby-prof', require: false
gem "simplecov", require: false
+ gem 'bixby', github: 'samvera-labs/bixby', branch: 'rubocop1-plus'
end
test_app_path = ENV['RAILS_ROOT'] ||
This file has been truncated, but you can view the full file.
Inspecting 1659 files
WCC.CCCWC..CCCCCCCCCCW.CWCW.CWCCC.CCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCWCCCCCCCCCCCCCCCCCCCCCWCCCCCWCCCWCCCCWWCCCCCCCCCCCCCCCCWCCCCCCCCCCCW.CCWWCCC.WCWCCCWCCC.CCCCCCCCCCCCC.CCCCCWCC..C.WCCCCCCWCCCCCCC.C..CCW.C.CCCCCCCCCCCCCCCCCCCCCCCCCCCC.CCWCCCCCCCCCCCCCCCCCCCCCCCCC.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.CC.CCCCCCC.CCCCC.CCC..CC.CC.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCCCCWCCCCCCCCCCCCCCWCCCCCCCWCCCCCCCCCCCCCCWCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCCWWWWCCC.WW.C.WWCCCCCCCCCCCCCWCCCC....C.CCCCW.CCCCCCCCCCC.CCCCCCCCC.CCCCC..C..CC..CCCCCCCCCCCCCCCWCC.C.CCW.CWCCCCCCCCCCCCCCCCWCCCC.CC.CCCCCWCCCCCCCCCCCW.CCWCCCCCCCCCCCCCCCCCCCCCCCC..CC..CCCCCCCCCWCCCCCCCCCCCCCCCWCCCCCCC.CCCCCC.CCCCCCCC.W.W.CCCCCCC.CCWCCCWCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.CCCC.CCCCCWCC.WWCC.C.CWCCCCCCCCCCCC.C.CCCCCCCCCCCWCCWCCWCCCCCCWWWCCCCCCCCCWCWCCCCCCC.CCCCCCCWCCCCCCCCCCCCCCWWWCCCCWCCCWCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCCWWWCCCC.CC..CCCCCCCWCCCCCCCCWWCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCCCCCCCCCCCCWWCWCCCCCCCC.CCCCCCCCCCCCWCCWCCCCCCCCCCCCCCWCWCWCCCCCWCCCCCCCCCCCC.WCCCCCC..C..CCW.CWCCCCCCCCCCCCCCCCCCCCCCC.CCCCCCC.CCCCCCCCCCCCCCCCCCCCCCCCWCCCWWCCWCCWCCCCWCCCCCCCCCCCC.C..CCCCCWWWCCCWW.CCCCCCCCCCCCCCCCCCCWCCCWCCCCCCCCCCCCCCCCCCCCWCCCCCCCCCCCCCCCCCCCCCCCC.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCCCCCWWCCWCCCCCCCCCCCCWCCCCCCCCCCCCCCCWCCCCCCCCCCCC.CCWCCCCCCCWCWCCCCCWCCCCCCCCCCC.CCCCCCCCCCCCCCCCCCCCCCCWCCCCCCCCCCWCCCCCCWCCWCWCCCWCCC.CCCCC.CCCCCCCCC..CC.CCCW.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCWCCCWCWCCCCCCCCWWCCWCCCC
Offenses:
Gemfile:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
source 'https://rubygems.org'
^
Gemfile:14:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
gem "simplecov", require: false
^^^^^^^^^^^
Gemfile:15:3: C: [Correctable] Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem bixby should appear before simplecov.
gem 'bixby', github: 'samvera-labs/bixby', branch: 'rubocop1-plus'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gemfile:22:1: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Bundler/DuplicatedGem.
# rubocop:disable Bundler/DuplicatedGem
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:26:33: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if File.exist?(File.expand_path(".internal_test_app/Rakefile", __dir__))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:27:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
APP_RAKEFILE = File.expand_path(".internal_test_app/Rakefile", __dir__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/abstract_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/add_to_work_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/add_to_work_actor.rb:38:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if new_work_ids.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/add_to_work_actor.rb:72:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
work.errors[:in_works_ids] << "Works can only be related to each other if user has ability to edit both."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_order_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/apply_order_actor.rb:21:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if ordered_member_ids.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_order_actor.rb:44:65: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
env.curation_concern.errors[:ordered_member_ids] << "Works can only be related to each other if user has ability to edit both."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_order_actor.rb:44:121: C: Layout/LineLength: Line is too long. [139/120]
env.curation_concern.errors[:ordered_member_ids] << "Works can only be related to each other if user has ability to edit both."
^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_order_actor.rb:50:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless new_order
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_permission_template_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/apply_permission_template_actor.rb:22:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if env.attributes[:admin_set_id].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_permission_template_actor.rb:28:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if env.attributes[:collection_id].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/apply_permission_template_actor.rb:29:121: C: Layout/LineLength: Line is too long. [151/120]
collection_id = env.attributes.delete(:collection_id) # delete collection_id from attributes because works do not have a collection_id property
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/attach_members_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/attach_members_actor.rb:34:7: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/CyclomaticComplexity.
# rubocop:disable Metrics/CyclomaticComplexity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/attach_members_actor.rb:55:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless cast_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/base_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/base_actor.rb:81:61: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue Wings::Valkyrie::Persister::FailedSaveError => _err
^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/collections_membership_actor.rb:38:7: C: Metrics/AbcSize: Assignment Branch Condition size for assign_nested_attributes_for_collection is too high. [<8, 25, 11> 28.46/28]
def assign_nested_attributes_for_collection(env) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:50:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if attributes['id'].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:55:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless existing_collections.include?(attributes['id'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:59:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if existing_collections.include?(attributes['id'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:75:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless env.current_ability.can?(:deposit, collection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:101:26: C: [Correctable] Style/RedundantFetchBlock: Use fetch(:member_of_collections_attributes, nil) instead of fetch(:member_of_collections_attributes) { nil }.
env.attributes.fetch(:member_of_collections_attributes) { nil }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/collections_membership_actor.rb:118:121: C: Layout/LineLength: Line is too long. [133/120]
multiple_memberships = Hyrax::MultipleMembershipChecker.new(item: env.curation_concern).check(collection_ids: collection_ids)
^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_files_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/create_with_files_actor.rb:43:121: C: Layout/LineLength: Line is too long. [139/120]
Rails.logger.error "User #{env.user.user_key} attempted to ingest uploaded_file #{file.id}, but it belongs to a different user"
^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_files_actor.rb:52:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if files.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_files_actor.rb:59:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if uploaded_file_ids.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_files_ordered_members_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:45:121: C: Layout/LineLength: Line is too long. [123/120]
def initialize(user:, curation_concern:, remote_files:, file_set_actor_class:, ordered_members: [], ordered: false)
^^^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:59:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless remote_files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:61:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if file_info.blank? || file_info[:url].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:65:121: C: Layout/LineLength: Line is too long. [140/120]
Rails.logger.error "User #{user.user_key} attempted to ingest file from url #{file_info[:url]}, which doesn't pass validation"
^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:125:52: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
operation_type: "Attach Remote File")
^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_remote_files_actor.rb:134:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
class_attribute :ingest_remote_files_service_class, default: ::Hyrax::Actors::CreateWithRemoteFilesActor::IngestRemoteFilesService
^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb:41:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :ordered_members
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/default_admin_set_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/embargo_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/environment.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/featured_work_actor.rb:28:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless curation_concern.private?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'wings/services/file_metadata_builder'
^
app/actors/hyrax/actors/file_actor.rb:26:121: C: Layout/LineLength: Line is too long. [151/120]
# @todo create a job to monitor the temp directory (or in a multi-worker system, directories!) to prune old files that have made it into the repo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:37:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless file_set.save
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:45:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless other.is_a?(self.class)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:63:121: C: Layout/LineLength: Line is too long. [121/120]
file_set.public_send(normalize_relation(relation)) || raise("No #{relation} returned for FileSet #{file_set.id}")
^
app/actors/hyrax/actors/file_actor.rb:67:121: C: Layout/LineLength: Line is too long. [137/120]
# Skip versioning because versions will be minted by VersionCommitter as necessary during save_characterize_and_record_committer.
^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:72:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless file_set.save
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:79:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn "FileActor support for Valkyrie was experimental and " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:80:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"is slated to be removed in favor of WorkUploadsHandler."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_actor.rb:83:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
Hyrax.storage_adapter.upload(resource: file_set, file: io, original_filename: io.original_name, use: relation)
^^
app/actors/hyrax/actors/file_actor.rb:84:35: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue StandardError => err
^^^
app/actors/hyrax/actors/file_set_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/file_set_actor.rb:27:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless file_set
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:54:121: C: Layout/LineLength: Line is too long. [124/120]
# we have to save both the parent work and the file_set in order to record the "metadata" relationship between them.
^^^^
app/actors/hyrax/actors/file_set_actor.rb:83:50: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
deprecation_deprecate attach_file_to_work: "use attach_to_work instead"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:85:7: C: Metrics/AbcSize: Assignment Branch Condition size for attach_to_valkyrie_work is too high. [<5, 30, 4> 30.68/28]
def attach_to_valkyrie_work(work, file_set_params) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:115:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless build_file_actor(relation).revert_to(revision_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:179:121: C: Layout/LineLength: Line is too long. [133/120]
# replaces file_set.apply_depositor_metadata(user)from hydra-access-controls so depositor doesn't automatically get edit access
^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:187:7: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/CyclomaticComplexity.
# rubocop:disable Metrics/CyclomaticComplexity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:190:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless work && (work.thumbnail_id == file_set.id || work.representative_id == file_set.id || work.rendering_ids.include?(file_set.id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:190:16: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
return unless work && (work.thumbnail_id == file_set.id || work.representative_id == file_set.id || work.rendering_ids.include?(file_set.id))
^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:190:121: C: Layout/LineLength: Line is too long. [149/120]
return unless work && (work.thumbnail_id == file_set.id || work.representative_id == file_set.id || work.rendering_ids.include?(file_set.id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:203:121: C: Layout/LineLength: Line is too long. [145/120]
saved_object_to_return = valkyrie_object?(object) ? saved_resource : Wings::ActiveFedoraConverter.new(resource: saved_resource).convert
^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:213:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return object if valkyrie_object?(object)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/file_set_actor.rb:221:24: W: [Correctable] Lint/RedundantCopEnableDirective: Unnecessary enabling of Metrics/AbcSize.
# rubocop:enable Metrics/AbcSize
^^^^^^^^^^^^^^^
app/actors/hyrax/actors/initialize_workflow_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/interpret_visibility_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/interpret_visibility_actor.rb:6:9: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(attributes) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:95:86: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
template = PermissionTemplate.find_by!(source_id: attributes[:admin_set_id]) if attributes[:admin_set_id].present?
^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:95:121: C: Layout/LineLength: Line is too long. [122/120]
template = PermissionTemplate.find_by!(source_id: attributes[:admin_set_id]) if attributes[:admin_set_id].present?
^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:113:121: C: Layout/LineLength: Line is too long. [126/120]
# Leases are only allowable if a template doesn't require a release period or have any specific visibility requirement
^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:116:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if intention.valid_lease?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:117:121: C: [Correctable] Layout/LineLength: Line is too long. [137/120]
env.curation_concern.errors.add(:visibility, 'When setting visibility to "lease" you must also specify lease expiration date.')
^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:121:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
env.curation_concern.errors.add(:visibility, 'Lease option is not allowed by permission template for selected AdminSet.')
^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:130:121: C: [Correctable] Layout/LineLength: Line is too long. [165/120]
env.curation_concern.errors.add(:visibility, 'Visibility specified does not match permission template "no release delay" requirement for selected AdminSet.')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:136:121: C: Layout/LineLength: Line is too long. [150/120]
# NOTE: For embargo/lease, attributes[:visibility] will be nil (see sanitize_params), so visibility will be validated as part of embargo/lease
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:142:121: C: [Correctable] Layout/LineLength: Line is too long. [157/120]
env.curation_concern.errors.add(:visibility, 'Visibility specified does not match permission template visibility requirement for selected AdminSet.')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:157:121: C: [Correctable] Layout/LineLength: Line is too long. [167/120]
env.curation_concern.errors.add(:visibility, 'When setting visibility to "embargo" you must also specify embargo release date.') if embargo_release_date.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:157:138: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
env.curation_concern.errors.add(:visibility, 'When setting visibility to "embargo" you must also specify embargo release date.') if embargo_release_date.blank?
^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:165:57: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
env.curation_concern.errors.add(attribute_name, "Must be a future date.")
^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:176:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
env.curation_concern.errors.add(:embargo_release_date, "Release date specified does not match permission template release requirements for selected AdminSet.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:176:121: C: [Correctable] Layout/LineLength: Line is too long. [167/120]
env.curation_concern.errors.add(:embargo_release_date, "Release date specified does not match permission template release requirements for selected AdminSet.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:185:68: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
env.curation_concern.errors.add(:visibility_after_embargo, "Visibility after embargo does not match permission template visibility requirements for selected AdminSet.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:185:121: C: [Correctable] Layout/LineLength: Line is too long. [176/120]
env.curation_concern.errors.add(:visibility_after_embargo, "Visibility after embargo does not match permission template visibility requirements for selected AdminSet.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:199:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return datetime.to_date unless datetime.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:205:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless intention.wants_lease?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/interpret_visibility_actor.rb:215:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless intention.wants_embargo?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/lease_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/model_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/model_actor.rb:7:7: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Rails/Delegate.
# rubocop:disable Rails/Delegate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/model_actor.rb:34:27: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of error.
rescue NameError => error
^^^^^
app/actors/hyrax/actors/optimistic_lock_validator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/optimistic_lock_validator.rb:22:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if version.blank? || version == env.curation_concern.etag
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/ordered_members_actor.rb:9:7: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(ordered_members, user) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/actors/hyrax/actors/terminator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/transactional_request.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/transfer_request_actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/actors/hyrax/actors/transfer_request_actor.rb:22:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if proxy.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/authorities/qa/authorities/collections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Qa::Authorities
^
app/authorities/qa/authorities/collections.rb:7:16: C: Naming/MethodParameterName: Method parameter must be at least 3 characters long.
def search(_q, controller)
^^
app/authorities/qa/authorities/collections.rb:9:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless controller.current_user
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/authorities/qa/authorities/find_works.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Qa::Authorities
^
app/authorities/qa/authorities/find_works.rb:7:16: C: Naming/MethodParameterName: Method parameter must be at least 3 characters long.
def search(_q, controller)
^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# The BootstrapBreadcrumbsBuilder is a Bootstrap compatible breadcrumb builder.
^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:13:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" if @elements.blank?
^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:23:95: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
html_class = 'active' if @context.current_page?(compute_path(element)) || element.options["aria-current"] == "page"
^^^^^^^^^^^^^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:23:114: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
html_class = 'active' if @context.current_page?(compute_path(element)) || element.options["aria-current"] == "page"
^^^^^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:26:121: C: [Correctable] Layout/LineLength: Line is too long. [163/120]
@context.link_to_unless(html_class == 'active', @context.truncate(compute_name(element), length: 30, separator: ' '), compute_path(element), element.options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:31:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ class: 'breadcrumb', role: "navigation", "aria-label" => "Breadcrumb" }
^^^^^^^^^^^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:31:48: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ class: 'breadcrumb', role: "navigation", "aria-label" => "Breadcrumb" }
^^^^^^^^^^^^
app/builders/hyrax/bootstrap_breadcrumbs_builder.rb:31:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ class: 'breadcrumb', role: "navigation", "aria-label" => "Breadcrumb" }
^^^^^^^^^^^^
app/builders/hyrax/form_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/builders/hyrax/form_builder.rb:6:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
options[:input_html] = options.except(:as, :boolean_style, :collection, :label_method, :value_method, *ATTRIBUTE_COMPONENTS)
^^^^^^^^^^
app/builders/hyrax/manifest_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/builders/hyrax/manifest_helper.rb:22:61: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
mime = file_set_document.mime_type.presence || I18n.t("hyrax.manifest.unknown_mime_text")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/builders/hyrax/manifest_helper.rb:26:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
'label' => I18n.t("hyrax.manifest.download_text") + label
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/channels/hyrax/application_cable/channel.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/channels/hyrax/application_cable/connection.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/channels/hyrax/application_cable/connection.rb:15:9: C: [Correctable] Style/RedundantCondition: Use double pipes || instead.
if user ...
^^^^^^^
app/channels/hyrax/notifications_channel.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/connections/hyrax/clean_connection.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/connections/hyrax/clean_connection.rb:7:7: C: [Correctable] Style/RedundantAssignment: Redundant assignment before returning detected.
result = __getobj__.get(*args) do |req| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/connections/hyrax/clean_connection.rb:8:61: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
prefer_headers = Ldp::PreferHeaders.new(req.headers["Prefer"])
^^^^^^^^
app/connections/hyrax/clean_connection.rb:10:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
req.headers["Prefer"] = prefer_headers.to_s
^^^^^^^^
app/controllers/concerns/hyrax/admin/stats_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/admin/stats_behavior.rb:28:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
limit = params.fetch(:limit, "5").to_i
^^^
app/controllers/concerns/hyrax/admin/users_controller_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/api.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/api.rb:9:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Request Succeeded",
^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:18:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Created the Resource"
^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:22:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Accepted",
^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:27:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Bad Request",
^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:32:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Authentication Required",
^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:37:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Not Authorized",
^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:42:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Resource not found",
^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:47:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Unprocessable Entity",
^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/api.rb:53:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message: "Internal Server Error",
^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/breadcrumbs.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb:12:121: C: [Correctable] Layout/LineLength: Line is too long. [124/120]
add_breadcrumb I18n.t('hyrax.dashboard.breadcrumbs.collections_report'), hyrax.admin_analytics_collection_reports_path
^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb:23:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "aria-current" => "page" }
^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb:23:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "aria-current" => "page" }
^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb:18:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
add_breadcrumb I18n.t("hyrax.collection.edit_view"), collection_path(params["id"]), mark_active_action
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb:18:85: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
add_breadcrumb I18n.t("hyrax.collection.edit_view"), collection_path(params["id"]), mark_active_action
^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb:25:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "aria-current" => "page" }
^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb:25:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "aria-current" => "page" }
^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_works.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/breadcrumbs_for_works.rb:19:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super if action_name == 'show'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb:23:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "aria-current" => "page" }
^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb:23:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "aria-current" => "page" }
^^^^^^
app/controllers/concerns/hyrax/collections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/collections/accepts_batches.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/collections/accepts_batches.rb:49:109: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
flash[:notice] = "You do not have permission to edit the documents: #{no_permissions.join(', ')}" unless no_permissions.empty?
^^^^^^
app/controllers/concerns/hyrax/collections/accepts_batches.rb:49:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
flash[:notice] = "You do not have permission to edit the documents: #{no_permissions.join(', ')}" unless no_permissions.empty?
^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/collections_controller_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/collections_controller_behavior.rb:44:22: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
@presenter ||= begin
^^^^^
app/controllers/concerns/hyrax/collections_controller_behavior.rb:54:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise CanCan::AccessDenied unless curation_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/collections_controller_behavior.rb:59:121: C: [Correctable] Layout/LineLength: Line is too long. [165/120]
Hyrax::SearchService.new(config: blacklight_config, user_params: params.except(:q, :page), scope: self, search_builder_class: single_item_search_builder_class)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/collections_controller_behavior.rb:87:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
@collection_member_service ||= membership_service_class.new(scope: self, collection: collection, params: params_for_query)
^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:39:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super if defined?(super)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:40:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Avoid direct calls to `#search_builder_class`; this" \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:41:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
" method provides short-term compatibility to" \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:42:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
" Blacklight 6 clients.")
^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:50:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super if defined?(super)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:51:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Avoid direct calls to `#repository`; this method" \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:52:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
" provides short-term compatibility to Blacklight 6 " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:53:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
" clients.")
^^^^^^^^^^^
app/controllers/concerns/hyrax/controller.rb:142:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if self.class.to_s == Hyrax::Admin::StrategiesController.to_s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/deny_access_override_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/embargoes_controller_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/embargoes_controller_behavior.rb:30:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for update is too high. [8/7]
def update ...
^^^^^^^^^^
app/controllers/concerns/hyrax/embargoes_controller_behavior.rb:34:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
resources = Hyrax.custom_queries.find_many_by_alternate_ids(alternate_ids: batch, use_valkyrie: Hyrax.config.use_valkyrie?)
^^^^^^^^^
app/controllers/concerns/hyrax/embargoes_controller_behavior.rb:44:52: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
resource.visibility = resource.to_solr["visibility_after_embargo_ssim"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/leases_controller_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/leases_controller_behavior.rb:32:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
resources = Hyrax.custom_queries.find_many_by_alternate_ids(alternate_ids: batch, use_valkyrie: Hyrax.config.use_valkyrie?)
^^^^^^^^^
app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb:22:7: C: [Correctable] Style/OrAssignment: Use the double pipe equals operator ||= instead.
to = local_file_size - 1 unless to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb:33:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless stale?(last_modified: local_file_last_modified, template: false)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/manages_embargoes.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/manages_embargoes.rb:7:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_accessor :curation_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/singular_subresource_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/themed_layout_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/concerns/hyrax/themed_layout_controller.rb:18:11: W: Lint/AmbiguousBlockAssociation: Parenthesize the param proc { |controller| controller.send(view_name) } to make sure that the block will be associated with the proc method call.
layout proc { |controller| controller.send(view_name) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'iiif_manifest'
^
app/controllers/concerns/hyrax/works_controller_behavior.rb:20:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_accessor :curation_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:28:121: C: [Correctable] Layout/LineLength: Line is too long. [156/120]
load_and_authorize_resource class: curation_concern_type, instance_name: :curation_concern, except: [:show, :file_manager, :inspect_work, :manifest]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:68:121: C: [Correctable] Layout/LineLength: Line is too long. [124/120]
@form = Hyrax::Forms::FailedSubmissionFormWrapper.new(form: @form, input_params: original_input_params_for_form)
^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:71:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
wants.json { render_json_response(response_type: :unprocessable_entity, options: { errors: curation_concern.errors }) }
^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:87:121: C: Layout/LineLength: Line is too long. [136/120]
curation_concern # This is here for authorization checks (we could add authorize! but let's use the same method for CanCanCan)
^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:112:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
wants.json { render_json_response(response_type: :unprocessable_entity, options: { errors: curation_concern.errors }) }
^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:122:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless actor.destroy(env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:141:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise Hydra::AccessDenied unless current_ability.admin?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:184:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return AdminSet::DEFAULT_ID if admin_sets.map(&:id).include?(AdminSet::DEFAULT_ID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:209:121: C: [Correctable] Layout/LineLength: Line is too long. [161/120]
'work_resource.add_file_sets' => { uploaded_files: uploaded_files, file_set_params: params[hash_key_for_curation_concern][:file_set] },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:225:121: C: [Correctable] Layout/LineLength: Line is too long. [161/120]
.with_step_args('work_resource.add_file_sets' => { uploaded_files: uploaded_files, file_set_params: params[hash_key_for_curation_concern][:file_set] })
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:301:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return document_list.first unless document_list.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:307:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise WorkflowAuthorizationException if doc.suppressed? && current_ability.can?(:read, doc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:312:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message = I18n.t("hyrax.workflow.unauthorized")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:328:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @presenter does not match method name unavailable_presenter. Use @unavailable_presenter instead.
@presenter ||= show_presenter.new(::SolrDocument.find(params[:id]), current_ability, request)
^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:378:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
flash[:notice] = view_context.t('hyrax.works.create.after_create_html', application_name: view_context.application_name)
^^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:387:81: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return redirect_to hyrax.confirm_access_permission_path(curation_concern) if permissions_changed? && concern_has_file_sets?
^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:387:121: C: Layout/LineLength: Line is too long. [129/120]
return redirect_to hyrax.confirm_access_permission_path(curation_concern) if permissions_changed? && concern_has_file_sets?
^^^^^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:390:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
wants.html { redirect_to [main_app, curation_concern], notice: "Work \"#{curation_concern}\" successfully updated." }
^^^^^
app/controllers/concerns/hyrax/works_controller_behavior.rb:405:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
type: "application/x-endnote-refer",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/admin_sets_controller.rb:81:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
def after_create_error(err_msg: "")
^^
app/controllers/hyrax/admin/admin_sets_controller.rb:121:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
["hyrax/admin/admin_sets", "hyrax/collections", 'catalog']
^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:121:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
["hyrax/admin/admin_sets", "hyrax/collections", 'catalog']
^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:127:121: C: Layout/LineLength: Line is too long. [129/120]
@admin_set = form.validate(admin_set_params) && transactions['admin_set_resource.update'].call(form).value_or do |_failure|
^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:131:121: C: [Correctable] Layout/LineLength: Line is too long. [163/120]
redirect_to update_referer, notice: I18n.t('updated_admin_set', scope: 'hyrax.admin.admin_sets.form.permission_update_notices', name: @admin_set.title.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:136:121: C: [Correctable] Layout/LineLength: Line is too long. [165/120]
redirect_to update_referer, notice: I18n.t('updated_admin_set', scope: 'hyrax.admin.admin_sets.form.permission_update_notices', name: @admin_set.title.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:160:28: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue RuntimeError => err
^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:168:28: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue RuntimeError => err
^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:213:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if request.referer&.include? "my/collections"
^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/admin_sets_controller.rb:215:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
elsif request.referer&.include? "collections"
^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/analytics_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/analytics/analytics_controller.rb:17:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
@month_names = 12.downto(1).map { |n| DateTime::ABBR_MONTHNAMES.drop(1)[(Time.zone.today.month - n) % 12] }.reverse
^^^^^
app/controllers/hyrax/admin/analytics/analytics_controller.rb:32:26: C: [Correctable] Style/FloatDivision: Prefer using .to_f on one side only.
total_pages = (results_array.size.to_f / rows.to_f).ceil
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:24:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless Hyrax.config.analytics?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:36:8: C: [Correctable] Layout/AccessModifierIndentation: Indent access modifiers like private.
private
^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:41:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "View of Works In Collection", "Downloads of Works In Collection", "Collection Page Views"]
^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:41:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "View of Works In Collection", "Downloads of Works In Collection", "Collection Page Views"]
^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:41:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "View of Works In Collection", "Downloads of Works In Collection", "Collection Page Views"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:41:66: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "View of Works In Collection", "Downloads of Works In Collection", "Collection Page Views"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:41:102: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "View of Works In Collection", "Downloads of Works In Collection", "Collection Page Views"]
^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:41:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
csv << ["Name", "ID", "View of Works In Collection", "Downloads of Works In Collection", "Collection Page Views"]
^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:45:26: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 45, 25 is not aligned with document = begin at 43, 14.
rescue
^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:45:26: C: [Correctable] Style/RescueStandardError: Avoid rescuing without specifying an error class.
rescue
^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:46:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Collection deleted"
^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/collection_reports_controller.rb:47:26: W: [Correctable] Layout/BeginEndAlignment: end at 47, 25 is not aligned with document = begin at 43, 14.
end
^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:32:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@files = paginate(@document._source["file_set_ids_ssim"], rows: 5)
^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:39:3: C: [Correctable] Layout/AccessModifierIndentation: Indent access modifiers like private.
private
^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:45:15: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
fl: 'title_tesim, id, member_of_collections', ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:59:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"has_model_ssim:FileSet",
^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:89:80: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
views_match = @top_analytics_works.detect { |id, _count| id == doc["id"] }
^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:91:88: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
downloads_match = @top_analytics_downloads.detect { |id, _count| id == doc["id"] }
^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:93:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
list.push([doc["id"], doc["title_tesim"].join(''), @view_count, @download_count, doc["member_of_collections"]])
^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:93:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
list.push([doc["id"], doc["title_tesim"].join(''), @view_count, @download_count, doc["member_of_collections"]])
^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:93:98: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
list.push([doc["id"], doc["title_tesim"].join(''), @view_count, @download_count, doc["member_of_collections"]])
^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:93:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
list.push([doc["id"], doc["title_tesim"].join(''), @view_count, @download_count, doc["member_of_collections"]])
^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:102:88: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
downloads_match = @top_analytics_file_sets.detect { |id, _count| id == doc["id"] }
^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:104:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
list.push([doc["id"], doc["title_tesim"].join(''), @download_count]) if doc["title_tesim"].present?
^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:104:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
list.push([doc["id"], doc["title_tesim"].join(''), @download_count]) if doc["title_tesim"].present?
^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:104:89: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
list.push([doc["id"], doc["title_tesim"].join(''), @download_count]) if doc["title_tesim"].present?
^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:112:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "Work Page Views", "Total Downloads of File Sets In Work", "Collections"]
^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:112:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "Work Page Views", "Total Downloads of File Sets In Work", "Collections"]
^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:112:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "Work Page Views", "Total Downloads of File Sets In Work", "Collections"]
^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:112:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "Work Page Views", "Total Downloads of File Sets In Work", "Collections"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/analytics/work_reports_controller.rb:112:94: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
csv << ["Name", "ID", "Work Page Views", "Total Downloads of File Sets In Work", "Collections"]
^^^^^^^^^^^^^
app/controllers/hyrax/admin/appearances_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/collection_type_participants_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/collection_type_participants_controller.rb:15:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
edit_admin_collection_type_path(@collection_type_participant.hyrax_collection_type_id, anchor: 'participants'),
^
app/controllers/hyrax/admin/collection_type_participants_controller.rb:20:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
edit_admin_collection_type_path(@collection_type_participant.hyrax_collection_type_id, anchor: 'participants'),
^
app/controllers/hyrax/admin/collection_type_participants_controller.rb:30:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
edit_admin_collection_type_path(@collection_type_participant.hyrax_collection_type_id, anchor: 'participants'),
^
app/controllers/hyrax/admin/collection_type_participants_controller.rb:35:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
edit_admin_collection_type_path(@collection_type_participant.hyrax_collection_type_id, anchor: 'participants'),
^
app/controllers/hyrax/admin/collection_types_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/collection_types_controller.rb:31:121: C: [Correctable] Layout/LineLength: Line is too long. [169/120]
redirect_to hyrax.edit_admin_collection_type_path(@collection_type), notice: t(:'hyrax.admin.collection_types.create.notification', name: @collection_type.title)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:50:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
redirect_to update_referer, notice: t(:'hyrax.admin.collection_types.update.notification', name: @collection_type.title)
^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:61:121: C: [Correctable] Layout/LineLength: Line is too long. [147/120]
redirect_to hyrax.admin_collection_types_path, notice: t(:'hyrax.admin.collection_types.delete.notification', name: @collection_type.title)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:71:13: C: Style/StringConcatenation: Prefer string interpolation to string concatenation.
msg = 'Save was not successful because ' + ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:72:35: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
messages.map { |k, v| k.to_s + ' ' + v.join(', ') + ', and ' }.join
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:73:23: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
flash[:error] = msg.chomp(', and ') + '.'
^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:94:121: C: Layout/LineLength: Line is too long. [173/120]
@collection_type_participant = Hyrax::Forms::Admin::CollectionTypeParticipantForm.new(collection_type_participant: @collection_type.collection_type_participants.build)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:102:121: C: Layout/LineLength: Line is too long. [145/120]
params.require(:collection_type).permit(:title, :description, :nestable, :brandable, :discoverable, :sharable, :share_applies_to_new_works,
^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/collection_types_controller.rb:103:121: C: Layout/LineLength: Line is too long. [148/120]
:allow_multiple_membership, :require_membership, :assigns_workflow, :assigns_visibility, :badge_color)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/features_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/permission_template_accesses_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/permission_template_accesses_controller.rb:27:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless @permission_template_access.admin_group?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/permission_templates_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/permission_templates_controller.rb:41:121: C: [Correctable] Layout/LineLength: Line is too long. [131/120]
notice: translate(update_info[:content_tab], scope: 'hyrax.admin.admin_sets.form.permission_update_notices'))
^^^^^^^^^^^
app/controllers/hyrax/admin/permission_templates_controller.rb:44:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
notice: translate(update_info[:content_tab], scope: 'hyrax.dashboard.collections.form.permission_update_notices'))
^^^^^^^^^^^^^^^^
app/controllers/hyrax/admin/permission_templates_controller.rb:51:121: C: Layout/LineLength: Line is too long. [121/120]
# TODO: [Jeremy Friesen says: We need to better consolidate the form logic of admin sets and permission templates
^
app/controllers/hyrax/admin/permission_templates_controller.rb:54:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
alert: translate(update_info[:error_code], scope: 'hyrax.admin.admin_sets.form.permission_update_errors'))
^^^^^^^^
app/controllers/hyrax/admin/permission_templates_controller.rb:57:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
alert: translate(update_info[:error_code], scope: 'hyrax.dashboard.collections.form.permission_update_errors'))
^^^^^^^^^^^^^
app/controllers/hyrax/admin/stats_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/strategies_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/users_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/workflow_roles_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/admin/workflows_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/api/items_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/api/items_controller.rb:40:97: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return render plain: "Forbidden: #{@work} not deposited via Arkivo", status: :forbidden if @work.arkivo_checksum.nil?
^^
app/controllers/hyrax/api/items_controller.rb:40:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
return render plain: "Forbidden: #{@work} not deposited via Arkivo", status: :forbidden if @work.arkivo_checksum.nil?
^^^^^
app/controllers/hyrax/api/items_controller.rb:58:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return render plain: 'no item parameter', status: :bad_request if post_data.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/api/items_controller.rb:60:44: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of exception.
rescue Hyrax::Arkivo::InvalidItem => exception
^^^^^^^^^
app/controllers/hyrax/api/zotero_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'oauth'
^
app/controllers/hyrax/api/zotero_controller.rb:30:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
redirect_to hyrax.edit_dashboard_profile_path(current_user.to_param), alert: 'Please re-authenticate with Zotero'
^
app/controllers/hyrax/api/zotero_controller.rb:47:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
alert: "Malformed request from Zotero"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/api/zotero_controller.rb:50:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
alert: "You have not yet connected to Zotero"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/batch_edits_controller.rb:35:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless check_for_empty_batch?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:45:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
flash[:notice] = "Batch delete complete"
^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:61:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
case params["update_type"]
^^^^^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:62:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "update"
^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:64:121: C: [Correctable] Layout/LineLength: Line is too long. [126/120]
update_document(Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: doc_id, use_valkyrie: false))
^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:66:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
flash[:notice] = "Batch update complete"
^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:68:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "delete_all"
^^^^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:86:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
batch.each { |id| Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: id, use_valkyrie: false).destroy }
^^^^^^^^^
app/controllers/hyrax/batch_edits_controller.rb:113:7: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
['visibility', ...
^^^^^^^^^^^^^^
app/controllers/hyrax/batch_uploads_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/batch_uploads_controller.rb:38:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
return render_json_response(response_type: :forbidden, message: view_context.t('hyrax.batch_uploads.disabled'))
^
app/controllers/hyrax/batch_uploads_controller.rb:53:121: C: Layout/LineLength: Line is too long. [131/120]
# Calling constantize on user params is disfavored (per brakeman), so we sanitize by matching it against an authorized model.
^^^^^^^^^^^
app/controllers/hyrax/batch_uploads_controller.rb:54:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
safe_pc = Hyrax::SelectTypeListPresenter.new(current_user).authorized_models.map(&:to_s).find { |x| x == unsafe_pc }
^^
app/controllers/hyrax/batch_uploads_controller.rb:55:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise CanCan::AccessDenied, "Cannot create an object of class '#{unsafe_pc}'" unless safe_pc
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/batch_uploads_controller.rb:62:121: C: [Correctable] Layout/LineLength: Line is too long. [126/120]
flash[:notice] = view_context.t('hyrax.works.create.after_create_html', application_name: view_context.application_name)
^^^^^^
app/controllers/hyrax/batch_uploads_controller.rb:74:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
operation_type: "Batch Create")
^^^^^^^^^^^^^^
app/controllers/hyrax/batch_uploads_controller.rb:90:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return {} unless raw_params
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/citations_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/collections_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/contact_form_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/contact_form_controller.rb:20:29: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
flash.now[:error] = 'Sorry, this message was not sent successfully. ' + ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/contact_form_controller.rb:21:81: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@contact_form.errors.full_messages.map(&:to_s).join(", ")
^^^^
app/controllers/hyrax/contact_form_controller.rb:24:28: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of exception.
rescue RuntimeError => exception
^^^^^^^^^
app/controllers/hyrax/contact_form_controller.rb:46:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return {} unless params.key?(:contact_form)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/content_blocks_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/dashboard/collection_members_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/dashboard/collection_members_controller.rb:16:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
format.html { redirect_to success_return_path, notice: t('hyrax.dashboard.my.action.collection_update_success') }
^^^
app/controllers/hyrax/dashboard/collection_members_controller.rb:39:48: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Hyrax::SingleMembershipError => err
^^^
app/controllers/hyrax/dashboard/collection_members_controller.rb:58:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
member_action == "add" # should never happen
^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/dashboard/collections_controller.rb:65:121: C: Layout/LineLength: Line is too long. [140/120]
# Coming from the UI, a collection type id should always be present. Coming from the API, if a collection type id is not specified,
^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:98:121: C: [Correctable] Layout/LineLength: Line is too long. [147/120]
format.html { redirect_to edit_dashboard_collection_path(@collection), notice: t('hyrax.dashboard.my.action.collection_create_success') }
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:112:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return valkyrie_create if @collection.is_a?(Valkyrie::Resource)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:118:121: C: Layout/LineLength: Line is too long. [142/120]
# Coming from the UI, a collection type gid should always be present. Coming from the API, if a collection type gid is not specified,
^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:123:100: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
@collection.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE unless @collection.discoverable?
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:123:121: C: Layout/LineLength: Line is too long. [131/120]
@collection.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE unless @collection.discoverable?
^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:157:100: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
@collection.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE unless @collection.discoverable?
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:157:121: C: Layout/LineLength: Line is too long. [131/120]
@collection.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE unless @collection.discoverable?
^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:184:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
format.json { render json: { id: id }, status: :unprocessable_entity, location: dashboard_collection_path(@collection) }
^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:199:31: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue StandardError => err
^^^
app/controllers/hyrax/dashboard/collections_controller.rb:271:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if uploaded_file_ids.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:276:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return edit_dashboard_collection_path(@collection) + (params[:referer_anchor] || '') if params[:stay_on_edit]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:281:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return update_existing_banner if params["banner_unchanged"] == "true"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:281:49: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return update_existing_banner if params["banner_unchanged"] == "true"
^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:281:72: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return update_existing_banner if params["banner_unchanged"] == "true"
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:283:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
uploaded_file_ids = params["banner_files"]
^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:288:100: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
banner_info = CollectionBrandingInfo.where(collection_id: @collection.id.to_s).where(role: "banner")
^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:297:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
role: "banner",
^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:298:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
alt_txt: "",
^^
app/controllers/hyrax/dashboard/collections_controller.rb:299:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
target_url: ""
^^
app/controllers/hyrax/dashboard/collections_controller.rb:305:100: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
banner_info = CollectionBrandingInfo.where(collection_id: @collection.id.to_s).where(role: "banner")
^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:310:98: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
logo_info = CollectionBrandingInfo.where(collection_id: @collection.id.to_s).where(role: "logo").where(local_path: uploaded_file_id.to_s)
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:310:121: C: Layout/LineLength: Line is too long. [145/120]
logo_info = CollectionBrandingInfo.where(collection_id: @collection.id.to_s).where(role: "logo").where(local_path: uploaded_file_id.to_s)
^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:322:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
role: "logo",
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:332:99: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
logos_info = CollectionBrandingInfo.where(collection_id: @collection.id.to_s).where(role: "logo")
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:343:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
update_logo_info(ufi, params["alttext"][i], verify_linkurl(params["linkurl"][i]))
^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:343:79: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
update_logo_info(ufi, params["alttext"][i], verify_linkurl(params["linkurl"][i]))
^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:346:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
logo_info = create_logo_info(ufi, params["alttext"][i], verify_linkurl(params["linkurl"][i]))
^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:346:91: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
logo_info = create_logo_info(ufi, params["alttext"][i], verify_linkurl(params["linkurl"][i]))
^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:354:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
uploaded_file_ids = params["logo_files"]
^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:377:24: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
@presenter ||= begin
^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:387:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise CanCan::AccessDenied unless curation_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:392:121: C: [Correctable] Layout/LineLength: Line is too long. [167/120]
Hyrax::SearchService.new(config: blacklight_config, user_params: params.except(:q, :page), scope: self, search_builder_class: single_item_search_builder_class)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:416:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
permissions = attributes.delete("permissions_attributes")
^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:417:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:418:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn(self, "Passing in permissions_attributes parameter with a new collection is deprecated and support will be removed from Hyrax 3.0. " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:418:121: C: Layout/LineLength: Line is too long. [159/120]
Deprecation.warn(self, "Passing in permissions_attributes parameter with a new collection is deprecated and support will be removed from Hyrax 3.0. " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:419:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Use Hyrax::PermissionTemplate instead to grant Manage, Deposit, or View access.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:423:68: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
participants << { agent_type: agent_type(p), agent_id: p["name"], access: access } if access
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:430:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return 'group' if permission["type"] == 'group'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:430:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return 'group' if permission["type"] == 'group'
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:436:70: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return Hyrax::PermissionTemplateAccess::MANAGE if permission["access"] == 'edit'
^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:437:68: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return Hyrax::PermissionTemplateAccess::VIEW if permission["access"] == 'read'
^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:472:31: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue StandardError => err
^^^
app/controllers/hyrax/dashboard/collections_controller.rb:507:121: C: Layout/LineLength: Line is too long. [177/120]
additional_grants = @participants # Grants converted from older versions (< Hyrax 2.1.0) where share was edit or read access instead of managers, depositors, and viewers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:508:121: C: [Correctable] Layout/LineLength: Line is too long. [141/120]
Collections::PermissionsCreateService.create_default(collection: @collection, creating_user: current_user, grants: additional_grants)
^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:519:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
@collection_member_service ||= membership_service_class.new(scope: self, collection: collection, params: params_for_query)
^^^^^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:532:121: C: Layout/LineLength: Line is too long. [122/120]
@subcollection_count = @presenter.nil? ? 0 : @subcollection_count = @presenter.subcollection_count = results.total
^^
app/controllers/hyrax/dashboard/collections_controller.rb:561:21: W: [Correctable] Lint/UriRegexp: URI.regexp(['http', 'https']) is obsolete and should not be used. Instead, use URI::DEFAULT_PARSER.make_regexp(['http', 'https']).
(url =~ URI.regexp(['http', 'https']))
^^^^^^
app/controllers/hyrax/dashboard/collections_controller.rb:561:28: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
(url =~ URI.regexp(['http', 'https']))
^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:18:121: C: [Correctable] Layout/LineLength: Line is too long. [166/120]
notice = I18n.t('create_within', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:30:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
redirect_to new_dashboard_collection_path(collection_type_id: parent_type_id_for(form), parent_id: form.parent)
^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:41:121: C: [Correctable] Layout/LineLength: Line is too long. [165/120]
notice = I18n.t('create_under', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:52:121: C: [Correctable] Layout/LineLength: Line is too long. [173/120]
notice = I18n.t('removed_relationship', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:64:121: C: [Correctable] Layout/LineLength: Line is too long. [173/120]
notice = I18n.t('removed_relationship', scope: 'hyrax.dashboard.nest_collections_form', child_title: form.child.title.first, parent_title: form.parent.title.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/nest_collections_controller.rb:125:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return my_collections_path if params[:source] == 'my'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/profiles_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/dashboard/profiles_controller.rb:31:77: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to hyrax.dashboard_profile_path(@user.to_param), notice: "Your profile has been updated"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/profiles_controller.rb:43:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless params[:user]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/dashboard/works_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/dashboard_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/depositors_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/depositors_controller.rb:22:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
render_json_response(response_type: :unprocessable_entity, message: view_context.t('hyrax.dashboard.proxy_add_deny'))
^^^^^
app/controllers/hyrax/depositors_controller.rb:28:121: C: [Correctable] Layout/LineLength: Line is too long. [142/120]
render json: { name: grantee.name, delete_path: sanitize_route_string(hyrax.user_depositor_path(grantor.user_key, grantee.user_key)) }
^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/depositors_controller.rb:44:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
route.gsub("\.", "-dot-")
^^^^^^^
app/controllers/hyrax/downloads_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/downloads_controller.rb:46:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png")
^^^^^
app/controllers/hyrax/downloads_controller.rb:46:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png")
^^^^^^^^
app/controllers/hyrax/downloads_controller.rb:46:61: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png")
^^^^^^^^
app/controllers/hyrax/downloads_controller.rb:46:71: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png")
^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/downloads_controller.rb:50:121: C: Layout/LineLength: Line is too long. [121/120]
# Overrides Hydra::Controller::DownloadBehavior#load_file, which is hard-coded to assume files are in BasicContainer.
^
app/controllers/hyrax/downloads_controller.rb:55:121: C: Layout/LineLength: Line is too long. [147/120]
# @return [ActiveFedora::File, File, NilClass] Returns the file from the repository or a path to a file on the local file system, if it exists.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/downloads_controller.rb:79:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if file_reference.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/downloads_controller.rb:81:33: W: [Correctable] Lint/RedundantSafeNavigation: Redundant safe navigation detected.
association if association&.is_a?(ActiveFedora::Associations::SingularAssociation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/embargoes_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/featured_work_lists_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/featured_works_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/file_sets_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/file_sets_controller.rb:73:34: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of error.
rescue RSolr::Error::Http => error
^^^^^
app/controllers/hyrax/file_sets_controller.rb:75:121: C: Layout/LineLength: Line is too long. [126/120]
logger.error "FileSetsController::update rescued #{error.class}\n\t#{error.message}\n #{error.backtrace.join("\n")}\n\n"
^^^^^^
app/controllers/hyrax/file_sets_controller.rb:157:121: C: [Correctable] Layout/LineLength: Line is too long. [149/120]
redirect_to [main_app, curation_concern], notice: view_context.t('hyrax.file_sets.asset_updated_flash.message', link_to_file: link_to_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:170:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
flash[:error] = "There was a problem processing your request."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:173:121: C: [Correctable] Layout/LineLength: Line is too long. [127/120]
wants.json { render_json_response(response_type: :unprocessable_entity, options: { errors: curation_concern.errors }) }
^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:184:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
add_breadcrumb I18n.t("hyrax.file_set.browse_view"), main_app.hyrax_file_set_path(params["id"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:184:98: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
add_breadcrumb I18n.t("hyrax.file_set.browse_view"), main_app.hyrax_file_set_path(params["id"])
^^^^
app/controllers/hyrax/file_sets_controller.rb:198:121: C: Layout/LineLength: Line is too long. [131/120]
include WorkflowsHelper # Provides #workflow_restriction?, and yes I mean include not helper; helper exposes the module methods
^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:205:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless workflow_restriction?(parent, ability: current_ability)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:214:121: C: Layout/LineLength: Line is too long. [167/120]
params.fetch(:file_set, {}).except(:files).permit!.dup # use a copy of the hash so that original params stays untouched when interpret_visibility modifies things
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:220:24: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise WorkflowAuthorizationException if presenter.parent.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:222:22: W: [Correctable] Layout/BeginEndAlignment: end at 222, 21 is not aligned with @presenter ||= begin at 218, 6.
end
^^^
app/controllers/hyrax/file_sets_controller.rb:230:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise CanCan::AccessDenied unless curation_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:235:121: C: [Correctable] Layout/LineLength: Line is too long. [153/120]
Hyrax::SearchService.new(config: blacklight_config, user_params: params.except(:q, :page), scope: self, search_builder_class: search_builder_class)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:263:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message = I18n.t("hyrax.workflow.unauthorized_parent")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/file_sets_controller.rb:288:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @presenter does not match method name unavailable_presenter. Use @unavailable_presenter instead.
@presenter ||= show_presenter.new(::SolrDocument.find(params[:id]), current_ability, request)
^^^^^^^^^^
app/controllers/hyrax/fixity_checks_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/homepage_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Hyrax::HomepageController < ApplicationController
^
app/controllers/hyrax/homepage_controller.rb:44:121: C: [Correctable] Layout/LineLength: Line is too long. [144/120]
Hyrax::SearchService.new(config: blacklight_config, user_params: { q: '' }, scope: self, search_builder_class: Hyrax::HomepageSearchBuilder)
^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/homepage_controller.rb:48:5: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"date_uploaded_dtsi desc"
^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/leases_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/my/collections_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/my/highlights_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/my/highlights_controller.rb:9:7: W: [Correctable] Lint/UselessMethodDefinition: Useless method definition detected.
def index ...
^^^^^^^^^
app/controllers/hyrax/my/highlights_controller.rb:20:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return empty_search_result if Hyrax::TrophyPresenter.find_by_user(@user).count.zero?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/my/shares_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/my/shares_controller.rb:9:7: W: [Correctable] Lint/UselessMethodDefinition: Useless method definition detected.
def index ...
^^^^^^^^^
app/controllers/hyrax/my/works_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/my/works_controller.rb:9:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "admin_set_sim", limit: 5
^^^^^^^^^^^^^^^
app/controllers/hyrax/my/works_controller.rb:10:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "member_of_collections_ssim", limit: 5
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/my_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/my_controller.rb:14:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "visibility_ssi",
^^^^^^^^^^^^^^^^
app/controllers/hyrax/my_controller.rb:18:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "resource_type_sim", limit: 5
^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/my_controller.rb:59:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@result_set_size = @response.response["numFound"]
^^^^^^^^^^
app/controllers/hyrax/notifications_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/operations_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/pages_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/permissions_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/permissions_controller.rb:6:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :curation_concern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/permissions_controller.rb:12:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
deprecation_deprecate confirm: "Use the #confirm_access action instead."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/permissions_controller.rb:17:121: C: Layout/LineLength: Line is too long. [184/120]
flash_message = 'Updating file permissions. This may take a few minutes. You may want to refresh your browser or return to this record later to see the updated file permissions.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/permissions_controller.rb:32:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to [main_app, curation_concern], notice: I18n.t("hyrax.upload.change_access_flash_message")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/resource_sync_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Hyrax::ResourceSyncController < ApplicationController
^
app/controllers/hyrax/single_use_links_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/single_use_links_controller.rb:14:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to main_app.root_url, alert: "You do not have sufficient privileges to create links to this document"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/single_use_links_controller.rb:16:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
session["user_return_to"] = request.url
^^^^^^^^^^^^^^^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/single_use_links_viewer_controller.rb:21:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise not_found_exception unless single_use_link.path == hyrax.download_path(id: @asset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:33:121: C: Layout/LineLength: Line is too long. [129/120]
# create a dowload link that is single use for the user since we do not just want to show metadata we want to access it too
^^^^^^^^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:69:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
@asset ||= Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: single_use_link.item_id, use_valkyrie: false)
^^^^^^^^^^^^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:77:99: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
logger.error("Rendering PAGE due to exception: #{exception.inspect} - #{exception.backtrace if exception.respond_to? :backtrace}")
^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:77:121: C: Layout/LineLength: Line is too long. [136/120]
logger.error("Rendering PAGE due to exception: #{exception.inspect} - #{exception.backtrace if exception.respond_to? :backtrace}")
^^^^^^^^^^^^^^^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:78:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
render 'single_use_error', layout: "error", status: 404
^^^^^^^
app/controllers/hyrax/single_use_links_viewer_controller.rb:78:59: C: [Correctable] Rails/HttpStatus: Prefer :not_found over 404 to define HTTP status code.
render 'single_use_error', layout: "error", status: 404
^^^
app/controllers/hyrax/static_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/stats_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/stats_controller.rb:28:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
add_breadcrumb I18n.t("hyrax.file_set.browse_view"), main_app.hyrax_file_set_path(params["id"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/stats_controller.rb:28:98: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
add_breadcrumb I18n.t("hyrax.file_set.browse_view"), main_app.hyrax_file_set_path(params["id"])
^^^^
app/controllers/hyrax/transfers_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/transfers_controller.rb:17:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
session["user_return_to"] = request.url
^^^^^^^^^^^^^^^^
app/controllers/hyrax/transfers_controller.rb:32:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to hyrax.transfers_path, notice: "Transfer request created"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/transfers_controller.rb:51:49: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to hyrax.transfers_path, notice: "Transfer complete"
^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/transfers_controller.rb:56:49: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to hyrax.transfers_path, notice: "Transfer rejected"
^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/transfers_controller.rb:61:49: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to hyrax.transfers_path, notice: "Transfer canceled"
^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/trophies_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/uploads_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/users_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/users_controller.rb:17:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return redirect_to root_path, alert: "User '#{params[:id]}' does not exist" if user.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/users_controller.rb:32:121: C: [Correctable] Layout/LineLength: Line is too long. [140/120]
base = base.where("LOWER(#{base.user_key_field}) LIKE :clause OR LOWER(display_name) LIKE :clause", clause: clause) if clause.present?
^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/users_controller.rb:32:123: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
base = base.where("LOWER(#{base.user_key_field}) LIKE :clause OR LOWER(display_name) LIKE :clause", clause: clause) if clause.present?
^^
app/controllers/hyrax/users_controller.rb:60:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
redirect_to root_path, alert: "User does not exist" unless @user
^^^^^^^^^^^^^^^^^^^^^
app/controllers/hyrax/users_controller.rb:64:40: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
sort = params[:sort].presence || "name"
^^^^^^
app/controllers/hyrax/workflow_actions_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/controllers/hyrax/workflow_actions_controller.rb:21:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
wants.json { render_json_response(response_type: :unprocessable_entity, options: { errors: workflow_action_form.errors }) }
^^^^^^^^^^^^^
app/controllers/hyrax/workflow_actions_controller.rb:42:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
wants.html { redirect_to [main_app, curation_concern], notice: "The #{curation_concern.human_readable_type} has been updated." }
^^^^^^^^^^^^^^^^
app/conversions/power_converters.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'power_converter'
^
app/conversions/power_converters.rb:4:16: C: [Correctable] Style/ExpandPathArguments: Use expand_path('power_converters/**/*.rb', __dir__) instead of expand_path('../power_converters/**/*.rb', __FILE__).
pattern = File.expand_path('../power_converters/**/*.rb', __FILE__)
^^^^^^^^^^^
app/conversions/power_converters.rb:5:1: W: [Correctable] Lint/NonDeterministicRequireOrder: Sort files before requiring them.
Dir.glob(pattern).each do |filename|
^^^^^^^^^^^^^^^^^^^^^^
app/conversions/power_converters/polymorphic_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:polymorphic_type) do |input|
^
app/conversions/power_converters/sipity_action.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:sipity_action) do |input, scope|
^
app/conversions/power_converters/sipity_action_name.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:sipity_action_name) do |input|
^
app/conversions/power_converters/sipity_action_name.rb:6:22: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
input.to_s.sub(/[\?\!]\Z/, '')
^^
app/conversions/power_converters/sipity_action_name.rb:6:24: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
input.to_s.sub(/[\?\!]\Z/, '')
^^
app/conversions/power_converters/sipity_agent.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:sipity_agent) do |input|
^
app/conversions/power_converters/sipity_entity.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:sipity_entity) do |input|
^
app/conversions/power_converters/sipity_role.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:sipity_role) do |input|
^
app/conversions/power_converters/sipity_workflow_id.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
PowerConverter.define_conversion_for(:sipity_workflow_id) do |input|
^
app/conversions/power_converters/sipity_workflow_state.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'power_converter'
^
app/forms/hyrax/forms/admin/appearance.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/admin/appearance.rb:20:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ActiveModel::Name.new(self, Hyrax, "Hyrax::Admin::Appearance")
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/admin/appearance.rb:65:11: C: Naming/MemoizedInstanceVariableName: Memoized variable @primary_button_border does not match method name primary_button_border_color. Use @primary_button_border_color instead.
@primary_button_border ||= darken_color(primary_button_background_color, 0.05)
^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/admin/appearance.rb:123:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
format("#%02x%02x%02x", *rgb)
^^^^^^^^^^^^^^^
app/forms/hyrax/forms/admin/appearance.rb:123:20: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over unannotated tokens (like %s).
format("#%02x%02x%02x", *rgb)
^^^^
app/forms/hyrax/forms/admin/appearance.rb:123:24: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over unannotated tokens (like %s).
format("#%02x%02x%02x", *rgb)
^^^^
app/forms/hyrax/forms/admin/appearance.rb:123:28: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over unannotated tokens (like %s).
format("#%02x%02x%02x", *rgb)
^^^^
app/forms/hyrax/forms/admin/collection_type_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/admin/collection_type_form.rb:7:9: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_accessor :collection_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/admin/collection_type_participant_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/admin/collection_type_participant_form.rb:7:9: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_accessor :collection_type_participant
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/admin_set_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/admin_set_form.rb:10:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super if key == :thumbnail_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/admin_set_form.rb:18:34: W: [Correctable] Layout/BeginEndAlignment: end at 18, 33 is not aligned with @permission_template ||= begin at 15, 8.
end
^^^
app/forms/hyrax/forms/admin_set_form.rb:22:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless model.thumbnail
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/batch_edit_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/batch_edit_form.rb:79:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return model[key] = combined_attributes[key] if combined_attributes[key].present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/batch_upload_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/batch_upload_form.rb:32:9: C: Naming/MemoizedInstanceVariableName: Memoized variable @_model_name does not match method name model_name. Use @model_name instead.
@_model_name ||= begin
^^^^^^^^^^^^
app/forms/hyrax/forms/batch_upload_form.rb:62:33: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@route_key = "batch_uploads"
^^^^^^^^^^^^^^^
app/forms/hyrax/forms/batch_upload_form.rb:64:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@route_key << "_index" if @plural == @singular
^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/collection_form.rb:50:34: W: [Correctable] Layout/BeginEndAlignment: end at 50, 33 is not aligned with @permission_template ||= begin at 47, 8.
end
^^^
app/forms/hyrax/forms/collection_form.rb:83:79: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
banner_info = CollectionBrandingInfo.where(collection_id: id, role: "banner")
^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:87:27: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
relative_path = "/" + banner_info.first.local_path.split("/")[-4..-1].join("/") unless banner_info.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:87:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
relative_path = "/" + banner_info.first.local_path.split("/")[-4..-1].join("/") unless banner_info.empty?
^^^
app/forms/hyrax/forms/collection_form.rb:87:68: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
relative_path = "/" + banner_info.first.local_path.split("/")[-4..-1].join("/") unless banner_info.empty?
^^^
app/forms/hyrax/forms/collection_form.rb:87:86: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
relative_path = "/" + banner_info.first.local_path.split("/")[-4..-1].join("/") unless banner_info.empty?
^^^
app/forms/hyrax/forms/collection_form.rb:95:78: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
logos_info = CollectionBrandingInfo.where(collection_id: id, role: "logo")
^^^^^^
app/forms/hyrax/forms/collection_form.rb:99:29: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
relative_path = "/" + logo_info.local_path.split("/")[-4..-1].join("/")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:99:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
relative_path = "/" + logo_info.local_path.split("/")[-4..-1].join("/")
^^^
app/forms/hyrax/forms/collection_form.rb:99:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
relative_path = "/" + logo_info.local_path.split("/")[-4..-1].join("/")
^^^
app/forms/hyrax/forms/collection_form.rb:99:80: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
relative_path = "/" + logo_info.local_path.split("/")[-4..-1].join("/")
^^^
app/forms/hyrax/forms/collection_form.rb:102:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
{ file: logo_file, full_path: logo_info.local_path, relative_path: relative_path, alttext: alttext, linkurl: linkurl }
^^^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:114:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless model.thumbnail
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:135:121: C: [Correctable] Layout/LineLength: Line is too long. [144/120]
colls = Hyrax::Collections::NestedCollectionQueryService.available_parent_collections(child: collection, scope: scope, limit_to_id: nil)
^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:137:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "id" => col.id, "title_first" => col.title.first }
^^^^
app/forms/hyrax/forms/collection_form.rb:137:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "id" => col.id, "title_first" => col.title.first }
^^^^^^^^^^^^^
app/forms/hyrax/forms/collection_form.rb:154:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
@collection_member_service ||= membership_service_class.new(scope: scope, collection: collection, params: blacklight_config.default_solr_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:20:121: C: Layout/LineLength: Line is too long. [150/120]
# @param persistence_service [Hyrax::Collections::NestedCollectionPersistenceService] responsible for persisting the parent/child relationship
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:21:1: W: Lint/MissingCopEnableDirective: Re-enable Metrics/ParameterLists cop with # rubocop:enable after disabling it.
# rubocop:disable Metrics/ParameterLists
^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:22:24: C: [Correctable] Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
def initialize(parent: nil,
^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:23:24: C: Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
child: nil,
^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:24:24: C: Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
parent_id: nil,
^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:25:24: C: Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
child_id: nil,
^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:34:13: C: [Correctable] Style/CommentedKeyword: Do not place comments on the same line as the end keyword.
end # rubocop:enable Metrics/ParameterLists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:44:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless valid?
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:58:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"is deprecated. the helper of the same name or " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:59:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax::Collections::NestedCollectionQueryService " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:60:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"instead."
^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:75:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"is deprecated. the helper of the same name or " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:76:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax::Collections::NestedCollectionQueryService " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:77:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"instead."
^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:113:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if query_service.valid_combined_nesting_depth?(parent: parent, child: child, scope: context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/dashboard/nest_collection_form.rb:120:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if query_service.parent_and_child_can_nest?(parent: parent, child: child, scope: context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/failed_submission_form_wrapper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/failed_submission_form_wrapper.rb:78:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if @exposed_params.key?(method_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/failed_submission_form_wrapper.rb:86:85: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
@exposed_params[permitted_param] = @input_params.fetch(permitted_param) if @input_params.key?(permitted_param)
^^
app/forms/hyrax/forms/failed_submission_form_wrapper.rb:86:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
@exposed_params[permitted_param] = @input_params.fetch(permitted_param) if @input_params.key?(permitted_param)
^^
app/forms/hyrax/forms/failed_submission_form_wrapper.rb:99:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless value_schema.is_a?(::Array)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/file_manager_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/file_set_edit_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::Forms
^
app/forms/hyrax/forms/pcdm_collection_form.rb:8:52: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/ClassLength.
class PcdmCollectionForm < Valkyrie::ChangeSet # rubocop:disable Metrics/ClassLength
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/permission_template_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/permission_template_form.rb:15:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("reset_access_controls! is deprecated; use PermissionTemplate#reset_access_controls_for instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:15:121: C: Layout/LineLength: Line is too long. [123/120]
Deprecation.warn("reset_access_controls! is deprecated; use PermissionTemplate#reset_access_controls_for instead.")
^^^
app/forms/hyrax/forms/permission_template_form.rb:56:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "participants"
^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:58:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "visibility"
^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:60:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "workflow"
^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:67:24: W: [Correctable] Lint/RedundantCopEnableDirective: Unnecessary enabling of Metrics/MethodLength.
# rubocop:enable Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:100:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "participants" if attributes[:access_grants_attributes].present?
^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:101:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "workflow" if attributes[:workflow_id].present?
^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:102:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "visibility" if attributes.key?(:visibility)
^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:116:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"0" => {
^^^
app/forms/hyrax/forms/permission_template_form.rb:133:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless available_workflows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:135:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if roles.none?
^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:171:121: C: Layout/LineLength: Line is too long. [123/120]
# @return [Array<Sipity::Agent>] a list of sipity agents corresponding to the manager role of the permission_template
^^^
app/forms/hyrax/forms/permission_template_form.rb:186:121: C: Layout/LineLength: Line is too long. [127/120]
# @return [Array<PermissionTemplateAccess>] a list of grants corresponding to the manager role of the permission_template
^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:194:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return error_code if error_code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:201:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return active_workflow if new_active_workflow_id.to_s == active_workflow.id.to_s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:211:121: C: Layout/LineLength: Line is too long. [161/120]
# @todo Instead of granting the manage users all of the roles (which means lots of emails), can we agree on a Managing role that all workflows should have?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:214:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless new_active_workflow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:217:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
new_workflow_role = Sipity::WorkflowRole.find_or_create_by!(workflow: new_active_workflow, role: workflow_role.role)
^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:235:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless attributes[:access_grants_attributes]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:266:7: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/CyclomaticComplexity.
# rubocop:disable Metrics/CyclomaticComplexity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:267:7: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/PerceivedComplexity.
# rubocop:disable Metrics/PerceivedComplexity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:281:121: C: Layout/LineLength: Line is too long. [192/120]
if filtered_attributes[:release_period] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_NO_DELAY || (filtered_attributes[:release_period].blank? && attributes[:release_varies].blank?)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:301:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "nothing" if !attributes[:release_varies] && !attributes[:release_period] && !attributes[:release_date] && !attributes[:release_embargo]
^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:301:26: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return "nothing" if !attributes[:release_varies] && !attributes[:release_period] && !attributes[:release_date] && !attributes[:release_embargo]
^^
app/forms/hyrax/forms/permission_template_form.rb:301:121: C: Layout/LineLength: Line is too long. [151/120]
return "nothing" if !attributes[:release_varies] && !attributes[:release_period] && !attributes[:release_date] && !attributes[:release_embargo]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:304:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "no_date" if attributes[:release_varies] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_BEFORE_DATE && attributes[:release_date].blank?
^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:304:26: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return "no_date" if attributes[:release_varies] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_BEFORE_DATE && attributes[:release_date].blank?
^^
app/forms/hyrax/forms/permission_template_form.rb:304:121: C: Layout/LineLength: Line is too long. [152/120]
return "no_date" if attributes[:release_varies] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_BEFORE_DATE && attributes[:release_date].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:307:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "no_embargo" if attributes[:release_varies] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_EMBARGO && attributes[:release_embargo].blank?
^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:307:29: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return "no_embargo" if attributes[:release_varies] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_EMBARGO && attributes[:release_embargo].blank?
^^
app/forms/hyrax/forms/permission_template_form.rb:307:121: C: Layout/LineLength: Line is too long. [154/120]
return "no_embargo" if attributes[:release_varies] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_EMBARGO && attributes[:release_embargo].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:310:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "no_date" if attributes[:release_period] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_FIXED && attributes[:release_date].blank?
^^^^^^^^^
app/forms/hyrax/forms/permission_template_form.rb:310:26: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return "no_date" if attributes[:release_period] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_FIXED && attributes[:release_date].blank?
^^
app/forms/hyrax/forms/permission_template_form.rb:310:121: C: Layout/LineLength: Line is too long. [146/120]
return "no_date" if attributes[:release_period] == Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_FIXED && attributes[:release_date].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:23:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "Hyrax::Forms::ResourceForm(#{model_class})" if name.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:57:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax.logger.info "trying to prepopulate a lock token for " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:79:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
property :agreement_accepted, virtual: true, default: false, prepopulator: ->(_opts) { self.agreement_accepted = !model.new_record }
^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:89:121: C: [Correctable] Layout/LineLength: Line is too long. [144/120]
property :embargo_release_date, virtual: true, prepopulator: ->(_opts) { self.embargo_release_date = model.embargo&.embargo_release_date }
^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:90:121: C: [Correctable] Layout/LineLength: Line is too long. [156/120]
property :visibility_after_embargo, virtual: true, prepopulator: ->(_opts) { self.visibility_after_embargo = model.embargo&.visibility_after_embargo }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:91:121: C: [Correctable] Layout/LineLength: Line is too long. [159/120]
property :visibility_during_embargo, virtual: true, prepopulator: ->(_opts) { self.visibility_during_embargo = model.embargo&.visibility_during_embargo }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:93:121: C: [Correctable] Layout/LineLength: Line is too long. [146/120]
property :lease_expiration_date, virtual: true, prepopulator: ->(_opts) { self.lease_expiration_date = model.lease&.lease_expiration_date }
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:94:121: C: [Correctable] Layout/LineLength: Line is too long. [148/120]
property :visibility_after_lease, virtual: true, prepopulator: ->(_opts) { self.visibility_after_lease = model.lease&.visibility_after_lease }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:95:121: C: [Correctable] Layout/LineLength: Line is too long. [151/120]
property :visibility_during_lease, virtual: true, prepopulator: ->(_opts) { self.visibility_during_lease = model.lease&.visibility_during_lease }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/resource_form.rb:132:29: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue NameError => _err
^^^^
app/forms/hyrax/forms/widgets/admin_set_embargo_period.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/widgets/admin_set_embargo_period.rb:8:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
i18n_prefix = "hyrax.admin.admin_sets.form_visibility.release.varies.embargo"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/widgets/admin_set_visibility.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/widgets/admin_set_visibility.rb:8:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
i18n_prefix = "hyrax.admin.admin_sets.form_visibility.visibility"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/widgets/admin_set_visibility.rb:9:13: C: [Correctable] Style/CommentAnnotation: Annotation keywords like Note should be all upper case, followed by a colon, and a space, then a note describing the problem.
# Note: Visibility 'varies' = '' implies no constraints
^^^^^^
app/forms/hyrax/forms/widgets/admin_set_visibility.rb:12:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
[Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED, I18n.t('.institution', scope: i18n_prefix)],
^^^^^^^^^
app/forms/hyrax/forms/widgets/admin_set_visibility.rb:13:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
[Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE, I18n.t('.restricted', scope: i18n_prefix)]]
^^
app/forms/hyrax/forms/work_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/work_form.rb:55:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return base unless @controller.params[:add_works_to_collection]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:91:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if [:embargo_release_date, :lease_expiration_date].include?(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:105:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return model.member_of_collection_ids if key == :member_of_collection_ids
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:162:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super if admin_set_id && workflow_for(admin_set_id: admin_set_id).allows_access_grant?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:163:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
params_without_permissions = permitted_params.reject { |arg| arg.respond_to?(:key?) && arg.key?(:permissions_attributes) }
^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:195:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise Hyrax::MissingWorkflowError, "PermissionTemplate for AdminSet(id:#{admin_set_id}) does not have an active_workflow" unless workflow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:195:121: C: [Correctable] Layout/LineLength: Line is too long. [145/120]
raise Hyrax::MissingWorkflowError, "PermissionTemplate for AdminSet(id:#{admin_set_id}) does not have an active_workflow" unless workflow
^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:195:131: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
raise Hyrax::MissingWorkflowError, "PermissionTemplate for AdminSet(id:#{admin_set_id}) does not have an active_workflow" unless workflow
^^^^^^
app/forms/hyrax/forms/work_form.rb:204:9: C: Naming/MemoizedInstanceVariableName: Memoized variable @file_sets does not match method name file_presenters. Use @file_presenters instead.
@file_sets ||=
^^^^^^^^^^
app/forms/hyrax/forms/work_form.rb:212:18: W: [Correctable] Lint/RedundantCopEnableDirective: Unnecessary enabling of Metrics/ClassLength.
# rubocop:enable Metrics/ClassLength
^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/workflow_action_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/workflow_action_form.rb:35:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless valid?
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/workflow_action_form.rb:47:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if Hyrax::Workflow::PermissionQuery.authorized_for_processing?( ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/workflow_responsibility_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/forms/hyrax/forms/workflow_responsibility_form.rb:7:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless params[:user_id]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/forms/hyrax/forms/workflow_responsibility_form.rb:13:9: C: Naming/MemoizedInstanceVariableName: Memoized variable @model does not match method name model_instance. Use @model_instance instead.
@model ||= Sipity::WorkflowResponsibility.new
^^^^^^
app/helpers/hyrax/ability_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/ability_helper.rb:47:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return institution_name if value == Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/blacklight_override.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/charts_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:10:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:10:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
^^^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:10:59: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
^^^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:10:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
^^^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:10:69: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
^^^
app/helpers/hyrax/citations_behaviors/common_behavior.rb:10:74: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
^^^
app/helpers/hyrax/citations_behaviors/formatters.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:34:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return '' if authors_list.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:45:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += "." unless text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:45:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += "." unless text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:69:13: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
pub_info + "."
^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:69:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
pub_info + "."
^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:76:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
pub_date.blank? ? "" : "(" + pub_date + "). "
^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:76:34: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
pub_date.blank? ? "" : "(" + pub_date + "). "
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:76:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
pub_date.blank? ? "" : "(" + pub_date + "). "
^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:76:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
pub_date.blank? ? "" : "(" + pub_date + "). "
^^^^^
app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb:80:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title_info.nil? ? "" : "<i class=\"citation-title\">#{title_info}</i> "
^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:9:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text = ""
^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:26:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return '' if authors_list.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:36:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += " et al." if authors_list.length > 7
^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:39:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += "." unless text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:39:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += "." unless text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:46:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "" if title_info.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:46:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" if title_info.blank?
^^
app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb:48:57: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title_text += '.' unless title_text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:22:20: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
text += (pub_info + ".") if pub_info.present?
^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:22:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += (pub_info + ".") if pub_info.present?
^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:27:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "" if authors_list.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:27:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" if authors_list.blank?
^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:31:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += "." unless text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:31:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += "." unless text.end_with?(".")
^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:32:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += " "
^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:47:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
text += ", et al"
^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb:59:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title_info.blank? ? "" : "<i class=\"citation-title\">#{mla_citation_title(title_info)}</i> "
^^
app/helpers/hyrax/citations_behaviors/formatters/open_url_formatter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/formatters/open_url_formatter.rb:8:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
export_text << "url_ver=Z39.88-2004&ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&rfr_id=info%3Asid%2Fblacklight.rubyforge.org%3Agenerator"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/open_url_formatter.rb:8:121: C: Layout/LineLength: Line is too long. [169/120]
export_text << "url_ver=Z39.88-2004&ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&rfr_id=info%3Asid%2Fblacklight.rubyforge.org%3Agenerator"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/open_url_formatter.rb:10:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless work.respond_to?(element)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/formatters/open_url_formatter.rb:13:15: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if value.blank?
^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:19:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return name unless name.include?(',')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:21:9: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
temp_name.last + " " + temp_name.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:21:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
temp_name.last + " " + temp_name.first
^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:27:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return name if name.include?(',')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:43:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return name unless name.include?(' ') || name.include?(',')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:48:9: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
abbreviated_name + "."
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/name_behavior.rb:48:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
abbreviated_name + "."
^^^
app/helpers/hyrax/citations_behaviors/publication_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/publication_behavior.rb:10:48: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
date_value = first_date.gsub(/[^0-9|n\.d\.]/, "")[0, 4]
^^
app/helpers/hyrax/citations_behaviors/publication_behavior.rb:10:51: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
date_value = first_date.gsub(/[^0-9|n\.d\.]/, "")[0, 4]
^^
app/helpers/hyrax/citations_behaviors/publication_behavior.rb:10:57: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date_value = first_date.gsub(/[^0-9|n\.d\.]/, "")[0, 4]
^^
app/helpers/hyrax/citations_behaviors/publication_behavior.rb:25:32: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use include_date: false instead of include_date = false.
def setup_pub_info(work, include_date = false)
^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/publication_behavior.rb:26:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
pub_info = ""
^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:22: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:48: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:61: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:67: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:73: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:80: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:7:86: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
TITLE_NOCAPS = ["a", "an", "and", "but", "by", "for", "it", "of", "the", "to", "with"].freeze
^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:8:40: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
EXPANDED_NOCAPS = TITLE_NOCAPS + ["about", "across", "before", "without"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:8:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
EXPANDED_NOCAPS = TITLE_NOCAPS + ["about", "across", "before", "without"]
^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:8:50: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
EXPANDED_NOCAPS = TITLE_NOCAPS + ["about", "across", "before", "without"]
^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:8:60: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
EXPANDED_NOCAPS = TITLE_NOCAPS + ["about", "across", "before", "without"]
^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:8:70: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
EXPANDED_NOCAPS = TITLE_NOCAPS + ["about", "across", "before", "without"]
^^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:14:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
w.split("-").map!(&:capitalize).join("-")
^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:14:50: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
w.split("-").map!(&:capitalize).join("-")
^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:33:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title_text.split(" ").collect.with_index(&block).join(" ")
^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:33:65: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title_text.split(" ").collect.with_index(&block).join(" ")
^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:48:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil if text.strip.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:49:9: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
clean_end_punctuation(text.strip) + "."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/citations_behaviors/title_behavior.rb:49:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
clean_end_punctuation(text.strip) + "."
^^^
app/helpers/hyrax/collections_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/collections_helper.rb:23:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "id" => result.id, "title_first" => result.title.first }
^^^^
app/helpers/hyrax/collections_helper.rb:23:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "id" => result.id, "title_first" => result.title.first }
^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:47:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("the .present_terms is deprecated for removal in Hyrax 4.0.0; " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:48:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"use #collection_metadata_label/value instead")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:64:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if collection_list.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:65:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
links = collection_list.map { |collection| link_to collection.title_or_label, hyrax.collection_path(collection.id) }
^^
app/helpers/hyrax/collections_helper.rb:76:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if collection_list.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:77:15: C: [Correctable] Style/InverseMethods: Use reject instead of inverting select.
links = collection_list.select { |collection| collection.id != collection_id }.map { |collection| link_to collection.title_or_label, hyrax.collection_path(collection.id) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:77:121: C: [Correctable] Layout/LineLength: Line is too long. [177/120]
links = collection_list.select { |collection| collection.id != collection_id }.map { |collection| link_to collection.title_or_label, hyrax.collection_path(collection.id) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:78:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if links.empty?
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:110:121: C: Layout/LineLength: Line is too long. [122/120]
def button_for_remove_from_collection(collection, document, label: 'Remove From Collection', btn_class: 'btn-primary')
^^
app/helpers/hyrax/collections_helper.rb:111:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
render 'hyrax/dashboard/collections/button_remove_from_collection', collection: collection, label: label, document: document, btn_class: btn_class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/collections_helper.rb:115:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
render 'hyrax/dashboard/collections/button_for_remove_selected_from_collection', collection: collection, label: label
^^^
app/helpers/hyrax/collections_helper.rb:215:5: C: [Correctable] Style/CommentedKeyword: Do not place comments on the same line as the end keyword.
end # rubocop:enable Metrics/ModuleLength
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/content_block_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/content_block_helper_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/content_block_helper_behavior.rb:5:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless display_content_block? content_block
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/dashboard_helper_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/dashboard_helper_behavior.rb:12:73: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
def number_of_works(user = current_user, where: { generic_type_sim: "Work" })
^^^^^^
app/helpers/hyrax/embargo_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/file_set_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::FileSetHelper
^
app/helpers/hyrax/file_set_helper.rb:31:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("the helper `media_display` renders a partial name " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/file_set_helper.rb:32:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"provided by `media_display_partial`. Callers " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/file_set_helper.rb:40:5: C: Style/StringConcatenation: Prefer string interpolation to string concatenation.
'hyrax/file_sets/media_display/' + ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:1:1: C: [Correctable] Style/Encoding: Unnecessary utf-8 encoding comment.
# coding: utf-8
^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:3:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/hyrax_helper_behavior.rb:77:30: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
class: count_classes_for(unread_notifications))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:104:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
def link_to_facet_list(values, solr_field, empty_message = "No value entered", separator = ", ")
^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:104:96: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
def link_to_facet_list(values, solr_field, empty_message = "No value entered", separator = ", ")
^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:105:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return empty_message if values.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:106:21: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
facet_field = solr_field.to_s + "_sim"
^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:106:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
facet_field = solr_field.to_s + "_sim"
^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:139:121: C: Layout/LineLength: Line is too long. [128/120]
# @param options [Hash{Symbol=>Object}] Blacklight sends :document, :field, :config, :value and whatever else was in options
^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:146:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError unless options[:config] && options[:config][:field_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:149:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
safe_join(links, ", ")
^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:155:121: C: Layout/LineLength: Line is too long. [121/120]
# link_to_each_facet_field({ value: "Imaging > Object Photography", config: { helper_facet: :document_types_sim }})
^
app/helpers/hyrax/hyrax_helper_behavior.rb:157:121: C: Layout/LineLength: Line is too long. [180/120]
# <a href=\"/catalog?f%5Bdocument_types_sim%5D%5B%5D=Imaging\">Imaging</a> &gt; <a href=\"/catalog?f%5Bdocument_types_sim%5D%5B%5D=Object+Photography\">Object Photography</a>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:162:121: C: Layout/LineLength: Line is too long. [124/120]
# @option options [Hash>] :config Example: { separator: '>', helper_facet: :document_types_sim, output_separator: '::' }
^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:188:34: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use show_link: true instead of show_link = true.
def iconify_auto_link(field, show_link = true)
^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:198:65: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
"<span class='glyphicon glyphicon-new-window'></span>#{('&nbsp;' + value) if show_link}"
^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:206:5: C: Metrics/PerceivedComplexity: Perceived complexity for link_to_profile is too high. [11/8]
def link_to_profile(args) ...
^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:214:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return user_or_key if user.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:260:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless user
^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:267:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if on_the_dashboard?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:282:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return user_key if user.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:288:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span("", class: [Hyrax::ModelIcon.css_class_for(::Collection), "collection-icon-search"])
^^
app/helpers/hyrax/hyrax_helper_behavior.rb:288:74: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span("", class: [Hyrax::ModelIcon.css_class_for(::Collection), "collection-icon-search"])
^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:293:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil if solr_docs.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:294:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_field = solr_docs.first["title_tesim"]
^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:295:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil if solr_field.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:305:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
""
^^
app/helpers/hyrax/hyrax_helper_behavior.rb:322:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "hyrax/my/collections"
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:324:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "hyrax/my/shares"
^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:326:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "hyrax/my/highlights"
^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:328:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "hyrax/dashboard/works"
^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:330:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "hyrax/dashboard/collections"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:337:22: W: [Correctable] Lint/RedundantCopEnableDirective: Unnecessary enabling of Metrics/MethodLength.
# rubocop:enable Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:351:43: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
facet_type = state.add_facet_params(facet.keys.first.to_s + "_sim", facet.values.first)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:351:67: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
facet_type = state.add_facet_params(facet.keys.first.to_s + "_sim", facet.values.first)
^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:354:48: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
facet_depositor = state.add_facet_params(facet.keys[1].to_s + "_ssim", facet.values[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:354:69: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
facet_depositor = state.add_facet_params(facet.keys[1].to_s + "_ssim", facet.values[1])
^^^^^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:356:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
facet_all["f"] = facet_type["f"].merge(facet_depositor["f"])
^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:356:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
facet_all["f"] = facet_type["f"].merge(facet_depositor["f"])
^^^
app/helpers/hyrax/hyrax_helper_behavior.rb:356:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
facet_all["f"] = facet_type["f"].merge(facet_depositor["f"])
^^^
app/helpers/hyrax/iiif_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/iiif_helper.rb:10:7: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
'hyrax/base/iiif_viewers/' + work_presenter.iiif_viewer.to_s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/lease_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/permissions_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/trophy_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/trophy_helper.rb:4:5: C: Metrics/AbcSize: Assignment Branch Condition size for display_trophy_link is too high. [<12, 28, 6> 31.05/28]
def display_trophy_link(user, id, args = {}, &_block) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/trophy_helper.rb:5:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless user
^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/trophy_helper.rb:7:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
trophyclass = trophy ? "trophy-on" : "trophy-off"
^^^^^^^^^^^
app/helpers/hyrax/trophy_helper.rb:7:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
trophyclass = trophy ? "trophy-on" : "trophy-off"
^^^^^^^^^^^^
app/helpers/hyrax/trophy_helper.rb:9:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
args[:add_text] ||= t("hyrax.dashboard.my.action.highlight")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/trophy_helper.rb:10:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
args[:remove_text] ||= t("hyrax.dashboard.my.action.unhighlight")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/trophy_helper.rb:22:22: W: [Correctable] Lint/RedundantCopEnableDirective: Unnecessary enabling of Metrics/MethodLength.
# rubocop:enable Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/url_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/url_helper.rb:6:121: C: [Correctable] Layout/LineLength: Line is too long. [126/120]
(['FileSet', 'Collection', 'Hyrax::AdministrativeSet'] + Hyrax.config.registered_curation_concern_types).each do |concern|
^^^^^^
app/helpers/hyrax/url_helper.rb:9:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless model_name
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/hyrax/work_form_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/workflows_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/helpers/hyrax/workflows_helper.rb:38:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return object.suppressed? if object.respond_to?(:suppressed?)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/concerns/hyrax/indexes_basic_metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/concerns/hyrax/indexes_linked_metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/admin_set_indexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/administrative_set_indexer.rb:12:17: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength.
def to_solr # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/basic_metadata_indexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/basic_metadata_indexer.rb:6:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
self.stored_and_facetable_fields = %i[resource_type creator contributor keyword publisher subject language based_near]
^^
app/indexers/hyrax/basic_metadata_indexer.rb:7:121: C: [Correctable] Layout/LineLength: Line is too long. [184/120]
self.stored_fields = %i[alternative_title description abstract license rights_statement rights_notes access_right date_created identifier related_url bibliographic_citation source]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/basic_metadata_indexer.rb:52:42: C: Naming/MethodParameterName: Method parameter must be at least 3 characters long.
def index_object_for(attribute_name, as: [])
^^
app/indexers/hyrax/collection_indexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/collection_indexer.rb:15:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_doc['generic_type_sim'] = ["Collection"]
^^^^^^^^^^^^
app/indexers/hyrax/collection_with_basic_metadata_indexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/deep_indexing_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'linkeddata' # we need all the linked data types, because we don't know what types a service might return.
^
app/indexers/hyrax/deep_indexing_service.rb:12:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super unless object.controlled_properties.include?(solr_field_key.to_sym)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/deep_indexing_service.rb:36:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if value.is_a?(ActiveFedora::Base)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/deep_indexing_service.rb:44:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless old_label == resource.rdf_subject.to_s || old_label.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/deep_indexing_service.rb:46:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if old_label == resource.rdf_label.first || resource.rdf_label.first == resource.rdf_subject.to_s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/deep_indexing_service.rb:61:62: C: [Correctable] Style/RegexpLiteral: Use %r around regular expression.
RDF::Util::File::HttpAdapter.default_accept_header.sub(/, \*\/\*;q=0\.1\Z/, '')
^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/deep_indexing_service.rb:68:121: C: Layout/LineLength: Line is too long. [126/120]
# @param [Array] val an array of two elements, first is a string (the uri) and the second is a hash with one key: `:label`
^^^^^^
app/indexers/hyrax/deep_indexing_service.rb:74:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless val.last.is_a? Hash
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/file_set_indexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/file_set_indexer.rb:39:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless object.original_file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/file_set_indexer.rb:44:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless object.original_file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/indexes_workflow.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/indexers/hyrax/indexes_workflow.rb:5:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"suppressed_bsi"
^^^^^^^^^^^^^^^^
app/indexers/hyrax/indexes_workflow.rb:26:121: C: [Correctable] Layout/LineLength: Line is too long. [163/120]
solr_document[workflow_role_field] = workflow_roles(entity).map { |role| "#{entity.workflow.permission_template.source_id}-#{entity.workflow.name}-#{role}" }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/indexes_workflow.rb:33:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"workflow_state_name_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/indexes_workflow.rb:37:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"actionable_workflow_roles_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/pcdm_collection_indexer.rb:15:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
index_document[Hyrax.config.collection_type_index_field.to_sym] = Array(resource.try(:collection_type_gid)&.to_s)
^
app/indexers/hyrax/repository_reindexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'active_fedora/base'
^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:30:98: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
solr_doc['original_file_alternate_ids_tesim'] = file_metadata.alternate_ids&.map(&:to_s) if file_metadata.alternate_ids.present?
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:30:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
solr_doc['original_file_alternate_ids_tesim'] = file_metadata.alternate_ids&.map(&:to_s) if file_metadata.alternate_ids.present?
^^^^^^^^^^^^^^^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:32:79: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
solr_doc['original_filename_tesi'] = file_metadata.original_filename if file_metadata.original_filename.present?
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:32:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
solr_doc['original_filename_tesi'] = file_metadata.original_filename if file_metadata.original_filename.present?
^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:33:79: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
solr_doc['original_filename_ssi'] = file_metadata.original_filename if file_metadata.original_filename.present?
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:33:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
solr_doc['original_filename_ssi'] = file_metadata.original_filename if file_metadata.original_filename.present?
^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:52:72: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
solr_doc['frame_rate_tesim'] = file_metadata.frame_rate if file_metadata.frame_rate.present? # audio, video
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:52:121: C: Layout/LineLength: Line is too long. [122/120]
solr_doc['frame_rate_tesim'] = file_metadata.frame_rate if file_metadata.frame_rate.present? # audio, video
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:55:73: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
solr_doc['sample_rate_tesim'] = file_metadata.sample_rate if file_metadata.sample_rate.present? # audio, video
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:55:121: C: Layout/LineLength: Line is too long. [124/120]
solr_doc['sample_rate_tesim'] = file_metadata.sample_rate if file_metadata.sample_rate.present? # audio, video
^^^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:90:79: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
solr_doc['scanning_software_tesim'] = file_metadata.scanning_software if file_metadata.scanning_software.present?
^^
app/indexers/hyrax/valkyrie_file_set_indexer.rb:90:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
solr_doc['scanning_software_tesim'] = file_metadata.scanning_software if file_metadata.scanning_software.present?
^
app/indexers/hyrax/valkyrie_indexer.rb:115:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return indexer_class if indexer_class.is_a?(Class) && ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/valkyrie_work_indexer.rb:12:17: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength.
def to_solr # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/indexers/hyrax/work_indexer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/inputs/multi_value_select_input.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class MultiValueSelectInput < MultiValueInput
^
app/inputs/multi_value_select_input.rb:43:109: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
(render_options, html_options) = options[:item_helper].call(value, index, render_options, html_options) if options[:item_helper]
^^
app/inputs/multi_value_select_input.rb:43:121: C: [Correctable] Layout/LineLength: Line is too long. [132/120]
(render_options, html_options) = options[:item_helper].call(value, index, render_options, html_options) if options[:item_helper]
^^^^^^^^^^^^
app/inputs/multifile_input.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class MultifileInput < SimpleForm::Inputs::CollectionInput
^
app/jobs/attach_files_to_work_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Converts UploadedFiles into FileSets and attaches them to works.
^
app/jobs/attach_files_to_work_job.rb:14:121: C: Layout/LineLength: Line is too long. [127/120]
raise("Could not complete AttachFilesToWorkJob. Some of these are probably in an undesirable state: #{uploaded_files}")
^^^^^^^
app/jobs/attach_files_to_work_job.rb:27:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if uploaded_file.file_set_uri.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/attach_files_to_work_job.rb:53:22: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
:visibility_after_lease, :lease_expiration_date,
^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/attach_files_to_work_job.rb:54:22: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
:embargo_release_date, :visibility_during_embargo,
^^^^^^^^^^^^^^^^^^^^^
app/jobs/attach_files_to_work_job.rb:55:22: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
:visibility_after_embargo)
^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/attach_files_to_work_job.rb:59:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
attrs = Array(attributes[:file_set]).find { |fs| fs[:uploaded_file_id].present? && (fs[:uploaded_file_id].to_i == uploaded_file&.id) }
^^^^^^^^^^^^^^^^^^
app/jobs/attach_files_to_work_job.rb:65:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if uploaded_file.is_a? Hyrax::UploadedFile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/attach_files_to_work_with_ordered_members_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Converts UploadedFiles into FileSets and attaches them to works.
^
app/jobs/batch_create_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class BatchCreateJob < Hyrax::ApplicationJob
^
app/jobs/batch_create_job.rb:29:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, 'attributes must include "model" => ClassName.to_s' unless model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/batch_create_job.rb:37:66: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
operation_type: "Create Work",
^^^^^^^^^^^^^
app/jobs/characterize_job.rb:31:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "#{file_set.class.characterization_proxy} was not found for FileSet #{file_set.id}" unless file_set.characterization_proxy?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/characterize_job.rb:31:95: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
raise "#{file_set.class.characterization_proxy} was not found for FileSet #{file_set.id}" unless file_set.characterization_proxy?
^^^^^^
app/jobs/characterize_job.rb:31:121: C: Layout/LineLength: Line is too long. [133/120]
raise "#{file_set.class.characterization_proxy} was not found for FileSet #{file_set.id}" unless file_set.characterization_proxy?
^^^^^^^^^^^^^
app/jobs/characterize_job.rb:41:121: C: Layout/LineLength: Line is too long. [133/120]
Rails.logger.debug "Ran characterization on #{file_set.characterization_proxy.id} (#{file_set.characterization_proxy.mime_type})"
^^^^^^^^^^^^^
app/jobs/characterize_job.rb:42:73: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
file_set.characterization_proxy.alpha_channels = channels(filepath) if file_set.image? && Hyrax.config.iiif_image_server?
^^
app/jobs/characterize_job.rb:42:121: C: Layout/LineLength: Line is too long. [125/120]
file_set.characterization_proxy.alpha_channels = channels(filepath) if file_set.image? && Hyrax.config.iiif_image_server?
^^^^^
app/jobs/concerns/hyrax/members_permission_job_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/concerns/hyrax/permission_job_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/content_delete_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log object deletion to activity streams
^
app/jobs/content_deposit_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log a concern deposit to activity streams
^
app/jobs/content_depositor_change_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log work depositor change to activity streams
^
app/jobs/content_depositor_change_event_job.rb:13:121: C: Layout/LineLength: Line is too long. [127/120]
# @param [TrueClass,FalseClass] reset (false) if true, reset the access controls. This revokes edit access from the depositor
^^^^^^^
app/jobs/content_depositor_change_event_job.rb:14:27: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use reset: false instead of reset = false.
def perform(work, user, reset = false)
^^^^^^^^^^^^^
app/jobs/content_depositor_change_event_job.rb:20:121: C: Layout/LineLength: Line is too long. [136/120]
"User #{link_to_profile work.proxy_depositor} has transferred #{link_to_work work.title.first} to user #{link_to_profile depositor}"
^^^^^^^^^^^^^^^^
app/jobs/content_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# A generic job for sending events about repository objects to a user and their followers.
^
app/jobs/content_event_job.rb:7:3: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :repo_object
^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/content_new_version_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log new version of a file to activity streams
^
app/jobs/content_new_version_event_job.rb:5:121: C: [Correctable] Layout/LineLength: Line is too long. [184/120]
@action ||= "User #{link_to_profile depositor} has added a new version of #{link_to repo_object.title.first, Rails.application.routes.url_helpers.hyrax_file_set_path(repo_object)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/content_restored_version_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log file restored version to activity streams
^
app/jobs/content_restored_version_event_job.rb:12:121: C: [Correctable] Layout/LineLength: Line is too long. [188/120]
"User #{link_to_profile depositor} has restored a version '#{revision_id}' of #{link_to repo_object.title.first, Rails.application.routes.url_helpers.hyrax_file_set_path(repo_object)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/content_update_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log content update to activity streams
^
app/jobs/create_derivatives_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class CreateDerivativesJob < Hyrax::ApplicationJob
^
app/jobs/create_derivatives_job.rb:9:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if file_set.video? && !Hyrax.config.enable_ffmpeg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/create_derivatives_job.rb:23:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless file_set.parent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/create_work_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# This is a job spawned by the BatchCreateJob
^
app/jobs/create_work_job.rb:23:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return operation.success! if status
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/embargo_expiry_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class EmbargoExpiryJob < Hyrax::ApplicationJob
^
app/jobs/event_job.rb:28:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise(NotImplementedError, "#action should be implemented by an child class of EventJob")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/file_set_attached_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log a fileset attachment to activity streams
^
app/jobs/fixity_check_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class FixityCheckJob < Hyrax::ApplicationJob
^
app/jobs/fixity_check_job.rb:51:121: C: [Correctable] Layout/LineLength: Line is too long. [162/120]
ChecksumAuditLog.create_and_prune!(passed: service.check, file_set_id: file_set_id, checked_uri: uri.to_s, file_id: file_id, expected_result: expected_result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/fixity_check_job.rb:53:121: C: [Correctable] Layout/LineLength: Line is too long. [154/120]
ChecksumAuditLog.create_and_prune!(passed: false, file_set_id: file_set_id, checked_uri: uri.to_s, file_id: file_id, expected_result: expected_result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/hyrax/application_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/hyrax/grant_edit_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/hyrax/grant_edit_to_members_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/hyrax/grant_read_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/hyrax/grant_read_to_members_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/hyrax/revoke_edit_from_members_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/hyrax/revoke_edit_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/jobs/import_export_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'open3'
^
app/jobs/import_export_job.rb:24:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Fedora command failed: \"#{command}\"\n#{err}" unless exit_status.success?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/import_url_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'uri'
^
app/jobs/import_url_job.rb:50:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if BrowseEverything::Retriever.can_retrieve?(uri, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/import_url_job.rb:83:7: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/jobs/import_url_job.rb:105:18: C: Naming/MethodParameterName: Method parameter must be at least 3 characters long.
def write_file(f)
^
app/jobs/import_url_job.rb:116:25: C: Naming/MethodParameterName: Method parameter must be at least 3 characters long.
def log_import_status(f)
^
app/jobs/ingest_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class IngestJob < Hyrax::ApplicationJob
^
app/jobs/ingest_job.rb:15:1: W: Lint/MissingCopEnableDirective: Re-enable Lint/UnusedMethodArgument cop with # rubocop:enable after disabling it.
# rubocop:disable Lint/UnusedMethodArgument
^
app/jobs/ingest_local_file_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class IngestLocalFileJob < Hyrax::ApplicationJob
^
app/jobs/inherit_permissions_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# A job to apply work permissions to all contained files set
^
app/jobs/inherit_permissions_job.rb:10:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("use_valkyrie argument is deprecated, behavior depends on deserialized resource") unless
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/lease_expiry_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class LeaseExpiryJob < Hyrax::ApplicationJob
^
app/jobs/resolrize_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class ResolrizeJob < Hyrax::ApplicationJob
^
app/jobs/stream_notifications_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class StreamNotificationsJob < Hyrax::ApplicationJob
^
app/jobs/stream_notifications_job.rb:5:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless Hyrax.config.realtime_notifications?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/user_edit_profile_event_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Log user profile edits to activity streams
^
app/jobs/valkyrie_ingest_job.rb:72:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax.publisher.publish("object.file.uploaded", metadata: saved_metadata)
^^^^^^^^^^^^^^^^^^^^^^
app/jobs/valkyrie_ingest_job.rb:84:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax.logger.warn "Creating Hyrax::FileMetadata now"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/jobs/visibility_copy_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Responsible for copying the following attributes from the work to each file in the file_sets
^
app/mailers/hyrax/contact_mailer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/mailers/hyrax/contact_mailer.rb:8:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if @contact_form.spam?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/admin_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# There is an interplay between an AdminSet and a PermissionTemplate. Given
^
app/models/admin_set.rb:95:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("reset_access_controls! is deprecated; use PermissionTemplate#reset_access_controls_for instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/admin_set.rb:109:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if members.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/admin_set.rb:115:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless default_set?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/batch_upload_item.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# This stands in for an object to be created from the BatchUploadForm.
^
app/models/batch_upload_item.rb:19:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise "This is a read only record"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/checksum_audit_log.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class ChecksumAuditLog < ActiveRecord::Base
^
app/models/checksum_audit_log.rb:18:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.where("c2.id is NULL")
^^^^^^^^^^^^^^^
app/models/checksum_audit_log.rb:19:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.order("created_at desc, id desc")
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/checksum_audit_log.rb:38:121: C: [Correctable] Layout/LineLength: Line is too long. [137/120]
log = create!(passed: passed, checked_uri: checked_uri, file_set_id: file_set_id, file_id: file_id, expected_result: expected_result)
^^^^^^^^^^^^^^^^^
app/models/checksum_audit_log.rb:51:72: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
all_logs = logs_for(file_set_id, checked_uri: checked_uri).reorder("created_at asc").to_a
^^^^^^^^^^^^^^^^
app/models/collection_branding_info.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class CollectionBrandingInfo < ApplicationRecord
^
app/models/collection_branding_info.rb:6:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
alt_txt: "",
^^
app/models/collection_branding_info.rb:7:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
target_url: "")
^^
app/models/collection_branding_info.rb:17:27: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use copy_file: true instead of copy_file = true.
def save(file_location, copy_file = true)
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/ability.rb:87:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if doc.nil?
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:96:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if doc.nil?
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:157:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless registered_user?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:171:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless registered_user?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:347:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if admin?
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:362:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless admin?
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:389:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless registered_user?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:399:55: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
access: ['deposit', 'manage'])
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:409:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if current_user.guest?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability.rb:432:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless approving_role
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/ability/admin_set_ability.rb:29:121: C: Layout/LineLength: Line is too long. [134/120]
can [:edit, :update, :destroy], Hyrax::AdministrativeSet do |admin_set| # for test by solr_doc, see solr_document_ability.rb
^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:34:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
Hyrax::Collections::PermissionsService.can_deposit_in_collection?(ability: self, collection_id: admin_set.id)
^
app/models/concerns/hyrax/ability/admin_set_ability.rb:37:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
Hyrax::Collections::PermissionsService.can_deposit_in_collection?(ability: self, collection_id: admin_set.id)
^
app/models/concerns/hyrax/ability/admin_set_ability.rb:40:121: C: Layout/LineLength: Line is too long. [123/120]
can :view_admin_show, AdminSet do |admin_set| # admin show page # for test by solr_doc, see collection_ability.rb
^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:41:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
Hyrax::Collections::PermissionsService.can_view_admin_show_for_collection?(ability: self, collection_id: admin_set.id)
^^^^^^^^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:43:121: C: Layout/LineLength: Line is too long. [139/120]
can :view_admin_show, Hyrax::AdministrativeSet do |admin_set| # admin show page # for test by solr_doc, see collection_ability.rb
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:44:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
Hyrax::Collections::PermissionsService.can_view_admin_show_for_collection?(ability: self, collection_id: admin_set.id)
^^^^^^^^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:48:121: C: Layout/LineLength: Line is too long. [128/120]
can :read, Hyrax::AdministrativeSet do |admin_set| # admin show page # for test by solr_doc, see collection_ability.rb
^^^^^^^^
app/models/concerns/hyrax/ability/admin_set_ability.rb:53:121: C: Layout/LineLength: Line is too long. [164/120]
# TODO: I'm not sure why this is checked with AdminSet abilities. It was before the refactor and since I'm not sure what the connection is, I left it here.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/collection_ability.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/ability/collection_ability.rb:30:121: C: [Correctable] Layout/LineLength: Line is too long. [124/120]
Hyrax::Collections::PermissionsService.can_deposit_in_collection?(ability: self, collection_id: collection.id)
^^^^
app/models/concerns/hyrax/ability/collection_ability.rb:34:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
Hyrax::Collections::PermissionsService.can_view_admin_show_for_collection?(ability: self, collection_id: collection.id)
^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/collection_ability.rb:43:121: C: Layout/LineLength: Line is too long. [156/120]
Hyrax::Collections::PermissionsService.can_deposit_in_collection?(ability: self, collection_id: solr_doc.id) # checks collections and admin_sets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/collection_ability.rb:46:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
Hyrax::Collections::PermissionsService.can_deposit_in_collection?(ability: self, collection_id: collection_id)
^^
app/models/concerns/hyrax/ability/collection_ability.rb:50:121: C: Layout/LineLength: Line is too long. [165/120]
Hyrax::Collections::PermissionsService.can_view_admin_show_for_collection?(ability: self, collection_id: solr_doc.id) # checks collections and admin_sets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/collection_type_ability.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/ability/collection_type_ability.rb:11:121: C: [Correctable] Layout/LineLength: Line is too long. [134/120]
Hyrax::CollectionTypes::PermissionsService.can_create_collection_of_type?(ability: self, collection_type: collection_type)
^^^^^^^^^^^^^^
app/models/concerns/hyrax/ability/permission_template_ability.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/ability/solr_document_ability.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/basic_metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/basic_metadata.rb:14:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
property :relative_path, predicate: ::RDF::URI.new('http://scholarsphere.psu.edu/ns#relativePath'), multiple: false
^
app/models/concerns/hyrax/basic_metadata.rb:36:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
property :based_near, predicate: ::RDF::Vocab::FOAF.based_near, class_name: Hyrax::ControlledVocabularies::Location
^
app/models/concerns/hyrax/collection_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/collection_behavior.rb:34:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Can't modify collection type of this collection" if !force && persisted? && !collection_type_gid_was.nil? && collection_type_gid_was != new_collection_type_gid
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:34:65: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
raise "Can't modify collection type of this collection" if !force && persisted? && !collection_type_gid_was.nil? && collection_type_gid_was != new_collection_type_gid
^^
app/models/concerns/hyrax/collection_behavior.rb:34:121: C: Layout/LineLength: Line is too long. [174/120]
raise "Can't modify collection type of this collection" if !force && persisted? && !collection_type_gid_was.nil? && collection_type_gid_was != new_collection_type_gid
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:56:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Instead, use Hyrax::Collections::CollectionMemberService.add_members_by_ids.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:66:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Instead, use Hyrax::Collections::CollectionMemberService.add_members_by_ids.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:80:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless id
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:90:28: C: [Correctable] Layout/LeadingCommentSpace: Missing space after #.
def _to_partial_path #:nodoc:
^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:129:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("reset_access_controls! is deprecated; use PermissionTemplate#reset_access_controls_for instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_behavior.rb:129:121: C: Layout/LineLength: Line is too long. [121/120]
Deprecation.warn("reset_access_controls! is deprecated; use PermissionTemplate#reset_access_controls_for instead.")
^
app/models/concerns/hyrax/collection_behavior.rb:139:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"member_ids_ssim"
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_nesting.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/collection_nesting.rb:30:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if @during_save
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/collection_nesting.rb:47:121: C: Layout/LineLength: Line is too long. [123/120]
Hyrax::SolrService.query(Hyrax::SolrQueryBuilderService.construct_query(member_of_collection_ids_ssim: destroyed_id))
^^^
app/models/concerns/hyrax/core_metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/core_metadata.rb:9:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
property :depositor, predicate: ::RDF::URI.new('http://id.loc.gov/vocabulary/relators/dpt'), multiple: false do |index|
^^^^^
app/models/concerns/hyrax/embargoable.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/file_set/belongs_to_works.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/file_set/belongs_to_works.rb:12:121: C: Layout/LineLength: Line is too long. [194/120]
# This is a hack to handle things like FileSets inheriting access controls from their parent. (see Hyrax::ParentContainer in app/controllers/concerns/curation_concers/parent_container.rb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/file_set/belongs_to_works.rb:18:121: C: Layout/LineLength: Line is too long. [194/120]
# This is a hack to handle things like FileSets inheriting access controls from their parent. (see Hyrax::ParentContainer in app/controllers/concerns/curation_concers/parent_container.rb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/file_set/belongs_to_works.rb:26:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if parent_objects.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/file_set/derivatives.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/file_set/indexing.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/file_set/querying.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/file_set/querying.rb:9:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
where "digest_ssim" => urnify(digest_string)
^^^^^^^^^^^^^
app/models/concerns/hyrax/file_set_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/has_rendering.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::HasRendering
^
app/models/concerns/hyrax/has_representative.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::HasRepresentative
^
app/models/concerns/hyrax/human_readable_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/human_readable_type.rb:18:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
doc["human_readable_type_sim"] = human_readable_type
^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/human_readable_type.rb:19:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
doc["human_readable_type_tesim"] = human_readable_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/in_admin_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/naming.rb:12:9: C: Naming/MemoizedInstanceVariableName: Memoized variable @_model_name does not match method name model_name. Use @model_name instead.
@_model_name ||= begin
^^^^^^^^^^^^
app/models/concerns/hyrax/nested_works.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/permissions.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/permissions/readable.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/permissions/writable.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/permissions/writable.rb:17:121: C: [Correctable] Layout/LineLength: Line is too long. [155/120]
{ key: :edit_groups, message: 'Public cannot have edit access', condition: ->(obj) { obj.edit_groups.include?(::Ability.public_group_name) } },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/permissions/writable.rb:18:121: C: [Correctable] Layout/LineLength: Line is too long. [162/120]
{ key: :edit_groups, message: 'Registered cannot have edit access', condition: ->(obj) { obj.edit_groups.include?(::Ability.registered_group_name) } }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/permissions/writable.rb:25:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless validation[:condition].call(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/proxy_deposit.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/proxy_deposit.rb:7:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
property :proxy_depositor, predicate: ::RDF::URI.new('http://scholarsphere.psu.edu/ns#proxyDepositor'), multiple: false do |index|
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/proxy_deposit.rb:12:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
property :on_behalf_of, predicate: ::RDF::URI.new('http://scholarsphere.psu.edu/ns#onBehalfOf'), multiple: false do |index|
^^^^^^^^^
app/models/concerns/hyrax/proxy_deposit.rb:18:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "Must provide a target" unless target
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/proxy_deposit.rb:18:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "Must provide a target" unless target
^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/serializers.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/solr_document/characterization.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/solr_document/characterization.rb:8:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["byte_order_tesim"]
^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:14:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["capture_device_tesim"]
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:20:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["color_map_tesim"]
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:26:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["color_space_tesim"]
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:32:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["compression_tesim"]
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:38:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["gps_timestamp_tesim"]
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:48:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["image_producer_tesim"]
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:54:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["latitude_tesim"]
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:60:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["longitude_tesim"]
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:66:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["orientation_tesim"]
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:72:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["profile_name_tesim"]
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:78:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["profile_version_tesim"]
^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:84:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["scanning_software_tesim"]
^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:94:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["format_label_tesim"]
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:98:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["file_size_lts"]
^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:104:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["filename_tesim"]
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:110:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["well_formed_tesim"]
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:114:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["page_count_tesim"]
^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:118:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["file_title_tesim"]
^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:122:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["duration_tesim"]
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:126:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["sample_rate_tesim"]
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:132:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["last_modified_tesim"]
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:136:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["original_checksum_tesim"]
^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/characterization.rb:140:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
self["alpha_channels_ssi"]
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/export.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/solr_document/export.rb:35:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if values.blank? || values.first.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/export.rb:36:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spaced_values = values.join("; ")
^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/solr_document/metadata.rb:33:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if field.blank?
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:44:52: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :alternative_title, Solr::Array, "alternative_title_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:45:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :identifier, Solr::Array, "identifier_tesim"
^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:46:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :based_near, Solr::Array, "based_near_tesim"
^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:47:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :based_near_label, Solr::Array, "based_near_label_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:48:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :related_url, Solr::Array, "related_url_tesim"
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:49:48: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :resource_type, Solr::Array, "resource_type_tesim"
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:54:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :admin_set, Solr::Array, "admin_set_tesim"
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:55:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :member_ids, Solr::Array, "member_ids_ssim"
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:56:59: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :member_of_collection_ids, Solr::Array, "member_of_collection_ids_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:57:56: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :member_of_collections, Solr::Array, "member_of_collections_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:58:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :description, Solr::Array, "description_tesim"
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:59:43: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :abstract, Solr::Array, "abstract_tesim"
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:60:40: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :title, Solr::Array, "title_tesim"
^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:61:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :contributor, Solr::Array, "contributor_tesim"
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:62:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :subject, Solr::Array, "subject_tesim"
^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:63:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :publisher, Solr::Array, "publisher_tesim"
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:64:43: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :language, Solr::Array, "language_tesim"
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:65:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :keyword, Solr::Array, "keyword_tesim"
^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:66:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :license, Solr::Array, "license_tesim"
^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:67:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :source, Solr::Array, "source_tesim"
^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:68:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :date_created, Solr::Array, "date_created_tesim"
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:69:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :rights_statement, Solr::Array, "rights_statement_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:70:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :rights_notes, Solr::Array, "rights_notes_tesim"
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:71:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :access_right, Solr::Array, "access_right_tesim"
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:72:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :mime_type, Solr::String, "mime_type_ssi"
^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:73:50: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :workflow_state, Solr::String, "workflow_state_name_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:74:55: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :human_readable_type, Solr::String, "human_readable_type_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:75:53: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :representative_id, Solr::String, "hasRelatedMediaFragment_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:77:48: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
attribute :rendering_ids, Solr::Array, Hyrax.config.rendering_predicate.value.split(/#|\/|,/).last + "_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:77:93: C: [Correctable] Style/RegexpLiteral: Use %r around regular expression.
attribute :rendering_ids, Solr::Array, Hyrax.config.rendering_predicate.value.split(/#|\/|,/).last + "_ssim"
^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:77:110: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :rendering_ids, Solr::Array, Hyrax.config.rendering_predicate.value.split(/#|\/|,/).last + "_ssim"
^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:78:48: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :thumbnail_id, Solr::String, "hasRelatedImage_ssim"
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:80:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :label, Solr::String, "label_tesim"
^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:81:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :file_format, Solr::String, "file_format_tesim"
^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:82:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :suppressed?, Solr::String, "suppressed_bsi"
^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:83:52: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :original_file_id, Solr::String, "original_file_id_ssi"
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:84:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :date_modified, Solr::Date, "date_modified_dtsi"
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:85:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :date_uploaded, Solr::Date, "date_uploaded_dtsi"
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:86:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :create_date, Solr::Date, "system_create_dtsi"
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/metadata.rb:87:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute :modified_date, Solr::Date, "system_modified_dtsi"
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document/ordered_members.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/solr_document/ordered_members.rb:28:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if id.blank?
^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/solr_document_behavior.rb:32:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return label if title.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document_behavior.rb:50:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @model does not match method name to_model. Use @to_model instead.
@model ||= ActiveFedoraDummyModel.new(hydra_model, id)
^^^^^^
app/models/concerns/hyrax/solr_document_behavior.rb:84:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
val = first("depositor_tesim")
^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document_behavior.rb:89:45: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_term = hydra_model == AdminSet ? "creator_ssim" : "creator_tesim"
^^^^^^^^^^^^^^
app/models/concerns/hyrax/solr_document_behavior.rb:89:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_term = hydra_model == AdminSet ? "creator_ssim" : "creator_tesim"
^^^^^^^^^^^^^^^
app/models/concerns/hyrax/suppressible.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/suppressible.rb:29:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn "Use `Sipity::Entity(entity)` instead."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/suppressible.rb:30:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Can't create an entity until the model has been persisted" unless persisted?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/suppressible.rb:31:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @sipity_entity does not match method name to_sipity_entity. Use @to_sipity_entity instead.
@sipity_entity ||= Sipity::Entity(to_global_id)
^^^^^^^^^^^^^^
app/models/concerns/hyrax/user.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'oauth'
^
app/models/concerns/hyrax/user.rb:32:22: C: [Correctable] Style/EmptyLambdaParameter: Omit parentheses for the empty lambda parameters.
scope :guests, ->() { where(guest: true) }
^^
app/models/concerns/hyrax/user.rb:33:26: C: [Correctable] Style/EmptyLambdaParameter: Omit parentheses for the empty lambda parameters.
scope :registered, ->() { where(guest: false) }
^^
app/models/concerns/hyrax/user.rb:34:121: C: [Correctable] Layout/LineLength: Line is too long. [159/120]
scope :without_system_accounts, -> { where("#{::User.user_key_field} not in (?)", [::User.batch_user_key, ::User.audit_user_key, ::User.system_user_key]) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/user.rb:109:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if errors[:orcid].first.present? || orcid.blank? || orcid.starts_with?('https://orcid.org/')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/user.rb:177:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
User.find_by_user_key(user_key) || User.create!(user_key_field => user_key, password: Devise.friendly_token[0, 20])
^
app/models/concerns/hyrax/user_usage_stats.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::UserUsageStats
^
app/models/concerns/hyrax/virus_check.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/virus_check.rb:10:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless original_file&.new_record? # We have a new file to check
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/virus_check.rb:15:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless viruses?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/virus_check.rb:16:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
errors.add(:base, "Failed to verify uploaded file is not a virus")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/hyrax/with_events.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/with_file_sets.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/work_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/concerns/hyrax/work_behavior.rb:37:28: C: [Correctable] Layout/LeadingCommentSpace: Missing space after #.
def _to_partial_path #:nodoc:
^^^^^^^^
app/models/concerns/hyrax/works/metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::Works
^
app/models/concerns/hyrax/works/metadata.rb:7:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
property :arkivo_checksum, predicate: ::RDF::URI.new('http://scholarsphere.psu.edu/ns#arkivoChecksum'), multiple: false
^^^^^
app/models/content_block.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class ContentBlock < ActiveRecord::Base
^
app/models/content_block.rb:22:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "#{key} is not a ContentBlock name" unless registered?(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/content_block.rb:29:121: C: [Correctable] Layout/LineLength: Line is too long. [124/120]
Deprecation.warn(self, "Samvera is deprecating '#{self}.whitelisted?' in Hyrax 3.0. Use #{self}.registered? instead.")
^^^^
app/models/featured_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class FeaturedWork < ActiveRecord::Base
^
app/models/featured_work.rb:10:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if FeaturedWork.can_create_another?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/featured_work_list.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class FeaturedWorkList
^
app/models/featured_work_list.rb:8:112: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
attributes_collection = attributes_collection.sort_by { |i, _| i.to_i }.map { |_, attributes| attributes } if attributes_collection.is_a? Hash
^^
app/models/featured_work_list.rb:8:121: C: [Correctable] Layout/LineLength: Line is too long. [146/120]
attributes_collection = attributes_collection.sort_by { |i, _| i.to_i }.map { |_, attributes| attributes } if attributes_collection.is_a? Hash
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/featured_work_list.rb:10:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Missing id" if attributes['id'].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/featured_work_list.rb:10:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise "Missing id" if attributes['id'].blank?
^^^^^^^^^^^^
app/models/featured_work_list.rb:17:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @works if @works
^^^^^^^^^^^^^^^^^^^^^^^
app/models/file_download_stat.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class FileDownloadStat < Hyrax::Statistic
^
app/models/file_download_stat.rb:12:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.error("Google Analytics profile has not been established. Unable to fetch statistics.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/file_view_stat.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class FileViewStat < Hyrax::Statistic
^
app/models/hyrax/administrative_set.rb:15:121: C: Layout/LineLength: Line is too long. [135/120]
# * Get works using: <code>works = Hyrax.query_service.find_inverse_references_by(id: admin_set.id, property: :admin_set_id)</code>
^^^^^^^^^^^^^^^
app/models/hyrax/avatar_validator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/avatar_validator.rb:5:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless record.avatar?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/batch_create_operation.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/batch_create_operation.rb:8:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless Hyrax.config.callback.set?(:after_batch_create_success)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/batch_create_operation.rb:13:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless Hyrax.config.callback.set?(:after_batch_create_failure)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/change_set.rb:16:14: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
klass = (resource_class.to_s + "ChangeSet").safe_constantize || Hyrax::ChangeSet
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/change_set.rb:16:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
klass = (resource_class.to_s + "ChangeSet").safe_constantize || Hyrax::ChangeSet
^^^^^^^^^^^
app/models/hyrax/change_set.rb:25:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "Hyrax::ChangeSet(#{model_class})" if name.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/collection_type.rb:19:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
has_many :collection_type_participants, class_name: 'Hyrax::CollectionTypeParticipant', foreign_key: 'hyrax_collection_type_id', dependent: :destroy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:57:121: C: Layout/LineLength: Line is too long. [158/120]
# @return [Hyrax::CollectionType] if record matching gid is found, an instance of Hyrax::CollectionType with id = the model_id portion of the gid (e.g. 3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:75:121: C: Layout/LineLength: Line is too long. [125/120]
# @return [Hyrax::CollectionType] an instance of Hyrax::CollectionType with id = the model_id portion of the gid (e.g. 3)
^^^^^
app/models/hyrax/collection_type.rb:78:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise(URI::InvalidURIError) if gid.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:82:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"a legacy collection type global id format. If this " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:83:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"collection type gid is attached to a collection in " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:85:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"`hyrax:collections:update_collection_type_global_ids` to " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:86:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"update references. see: https://github.com/samvera/hyrax/issues/4696"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:102:121: C: Layout/LineLength: Line is too long. [121/120]
# @return [String, nil] Global Identifier (gid) for this collection_type (e.g. gid://internal/hyrax-collectiontype/3)
^
app/models/hyrax/collection_type.rb:114:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Hyrax.custom_queries.find_collections_by_type(global_id: to_global_id.to_s) if use_valkyrie
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:151:121: C: Layout/LineLength: Line is too long. [122/120]
find_by(machine_id: USER_COLLECTION_MACHINE_ID) || Hyrax::CollectionTypes::CreateService.create_user_collection_type
^^
app/models/hyrax/collection_type.rb:174:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless collections.any?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:180:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless admin_set? && collection_type_settings_changed? && exists_for_machine_id?(ADMIN_SET_MACHINE_ID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:186:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless user_collection? && collection_type_settings_changed? && exists_for_machine_id?(USER_COLLECTION_MACHINE_ID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:186:19: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
return true unless user_collection? && collection_type_settings_changed? && exists_for_machine_id?(USER_COLLECTION_MACHINE_ID)
^^^^^^
app/models/hyrax/collection_type.rb:186:121: C: Layout/LineLength: Line is too long. [132/120]
return true unless user_collection? && collection_type_settings_changed? && exists_for_machine_id?(USER_COLLECTION_MACHINE_ID)
^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:193:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless collection_type_settings_changed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:199:23: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
(changes.keys & ['nestable', 'brandable', 'discoverable', 'sharable', 'share_applies_to_new_works', ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type.rb:200:121: C: Layout/LineLength: Line is too long. [121/120]
'allow_multiple_membership', 'require_membership', 'assigns_workflow', 'assigns_visibility']).any?
^
app/models/hyrax/collection_type.rb:206:7: C: [Correctable] Style/CommentedKeyword: Do not place comments on the same line as the end keyword.
end # rubocop:enable Metrics/ClassLength
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type_participant.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/collection_type_participant.rb:15:121: C: Layout/LineLength: Line is too long. [143/120]
message: "%<value>s is not a valid agent type. Accepts: #{GROUP_TYPE}, #{USER_TYPE}" }
^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type_participant.rb:17:121: C: Layout/LineLength: Line is too long. [142/120]
message: "%<value>s is not a valid access. Accepts: #{MANAGE_ACCESS}, #{CREATE_ACCESS}" }
^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/collection_type_participant.rb:29:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return agent_id unless agent_type == GROUP_TYPE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/contact_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/contact_form.rb:5:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_accessor :contact_method, :category, :name, :email, :subject, :message
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/contact_form.rb:7:38: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
validates :email, format: /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i, allow_blank: true
^^
app/models/hyrax/contact_form.rb:7:41: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
validates :email, format: /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i, allow_blank: true
^^
app/models/hyrax/contact_form.rb:7:62: C: [Correctable] Style/RedundantRegexpCharacterClass: Redundant single-element character class, [\w] can be replaced with \w.
validates :email, format: /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i, allow_blank: true
^^^^
app/models/hyrax/contact_form.rb:9:121: C: Layout/LineLength: Line is too long. [121/120]
# - can't use this without ActiveRecord::Base validates_inclusion_of :category, in: self.class.issue_types_for_locale
^
app/models/hyrax/default_administrative_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/default_administrative_set.rb:37:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if id.is_a?(String) || id.is_a?(Valkyrie::ID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/default_administrative_set.rb:38:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "default_admin_set_id must be a non-blank String or Valkyrie::ID"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/download.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/event.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/feature.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/file_metadata.rb:38:121: C: Layout/LineLength: Line is too long. [154/120]
attribute :alternate_ids, Valkyrie::Types::Set.of(Valkyrie::Types::ID) # id of the Hydra::PCDM::File which holds metadata and the file in ActiveFedora
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/file_set.rb:13:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @_model_name does not match method name model_name. Use @model_name instead.
@_model_name ||= begin
^^^^^^^^^^^^
app/models/hyrax/file_set.rb:13:24: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
@_model_name ||= begin
^^^^^
app/models/hyrax/group.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/operation.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/operation.rb:40:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return fail! if stats.include?(FAILURE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/orcid_validator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/orcid_validator.rb:6:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if record.orcid.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/orcid_validator.rb:7:99: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
record.errors.add(:orcid, 'must be a string of 19 characters, e.g., "0000-0000-0000-0000"') unless ORCID_REGEXP.match?(record.orcid)
^^^^^^
app/models/hyrax/orcid_validator.rb:7:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
record.errors.add(:orcid, 'must be a string of 19 characters, e.g., "0000-0000-0000-0000"') unless ORCID_REGEXP.match?(record.orcid)
^^^^^^^^^^^^^^^^^^
app/models/hyrax/pageview.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/permission_template.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/permission_template.rb:57:5: C: Rails/HasManyOrHasOneDependent: Specify a :dependent option.
has_one :active_workflow, -> { where(active: true) }, class_name: 'Sipity::Workflow', foreign_key: :permission_template_id
^^^^^^^
app/models/hyrax/permission_template.rb:57:121: C: [Correctable] Layout/LineLength: Line is too long. [126/120]
has_one :active_workflow, -> { where(active: true) }, class_name: 'Sipity::Workflow', foreign_key: :permission_template_id
^^^^^^
app/models/hyrax/permission_template.rb:99:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("#admin_set is deprecated; use #source instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:100:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return AdminSet.find(source_id) if AdminSet.exists?(source_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:111:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("#collection is deprecated; use #source instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:112:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ::Collection.find(source_id) if ::Collection.exists?(source_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:228:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("#reset_access_controls is deprecated; use #reset_access_controls_for instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:266:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless release_no_delay?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:272:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless release_before_date? && release_date.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template.rb:278:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless release_fixed_date? && release_date.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:33:121: C: Layout/LineLength: Line is too long. [191/120]
# @param access [Array<String>] one or more types of access (e.g. Hyrax::PermissionTemplateAccess::MANAGE, Hyrax::PermissionTemplateAccess::DEPOSIT, Hyrax::PermissionTemplateAccess::VIEW)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:47:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return agent_id unless agent_type == GROUP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:66:121: C: Layout/LineLength: Line is too long. [191/120]
# @param access [Array<String>] one or more types of access (e.g. Hyrax::PermissionTemplateAccess::MANAGE, Hyrax::PermissionTemplateAccess::DEPOSIT, Hyrax::PermissionTemplateAccess::VIEW)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:69:121: C: Layout/LineLength: Line is too long. [142/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:70:121: C: Layout/LineLength: Line is too long. [129/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^
app/models/hyrax/permission_template_access.rb:84:121: C: Layout/LineLength: Line is too long. [191/120]
# @param access [Array<String>] one or more types of access (e.g. Hyrax::PermissionTemplateAccess::MANAGE, Hyrax::PermissionTemplateAccess::DEPOSIT, Hyrax::PermissionTemplateAccess::VIEW)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:88:121: C: Layout/LineLength: Line is too long. [142/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/permission_template_access.rb:89:121: C: Layout/LineLength: Line is too long. [129/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^
app/models/hyrax/statistic.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/statistic.rb:34:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.error("Google Analytics profile has not been established. Unable to fetch statistics.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:50:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results = query_works("human_readable_type_tesim")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:54:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for resource_types is too high. [8/7]
def resource_types ...
^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:54:7: C: Metrics/PerceivedComplexity: Perceived complexity for resource_types is too high. [9/8]
def resource_types ...
^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:55:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results = query_works("resource_type_tesim")
^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:58:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if y["resource_type_tesim"].nil? || (y["resource_type_tesim"] == [""])
^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:58:50: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if y["resource_type_tesim"].nil? || (y["resource_type_tesim"] == [""])
^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:58:77: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if y["resource_type_tesim"].nil? || (y["resource_type_tesim"] == [""])
^^
app/models/hyrax/statistic.rb:59:33: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
resource_types.push("Unknown")
^^^^^^^^^
app/models/hyrax/statistic.rb:60:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
elsif y["resource_type_tesim"].count > 1
^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:61:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
y["resource_type_tesim"].each do |t|
^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:65:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
resource_types.push(y["resource_type_tesim"].join(""))
^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/statistic.rb:65:63: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
resource_types.push(y["resource_type_tesim"].join(""))
^^
app/models/hyrax/uploaded_file.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/version_committer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/hyrax/virus_scanner.rb:46:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if scan_result.zero?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/hyrax/work.rb:27:121: C: Layout/LineLength: Line is too long. [124/120]
# * <code>Hyrax::CollectionMemberService.add_members(collection_id: col.id, members: works, user: current_user)</code>
^^^^
app/models/hyrax/work.rb:28:121: C: Layout/LineLength: Line is too long. [124/120]
# * Get collection resources using: <code>collections = Hyrax.custom_queries.find_collections_for(resource: work)</code>
^^^^
app/models/hyrax/workflow_action_info.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/models/job_io_wrapper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Primarily for jobs like IngestJob to revivify an equivalent FileActor to one that existed on
^
app/models/job_io_wrapper.rb:62:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return file.stat.size.to_s if file.respond_to? :stat
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/job_io_wrapper.rb:67:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return FileSet.find(file_set_id) unless use_valkyrie
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/job_io_wrapper.rb:97:33: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
eon ||= File.basename(path) if path.present? # note: uploader.filename is `nil` with uncached remote files (e.g. AWSFile)
^^
app/models/job_io_wrapper.rb:97:52: C: [Correctable] Style/CommentAnnotation: Annotation keywords like note should be all upper case, followed by a colon, and a space, then a note describing the problem.
eon ||= File.basename(path) if path.present? # note: uploader.filename is `nil` with uncached remote files (e.g. AWSFile)
^^^^^^
app/models/job_io_wrapper.rb:97:121: C: Layout/LineLength: Line is too long. [125/120]
eon ||= File.basename(path) if path.present? # note: uploader.filename is `nil` with uncached remote files (e.g. AWSFile)
^^^^^
app/models/job_io_wrapper.rb:108:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise("path '#{path}' was unusable and uploaded_file empty") unless uploaded_file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/proxy_deposit_request.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Responsible for persisting the ownership transfer requests and the state of each request.
^
app/models/proxy_deposit_request.rb:27:121: C: Layout/LineLength: Line is too long. [130/120]
# @note We are iterating through the found objects and querying SOLR each time. Assuming we are rendering this result in a view,
^^^^^^^^^^
app/models/proxy_deposit_request.rb:28:121: C: Layout/LineLength: Line is too long. [135/120]
# this is reasonable. In the view we will render the #to_s of the associated work. So we may as well preload the SOLR document.
^^^^^^^^^^^^^^^
app/models/proxy_deposit_request.rb:66:109: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
errors.add(:transfer_to, I18n.t('hyrax.notifications.proxy_deposit_request.validation.valid_username')) unless receiving_user
^^^^^^
app/models/proxy_deposit_request.rb:66:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
errors.add(:transfer_to, I18n.t('hyrax.notifications.proxy_deposit_request.validation.valid_username')) unless receiving_user
^^^^^^^^^
app/models/proxy_deposit_request.rb:70:117: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
errors.add(:transfer_to, I18n.t('hyrax.notifications.proxy_deposit_request.validation.sender_is_not_receiver')) if receiving_user && receiving_user.user_key == sending_user.user_key
^^
app/models/proxy_deposit_request.rb:70:121: C: [Correctable] Layout/LineLength: Line is too long. [185/120]
errors.add(:transfer_to, I18n.t('hyrax.notifications.proxy_deposit_request.validation.sender_is_not_receiver')) if receiving_user && receiving_user.user_key == sending_user.user_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/proxy_deposit_request.rb:75:110: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
errors.add(:open_transfer, I18n.t('hyrax.notifications.proxy_deposit_request.validation.open_transfer')) unless transfers.blank? || (transfers.count == 1 && transfers[0].id == id)
^^^^^^
app/models/proxy_deposit_request.rb:75:121: C: [Correctable] Layout/LineLength: Line is too long. [183/120]
errors.add(:open_transfer, I18n.t('hyrax.notifications.proxy_deposit_request.validation.open_transfer')) unless transfers.blank? || (transfers.count == 1 && transfers[0].id == id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/proxy_deposit_request.rb:96:121: C: [Correctable] Layout/LineLength: Line is too long. [168/120]
transfer_link = link_to(I18n.t('hyrax.notifications.proxy_deposit_request.transfer_on_create.transfer_link_label'), Hyrax::Engine.routes.url_helpers.transfers_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/proxy_deposit_request.rb:98:121: C: Layout/LineLength: Line is too long. [122/120]
transfer_link: transfer_link)
^^
app/models/proxy_deposit_request.rb:106:18: C: Style/StringConcatenation: Prefer string interpolation to string concatenation.
message += " " + I18n.t('hyrax.notifications.proxy_deposit_request.transfer_on_update.comments', ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/proxy_deposit_request.rb:106:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
message += " " + I18n.t('hyrax.notifications.proxy_deposit_request.transfer_on_update.comments',
^^^
app/models/proxy_deposit_request.rb:130:121: C: Layout/LineLength: Line is too long. [128/120]
# @param [TrueClass,FalseClass] reset (false) if true, reset the access controls. This revokes edit access from the depositor
^^^^^^^^
app/models/proxy_deposit_request.rb:131:17: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use reset: false instead of reset = false.
def transfer!(reset = false)
^^^^^^^^^^^^^
app/models/proxy_deposit_rights.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class ProxyDepositRights < ActiveRecord::Base
^
app/models/proxy_deposit_rights.rb:3:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
belongs_to :grantor, class_name: "User"
^^^^^^
app/models/proxy_deposit_rights.rb:4:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
belongs_to :grantee, class_name: "User"
^^^^^^
app/models/single_use_link.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class SingleUseLink < ActiveRecord::Base
^
app/models/single_use_link.rb:34:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
errors[:base] << "Single Use Link has already been used" if destroyed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/single_use_link.rb:38:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless new_record?
^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity.rb:66:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.debug("Entity() got a GID, searching by proxy")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity.rb:81:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.debug("Entity() got something else, testing #to_global_id")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity.rb:89:7: C: [Correctable] Style/CommentedKeyword: Do not place comments on the same line as the end keyword.
end # rubocop:enable Metrics/AbcSize
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity/agent.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/comment.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/entity.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/entity_specific_responsibility.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/method.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/notifiable_context.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/notification.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/notification_recipient.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/role.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow.rb:37:44: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue ActiveRecord::RecordNotFound => err
^^^
app/models/sipity/workflow.rb:48:121: C: Layout/LineLength: Line is too long. [122/120]
# @param workflow_name [String] The name of the workflow within the given permission template that should be activated
^^
app/models/sipity/workflow.rb:50:121: C: Layout/LineLength: Line is too long. [123/120]
# @raise [ActiveRecord::RecordNotFound] When we have a mismatch on permission template and workflow id or workflow name
^^^
app/models/sipity/workflow.rb:53:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise(ArgumentError, "You must specify a workflow_id or workflow_name to activate!") if ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity/workflow.rb:53:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise(ArgumentError, "You must specify a workflow_id or workflow_name to activate!") if
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity/workflow.rb:55:121: C: [Correctable] Layout/LineLength: Line is too long. [146/120]
workflow_to_activate = Sipity::Workflow.find_by!({ permission_template: permission_template, id: workflow_id, name: workflow_name }.compact)
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity/workflow.rb:57:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return workflow_to_activate if workflow_to_activate == active_workflow.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/sipity/workflow.rb:75:44: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue ActiveRecord::RecordNotFound => err
^^^
app/models/sipity/workflow_action.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow_action.rb:44:35: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
input.to_s.sub(/[\?\!]\Z/, '')
^^
app/models/sipity/workflow_action.rb:44:37: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
input.to_s.sub(/[\?\!]\Z/, '')
^^
app/models/sipity/workflow_responsibility.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow_role.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow_role.rb:11:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
has_many :workflow_state_action_permissions, dependent: :destroy, class_name: 'Sipity::WorkflowStateActionPermission'
^
app/models/sipity/workflow_state.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow_state_action.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/sipity/workflow_state_action.rb:8:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
has_many :workflow_state_action_permissions, dependent: :destroy, class_name: 'Sipity::WorkflowStateActionPermission'
^
app/models/sipity/workflow_state_action_permission.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Sipity
^
app/models/solr_hit.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class SolrHit < Delegator
^
app/models/trophy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Trophy < ActiveRecord::Base
^
app/models/trophy.rb:6:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if Trophy.where(user_id: user_id).count < 5
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/trophy.rb:7:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
errors.add(:base, "Exceeded trophy limit")
^^^^^^^^^^^^^^^^^^^^^^^
app/models/user_mailbox.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class UserMailbox
^
app/models/user_mailbox.rb:21:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
I18n.t("hyrax.toolbar.notifications.zero", locale: locale_from_params || preferred_locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user_mailbox.rb:23:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
I18n.t("hyrax.toolbar.notifications.one", locale: locale_from_params || preferred_locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user_mailbox.rb:25:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
I18n.t("hyrax.toolbar.notifications.many", count: unread_count, locale: locale_from_params || preferred_locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user_mailbox.rb:38:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "You do not have privileges to delete the notification..." unless msg.participants.include? user
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user_mailbox.rb:38:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "You do not have privileges to delete the notification..." unless msg.participants.include? user
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user_stat.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class UserStat < ActiveRecord::Base
^
app/models/vocab/fedora_resource_status.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rdf'
^
app/models/work_view_stat.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class WorkViewStat < Hyrax::Statistic
^
app/presenters/hyrax/admin/dashboard_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/repository_growth_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/repository_object_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/repository_object_presenter.rb:21:21: C: [Correctable] Style/HashTransformKeys: Prefer transform_keys over each_with_object.
@counts ||= raw_count.each_with_object({}) { |(k, v), o| o[translation[k]] = v }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin/repository_object_presenter.rb:40:121: C: [Correctable] Layout/LineLength: Line is too long. [161/120]
Hyrax::SearchService.new(config: CatalogController.blacklight_config, user_params: {}, scope: self, search_builder_class: Stats::WorkStatusSearchBuilder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin/user_activity_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/users_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/users_presenter.rb:26:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @show_last_access unless @show_last_access.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin/workflow_role_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/workflow_role_presenter.rb:13:121: C: Layout/LineLength: Line is too long. [121/120]
# However based on the current UI, in which we list all workflows (spanning all admin sets) this is required.
^
app/presenters/hyrax/admin/workflow_roles_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin/workflow_roles_presenter.rb:12:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless agent
^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_set_options_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin_set_options_presenter.rb:32:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return {} unless permission_template
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_set_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin_set_presenter.rb:15:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs = { "isPartOf_ssim" => id.to_s }
^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_set_presenter.rb:29:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return I18n.t('hyrax.admin.admin_sets.delete.error_default_set') if default_set?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_set_presenter.rb:45:121: C: Layout/LineLength: Line is too long. [122/120]
# For the Managed Collections tab, determine the label to use for the level of access the user has for this admin set.
^^
app/presenters/hyrax/admin_set_presenter.rb:49:81: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.manage') if current_ability.can?(:edit, solr_document)
^^
app/presenters/hyrax/admin_set_presenter.rb:49:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.manage') if current_ability.can?(:edit, solr_document)
^^^^^
app/presenters/hyrax/admin_set_presenter.rb:50:82: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.deposit') if current_ability.can?(:deposit, solr_document)
^^
app/presenters/hyrax/admin_set_presenter.rb:50:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.deposit') if current_ability.can?(:deposit, solr_document)
^^^^^^^^^
app/presenters/hyrax/admin_set_presenter.rb:51:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.view') if current_ability.can?(:read, solr_document)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_set_presenter.rb:51:79: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.view') if current_ability.can?(:read, solr_document)
^^
app/presenters/hyrax/admin_set_presenter.rb:51:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.view') if current_ability.can?(:read, solr_document)
^^^
app/presenters/hyrax/admin_set_presenter.rb:62:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless current_ability.can?(:edit, solr_document)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_set_selection_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin_stats_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/admin_stats_presenter.rb:61:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if stats_filters[key].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/admin_stats_presenter.rb:101:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"unfiltered"
^^^^^^^^^^^^
app/presenters/hyrax/characterization_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/characterization_behavior.rb:62:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
additional_values = values.slice(Hyrax.config.fits_message_length, values.length - Hyrax.config.fits_message_length)
^^
app/presenters/hyrax/characterization_behavior.rb:63:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless additional_values
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collapsable_section_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/collapsable_section_presenter.rb:13:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :view_context, :text, :id, :icon_class, :open
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collapsable_section_presenter.rb:27:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
onclick: "toggleCollapse(this)",
^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collapsable_section_presenter.rb:36:7: C: [Correctable] Style/ExplicitBlockArgument: Consider using explicit block argument in the surrounding method's signature over yield.
tag.ul(class: "collapse #{workflows_class}nav nav-pills nav-stacked", ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/collection_presenter.rb:8:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_accessor attributes.
attr_accessor :solr_document, :current_ability, :request
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:10:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_accessor attributes.
attr_accessor :parent_collections # This is expected to be a Blacklight::Solr::Response with all of the parent collections
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:10:121: C: Layout/LineLength: Line is too long. [126/120]
attr_accessor :parent_collections # This is expected to be a Blacklight::Solr::Response with all of the parent collections
^^^^^^
app/presenters/hyrax/collection_presenter.rb:38:121: C: Layout/LineLength: Line is too long. [124/120]
delegate :title, :description, :creator, :contributor, :subject, :publisher, :keyword, :language, :embargo_release_date,
^^^^
app/presenters/hyrax/collection_presenter.rb:39:121: C: Layout/LineLength: Line is too long. [134/120]
:lease_expiration_date, :license, :date_created, :resource_type, :based_near, :related_url, :identifier, :thumbnail_path,
^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:40:121: C: Layout/LineLength: Line is too long. [122/120]
:title_or_label, :collection_type_gid, :create_date, :modified_date, :visibility, :edit_groups, :edit_people,
^^
app/presenters/hyrax/collection_presenter.rb:46:121: C: Layout/LineLength: Line is too long. [124/120]
[:total_items, :size, :resource_type, :creator, :contributor, :keyword, :license, :publisher, :date_created, :subject,
^^^^
app/presenters/hyrax/collection_presenter.rb:81:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs = { "member_of_collection_ids_ssim" => id.to_s }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:88:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs = { "member_of_collection_ids_ssim" => id.to_s }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:96:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs = { "member_of_collection_ids_ssim" => id.to_s }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:99:56: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.with_generic_type(generic_type: "Work")
^^^^^^
app/presenters/hyrax/collection_presenter.rb:105:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs = { "member_of_collection_ids_ssim" => id.to_s }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:108:56: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.with_generic_type(generic_type: "Collection")
^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:114:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span(collection_type.title, class: "label", style: "background-color: " + collection_type.badge_color + ";")
^^^^^^^
app/presenters/hyrax/collection_presenter.rb:114:62: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
tag.span(collection_type.title, class: "label", style: "background-color: " + collection_type.badge_color + ";")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:114:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span(collection_type.title, class: "label", style: "background-color: " + collection_type.badge_color + ";")
^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:114:115: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span(collection_type.title, class: "label", style: "background-color: " + collection_type.badge_color + ";")
^^^
app/presenters/hyrax/collection_presenter.rb:143:72: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
banner = CollectionBrandingInfo.find_by(collection_id: id, role: "banner")
^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:144:7: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
"/" + banner.local_path.split("/")[-4..-1].join("/") if banner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:144:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"/" + banner.local_path.split("/")[-4..-1].join("/") if banner
^^^
app/presenters/hyrax/collection_presenter.rb:144:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"/" + banner.local_path.split("/")[-4..-1].join("/") if banner
^^^
app/presenters/hyrax/collection_presenter.rb:144:55: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"/" + banner.local_path.split("/")[-4..-1].join("/") if banner
^^^
app/presenters/hyrax/collection_presenter.rb:148:61: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
CollectionBrandingInfo.where(collection_id: id, role: "logo")
^^^^^^
app/presenters/hyrax/collection_presenter.rb:182:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"deprecated. Use available_parent_collections_data " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:183:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"helper instead.")
^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:184:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @available_parents if @available_parents.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:186:121: C: [Correctable] Layout/LineLength: Line is too long. [142/120]
colls = Hyrax::Collections::NestedCollectionQueryService.available_parent_collections(child: collection, scope: scope, limit_to_id: nil)
^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:188:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "id" => col.id, "title_first" => col.title.first }
^^^^
app/presenters/hyrax/collection_presenter.rb:188:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ "id" => col.id, "title_first" => col.title.first }
^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:196:121: C: Layout/LineLength: Line is too long. [122/120]
# For the Managed Collections tab, determine the label to use for the level of access the user has for this admin set.
^^
app/presenters/hyrax/collection_presenter.rb:200:81: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.manage') if current_ability.can?(:edit, solr_document)
^^
app/presenters/hyrax/collection_presenter.rb:200:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.manage') if current_ability.can?(:edit, solr_document)
^^^^^
app/presenters/hyrax/collection_presenter.rb:201:82: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.deposit') if current_ability.can?(:deposit, solr_document)
^^
app/presenters/hyrax/collection_presenter.rb:201:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.deposit') if current_ability.can?(:deposit, solr_document)
^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:202:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.view') if current_ability.can?(:read, solr_document)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/collection_presenter.rb:202:79: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.view') if current_ability.can?(:read, solr_document)
^^
app/presenters/hyrax/collection_presenter.rb:202:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.view') if current_ability.can?(:read, solr_document)
^^^
app/presenters/hyrax/collection_presenter.rb:213:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if current_ability.can?(:edit, solr_document)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/composite_presenter_factory.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/composite_presenter_factory.rb:7:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :file_set_presenter_class, :work_presenter_class, :file_set_ids
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/dashboard/user_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/dashboard/user_presenter.rb:36:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
render "hyrax/notifications/notifications", messages: notifications_for_dashboard
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/dashboard/user_presenter.rb:41:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless notifications.count > Hyrax.config.max_notifications_for_dashboard
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/dashboard/user_presenter.rb:46:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
link_to t('hyrax.dashboard.manage_proxies'), hyrax.depositors_path, aria: { label: t('hyrax.dashboard.manage_proxies') }
^^^^^^^^
app/presenters/hyrax/dashboard/user_presenter.rb:51:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :current_user, :view_context, :since
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/dashboard/user_presenter.rb:56:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return since.to_i if since.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/displays_image.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'iiif_manifest'
^
app/presenters/hyrax/displays_image.rb:37:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless Hyrax.config.iiif_image_server?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/embargo_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/file_set_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/file_set_presenter.rb:76:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if solr_document.license.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/file_set_presenter.rb:100:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @parent_presenter does not match method name parent. Use @parent instead.
@parent_presenter ||= fetch_parent_presenter
^^^^^^^^^^^^^^^^^
app/presenters/hyrax/file_set_presenter.rb:104:121: C: Layout/LineLength: Line is too long. [144/120]
Deprecation.warn("We're removing Hyrax::FileSetPresenter.user_can_perform_any_action? in Hyrax 4.0.0; Instead use can? in view contexts.")
^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/file_usage.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/file_usage.rb:7:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(id) ...
^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/file_usage.rb:24:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ label: "Pageviews", data: pageviews },
^^^^^^^^^^^
app/presenters/hyrax/file_usage.rb:25:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ label: "Downloads", data: downloads }
^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/fixity_status_presenter.rb:14:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :file_set_id
^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:24:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @file_set_status does not match method name render_file_set_status. Use @render_file_set_status instead.
@file_set_status ||=
^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:26:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Fixity checks have not yet been run on this object"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:28:11: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
tag.span("passed", class: "label label-success") + ' ' + render_existing_check_summary
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:28:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span("passed", class: "label label-success") + ' ' + render_existing_check_summary
^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:28:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span("passed", class: "label label-success") + ' ' + render_existing_check_summary
^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:30:11: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
tag.span("FAIL", class: "label label-danger") + ' ' + render_existing_check_summary + render_failed_compact
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:30:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span("FAIL", class: "label label-danger") + ' ' + render_existing_check_summary + render_failed_compact
^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:30:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.span("FAIL", class: "label label-danger") + ' ' + render_existing_check_summary + render_failed_compact
^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:41:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
["<p><strong>Failed checks:</strong></p>".html_safe] +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:45:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"<p>".html_safe,
^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:47:15: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
tag.a("file", href: "#{Hydra::PCDM::File.translate_id_to_uri.call(log.file_id)}/fcr:metadata") + "; ",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:47:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.a("file", href: "#{Hydra::PCDM::File.translate_id_to_uri.call(log.file_id)}/fcr:metadata") + "; ",
^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:47:112: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.a("file", href: "#{Hydra::PCDM::File.translate_id_to_uri.call(log.file_id)}/fcr:metadata") + "; ",
^^^^
app/presenters/hyrax/fixity_status_presenter.rb:48:15: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
tag.a("checked_uri", href: "#{log.checked_uri}/fcr:metadata") + "; ",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:48:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.a("checked_uri", href: "#{log.checked_uri}/fcr:metadata") + "; ",
^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:48:79: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
tag.a("checked_uri", href: "#{log.checked_uri}/fcr:metadata") + "; ",
^^^^
app/presenters/hyrax/fixity_status_presenter.rb:51:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"</p>".html_safe
^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:61:121: C: [Correctable] Layout/LineLength: Line is too long. [139/120]
"#{pluralize num_checked_files, 'File'} with #{pluralize relevant_log_records.count, 'total version'} checked #{render_date_range}"
^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/fixity_status_presenter.rb:83:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @num_relevant_files does not match method name num_checked_files. Use @num_checked_files instead.
@num_relevant_files ||= relevant_log_records.group_by(&:file_id).keys.count
^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/google_scholar_presenter.rb:83:33: C: [Correctable] Style/RedundantSort: Use min instead of sort...first.
Array(object.try(:title)).sort.first || ""
^^^^^^^^^^
app/presenters/hyrax/google_scholar_presenter.rb:83:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Array(object.try(:title)).sort.first || ""
^^
app/presenters/hyrax/homepage_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/iiif_manifest_presenter.rb:107:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @member_presenters_cache does not match method name member_presenters. Use @member_presenters instead.
@member_presenters_cache ||= Factory.build_for(ids: member_ids, presenter_class: self.class).map do |presenter|
^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/iiif_manifest_presenter.rb:124:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
'format' => rendering.mime_type.presence || I18n.t("hyrax.manifest.unknown_mime_text"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/iiif_manifest_presenter.rb:125:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
'label' => I18n.t("hyrax.manifest.download_text") + (rendering.label || '') }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/iiif_manifest_presenter.rb:177:9: C: Naming/MemoizedInstanceVariableName: Memoized variable @cached_docs does not match method name load_docs. Use @load_docs instead.
@cached_docs ||= super
^^^^^^^^^^^^
app/presenters/hyrax/inspect_work_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/inspect_work_presenter.rb:11:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return { comments: [], roles: [] } unless sipity_entity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/inspect_work_presenter.rb:47:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless sipity_entity&.comments&.any?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/lease_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/member_presenter_factory.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/member_presenter_factory.rb:50:25: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
@file_set_ids ||= begin
^^^^^
app/presenters/hyrax/member_presenter_factory.rb:51:52: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax::SolrService.query("{!field f=has_model_ssim}FileSet",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/member_presenter_factory.rb:54:121: C: Layout/LineLength: Line is too long. [121/120]
fq: "{!join from=ordered_targets_ssim to=id}id:\"#{id}/list_source\"")
^
app/presenters/hyrax/member_presenter_factory.rb:56:25: W: [Correctable] Layout/BeginEndAlignment: end at 56, 24 is not aligned with @file_set_ids ||= begin at 50, 6.
end
^^^
app/presenters/hyrax/menu_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/menu_presenter.rb:27:9: C: [Correctable] Style/ExplicitBlockArgument: Consider using explicit block argument in the surrounding method's signature over yield.
link_to(options, link_html_options) do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/menu_presenter.rb:39:121: C: Layout/LineLength: Line is too long. [122/120]
when Hyrax::UsersController, Hyrax::NotificationsController, Hyrax::TransfersController, Hyrax::DepositorsController
^^
app/presenters/hyrax/model_icon.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/model_proxy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/page_title_decorator.rb:15:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return title if title.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/page_title_decorator.rb:26:16: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
result = title + ' // ' + result if object.persisted?
^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/pcdm_member_presenter_factory.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/pcdm_member_presenter_factory.rb:33:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results = query_docs(generic_type: "FileSet")
^^^^^^^^^
app/presenters/hyrax/pcdm_member_presenter_factory.rb:38:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if indx.nil?
^^^^^^^^^^^^^^^^^
app/presenters/hyrax/pcdm_member_presenter_factory.rb:64:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise(ArgumentError, "Could not find an indexed document for id: #{id}") if ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/pcdm_member_presenter_factory.rb:82:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results = query_docs(generic_type: "Work")
^^^^^^
app/presenters/hyrax/pcdm_member_presenter_factory.rb:87:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if indx.nil?
^^^^^^^^^^^^^^^^^
app/presenters/hyrax/permission_badge.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/permission_badge.rb:7:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
authenticated: "label-info",
^^^^^^^^^^^^
app/presenters/hyrax/permission_badge.rb:8:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
embargo: "label-warning",
^^^^^^^^^^^^^^^
app/presenters/hyrax/permission_badge.rb:9:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
lease: "label-warning",
^^^^^^^^^^^^^^^
app/presenters/hyrax/permission_badge.rb:10:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
open: "label-success",
^^^^^^^^^^^^^^^
app/presenters/hyrax/permission_badge.rb:11:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
restricted: "label-danger"
^^^^^^^^^^^^^^
app/presenters/hyrax/presenter_factory.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/presenter_factory.rb:4:121: C: Layout/LineLength: Line is too long. [129/120]
# @todo Extract a SolrDocument finder class that takes a list of pids and returns/yields a ::SolrDocument for each hit in SOLR.
^^^^^^^^^
app/presenters/hyrax/presenter_factory.rb:8:121: C: Layout/LineLength: Line is too long. [169/120]
# @todo Convert to find and yield only the found SOLR documents. There is a coupling of knowledge regarding the building of the presenter class and its parameters.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/presenter_factory.rb:30:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if ids.blank?
^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/presenter_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/presenter_renderer.rb:28:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Fields is deprecated for removal in Hyrax 4.0.0. use #value and #label directly instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/presenter_renderer.rb:41:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"#{collection_path}/show_fields/_default", "records/show_fields/_default"].find do |partial|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/presenter_renderer.rb:43:28: C: [Correctable] Style/RegexpLiteral: Use %r around regular expression.
return partial.sub(/\/_/, '/') if partial_exists?(partial)
^^^^^
app/presenters/hyrax/presents_attributes.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/presents_attributes.rb:42:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "" unless display_microdata?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/presents_attributes.rb:42:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" unless display_microdata?
^^
app/presenters/hyrax/presents_attributes.rb:51:7: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
['Renderer', 'AttributeRenderer'].each do |suffix|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/presents_attributes.rb:55:20: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 55, 19 is not aligned with renderer = begin at 53, 8.
rescue NameError
^^^^^^
app/presenters/hyrax/presents_attributes.rb:60:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise NameError, "unknown renderer type `#{name}`" if renderer.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/select_collection_type_list_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/select_collection_type_list_presenter.rb:20:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if authorized_collection_types.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/select_collection_type_list_presenter.rb:26:121: C: Layout/LineLength: Line is too long. [130/120]
@authorized_collection_types ||= Hyrax::CollectionTypes::PermissionsService.can_create_collection_types(user: @current_user)
^^^^^^^^^^
app/presenters/hyrax/select_collection_type_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/select_type_list_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/select_type_list_presenter.rb:20:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless @current_user
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/select_type_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/select_type_presenter.rb:56:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil unless params
^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/single_use_link_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/single_use_link_presenter.rb:37:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"download_single_use_link_url"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/single_use_link_presenter.rb:39:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"show_single_use_link_url"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/stats_usage_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/stats_usage_presenter.rb:18:20: W: [Correctable] Layout/BeginEndAlignment: end at 18, 19 is not aligned with @user_id ||= begin at 15, 6.
end
^^^
app/presenters/hyrax/stats_usage_presenter.rb:33:38: C: [Correctable] Style/RedundantCondition: Use double pipes || instead.
date_analytics = date_uploaded ? date_uploaded : model.create_date
^^^^^^^^^^^^^^^^^
app/presenters/hyrax/stats_usage_presenter.rb:34:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return date_analytics if earliest.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/transfers_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/transfers_presenter.rb:27:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :current_user, :view_context, :since
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/transfers_presenter.rb:31:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @incoming does not match method name incoming_proxy_deposits. Use @incoming_proxy_deposits instead.
@incoming ||= ProxyDepositRequest.incoming_for(user: current_user)
^^^^^^^^^
app/presenters/hyrax/transfers_presenter.rb:35:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @outgoing does not match method name outgoing_proxy_deposits. Use @outgoing_proxy_deposits instead.
@outgoing ||= ProxyDepositRequest.outgoing_for(user: current_user)
^^^^^^^^^
app/presenters/hyrax/trophy_presenter.rb:53:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.warn("Use CatalogController.blacklight_config.document_model instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/twitter_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/user_profile_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/version_list_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/version_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/work_show_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/work_show_presenter.rb:55:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @inspect_workflow does not match method name inspect_work. Use @inspect_work instead.
@inspect_workflow ||= InspectWorkPresenter.new(solr_document, current_ability)
^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:60:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return '' if representative_presenter.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:74:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
deprecation_deprecate universal_viewer?: "use iiif_viewer? instead"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:95:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil if representative_id.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:99:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil if result.try(:id) == id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:150:75: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax.config.registered_curation_concern_types.map(&:underscore) + ["collection"]
^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:196:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Use `#member_presenters` instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:202:8: C: [Correctable] Style/FloatDivision: Prefer using .to_f on one side only.
(total_items.to_f / rows_from_params.to_f).ceil
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:266:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @member_item_list_ids does not match method name authorized_item_ids. Use @authorized_item_ids instead.
@member_item_list_ids ||=
^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:267:29: C: [Correctable] Style/InverseMethods: Use select instead of inverting reject.
filter_unreadable ? ordered_ids.reject { |id| !current_ability.can?(:read, id) } : ordered_ids
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_show_presenter.rb:323:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @member_of does not match method name member_of_authorized_parent_collections. Use @member_of_authorized_parent_collections instead.
@member_of ||= Hyrax::CollectionMemberService.run(solr_document, current_ability).map(&:id)
^^^^^^^^^^
app/presenters/hyrax/work_usage.rb:10:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(id) ...
^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/work_usage.rb:24:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ label: "Pageviews", data: pageviews }
^^^^^^^^^^^
app/presenters/hyrax/workflow_presenter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/presenters/hyrax/workflow_presenter.rb:18:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless state
^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/workflow_presenter.rb:24:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless sipity_entity && current_ability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/workflow_presenter.rb:25:121: C: [Correctable] Layout/LineLength: Line is too long. [168/120]
actions = Hyrax::Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(entity: sipity_entity, user: current_ability.current_user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/workflow_presenter.rb:30:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless sipity_entity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/presenters/hyrax/workflow_presenter.rb:35:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless state
^^^^^^^^^^^^^^^^^^^
app/renderers/hyrax/renderers.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require "rails_autolink/helpers"
^
app/renderers/hyrax/renderers/attribute_renderer.rb:2:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "rails_autolink/helpers"
^^^^^^^^^^^^^^^^^^^^^^^^
app/renderers/hyrax/renderers/configured_microdata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/configured_microdata.rb:6:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless Hyrax.config.display_microdata?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/renderers/hyrax/renderers/configured_microdata.rb:11:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless Hyrax.config.display_microdata?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/renderers/hyrax/renderers/date_attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/external_link_attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/faceted_attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/faceted_attribute_renderer.rb:16:21: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
ERB::Util.h(options.fetch(:search_field, field).to_s + "_sim")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/renderers/hyrax/renderers/faceted_attribute_renderer.rb:16:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ERB::Util.h(options.fetch(:search_field, field).to_s + "_sim")
^^^^^^
app/renderers/hyrax/renderers/license_attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/license_attribute_renderer.rb:10:121: C: Layout/LineLength: Line is too long. [126/120]
# Special treatment for license/rights. A URL from the Hyrax gem's config/hyrax.rb is stored in the descMetadata of the
^^^^^^
app/renderers/hyrax/renderers/license_attribute_renderer.rb:11:121: C: Layout/LineLength: Line is too long. [130/120]
# curation_concern. If that URL is valid in form, then it is used as a link. If it is not valid, it is used as plain text.
^^^^^^^^^^
app/renderers/hyrax/renderers/linked_attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/rights_statement_attribute_renderer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/renderers/hyrax/renderers/rights_statement_attribute_renderer.rb:10:121: C: Layout/LineLength: Line is too long. [126/120]
# Special treatment for license/rights. A URL from the Hyrax gem's config/hyrax.rb is stored in the descMetadata of the
^^^^^^
app/renderers/hyrax/renderers/rights_statement_attribute_renderer.rb:11:121: C: Layout/LineLength: Line is too long. [130/120]
# curation_concern. If that URL is valid in form, then it is used as a link. If it is not valid, it is used as plain text.
^^^^^^^^^^
app/search_builders/hyrax/abstract_type_relation.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/abstract_type_relation.rb:11:40: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise(NotImplementedException, "Implement allowable_types in a subclass")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/admin_admin_set_member_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/admin_set_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/admin_set_search_builder.rb:23:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@discovery_permissions ||= ["edit"]
^^^^^^
app/search_builders/hyrax/admin_set_search_builder.rb:33:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super if @access != :deposit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/admin_set_search_builder.rb:42:121: C: Layout/LineLength: Line is too long. [142/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/catalog_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
##
^
app/search_builders/hyrax/catalog_search_builder.rb:40:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if blacklight_params[:q].blank? || blacklight_params[:search_field] != 'all_fields'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/catalog_search_builder.rb:56:121: C: [Correctable] Layout/LineLength: Line is too long. [132/120]
collection_ids = Hyrax::Collections::PermissionsService.collection_ids_for_view(ability: current_ability).map { |id| "^#{id}$" }
^^^^^^^^^^^^
app/search_builders/hyrax/catalog_search_builder.rb:60:74: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"^$"
^^^^
app/search_builders/hyrax/catalog_search_builder.rb:78:5: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"{!dismax v=$user_query}"
^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_member_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/collection_member_search_builder.rb:31:58: W: [Correctable] Lint/RedundantSafeNavigation: Redundant safe navigation detected.
@collection || (scope.context[:collection] if scope&.respond_to?(:context))
^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/collection_search_builder.rb:5:121: C: Layout/LineLength: Line is too long. [134/120]
# @see https://github.com/projectblacklight/blacklight/blob/master/lib/blacklight/search_builder.rb Blacklight::SearchBuilder parent
^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:6:121: C: Layout/LineLength: Line is too long. [155/120]
# @see https://github.com/projectblacklight/blacklight/blob/master/lib/blacklight/solr/search_builder_behavior.rb Blacklight::Solr::SearchBuilderBehavior
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:8:121: C: Layout/LineLength: Line is too long. [130/120]
# @note the default_processor_chain defined by Blacklight::Solr::SearchBuilderBehavior provides many possible points of override
^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:23:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"title_si"
^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:39:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if solr_parameters[:q]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:47:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return super unless permission_types.include?("deposit")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:47:53: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return super unless permission_types.include?("deposit")
^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:58:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
edit: ["edit"],
^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:59:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
deposit: ["deposit"],
^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:60:13: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
read: ["edit", "read"]
^^^^^^^^^^^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:60:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
read: ["edit", "read"]
^^^^^^
app/search_builders/hyrax/collection_search_builder.rb:60:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
read: ["edit", "read"]
^^^^^^
app/search_builders/hyrax/dashboard/collections_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/dashboard/collections_search_builder.rb:19:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if current_ability.admin?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/collections_search_builder.rb:21:11: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
'-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/collections_search_builder.rb:22:11: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
'-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: Hyrax.config.admin_set_model, creator: current_user_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/collections_search_builder.rb:22:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
'-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: Hyrax.config.admin_set_model, creator: current_user_key)
^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/collections_search_builder.rb:32:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if collection_ids.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/managed_search_filters.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/dashboard/managed_search_filters.rb:15:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if groups.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/managed_search_filters.rb:18:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
user_groups = type == 'read' ? groups - [::Ability.public_group_name, ::Ability.registered_group_name] : groups
^
app/search_builders/hyrax/dashboard/managed_search_filters.rb:19:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if user_groups.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:20:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :discovery_permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:30:11: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
"-" + Hyrax::SolrQueryBuilderService.construct_query_for_ids([limit_ids]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:30:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"-" + Hyrax::SolrQueryBuilderService.construct_query_for_ids([limit_ids]),
^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:31:121: C: Layout/LineLength: Line is too long. [133/120]
Hyrax::SolrQueryBuilderService.construct_query(Hyrax.config.collection_type_index_field => @collection.collection_type_gid)
^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:61:121: C: Layout/LineLength: Line is too long. [124/120]
# Using a !lucene query allows us to get items using a wildcard query, a feature not supported via AF query builder.
^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:62:121: C: Layout/LineLength: Line is too long. [135/120]
["-_query_:\"{!lucene df=#{Samvera::NestingIndexer.configuration.solr_field_name_for_storing_pathnames}}*#{@collection.id}*\""]
^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:74:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for exclude_if_paths_contain_collection is too high. [8/7]
def exclude_if_paths_contain_collection ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:79:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
exclude_list = ""
^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:88:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "-_query_:\"{!lucene q.op=OR df=#{Samvera::NestingIndexer.configuration.solr_field_name_for_storing_pathnames}}#{exclude_list}\"" unless exclude_list.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:88:121: C: Layout/LineLength: Line is too long. [171/120]
return "-_query_:\"{!lucene q.op=OR df=#{Samvera::NestingIndexer.configuration.solr_field_name_for_storing_pathnames}}#{exclude_list}\"" unless exclude_list.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:88:146: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
return "-_query_:\"{!lucene q.op=OR df=#{Samvera::NestingIndexer.configuration.solr_field_name_for_storing_pathnames}}#{exclude_list}\"" unless exclude_list.empty?
^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:89:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
""
^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:94:9: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
"-" + ActiveFedora::SolrQueryBuilder.construct_query(Samvera::NestingIndexer.configuration.solr_field_name_for_storing_parent_ids => @collection.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:94:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"-" + ActiveFedora::SolrQueryBuilder.construct_query(Samvera::NestingIndexer.configuration.solr_field_name_for_storing_parent_ids => @collection.id)
^^^
app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb:94:121: C: Layout/LineLength: Line is too long. [156/120]
"-" + ActiveFedora::SolrQueryBuilder.construct_query(Samvera::NestingIndexer.configuration.solr_field_name_for_storing_parent_ids => @collection.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/works_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/dashboard/works_search_builder.rb:13:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if current_ability.admin?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/works_search_builder.rb:15:33: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
solr_parameters[:fq] << '-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/dashboard/works_search_builder.rb:15:121: C: Layout/LineLength: Line is too long. [121/120]
solr_parameters[:fq] << '-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key)
^
app/search_builders/hyrax/deactivated_embargo_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/deactivated_lease_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/deposit_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/deposit_search_builder.rb:21:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"depositor_ssim"
^^^^^^^^^^^^^^^^
app/search_builders/hyrax/embargo_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/expired_embargo_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/expired_lease_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/exposed_models_relation.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/file_set_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/filter_by_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/filter_by_type.rb:50:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if only_collections?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/filter_by_type.rb:55:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if only_works?
^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/filter_suppressed.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/filter_suppressed_with_roles.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/filter_suppressed_with_roles.rb:27:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if depositor?(current_work: current_work)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/filter_suppressed_with_roles.rb:34:121: C: [Correctable] Layout/LineLength: Line is too long. [162/120]
Hyrax::Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(user: current_ability.current_user, entity: current_work).any?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/homepage_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Added to allow for the My controller to show only things I have edit access to
^
app/search_builders/hyrax/lease_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/member_with_files_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/member_with_files_search_builder.rb:12:121: C: Layout/LineLength: Line is too long. [127/120]
solr_parameters[:fq] << "{!join from=file_set_ids_ssim to=id}{!join from=child_object_ids_ssim to=id}id:#{collection_id}"
^^^^^^^
app/search_builders/hyrax/my/collections_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Added to allow for the My controller to show only things I have edit access to
^
app/search_builders/hyrax/my/find_works_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Search for possible works that user can edit and could be a work's child or parent.
^
app/search_builders/hyrax/my/find_works_search_builder.rb:6:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
self.default_processor_chain += [:filter_on_title, :show_only_other_works, :show_only_works_not_child, :show_only_works_not_parent]
^^^^^^^^^^^^^
app/search_builders/hyrax/my/find_works_search_builder.rb:12:40: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@id = context.params[:id] || raise("missing required parameter: id")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/my/find_works_search_builder.rb:27:63: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ids = Hyrax::SolrService.query("{!field f=id}#{@id}", fl: "member_ids_ssim", rows: 10_000).flat_map { |x| x.fetch("member_ids_ssim", []) }
^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/my/find_works_search_builder.rb:27:119: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ids = Hyrax::SolrService.query("{!field f=id}#{@id}", fl: "member_ids_ssim", rows: 10_000).flat_map { |x| x.fetch("member_ids_ssim", []) }
^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/my/find_works_search_builder.rb:27:121: C: [Correctable] Layout/LineLength: Line is too long. [142/120]
ids = Hyrax::SolrService.query("{!field f=id}#{@id}", fl: "member_ids_ssim", rows: 10_000).flat_map { |x| x.fetch("member_ids_ssim", []) }
^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/my/find_works_search_builder.rb:35:7: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
"-" + Hyrax::SolrQueryBuilderService.construct_query(member_ids_ssim: @id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/my/find_works_search_builder.rb:35:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"-" + Hyrax::SolrQueryBuilderService.construct_query(member_ids_ssim: @id)
^^^
app/search_builders/hyrax/my/highlights_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Added to allow for the My controller to show only things I have edit access to
^
app/search_builders/hyrax/my/search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/my/search_builder_behavior.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Behavior for the my controller search builder to allow the my controller to only get access to
^
app/search_builders/hyrax/my/search_builder_behavior.rb:11:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
["edit"]
^^^^^^
app/search_builders/hyrax/my/shares_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Added to allow for the My controller to show only things I have edit access to
^
app/search_builders/hyrax/my/shares_search_builder.rb:11:7: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
"-" + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/my/shares_search_builder.rb:11:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"-" + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key)
^^^
app/search_builders/hyrax/my/works_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/nested_collections_parent_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/parent_collection_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/search_filters.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/search_filters.rb:19:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if ability.admin?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/search_builders/hyrax/single_admin_set_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/single_collection_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/single_result.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/single_use_link_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/stats/work_status_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/work_relation.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/work_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/search_builders/hyrax/works_search_builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/abstract_message_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/abstract_message_service.rb:20:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise "Override #message in the service class"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/abstract_message_service.rb:25:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise "Override #subject in the service class"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/access_control_list.rb:42:121: C: Layout/LineLength: Line is too long. [129/120]
# # => #<Set: {#<Hyrax::Permission access_to=#<Valkyrie::ID:0x000055628b0ae0b8 @id="my_id"> agent="group/public" mode=:read>,
^^^^^^^^^
app/services/hyrax/access_control_list.rb:43:121: C: Layout/LineLength: Line is too long. [124/120]
# #<Hyrax::Permission access_to=#<Valkyrie::ID:0x000055628be41388 @id="my_id"> agent="user1@example.com" mode=:edit>}>
^^^^
app/services/hyrax/access_control_list.rb:48:121: C: Layout/LineLength: Line is too long. [130/120]
# # => #<Set: {#<Hyrax::Permission access_to=#<Valkyrie::ID:0x000055628b0ae0b8 @id="my_id"> agent="group/public" mode=:read>}>
^^^^^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/adapters/nesting_index_adapter.rb:5:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
FULL_REINDEX = "full"
^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:6:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
LIMITED_REINDEX = "limited"
^^^^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:63:13: C: [Correctable] Style/CommentAnnotation: Annotation keywords like note should be all upper case, followed by a colon, and a space, then a note describing the problem.
# note: we do not yield when the object has parents. Calling the nested indexer for the
^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:77:121: C: Layout/LineLength: Line is too long. [124/120]
# From the nesting_document, we will need to add the nesting attributes to the underlying SOLR document for the object
^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:124:121: C: [Correctable] Layout/LineLength: Line is too long. [135/120]
child_document = coerce_solr_document_to_index_document(original_solr_document: solr_document, id: solr_document.fetch('id'))
^^^^^^^^^^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:126:11: C: [Correctable] Performance/RedundantBlockCall: Use yield instead of block.call.
block.call(child_document) if full_reindex?(extent: extent) || child_document.pathnames.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:153:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Unable to find SolrDocument with ID=#{id}" if document.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/adapters/nesting_index_adapter.rb:185:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if extent == FULL_REINDEX
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/admin_set_create_service.rb:34:30: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue RuntimeError => _err
^^^^
app/services/hyrax/admin_set_create_service.rb:51:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if id.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:65:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Warning: This method may hide runtime errors. " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:68:30: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue RuntimeError => err
^^^
app/services/hyrax/admin_set_create_service.rb:69:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise err if default_admin_set?(id: admin_set.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:82:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Use .find_or_create_default_admin_set to create a default admin set" if default_admin_set?(id: admin_set.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:82:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise "Use .find_or_create_default_admin_set to create a default admin set" if default_admin_set?(id: admin_set.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:82:85: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
raise "Use .find_or_create_default_admin_set to create a default admin set" if default_admin_set?(id: admin_set.id)
^^
app/services/hyrax/admin_set_create_service.rb:82:121: C: Layout/LineLength: Line is too long. [123/120]
raise "Use .find_or_create_default_admin_set to create a default admin set" if default_admin_set?(id: admin_set.id)
^^^
app/services/hyrax/admin_set_create_service.rb:104:121: C: Layout/LineLength: Line is too long. [127/120]
if suggested_id.blank? || Hyrax.config.disable_wings || !Hyrax.metadata_adapter.is_a?(Wings::Valkyrie::MetadataAdapter)
^^^^^^^
app/services/hyrax/admin_set_create_service.rb:118:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if id.blank?
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:150:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return DEFAULT_ID unless save_default?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:183:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Warning: This method may hide runtime errors. " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:186:28: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue RuntimeError => _err
^^^^
app/services/hyrax/admin_set_create_service.rb:202:101: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
create_default_access_for(permission_template: permission_template, workflow: workflow) if default_admin_set?
^^
app/services/hyrax/admin_set_create_service.rb:202:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
create_default_access_for(permission_template: permission_template, workflow: workflow) if default_admin_set?
^
app/services/hyrax/admin_set_create_service.rb:223:121: C: [Correctable] Layout/LineLength: Line is too long. [132/120]
Sipity::Workflow.activate!(permission_template: permission_template, workflow_name: Hyrax.config.default_active_workflow_name)
^^^^^^^^^^^^
app/services/hyrax/admin_set_create_service.rb:254:121: C: [Correctable] Layout/LineLength: Line is too long. [160/120]
permission_template.access_grants.create(agent_type: 'group', agent_id: ::Ability.registered_group_name, access: Hyrax::PermissionTemplateAccess::DEPOSIT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_member_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/admin_set_service.rb:6:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :context, :search_builder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/admin_set_service.rb:56:59: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
file_results = Hyrax::SolrService.get(fq: [query, "has_model_ssim:FileSet"], rows: 0)
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/analytics.rb:10:25: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue NameError => err
^^^
app/services/hyrax/analytics/google.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'oauth2'
^
app/services/hyrax/analytics/google.rb:25:9: W: Lint/ConstantDefinitionInBlock: Do not define constants this way within a block.
class Config ...
^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:35:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Deprecated analytics configuration format found. Please update config/analytics.yml.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:57:13: C: [Correctable] Style/EvalWithLocation: Pass __FILE__ and __LINE__ to class_eval.
class_eval %{ def #{key}; @config.fetch('#{key}'); end }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:80:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Private key file for Google analytics was expected at '#{config.privkey_path}', but no file was found." unless File.exist?(config.privkey_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:80:121: C: Layout/LineLength: Line is too long. [160/120]
raise "Private key file for Google analytics was expected at '#{config.privkey_path}', but no file was found." unless File.exist?(config.privkey_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:80:122: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
raise "Private key file for Google analytics was expected at '#{config.privkey_path}', but no file was found." unless File.exist?(config.privkey_path)
^^^^^^
app/services/hyrax/analytics/google.rb:99:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless config.valid?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:103:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise 'User does not have access to this property' unless @profile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google.rb:107:1: W: Lint/MissingCopEnableDirective: Re-enable Metrics/MethodLength cop with # rubocop:enable after disabling it.
# rubocop:disable Metrics/MethodLength
^
app/services/hyrax/analytics/google.rb:110:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "day"
^^^^^
app/services/hyrax/analytics/google.rb:113:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "week"
^^^^^^
app/services/hyrax/analytics/google.rb:116:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "month"
^^^^^^^
app/services/hyrax/analytics/google.rb:119:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "year"
^^^^^^
app/services/hyrax/analytics/google.rb:130:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
when "last12"
^^^^^^^^
app/services/hyrax/analytics/google.rb:136:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date.split(",")
^^^
app/services/hyrax/analytics/google.rb:141:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if period == "range"
^^^^^^^
app/services/hyrax/analytics/google.rb:142:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date.split(",")
^^^
app/services/hyrax/analytics/google.rb:155:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date = date.split(",")
^^^
app/services/hyrax/analytics/google.rb:161:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date = date.split(",")
^^^
app/services/hyrax/analytics/google.rb:167:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date = date.split(",")
^^^
app/services/hyrax/analytics/google.rb:181:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date = date.split(",")
^^^
app/services/hyrax/analytics/google.rb:191:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
date = date.split(",")
^^^
app/services/hyrax/analytics/google/events.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/analytics/google/events.rb:27:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/events_daily.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/analytics/google/events_daily.rb:27:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/events_daily.rb:37:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/visits.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/analytics/google/visits.rb:21:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/visits.rb:28:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/visits.rb:35:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/visits_daily.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/analytics/google/visits_daily.rb:16:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/google/visits_daily.rb:24:13: C: [Correctable] Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
start_date: start_date, ...
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:9:1: W: Lint/MissingCopEnableDirective: Re-enable Metrics/BlockLength cop with # rubocop:enable after disabling it.
# rubocop:disable Metrics/BlockLength
^
app/services/hyrax/analytics/matomo.rb:22:9: W: Lint/ConstantDefinitionInBlock: Do not define constants this way within a block.
class Config ...
^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:46:13: C: [Correctable] Style/EvalWithLocation: Pass __FILE__ and __LINE__ to class_eval.
class_eval %{ def #{key}; @config.fetch('#{key}'); end }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:61:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response&.first ? response.first["nb_events"] : 0
^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:71:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response&.first ? response.first["nb_events"] : 0
^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:113:59: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results.push([result[0].to_date, subtable["nb_events"].to_i]) if subtable["label"] == action
^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:113:91: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results.push([result[0].to_date, subtable["nb_events"].to_i]) if subtable["label"] == action
^^^^^^^
app/services/hyrax/analytics/matomo.rb:133:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response["nb_visits_new"]
^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:143:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response["nb_visits_returning"]
^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:153:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response["nb_visits_returning"].to_i + response["nb_visits_new"].to_i
^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:153:59: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response["nb_visits_returning"].to_i + response["nb_visits_new"].to_i
^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:172:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if response.status != 200
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/analytics/matomo.rb:178:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
module: "API",
^^^^^
app/services/hyrax/analytics/matomo.rb:183:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
format: "JSON",
^^^^^^
app/services/hyrax/analytics/results.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/analytics/results.rb:10:18: W: [Correctable] Lint/DisjunctiveAssignmentInConstructor: Unnecessary disjunctive assignment. Use plain assignment.
@results ||= results
^^^
app/services/hyrax/analytics/results.rb:66:78: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
results.inject([]) { |csv, row| csv << CSV.generate_line(row) }.join("")
^^
app/services/hyrax/batch_create_failure_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/batch_create_failure_service.rb:4:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :user, :messages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/batch_create_failure_service.rb:5:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(user, messages) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/batch_create_success_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/batch_create_success_service.rb:6:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(user) ...
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/caching_iiif_manifest_builder.rb:20:121: C: Layout/LineLength: Line is too long. [129/120]
def initialize(iiif_manifest_factory: ::IIIFManifest::ManifestFactory, expires_in: Hyrax.config.iiif_manifest_cache_duration)
^^^^^^^^^
app/services/hyrax/callbacks.rb:52:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise NoBlockGiven, "a block is required when setting a callback" unless block_given?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:52:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise NoBlockGiven, "a block is required when setting a callback" unless block_given?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:65:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil unless set?(hook)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:72:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax.config.callback is deprecated; register your callback handler " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:73:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"as a listener on Hyrax.publisher instead. See Hyrax::Publisher " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:74:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"and Dry::Events"
^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:78:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax.config.callback is deprecated; to trigger handlers publish " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:79:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"events to Hyrax.publisher instead of running callbacks. See " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/callbacks.rb:80:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax::Publisher and Dry::Events"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/change_content_depositor_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/characterization/model_wrapper.rb:1:1: W: Lint/EmptyFile: Empty file detected.
app/services/hyrax/characterization/valkyrie_characterization_service.rb:38:29: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/ParameterLists.
def initialize(metadata:, # rubocop:disable Metrics/ParameterLists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/characterization/valkyrie_characterization_service.rb:94:7: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/services/hyrax/characterization/valkyrie_characterization_service.rb:131:43: C: [Correctable] Style/MultipleComparison: Avoid comparing a variable with multiple items in a conditional, use Array#include? instead.
value = value.map(&:to_i).max.to_s if property == :height || property == :width
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_member_service.rb:33:121: C: [Correctable] Layout/LineLength: Line is too long. [155/120]
@collection_search_builder ||= ParentCollectionSearchBuilder.new([:include_item_ids, :add_paging_to_solr, :add_access_controls_to_solr_params], self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collection_types/create_service.rb:6:121: C: Layout/LineLength: Line is too long. [125/120]
# Responsible for creating a CollectionType. If no params are given,the default user collection is assumed as defined by:
^^^^^
app/services/hyrax/collection_types/create_service.rb:26:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
badge_color: "#663333",
^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:27:121: C: Layout/LineLength: Line is too long. [179/120]
participants: [{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.admin_group_name, access: Hyrax::CollectionTypeParticipant::MANAGE_ACCESS },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:28:121: C: [Correctable] Layout/LineLength: Line is too long. [184/120]
{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.registered_group_name, access: Hyrax::CollectionTypeParticipant::CREATE_ACCESS }]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:44:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
badge_color: "#705070",
^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:45:121: C: Layout/LineLength: Line is too long. [179/120]
participants: [{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.admin_group_name, access: Hyrax::CollectionTypeParticipant::MANAGE_ACCESS },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:46:121: C: [Correctable] Layout/LineLength: Line is too long. [184/120]
{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.registered_group_name, access: Hyrax::CollectionTypeParticipant::CREATE_ACCESS }]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:62:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
badge_color: "#405060",
^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:63:121: C: Layout/LineLength: Line is too long. [179/120]
participants: [{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.admin_group_name, access: Hyrax::CollectionTypeParticipant::MANAGE_ACCESS },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:64:121: C: [Correctable] Layout/LineLength: Line is too long. [179/120]
{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.admin_group_name, access: Hyrax::CollectionTypeParticipant::CREATE_ACCESS }]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:77:121: C: Layout/LineLength: Line is too long. [130/120]
# @option options [Boolean] :discoverable if true, collections of this type can be marked Public and found in search results
^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:78:121: C: Layout/LineLength: Line is too long. [144/120]
# @option options [Boolean] :sharable if true, collections of this type can have participants added for :manage, :deposit, or :view access
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:79:121: C: Layout/LineLength: Line is too long. [151/120]
# @option options [Boolean] :share_applies_to_new_works if true, share participant permissions are applied to new works created in the collection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:80:121: C: Layout/LineLength: Line is too long. [127/120]
# @option options [Boolean] :allow_multiple_membership if true, works can be members of multiple collections of this type
^^^^^^^
app/services/hyrax/collection_types/create_service.rb:81:121: C: Layout/LineLength: Line is too long. [140/120]
# @option options [Boolean] :require_membership if true, all works must belong to at least one collection of this type. When combined
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:83:121: C: Layout/LineLength: Line is too long. [128/120]
# @option options [Boolean] :assigns_workflow if true, collections of this type can be used to assign a workflow to a work
^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:84:121: C: Layout/LineLength: Line is too long. [138/120]
# @option options [Boolean] :assigns_visibility if true, collections of this type can be used to assign initial visibility to a work
^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:110:121: C: [Correctable] Layout/LineLength: Line is too long. [134/120]
create_collection_type(machine_id: USER_COLLECTION_MACHINE_ID, title: USER_COLLECTION_TITLE, options: USER_COLLECTION_OPTIONS)
^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:118:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:119:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:121:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless collection_type_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:147:121: C: [Correctable] Layout/LineLength: Line is too long. [186/120]
Hyrax::CollectionTypeParticipant.create!(hyrax_collection_type_id: collection_type_id, agent_type: p.fetch(:agent_type), agent_id: p.fetch(:agent_id), access: p.fetch(:access))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:149:41: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of error.
rescue InvalidParticipantError => error
^^^^^
app/services/hyrax/collection_types/create_service.rb:150:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.error "Participants not created for collection type " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/create_service.rb:161:9: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(participants) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collection_types/permissions_service.rb:9:121: C: Layout/LineLength: Line is too long. [148/120]
# @param roles [String] type of access, Hyrax::CollectionTypeParticipant::MANAGE_ACCESS and/or Hyrax::CollectionTypeParticipant::CREATE_ACCESS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:13:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:14:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:17:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Hyrax::CollectionType.all.select(:id).distinct.pluck(:id) if user_admin?(user, ability)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:22:121: C: Layout/LineLength: Line is too long. [138/120]
Hyrax::CollectionTypeParticipant.where(agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE,
^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:35:121: C: Layout/LineLength: Line is too long. [148/120]
# @param roles [String] type of access, Hyrax::CollectionTypeParticipant::MANAGE_ACCESS and/or Hyrax::CollectionTypeParticipant::CREATE_ACCESS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:39:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:40:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:43:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Hyrax::CollectionType.all if user_admin?(user, ability)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:54:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:55:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:62:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if Hyrax::CollectionTypeParticipant.where(agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:74:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:75:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:83:121: C: Layout/LineLength: Line is too long. [155/120]
hyrax_collection_types: { machine_id: Hyrax::CollectionType::ADMIN_SET_MACHINE_ID }).present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:84:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if Hyrax::CollectionTypeParticipant.joins(:hyrax_collection_type) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:87:121: C: Layout/LineLength: Line is too long. [155/120]
hyrax_collection_types: { machine_id: Hyrax::CollectionType::ADMIN_SET_MACHINE_ID }).present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:98:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:99:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:101:121: C: [Correctable] Layout/LineLength: Line is too long. [170/120]
collection_types_for_user(user: user, ability: ability, roles: [Hyrax::CollectionTypeParticipant::MANAGE_ACCESS, Hyrax::CollectionTypeParticipant::CREATE_ACCESS])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:112:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:113:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:127:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:128:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:142:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:143:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:158:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:159:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:160:95: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/CyclomaticComplexity.
def self.access_to_collection_type?(collection_type:, access:, user: nil, ability: nil) # rubocop:disable Metrics/CyclomaticComplexity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:163:21: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return true if ([user_id(user, ability)] & agent_ids_for(collection_type: collection_type, agent_type: 'user', access: access)).present?
^^
app/services/hyrax/collection_types/permissions_service.rb:163:121: C: [Correctable] Layout/LineLength: Line is too long. [144/120]
return true if ([user_id(user, ability)] & agent_ids_for(collection_type: collection_type, agent_type: 'user', access: access)).present?
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:164:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if (user_groups(user, ability) & agent_ids_for(collection_type: collection_type, agent_type: 'group', access: access)).present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:164:21: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return true if (user_groups(user, ability) & agent_ids_for(collection_type: collection_type, agent_type: 'group', access: access)).present?
^^
app/services/hyrax/collection_types/permissions_service.rb:164:121: C: [Correctable] Layout/LineLength: Line is too long. [147/120]
return true if (user_groups(user, ability) & agent_ids_for(collection_type: collection_type, agent_type: 'group', access: access)).present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:174:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:175:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:188:121: C: Layout/LineLength: Line is too long. [124/120]
# @return [Array<String>] array of user identifiers (typically emails) for users who can edit collections of this type
^^^^
app/services/hyrax/collection_types/permissions_service.rb:189:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:190:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:192:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless collection_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:193:121: C: Layout/LineLength: Line is too long. [122/120]
Hyrax::CollectionTypeParticipant.joins(:hyrax_collection_type).where(hyrax_collection_type_id: collection_type.id,
^^
app/services/hyrax/collection_types/permissions_service.rb:194:121: C: Layout/LineLength: Line is too long. [133/120]
agent_type: Hyrax::CollectionTypeParticipant::USER_TYPE,
^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:195:121: C: Layout/LineLength: Line is too long. [170/120]
access: Hyrax::CollectionTypeParticipant::MANAGE_ACCESS).pluck(Arel.sql('DISTINCT agent_id'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:203:121: C: Layout/LineLength: Line is too long. [129/120]
# @return [Array<String>] array of group identifiers (typically groupname) for groups who can edit collections of this type
^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:204:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:205:121: C: Layout/LineLength: Line is too long. [131/120]
# If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:207:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless collection_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:208:121: C: Layout/LineLength: Line is too long. [131/120]
groups = Hyrax::CollectionTypeParticipant.joins(:hyrax_collection_type).where(hyrax_collection_type_id: collection_type.id,
^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:209:121: C: Layout/LineLength: Line is too long. [143/120]
agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE,
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:210:121: C: Layout/LineLength: Line is too long. [179/120]
access: Hyrax::CollectionTypeParticipant::MANAGE_ACCESS).pluck(Arel.sql('DISTINCT agent_id'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:216:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ability.user_groups if ability.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:223:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ability.admin? if ability.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collection_types/permissions_service.rb:229:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ability.current_user.user_key if ability.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/collection_member_search_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/collection_member_search_service.rb:14:121: C: Layout/LineLength: Line is too long. [150/120]
def initialize(scope:, collection:, params:, user_params: nil, current_ability: nil, search_builder_class: Hyrax::CollectionMemberSearchBuilder) # rubocop:disable Metrics/ParameterLists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/collection_member_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/collection_member_service.rb:14:121: C: Layout/LineLength: Line is too long. [150/120]
def initialize(scope:, collection:, params:, user_params: nil, current_ability: nil, search_builder_class: Hyrax::CollectionMemberSearchBuilder) # rubocop:disable Metrics/ParameterLists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/collection_member_service.rb:22:121: C: Layout/LineLength: Line is too long. [126/120]
search_builder_class: search_builder_class)
^^^^^^
app/services/hyrax/collections/collection_member_service.rb:86:13: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/services/hyrax/collections/collection_member_service.rb:88:52: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Hyrax::SingleMembershipError => err
^^^
app/services/hyrax/collections/collection_member_service.rb:109:121: C: [Correctable] Layout/LineLength: Line is too long. [144/120]
message = Hyrax::MultipleMembershipChecker.new(item: new_member).check(collection_ids: [collection_id], include_current_members: true)
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/collection_member_service.rb:110:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise Hyrax::SingleMembershipError, message if message.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/collection_member_service.rb:148:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return member unless member?(collection_id: collection_id, member: member)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/managed_collections_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/managed_collections_service.rb:9:121: C: Layout/LineLength: Line is too long. [137/120]
# @param scope [Object] Typically a controller object that responds to `repository`, `can?`, `blacklight_config`, `current_ability`
^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/migration_service.rb:11:121: C: Layout/LineLength: Line is too long. [123/120]
# Migrate all legacy collections to extended collections with collection type assigned. Legacy collections are those
^^^
app/services/hyrax/collections/migration_service.rb:26:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.info "--- Migration Complete"
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:31:121: C: Layout/LineLength: Line is too long. [127/120]
# Migrate a single legacy collection to extended collections with collection type assigned. Legacy collections are those
^^^^^^^
app/services/hyrax/collections/migration_service.rb:36:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if collection.collection_type_gid.present? # already migrated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:53:71: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
agent_type: "group", agent_id: "admin", access: "manage")
^^^^^^^
app/services/hyrax/collections/migration_service.rb:53:90: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
agent_type: "group", agent_id: "admin", access: "manage")
^^^^^^^
app/services/hyrax/collections/migration_service.rb:53:107: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
agent_type: "group", agent_id: "admin", access: "manage")
^^^^^^^^
app/services/hyrax/collections/migration_service.rb:62:121: C: Layout/LineLength: Line is too long. [121/120]
# access created and associated with the collection. Any collection without collection type gid as nil or assigned
^
app/services/hyrax/collections/migration_service.rb:67:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.info "*** Repairing migrated collections"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:76:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.info "--- Repairing Complete"
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:85:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if collection.collection_type_gid.present? && collection.collection_type_gid != Hyrax::CollectionType.find_or_create_default_collection_type.to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:85:16: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return if collection.collection_type_gid.present? && collection.collection_type_gid != Hyrax::CollectionType.find_or_create_default_collection_type.to_global_id
^^
app/services/hyrax/collections/migration_service.rb:85:121: C: Layout/LineLength: Line is too long. [168/120]
return if collection.collection_type_gid.present? && collection.collection_type_gid != Hyrax::CollectionType.find_or_create_default_collection_type.to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:104:121: C: [Correctable] Layout/LineLength: Line is too long. [139/120]
collection.edit_groups.each { |g| grants << { agent_type: 'group', agent_id: g, access: Hyrax::PermissionTemplateAccess::MANAGE } }
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:105:121: C: [Correctable] Layout/LineLength: Line is too long. [137/120]
collection.edit_users.each { |u| grants << { agent_type: 'user', agent_id: u, access: Hyrax::PermissionTemplateAccess::MANAGE } }
^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:106:121: C: [Correctable] Layout/LineLength: Line is too long. [137/120]
collection.read_groups.each { |g| grants << { agent_type: 'group', agent_id: g, access: Hyrax::PermissionTemplateAccess::VIEW } }
^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:107:121: C: [Correctable] Layout/LineLength: Line is too long. [135/120]
collection.read_users.each { |u| grants << { agent_type: 'user', agent_id: u, access: Hyrax::PermissionTemplateAccess::VIEW } }
^^^^^^^^^^^^^^^
app/services/hyrax/collections/migration_service.rb:108:121: C: [Correctable] Layout/LineLength: Line is too long. [169/120]
Hyrax::Collections::PermissionsCreateService.create_default(collection: collection, creating_user: ::User.find_by_user_key(collection.depositor), grants: grants)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_persistence_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/nested_collection_persistence_service.rb:18:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
Hyrax::Collections::CollectionMemberService.add_member(collection_id: parent.id, new_member: child_resource, user: user)
^^^^^^^^
app/services/hyrax/collections/nested_collection_persistence_service.rb:26:121: C: [Correctable] Layout/LineLength: Line is too long. [127/120]
Hyrax::Collections::CollectionMemberService.remove_member(collection_id: parent.id, member: child_resource, user: user)
^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/nested_collection_query_service.rb:33:121: C: Layout/LineLength: Line is too long. [137/120]
# @param scope [Object] Typically a controller object that responds to `repository`, `can?`, `blacklight_config`, `current_ability`
^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:34:121: C: Layout/LineLength: Line is too long. [129/120]
# @param limit_to_id [nil, String] Limit the query to just check if the given id is in the response. Useful for validation.
^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:38:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless scope.can?(:deposit, parent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:39:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
query_solr(collection: parent, access: :read, scope: scope, limit_to_id: limit_to_id, nest_direction: :as_child).documents
^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:56:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless scope.can?(:read, child)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:57:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
query_solr(collection: child, access: :deposit, scope: scope, limit_to_id: limit_to_id, nest_direction: :as_parent).documents
^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:72:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] unless child.try(:nestable?)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:143:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if available_child_collections(parent: parent, scope: scope, limit_to_id: child.id).none?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:158:55: C: [Correctable] Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
def self.valid_combined_nesting_depth?(parent:, child: nil, scope:)
^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:162:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if parent_depth + child_depth > Samvera::NestingIndexer.configuration.maximum_nesting_depth
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:174:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return 1 if child.nil?
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:178:121: C: Layout/LineLength: Line is too long. [143/120]
# => 1) First we find all the collections with this child in the path, sort the results in descending order, and take the first result.
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:182:121: C: Layout/LineLength: Line is too long. [159/120]
q: "#{Samvera::NestingIndexer.configuration.solr_field_name_for_storing_pathnames}:/.*#{child.id}.*/",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:183:121: C: Layout/LineLength: Line is too long. [151/120]
sort: "#{Samvera::NestingIndexer.configuration.solr_field_name_for_deepest_nested_depth} desc"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:192:121: C: Layout/LineLength: Line is too long. [183/120]
# => 2) Then we get the stored depth of the child collection itself to eliminate the collections above this one from our count, and add 1 to add back in this collection itself
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/nested_collection_query_service.rb:209:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return 1 if parent.nil?
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_create_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/permissions_create_service.rb:10:121: C: Layout/LineLength: Line is too long. [138/120]
# @param collection [#collection_type_gid || Hyrax::AdministrativeSet] the collection or admin set the new permissions will act on
^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_create_service.rb:16:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
access_grants = access_grants_attributes(collection_type: collection_type, creating_user: creating_user, grants: grants)
^^^^^^^^^^
app/services/hyrax/collections/permissions_create_service.rb:63:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
attribute_list << { agent_type: 'user', agent_id: creating_user.user_key, access: Hyrax::PermissionTemplateAccess::MANAGE } if creating_user
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_create_service.rb:63:137: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
attribute_list << { agent_type: 'user', agent_id: creating_user.user_key, access: Hyrax::PermissionTemplateAccess::MANAGE } if creating_user
^^
app/services/hyrax/collections/permissions_create_service.rb:75:121: C: Layout/LineLength: Line is too long. [142/120]
user_managers = Hyrax::CollectionTypes::PermissionsService.user_edit_grants_for_collection_of_type(collection_type: collection_type)
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_create_service.rb:79:121: C: Layout/LineLength: Line is too long. [144/120]
group_managers = Hyrax::CollectionTypes::PermissionsService.group_edit_grants_for_collection_of_type(collection_type: collection_type)
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/permissions_service.rb:9:121: C: Layout/LineLength: Line is too long. [193/120]
# @param access [Array<String>] one or more types of access (e.g. Hyrax::PermissionTemplateAccess::MANAGE, Hyrax::PermissionTemplateAccess::DEPOSIT, Hyrax::PermissionTemplateAccess::VIEW)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:18:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ids unless source_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:24:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if ids.empty?
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:40:121: C: Layout/LineLength: Line is too long. [193/120]
# @param access [Array<String>] one or more types of access (e.g. Hyrax::PermissionTemplateAccess::MANAGE, Hyrax::PermissionTemplateAccess::DEPOSIT, Hyrax::PermissionTemplateAccess::VIEW)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:43:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:53:121: C: Layout/LineLength: Line is too long. [193/120]
# @param access [Array<String>] one or more types of access (e.g. Hyrax::PermissionTemplateAccess::MANAGE, Hyrax::PermissionTemplateAccess::DEPOSIT, Hyrax::PermissionTemplateAccess::VIEW)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:56:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:69:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:82:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:94:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:105:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:118:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:131:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:145:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:156:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:170:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:183:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:188:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
deposit_access_to_collection?(collection_id: collection_id, ability: ability, exclude_groups: exclude_groups) ||
^^
app/services/hyrax/collections/permissions_service.rb:200:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:202:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
access_to_collection?(collection_id: collection_id, access: 'deposit', ability: ability, exclude_groups: exclude_groups)
^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:214:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:216:121: C: [Correctable] Layout/LineLength: Line is too long. [127/120]
access_to_collection?(collection_id: collection_id, access: 'manage', ability: ability, exclude_groups: exclude_groups)
^^^^^^^
app/services/hyrax/collections/permissions_service.rb:228:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:230:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
access_to_collection?(collection_id: collection_id, access: 'view', ability: ability, exclude_groups: exclude_groups)
^^^^^
app/services/hyrax/collections/permissions_service.rb:243:121: C: Layout/LineLength: Line is too long. [144/120]
# @note Several checks get the user's groups from the user's ability. The same values can be retrieved directly from a passed in ability.
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:245:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false unless collection_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:247:21: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return true if ([ability.current_user.user_key] & template.agent_ids_for(agent_type: 'user', access: access)).present?
^^
app/services/hyrax/collections/permissions_service.rb:247:121: C: [Correctable] Layout/LineLength: Line is too long. [126/120]
return true if ([ability.current_user.user_key] & template.agent_ids_for(agent_type: 'user', access: access)).present?
^^^^^^
app/services/hyrax/collections/permissions_service.rb:248:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if (ability.user_groups & (template.agent_ids_for(agent_type: 'group', access: access) - exclude_groups)).present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/permissions_service.rb:248:21: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return true if (ability.user_groups & (template.agent_ids_for(agent_type: 'group', access: access) - exclude_groups)).present?
^^
app/services/hyrax/collections/permissions_service.rb:248:121: C: [Correctable] Layout/LineLength: Line is too long. [134/120]
return true if (ability.user_groups & (template.agent_ids_for(agent_type: 'group', access: access) - exclude_groups)).present?
^^^^^^^^^^^^^^
app/services/hyrax/collections/search_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections/search_service.rb:17:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if @session[:history].blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections/search_service.rb:53:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, 'you must provide :group or :individual' unless [:group, :individual].include?(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/collections_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/collections_service.rb:11:121: C: Layout/LineLength: Line is too long. [151/120]
super(config: context.blacklight_config, user_params: context.params, search_builder_class: self.class.list_search_builder_class, scope: context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/contextual_path.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/curation_concern.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/curation_concern.rb:50:7: C: Naming/MemoizedInstanceVariableName: Memoized variable @work_middleware_stack does not match method name actor. Use @actor instead.
@work_middleware_stack ||= actor_factory.build(Actors::Terminator.new)
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/find_access_control.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/custom_queries/find_access_control.rb:15:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/find_by_collection_type.rb:1:1: W: Lint/EmptyFile: Empty file detected.
app/services/hyrax/custom_queries/find_collections_by_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/custom_queries/find_collections_by_type.rb:19:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/find_file_metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/custom_queries/find_file_metadata.rb:23:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/find_file_metadata.rb:47:121: C: Layout/LineLength: Line is too long. [137/120]
"Result type #{result.internal_resource} for alternate_identifier #{alternate_identifier} is not a `Hyrax::FileMetadata`"
^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/find_file_metadata.rb:52:121: C: Layout/LineLength: Line is too long. [131/120]
# Find an array of file metadata using Valkyrie IDs, and map them to Hyrax::FileMetadata maintaining order based on given ids
^^^^^^^^^^^
app/services/hyrax/custom_queries/find_file_metadata.rb:54:121: C: Layout/LineLength: Line is too long. [125/120]
# @return [Array<Hyrax::FileMetadata>] or empty array if there are no ids or none of the ids map to Hyrax::FileMetadata
^^^^^
app/services/hyrax/custom_queries/find_ids_by_model.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/custom_queries/find_ids_by_model.rb:15:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/find_many_by_alternate_ids.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/custom_queries/navigators/find_files.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/custom_queries/navigators/find_files.rb:26:9: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/custom_queries/navigators/find_files.rb:34:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if file_set.file_ids.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/database_migrator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators/actions'
^
app/services/hyrax/default_middleware_stack.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/derivative_path.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/derivative_path.rb:33:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Dir.glob(root_path.join("*")).select do |path|
^^^
app/services/hyrax/derivative_path.rb:55:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless destination_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/derivative_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Hyrax::DerivativeService
^
app/services/hyrax/derivative_service.rb:9:3: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :file_set
^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/derivative_service.rb:21:5: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
""
^^
app/services/hyrax/edit_permissions_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/edit_permissions_service.rb:8:121: C: Layout/LineLength: Line is too long. [144/120]
# * user is not permitted to update a work permission if it comes from a collection they do not manage, even if also from a managed collection
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/edit_permissions_service.rb:59:41: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
permission_hash.fetch(:access) == "edit" && @unauthorized_managers.include?(permission_hash.fetch(:name))
^^^^^^
app/services/hyrax/edit_permissions_service.rb:84:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return false if excluded_permission?(permission_hash)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/edit_permissions_service.rb:105:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
html = ""
^^
app/services/hyrax/edit_permissions_service.rb:107:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless name == managers.fetch(:name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/edit_permissions_service.rb:156:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if grant.access == "manage"
^^^^^^^^
app/services/hyrax/edit_permissions_service.rb:178:121: C: Layout/LineLength: Line is too long. [130/120]
unauthorized_collection_ids = object_member_of_ids - object_managed_collection_ids
^^^^^^^^^^
app/services/hyrax/edit_permissions_service.rb:179:121: C: Layout/LineLength: Line is too long. [161/120]
qualified_resources = Hyrax.query_service.find_many_by_ids(ids: unauthorized_collection_ids).select do |resource|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/edit_permissions_service.rb:183:47: W: [Correctable] Layout/BeginEndAlignment: end at 183, 46 is not aligned with @object_unauthorized_collection_ids ||= begin at 177, 6.
end
^^^
app/services/hyrax/embargo_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/ensure_well_formed_admin_set_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/ensure_well_formed_admin_set_service.rb:22:121: C: Layout/LineLength: Line is too long. [121/120]
admin_set_id = admin_set_id.presence&.to_s || Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id.to_s
^
app/services/hyrax/file_set_csv_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'csv'
^
app/services/hyrax/file_set_derivatives_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/file_set_derivatives_service.rb:5:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :file_set
^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/file_set_derivatives_service.rb:76:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
{ label: 'ogg', format: 'ogg', url: derivative_url('ogg') }])
^
app/services/hyrax/file_set_derivatives_service.rb:81:121: C: Layout/LineLength: Line is too long. [131/120]
outputs: [{ label: :thumbnail, format: 'jpg', url: derivative_url('thumbnail') },
^^^^^^^^^^^
app/services/hyrax/file_set_derivatives_service.rb:82:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
{ label: 'webm', format: 'webm', url: derivative_url('webm') },
^^^
app/services/hyrax/file_set_derivatives_service.rb:83:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
{ label: 'mp4', format: 'mp4', url: derivative_url('mp4') }])
^
app/services/hyrax/file_set_derivatives_service.rb:105:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless Hyrax.config.extract_full_text?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/file_set_derivatives_service.rb:107:83: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
outputs: [{ url: uri, container: "extracted_text" }])
^^^^^^^^^^^^^^^^
app/services/hyrax/file_set_fixity_check_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/file_set_fixity_check_service.rb:96:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true unless latest_fixity_check
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/file_set_fixity_check_service.rb:98:121: C: Layout/LineLength: Line is too long. [146/120]
logger.warn "***FIXITY*** problem with fixity check log! Latest Fixity check is not nil, but updated_at is not set #{latest_fixity_check}"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/file_set_type_service.rb:26:121: C: Layout/LineLength: Line is too long. [124/120]
def initialize(file_set:, characterization_proxy: ::FileSet.characterization_proxy, query_service: Hyrax.custom_queries)
^^^^
app/services/hyrax/file_set_type_service.rb:51:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ::FileSet.audio_mime_types if defined?(::FileSet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/file_set_visibility_propagator.rb:35:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless source_modifier
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/find_objects_via_solr_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/find_objects_via_solr_service.rb:14:121: C: Layout/LineLength: Line is too long. [124/120]
# @param model [Class] if not using Valkyrie, this is expected to be an ActiveFedora::Base object that supports #where
^^^^
app/services/hyrax/find_objects_via_solr_service.rb:16:121: C: Layout/LineLength: Line is too long. [143/120]
# @param join_with [String] the value we're joining the clauses with (default: ' OR ' for backward compatibility with ActiveFedora where)
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/find_objects_via_solr_service.rb:20:121: C: Layout/LineLength: Line is too long. [137/120]
def find_for_model_by_field_pairs(model:, field_pairs:, join_with: ' OR ', type: 'field', use_valkyrie: Hyrax.config.use_valkyrie?)
^^^^^^^^^^^^^^^^^
app/services/hyrax/find_objects_via_solr_service.rb:22:121: C: Layout/LineLength: Line is too long. [121/120]
"Instead, use 'Hyrax::SolrQueryService.new.with_model(...).with_field_pairs(...).get_objects'.")
^
app/services/hyrax/fixity/active_fedora_fixity_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/fixity/missing_content_error.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/fixity_check_failure_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/form_metadata_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/graph_exporter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/graph_exporter.rb:10:121: C: Layout/LineLength: Line is too long. [128/120]
# @param [SolrDocument, #id] solr_document idea here is that in the future, ActiveFedora may serialize the object as JSON+LD
^^^^^^^^
app/services/hyrax/graph_exporter.rb:32:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :solr_document, :request, :additional_resources, :hostname
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/graph_exporter.rb:100:121: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
new_uri = RDF::URI(builder.polymorphic_method(routes, route_key, nil, :url, id: resource_id.path, host: hostname, anchor: anchor))
^^^^^^^^^^^^^^^^
app/services/hyrax/graph_exporter.rb:144:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return parent_url + resource_id.sub(parent_id, '') if resource_id.start_with?(parent_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/identifier/builder.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/identifier/dispatcher.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/identifier/registrar.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/identifier/registrar.rb:13:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Hyrax.config.identifier_registrars[type].new(**opts) if Hyrax.config.identifier_registrars.include?(type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/identifier/registrar.rb:13:71: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
return Hyrax.config.identifier_registrars[type].new(**opts) if Hyrax.config.identifier_registrars.include?(type)
^^
app/services/hyrax/identifier/registrar.rb:13:121: C: Layout/LineLength: Line is too long. [122/120]
return Hyrax.config.identifier_registrars[type].new(**opts) if Hyrax.config.identifier_registrars.include?(type)
^^
app/services/hyrax/iiif_authorization_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/iiif_authorization_service.rb:4:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :controller
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/import_url_failure_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/indexes_thumbnails.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/institution.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/lease_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/license_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/list_source_exporter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/list_source_exporter.rb:24:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :request
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/listeners/acl_index_listener.rb:18:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless event[:result] == :success # do nothing on failure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/file_metadata_listener.rb:19:60: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Valkyrie::Persistence::ObjectNotFoundError => err
^^^
app/services/hyrax/listeners/member_cleanup_listener.rb:16:11: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/services/hyrax/listeners/member_cleanup_listener.rb:36:11: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/services/hyrax/listeners/metadata_index_listener.rb:21:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless resource? event[:collection]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/metadata_index_listener.rb:32:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless resource? event[:metadata]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/metadata_index_listener.rb:47:60: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Valkyrie::Persistence::ObjectNotFoundError => err
^^^
app/services/hyrax/listeners/metadata_index_listener.rb:60:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless resource? event[:object]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/metadata_index_listener.rb:71:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless resource?(event.payload[:object])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/metadata_index_listener.rb:82:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless resource?(event.payload[:collection])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/metadata_index_listener.rb:89:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if resource.is_a? Valkyrie::Resource
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/listeners/trophy_cleanup_listener.rb:13:31: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue StandardError => err
^^^
app/services/hyrax/listeners/workflow_listener.rb:28:121: C: Layout/LineLength: Line is too long. [123/120]
return Rails.logger.warn("Skipping workflow initialization for #{event[:object]}; no user is given\n\t#{event}") if
^^^
app/services/hyrax/listeners/workflow_listener.rb:32:61: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Sipity::StateError, Sipity::ConversionError => err
^^^
app/services/hyrax/local_file_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/lock_manager.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'redlock'
^
app/services/hyrax/lock_manager.rb:11:121: C: Layout/LineLength: Line is too long. [139/120]
# @param [Fixnum] retry_delay Maximum wait time in milliseconds before retrying. Wait time is a random value between 0 and retry_delay.
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/lock_manager.rb:21:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise UnableToAcquireLockError unless locked
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/lockable.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/manifest_builder_service.rb:58:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for sanitized_manifest is too high. [9/7]
def sanitized_manifest(presenter:) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/manifest_builder_service.rb:58:5: C: Metrics/PerceivedComplexity: Perceived complexity for sanitized_manifest is too high. [9/8]
def sanitized_manifest(presenter:) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/manifest_builder_service.rb:69:97: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
hash['description'] = Array(hash['description'])&.collect { |elem| sanitize_value(elem) } if hash.key?('description')
^^
app/services/hyrax/manifest_builder_service.rb:69:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
hash['description'] = Array(hash['description'])&.collect { |elem| sanitize_value(elem) } if hash.key?('description')
^^^
app/services/hyrax/messenger_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/microdata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/microdata.rb:5:121: C: Layout/LineLength: Line is too long. [128/120]
# You may load more than one source file. Source files that are later in the load process will overlay files that are earlier.
^^^^^^^^
app/services/hyrax/microdata.rb:13:16: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
FILENAME = Hyrax::Engine.root + 'config/schema_org.yml'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/microdata.rb:18:121: C: Layout/LineLength: Line is too long. [127/120]
# @todo Should we make specific methods for fetching :property, :type, :value. This would mean privatizing the fetch method
^^^^^^^
app/services/hyrax/microdata.rb:37:121: C: Layout/LineLength: Line is too long. [153/120]
# @note The load paths will be processed and loaded into in the natural array order. As each file is loaded, it overlays the already registered keys.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/multiple_membership_checker.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/multiple_membership_checker.rb:55:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if collection_ids.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/multiple_membership_checker.rb:60:63: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.with_generic_type(generic_type: "Collection")
^^^^^^^^^^^^
app/services/hyrax/multiple_membership_checker.rb:71:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return proposed unless include_current_members
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/multiple_membership_checker.rb:86:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if problematic_collections.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/noid.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/permission_manager.rb:21:121: C: Layout/LineLength: Line is too long. [144/120]
# # => #<Set: {#<Hyrax::Permission access_to=#<Valkyrie::ID:0x00 @id="81dc73b1-f244-48a7-9c4c-24c7ef528291"> agent="a_user_key" mode=:read>,
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/permission_manager.rb:22:121: C: Layout/LineLength: Line is too long. [145/120]
# <Hyrax::Permission access_to=#<Valkyrie::ID:0x00 @id="81dc73b1-f244-48a7-9c4c-24c7ef528291"> agent="another_user_key" mode=:read>}>
^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/permission_manager.rb:147:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless permission.agent.starts_with?(Hyrax::Group.name_prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/permission_manager.rb:169:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for update_users_for is too high. [10/7]
def update_users_for(mode:, users:) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/permission_manager.rb:169:5: C: Metrics/PerceivedComplexity: Perceived complexity for update_users_for is too high. [10/8]
def update_users_for(mode:, users:) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/permission_manager.rb:193:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if permission.agent.starts_with?(Hyrax::Group.name_prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/permission_template_applicator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/persist_derivatives.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/persist_derivatives.rb:21:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "No :url was provided in the transcoding directives" unless directives.key?(:url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/persist_derivatives.rb:21:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "No :url was provided in the transcoding directives" unless directives.key?(:url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/persist_derivatives.rb:23:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "Must provide a file uri" unless uri.scheme == 'file'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/persist_derivatives.rb:23:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "Must provide a file uri" unless uri.scheme == 'file'
^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/persist_directly_contained_output_file_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/persist_directly_contained_output_file_service.rb:27:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "#{uri} is not an http(s) uri" unless uri.is_a?(URI::HTTP)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/persist_directly_contained_output_file_service.rb:28:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: Hyrax::Base.uri_to_id(uri.to_s), use_valkyrie: false)
^^^^^^^^^^
app/services/hyrax/qa_select_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/query_service.rb:1:1: W: Lint/EmptyFile: Empty file detected.
app/services/hyrax/quick_classification_query.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/repository_fixity_check_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/resource_types_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/resource_types_service.rb:22:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Hyrax.config.microdata_default_type if id.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/restriction_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/restriction_service.rb:12:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise "RestrictionService is an Abstract class and should be extended. Implement presenter_class in the subclass"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/restriction_service.rb:12:121: C: Layout/LineLength: Line is too long. [121/120]
raise "RestrictionService is an Abstract class and should be extended. Implement presenter_class in the subclass"
^
app/services/hyrax/rights_statement_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/search_service.rb:25:121: C: Layout/LineLength: Line is too long. [181/120]
# @yield [search_builder] optional block yields configured SearchBuilder, caller can modify or create new SearchBuilder to be used. Block should return SearchBuilder to be used.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/search_service.rb:69:15: W: [Correctable] Lint/RedundantSafeNavigation: Redundant safe navigation detected.
if scope&.respond_to?(method_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/search_service.rb:80:12: W: [Correctable] Lint/RedundantSafeNavigation: Redundant safe navigation detected.
scope&.respond_to?(method_name, include_private) || super
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/solr_query_builder_service.rb:14:121: C: Layout/LineLength: Line is too long. [121/120]
# If the id_array is empty, defaults to a query of "id:NEVER_USE_THIS_ID", which will return an empty solr response
^
app/services/hyrax/solr_query_builder_service.rb:25:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "id:NEVER_USE_THIS_ID" if ids.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:25:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "id:NEVER_USE_THIS_ID" if ids.empty?
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:49:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"There will not be a replacement for this method. See Hyrax::SolrQueryService which is replacing this class.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:49:121: C: Layout/LineLength: Line is too long. [135/120]
"There will not be a replacement for this method. See Hyrax::SolrQueryService which is replacing this class.")
^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:53:121: C: Layout/LineLength: Line is too long. [128/120]
# Construct a solr query from a list of pairs (e.g. [field name, values]) including the model (e.g. Collection, Monograph)
^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:61:121: C: Layout/LineLength: Line is too long. [152/120]
# # => "_query_:\"{!field f=has_model_ssim}Collection\" AND _query_:\"{!field f=library_id_ssim}123\" AND _query_:\"{!field f=owner_ssim}Fred\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_builder_service.rb:66:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs["has_model_ssim"] = model.to_s
^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/solr_query_service.rb:14:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(query: [], solr_service: Hyrax::SolrService) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:51:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ids.map { |id| ActiveFedora::Base.find(id) } unless use_valkyrie
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:65:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return 'id:NEVER_USE_THIS_ID' if @query.blank? # forces this method to always return a valid solr query
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:81:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "Expected there to be at least one non-blank id." if ids.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:81:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "Expected there to be at least one non-blank id." if ids.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:115:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return self if pairs_query.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:152:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" if clauses.count.zero?
^^
app/services/hyrax/solr_query_service.rb:153:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return clauses.first if clauses.count == 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:164:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field_pairs = { "has_model_ssim" => model.to_s }
^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:183:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return "" if filters.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_query_service.rb:183:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" if filters.blank?
^^
app/services/hyrax/solr_service.rb:26:57: C: [Correctable] Performance/Caller: Use caller(2..2).first instead of caller[1].
Deprecation.warn(self, rsolr_call_warning) unless caller[1].include?("#{self.class.name.underscore}.rb")
^^^^^^^^^
app/services/hyrax/solr_service.rb:61:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response['status'] == "OK"
^^^^
app/services/hyrax/solr_service.rb:106:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
delete_by_query("*:*")
^^^^^
app/services/hyrax/solr_service.rb:128:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise Hyrax::ObjectNotFoundError, "Object '#{id}' not found in solr" if result.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_service.rb:149:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return self.class.instance.conn unless use_valkyrie
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_service.rb:154:121: C: Layout/LineLength: Line is too long. [184/120]
"Calling Hyrax::SolrService.get without passing an explicit value for ':rows' is not recommended. You will end up with Solr's default (usually set to 10)\nCalled by #{caller[0]}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_service.rb:154:174: C: [Correctable] Performance/Caller: Use caller(1..1).first instead of caller[0].
"Calling Hyrax::SolrService.get without passing an explicit value for ':rows' is not recommended. You will end up with Solr's default (usually set to 10)\nCalled by #{caller[0]}"
^^^^^^^^^
app/services/hyrax/solr_service.rb:158:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Calls to Hyrax::SolrService.instance are deprecated and support will be removed from Hyrax 4.0. Use methods in Hyrax::SolrService instead."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/solr_service.rb:158:121: C: Layout/LineLength: Line is too long. [146/120]
"Calls to Hyrax::SolrService.instance are deprecated and support will be removed from Hyrax 4.0. Use methods in Hyrax::SolrService instead."
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/collections/over_time.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/depositors/summary.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/depositors/summary.rb:31:13: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Unable to find user '#{key}'\nResults was: #{results.inspect}" unless user
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/file_sets/by_format.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/file_sets/by_format.rb:10:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"file_format_sim"
^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/over_time.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/over_time.rb:52:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise NotImplementedError, "Implement the relation method in a concrete class"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/query_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/query_service.rb:9:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if start_datetime.blank? # no date just return nothing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/query_service.rb:32:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"*"
^^^
app/services/hyrax/statistics/query_service.rb:52:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"%Y-%m-%dT%H:%M:%SZ"
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/system_stats.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/system_stats.rb:16:121: C: Layout/LineLength: Line is too long. [130/120]
# @param [Fixnum] limit_records limits the results returned from top_depositors and top_formats. Maximum is 20, minimum is 5
^^^^^^^^^^
app/services/hyrax/statistics/system_stats.rb:24:121: C: Layout/LineLength: Line is too long. [130/120]
# @param [Fixnum] limit_records limits the results returned from top_depositors and top_formats. Maximum is 20, minimum is 5
^^^^^^^^^^
app/services/hyrax/statistics/term_query.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/term_query.rb:31:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.error "Unable to reach TermsComponent via Solr connection. Is it enabled in your solr config?"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/users/over_time.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/works/by_depositor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/works/by_resource_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/works/by_resource_type.rb:9:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"resource_type_sim"
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/statistics/works/count.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/statistics/works/over_time.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/thumbnail_path_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/thumbnail_path_service.rb:13:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return call(thumb) unless thumb.file_set?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/thumbnail_path_service.rb:31:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return object if object.thumbnail_id == object.id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/time_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/tolerant_select_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/user_stat_importer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/user_stat_importer.rb:6:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
UserRecord = Struct.new("UserRecord", :id, :user_key, :last_stats_update)
^^^^^^^^^^^^
app/services/hyrax/user_stat_importer.rb:10:36: C: [Correctable] Style/GlobalStdStream: Use $stdout instead of STDOUT.
stdout_logger = Logger.new(STDOUT)
^^^^^^
app/services/hyrax/user_stat_importer.rb:72:121: C: [Correctable] Layout/LineLength: Line is too long. [150/120]
rescue_and_retry("Retried #{from} on #{user} for #{object.class} #{object.id} too many times.") { from.statistics(object, start_date, user.id) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/user_stat_importer.rb:84:29: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of exception.
rescue StandardError => exception
^^^^^^^^^
app/services/hyrax/user_stat_importer.rb:101:82: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
::FileSet.search_in_batches("#{depositor_field}:\"#{user.user_key}\"", fl: "id") do |group|
^^^^
app/services/hyrax/user_stat_importer.rb:102:9: W: Lint/AmbiguousBlockAssociation: Parenthesize the param group.map { |doc| doc["id"] } to make sure that the block will be associated with the group.map method call.
ids.concat group.map { |doc| doc["id"] }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/user_stat_importer.rb:102:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ids.concat group.map { |doc| doc["id"] }
^^^^
app/services/hyrax/user_stat_importer.rb:109:96: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax::WorkRelation.new.search_in_batches("#{depositor_field}:\"#{user.user_key}\"", fl: "id") do |group|
^^^^
app/services/hyrax/user_stat_importer.rb:110:9: W: Lint/AmbiguousBlockAssociation: Parenthesize the param group.map { |doc| doc["id"] } to make sure that the block will be associated with the group.map method call.
ids.concat group.map { |doc| doc["id"] }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/user_stat_importer.rb:110:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ids.concat group.map { |doc| doc["id"] }
^^^^
app/services/hyrax/user_stat_importer.rb:124:67: C: [Correctable] Style/RedundantFetchBlock: Use fetch(stat_name, 0) instead of fetch(stat_name) { 0 }.
old_count = total_stats[date_key] ? total_stats[date_key].fetch(stat_name) { 0 } : 0
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/versioning_service.rb:35:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if version.nil?
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/versioning_service.rb:43:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
use_valkyrie ? perform_create_through_valkyrie(content, user) : perform_create_through_active_fedora(content, user)
^^^
app/services/hyrax/versioning_service.rb:45:121: C: Layout/LineLength: Line is too long. [143/120]
Rails.logger.warn "Declining to create a Version for #{content}; #{self} doesn't support versioning with use_valkyrie: #{use_valkyrie}"
^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/versioning_service.rb:53:58: C: [Correctable] Style/CommentedKeyword: Do not place comments on the same line as the def keyword.
def perform_create_through_valkyrie(content, user) # no-op
^^^^^^^
app/services/hyrax/virus_checker_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/visibility_intention.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/visibility_intention.rb:87:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if date.is_a?(Time)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/visibility_intention_applicator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/visibility_intention_applicator.rb:30:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise InvalidIntentionError unless intention.valid_embargo?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/visibility_intention_applicator.rb:33:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise InvalidIntentionError unless intention.valid_lease?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/visibility_propagator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/visibility_propagator.rb:42:68: C: [Correctable] Performance/Caller: Use caller(1..1).first instead of caller[0].
"name #{source.try(:model_name)}. Called from #{caller[0]}."
^^^^^^^^^
app/services/hyrax/visibility_reader.rb:36:121: C: Layout/LineLength: Line is too long. [123/120]
elsif permission_manager.read_groups.include? Hydra::AccessControls::AccessRight::PERMISSION_TEXT_VALUE_AUTHENTICATED
^^^
app/services/hyrax/work_form_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/work_query_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/work_query_service.rb:10:121: C: Layout/LineLength: Line is too long. [180/120]
# @note This was extracted from the ProxyDepositRequest, which was coordinating lots of effort. It was also an ActiveRecord object that required lots of Fedora/Solr interactions.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/work_thumbnail_path_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/work_uploads_handler.rb:113:70: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
file_set.visibility = file_set_extra_params(file)[:visibility] if file_set_extra_params(file)[:visibility].present?
^^
app/services/hyrax/work_uploads_handler.rb:113:121: C: Layout/LineLength: Line is too long. [121/120]
file_set.visibility = file_set_extra_params(file)[:visibility] if file_set_extra_params(file)[:visibility].present?
^
app/services/hyrax/work_uploads_handler.rb:172:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if file.is_a? Hyrax::UploadedFile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/abstract_notification.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/abstract_notification.rb:4:121: C: Layout/LineLength: Line is too long. [131/120]
# @abstract A notification that happens when a state transition occurs. Subclass AbstractNotification to create a notification.
^^^^^^^^^^^
app/services/hyrax/workflow/abstract_notification.rb:36:121: C: Layout/LineLength: Line is too long. [162/120]
# @param [#comment] comment - the comment associated with the action being taken, could be a Sipity::Comment, or anything that responds to a #comment method
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/abstract_notification.rb:60:36: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise NotImplementedError, "Implement #subject in a child class"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/abstract_notification.rb:64:121: C: [Correctable] Layout/LineLength: Line is too long. [139/120]
"#{title} (#{link_to work_id, document_path}) was advanced in the workflow by #{user.user_key} and is awaiting approval #{comment}"
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/abstract_notification.rb:74:51: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
Rails.application.routes.url_helpers.send(key + "_path", document.id)
^^^^^^^^^^^^^
app/services/hyrax/workflow/abstract_notification.rb:74:57: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.application.routes.url_helpers.send(key + "_path", document.id)
^^^^^^^
app/services/hyrax/workflow/action_taken_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/action_taken_service.rb:35:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless action.triggered_methods.any?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/action_taken_service.rb:42:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return save_target if success
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/action_taken_service.rb:52:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless service
^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/action_taken_service.rb:65:17: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 65, 16 is not aligned with klass = begin at 63, 8.
rescue NameError
^^^^^^
app/services/hyrax/workflow/action_taken_service.rb:68:17: W: [Correctable] Layout/BeginEndAlignment: end at 68, 16 is not aligned with klass = begin at 63, 8.
end
^^^
app/services/hyrax/workflow/action_taken_service.rb:69:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return klass if klass.respond_to?(:call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/action_taken_service.rb:70:121: C: Layout/LineLength: Line is too long. [123/120]
Rails.logger.error "Expected '#{class_name}' to respond to 'call', but it didn't, so not running workflow callback"
^^^
app/services/hyrax/workflow/actionable_objects.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/actionable_objects.rb:33:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return enum_for(:each) unless block_given?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/activate_object.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/changes_required_notification.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/deactivate_object.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/deposited_notification.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/grant_edit_to_depositor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/grant_edit_to_depositor.rb:8:121: C: Layout/LineLength: Line is too long. [132/120]
# @param [#read_users=, #read_users] target (likely an ActiveRecord::Base) to which we are adding edit_users for the depositor
^^^^^^^^^^^^
app/services/hyrax/workflow/grant_read_to_depositor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/invalid_state_removal_exception.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/invalid_state_removal_exception.rb:5:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :states
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/method_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/notification_configuration_parameter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/notification_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/notification_generator.rb:15:121: C: Layout/LineLength: Line is too long. [135/120]
# @param workflow [Sipity::Workflow] The containing workflow for this notification; Without the workflow the scope is meaningless
^^^^^^^^^^^^^^^
app/services/hyrax/workflow/notification_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/notification_service.rb:42:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless notifier
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/notification_service.rb:62:17: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 62, 16 is not aligned with klass = begin at 60, 8.
rescue NameError
^^^^^^
app/services/hyrax/workflow/notification_service.rb:65:17: W: [Correctable] Layout/BeginEndAlignment: end at 65, 16 is not aligned with klass = begin at 60, 8.
end
^^^
app/services/hyrax/workflow/notification_service.rb:66:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return klass if klass.respond_to?(:send_notification)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/notification_service.rb:67:121: C: Layout/LineLength: Line is too long. [131/120]
Rails.logger.error "Expected '#{class_name}' to respond to 'send_notification', but it didn't, so not sending notification"
^^^^^^^^^^^
app/services/hyrax/workflow/pending_review_notification.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/permission_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'active_support/core_ext/array/wrap'
^
app/services/hyrax/workflow/permission_generator.rb:31:121: C: Layout/LineLength: Line is too long. [124/120]
# @todo Extract public class level methods that expose each of the primary purposes (instead of relying on parameters)
^^^^
app/services/hyrax/workflow/permission_generator.rb:42:121: C: Layout/LineLength: Line is too long. [168/120]
# - will grant the given +:agents+ the given +:roles+ for the given +:entity+ (e.g. Sipity::EntitySpecificResponsibility)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:44:121: C: Layout/LineLength: Line is too long. [164/120]
# - will grant the given +:agents+ the given +:roles+ for the given +:workflow+ (e.g. Sipity::WorkflowResponsibility)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:45:121: C: Layout/LineLength: Line is too long. [142/120]
# @option keywords [Array<String>] action_names - it will wire-up the workflow, allowing the given +:roles+ to take the given +:actions+
^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:47:121: C: Layout/LineLength: Line is too long. [127/120]
# @todo Extract public class level methods that expose each of the options (and don't rely on an external parameter list)
^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:100:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if workflow_state.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:109:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if entity
^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:112:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
agents.each { |agent| Sipity::WorkflowResponsibility.find_or_create_by!(workflow_role: workflow_role, agent: agent) }
^^^^^
app/services/hyrax/workflow/permission_generator.rb:116:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless entity
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_generator.rb:120:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
Sipity::EntitySpecificResponsibility.find_or_create_by!(workflow_role: workflow_role, entity: entity, agent: agent)
^^^^^
app/services/hyrax/workflow/permission_query.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/permission_query.rb:72:42: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/MethodLength.
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_query.rb:136:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Sipity::Role.none unless entity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_query.rb:171:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Sipity::Agent.none unless user.persisted?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/permission_query.rb:277:67: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
type = ActiveRecord::Base.connection.adapter_name.casecmp("mysql2").zero? ? "signed" : "integer"
^^^^^^^^
app/services/hyrax/workflow/permission_query.rb:277:85: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
type = ActiveRecord::Base.connection.adapter_name.casecmp("mysql2").zero? ? "signed" : "integer"
^^^^^^^^
app/services/hyrax/workflow/permission_query.rb:277:96: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
type = ActiveRecord::Base.connection.adapter_name.casecmp("mysql2").zero? ? "signed" : "integer"
^^^^^^^^^
app/services/hyrax/workflow/permission_query.rb:278:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
cast = Arel::Nodes::NamedFunction.new "CAST", [agent_table[:proxy_for_id].as(type)]
^^^^^^
app/services/hyrax/workflow/revoke_edit_from_depositor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/sipity_actions_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/sipity_actions_generator.rb:68:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if new_state_names.include?(state.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/sipity_actions_generator.rb:70:52: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
states_that_cannot_be_destroyed << state if state.entities.count.positive? # Choosing count so we pre-warm the query
^^
app/services/hyrax/workflow/sipity_actions_generator.rb:70:121: C: Layout/LineLength: Line is too long. [126/120]
states_that_cannot_be_destroyed << state if state.entities.count.positive? # Choosing count so we pre-warm the query
^^^^^^
app/services/hyrax/workflow/sipity_actions_generator.rb:73:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
exception_message = "Cannot delete one or more states because they have one or more entities associated with them."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/sipity_actions_generator.rb:73:121: C: Layout/LineLength: Line is too long. [125/120]
exception_message = "Cannot delete one or more states because they have one or more entities associated with them."
^^^^^
app/services/hyrax/workflow/state_machine_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/state_machine_generator.rb:14:121: C: Layout/LineLength: Line is too long. [121/120]
def initialize(workflow:, action_name:, config:, email_generator_method_name: :schema_based_email_generator_method)
^
app/services/hyrax/workflow/state_machine_generator.rb:45:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless config.key?(:attributes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/state_machine_generator.rb:47:121: C: Layout/LineLength: Line is too long. [128/120]
action_attributes.delete('presentation_sequence') # TODO: remove this line when we want to support presentation_sequence
^^^^^^^^
app/services/hyrax/workflow/state_machine_generator.rb:49:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if action_attributes == existing_action_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/state_machine_generator.rb:54:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless config.key?(:transition_to)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/state_machine_generator.rb:57:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if action.resulting_workflow_state == transition_to_state
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/state_machine_generator.rb:84:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless config.key?(:methods)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/status_list_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/status_list_service.rb:18:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
.warn("Use the Hyrax::Workflow::ActionableObjects enumerator instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/status_list_service.rb:24:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "A current user MUST be provided."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/status_list_service.rb:38:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :context
^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/status_list_service.rb:47:9: C: [Correctable] Style/ExplicitBlockArgument: Consider using explicit block argument in the surrounding method's signature over yield.
solr_documents.each do |doc| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/status_list_service.rb:71:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [] if actionable_roles.empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/status_list_service.rb:92:121: C: [Correctable] Layout/LineLength: Line is too long. [127/120]
Hyrax::Workflow::PermissionQuery.scope_processing_workflow_roles_for_user_and_workflow(user: @user, workflow: workflow)
^^^^^^^
app/services/hyrax/workflow/workflow_action_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/workflow_action_service.rb:29:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if action.resulting_workflow_state_id.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_action_service.rb:34:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Sipity::NullComment.new(entity: subject.entity, agent: subject.agent) if ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_factory.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/workflow_importer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/workflow_importer.rb:30:121: C: Layout/LineLength: Line is too long. [125/120]
# @param [#info, #debug, #warning, #fatal] logger - By default this is Hyrax::Workflow::WorkflowImporter.default_logger
^^^^^
app/services/hyrax/workflow/workflow_importer.rb:33:121: C: Layout/LineLength: Line is too long. [139/120]
# @note I'd like to deprecate .load_workflows but for now that is beyond the scope of what I'm after. So I will use its magic instead
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:37:121: C: Layout/LineLength: Line is too long. [165/120]
logger.info("Unable to load workflows for #{permission_template.class} ID=#{permission_template.id}. No workflows were found in #{path_to_workflow_files}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:50:121: C: Layout/LineLength: Line is too long. [127/120]
# @param [#each] permission_templates - An enumerator of permission templates (by default Hyrax::PermissionTemplate.all)
^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:62:121: C: Layout/LineLength: Line is too long. [127/120]
# Responsible for generating the work type and corresponding processing entries based on given pathname or JSON document.
^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:65:121: C: Layout/LineLength: Line is too long. [139/120]
# @param [Hyrax::PermissionTemplate] permission_template - the permission_template that will be associated with each of these entries
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:75:121: C: Layout/LineLength: Line is too long. [127/120]
# Responsible for generating the work type and corresponding processing entries based on given pathname or JSON document.
^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:77:121: C: Layout/LineLength: Line is too long. [123/120]
# @param [#deep_symbolize_keys] data - the configuration information from which we will generate all the data entries
^^^
app/services/hyrax/workflow/workflow_importer.rb:78:121: C: Layout/LineLength: Line is too long. [139/120]
# @param [Hyrax::PermissionTemplate] permission_template - the permission_template that will be associated with each of these entries
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:88:121: C: Layout/LineLength: Line is too long. [123/120]
# @param [#deep_symbolize_keys] data - the configuration information from which we will generate all the data entries
^^^
app/services/hyrax/workflow/workflow_importer.rb:89:121: C: Layout/LineLength: Line is too long. [139/120]
# @param [Hyrax::PermissionTemplate] permission_template - the permission_template that will be associated with each of these entries
^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:93:121: C: Layout/LineLength: Line is too long. [127/120]
def initialize(data:, permission_template:, schema: default_schema, validator: default_validator, logger: default_logger)
^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:131:11: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/services/hyrax/workflow/workflow_importer.rb:135:121: C: [Correctable] Layout/LineLength: Line is too long. [159/120]
error = I18n.t('hyrax.workflow.load.state_error', workflow_name: state.workflow.name, state_name: state.name, entity_count: state.entities.count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:147:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
workflow = Sipity::Workflow.find_or_initialize_by(name: configuration.fetch(:name), permission_template: permission_template)
^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:157:121: C: Layout/LineLength: Line is too long. [128/120]
logger.info(%(Loaded Sipity::Workflow "#{workflow.name}" for #{permission_template.class} ID=#{permission_template.id}))
^^^^^^^^
app/services/hyrax/workflow/workflow_importer.rb:173:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if result.success?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/workflow/workflow_permissions_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/workflow_schema.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/workflow/workflow_schema.rb:7:121: C: Layout/LineLength: Line is too long. [128/120]
# The `workflows actions` defines the actions that can be taken in the given states (e.g. :from_states) by the given :roles.
^^^^^^^^
app/services/hyrax/workflow/workflow_schema.rb:23:11: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/services/hyrax/workflow/workflow_schema.rb:25:31: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue NameError => _err
^^^^
app/services/hyrax/working_directory.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/working_directory.rb:13:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return filepath if filepath && File.exist?(filepath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/working_directory.rb:17:121: C: Layout/LineLength: Line is too long. [122/120]
Rails.logger.debug "#{repository_file.original_name} already exists in the working directory at #{working_path}"
^^
app/services/hyrax/works/managed_works_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/works/managed_works_service.rb:9:121: C: Layout/LineLength: Line is too long. [137/120]
# @param scope [Object] Typically a controller object that responds to `repository`, `can?`, `blacklight_config`, `current_ability`
^^^^^^^^^^^^^^^^^
app/services/hyrax/works/managed_works_service.rb:15:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
response.response["numFound"]
^^^^^^^^^^
app/services/hyrax/works/migration_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/services/hyrax/works/migration_service.rb:15:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless work.ldp_source.content.include?(predicate_from.to_s)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/hyrax/works/migration_service.rb:27:58: C: Rails/SkipsModelValidations: Avoid using insert because it skips validations.
orm.value(predicate_from).each { |val| orm.graph.insert([orm.resource.subject_uri, predicate_to, val.to_s]) }
^^^^^^
app/strategies/hyrax/strategies/yaml_strategy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax::Strategies
^
app/strategies/hyrax/strategies/yaml_strategy.rb:6:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Features configured by a YAML configuration file."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/strategies/hyrax/strategies/yaml_strategy.rb:21:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless key_exists?(feature)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/strategies/hyrax/strategies/yaml_strategy.rb:22:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
yaml_file[feature.to_s]["enabled"]
^^^^^^^^^
app/strategies/hyrax/strategies/yaml_strategy.rb:32:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
yaml_file[feature.to_s]&.key?("enabled")
^^^^^^^^^
app/strategies/hyrax/strategies/yaml_strategy.rb:37:9: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
app/uploaders/hyrax/avatar_uploader.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Hyrax::AvatarUploader < CarrierWave::Uploader::Base
^
app/uploaders/hyrax/uploaded_file_uploader.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/validators/hyrax/has_one_title_validator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/validators/hyrax/has_one_title_validator.rb:6:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless record.title.reject(&:empty?).empty?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/hyrax/has_one_title_validator.rb:7:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
record.errors[:title] << "You must provide a title"
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/values/hyrax/chart_data.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
app/values/hyrax/chart_data.rb:4:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :data
^^^^^^^^^^^^^^^^^
app/values/hyrax/chart_data.rb:36:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return nil unless @value.is_a?(Hash)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/views/hyrax/admin/admin_sets/index.json.jbuilder:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
json.admin_sets @admin_sets do |admin_set|
^
app/views/hyrax/base/show.json.jbuilder:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
@curation_concern = Wings::ActiveFedoraConverter.convert(resource: @curation_concern) if
^
app/views/hyrax/file_sets/show.json.jbuilder:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
json.extract! @presenter, :id, :title, :label, :creator, :date_uploaded,
^
app/views/hyrax/uploads/create.json.jbuilder:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
json.files [@upload] do |uploaded_file|
^
app/views/hyrax/users/index.json.jbuilder:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
json.users @users do |user|
^
config/features.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Flipflop.configure do
^
config/features.rb:3:3: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
config/features.rb:12:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Depositors may designate proxies to deposit works on their behalf"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:16:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Depositors may transfer their works to another user"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:22:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Ability to assign uploaded items to an admin set"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:26:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Show a deposit agreement to users creating works"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:30:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Require an active acceptance of the deposit agreement by checking a checkbox"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:34:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Enable uploading batches of works"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:38:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Do not show the private items."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:42:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Do not show users list unless user has authenticated."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:46:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Use Rails.cache to cache the JSON document for IIIF manifests"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:49:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
description: "Put the system into read-only mode. Deposits, edits, approvals and anything that makes a change to the data will be disabled."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:49:121: C: Layout/LineLength: Line is too long. [152/120]
description: "Put the system into read-only mode. Deposits, edits, approvals and anything that makes a change to the data will be disabled."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/features.rb:50:61: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Flipflop::StrategyError, Flipflop::FeatureError => err
^^^
config/initializers/1_healthz.rb:27:21: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue NameError => err
^^^
config/initializers/nesting_indexer_initializer.rb:12:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.solr_field_name_for_storing_parent_ids = "nesting_collection__parent_ids_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/nesting_indexer_initializer.rb:13:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.solr_field_name_for_storing_ancestors = "nesting_collection__ancestors_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/nesting_indexer_initializer.rb:14:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.solr_field_name_for_storing_pathnames = "nesting_collection__pathnames_ssim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/simple_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'simple_form'
^
config/routes.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Hyrax::Engine.routes.draw do
^
config/routes.rb:11:58: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
get '/files/:id', to: redirect('/concern/generic_works/%{id}')
^^^^^
config/routes.rb:138:121: C: [Correctable] Layout/LineLength: Line is too long. [146/120]
post 'collections/:child_id/within', controller: 'nest_collections', action: 'create_relationship_within', as: 'create_nest_collection_within'
^^^^^^^^^^^^^^^^^^^^^^^^^^
config/routes.rb:139:121: C: [Correctable] Layout/LineLength: Line is too long. [139/120]
get 'collections/:parent_id/under', controller: 'nest_collections', action: 'create_collection_under', as: 'create_subcollection_under'
^^^^^^^^^^^^^^^^^^^
config/routes.rb:140:121: C: [Correctable] Layout/LineLength: Line is too long. [144/120]
post 'collections/:parent_id/under', controller: 'nest_collections', action: 'create_relationship_under', as: 'create_nest_collection_under'
^^^^^^^^^^^^^^^^^^^^^^^^
config/routes.rb:141:121: C: [Correctable] Layout/LineLength: Line is too long. [166/120]
post 'collections/:child_id/remove_parent/:parent_id', controller: 'nest_collections', action: 'remove_relationship_above', as: 'remove_parent_relationship_above'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/routes.rb:142:121: C: [Correctable] Layout/LineLength: Line is too long. [164/120]
post 'collections/:parent_id/remove_child/:child_id', controller: 'nest_collections', action: 'remove_relationship_under', as: 'remove_child_relationship_under'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/routes.rb:167:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
get '/permission_template/new' => 'admin/permission_templates#new', as: :new_dashboard_collection_permission_template
^^^
config/routes.rb:168:121: C: [Correctable] Layout/LineLength: Line is too long. [141/120]
get '/:collection_id/permission_template/edit' => 'admin/permission_templates#edit', as: :edit_dashboard_collection_permission_template
^^^^^^^^^^^^^^^^^^^^^
config/routes.rb:169:121: C: [Correctable] Layout/LineLength: Line is too long. [131/120]
get '/:collection_id/permission_template' => 'admin/permission_templates#show', as: :dashboard_collection_permission_template
^^^^^^^^^^^
config/routes.rb:183:121: C: [Correctable] Layout/LineLength: Line is too long. [124/120]
post 'single_use_link/generate_download/:id' => 'single_use_links#create_download', as: :generate_download_single_use_link
^^^^
hyrax.gemspec:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
lib = File.expand_path('../lib', __FILE__)
^
hyrax.gemspec:2:12: C: [Correctable] Style/ExpandPathArguments: Use expand_path('lib', __dir__) instead of expand_path('../lib', __FILE__).
lib = File.expand_path('../lib', __FILE__)
^^^^^^^^^^^
hyrax.gemspec:7:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.authors = ["Justin Coyne", 'Michael J. Giarlo', "Carolyn Cole", "Matt Zumwalt", 'Jeremy Friesen', 'Trey Pendragon', 'Esmé Cowles']
^^^^^^^^^^^^^^
hyrax.gemspec:7:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.authors = ["Justin Coyne", 'Michael J. Giarlo', "Carolyn Cole", "Matt Zumwalt", 'Jeremy Friesen', 'Trey Pendragon', 'Esmé Cowles']
^^^^^^^^^^^^^^
hyrax.gemspec:7:78: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.authors = ["Justin Coyne", 'Michael J. Giarlo', "Carolyn Cole", "Matt Zumwalt", 'Jeremy Friesen', 'Trey Pendragon', 'Esmé Cowles']
^^^^^^^^^^^^^^
hyrax.gemspec:7:121: C: [Correctable] Layout/LineLength: Line is too long. [143/120]
spec.authors = ["Justin Coyne", 'Michael J. Giarlo', "Carolyn Cole", "Matt Zumwalt", 'Jeremy Friesen', 'Trey Pendragon', 'Esmé Cowles']
^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:8:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.email = ["jcoyne85@stanford.edu", 'mjgiarlo@stanford.edu', 'cam156@psu.edu', 'matt@databindery.com', "jeremy.n.friesen@gmail.com", 'tpendragon@princeton.edu', 'escowles@ticklefish.org']
^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:8:117: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.email = ["jcoyne85@stanford.edu", 'mjgiarlo@stanford.edu', 'cam156@psu.edu', 'matt@databindery.com', "jeremy.n.friesen@gmail.com", 'tpendragon@princeton.edu', 'escowles@ticklefish.org']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:8:121: C: [Correctable] Layout/LineLength: Line is too long. [200/120]
spec.email = ["jcoyne85@stanford.edu", 'mjgiarlo@stanford.edu', 'cam156@psu.edu', 'matt@databindery.com', "jeremy.n.friesen@gmail.com", 'tpendragon@princeton.edu', 'escowles@ticklefish.org']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:9:121: C: Layout/LineLength: Line is too long. [126/120]
spec.description = 'Hyrax is a featureful Samvera front-end based on the latest and greatest Samvera software components.'
^^^^^^
hyrax.gemspec:16:1: C: [Correctable] Layout/ClosingHeredocIndentation: SUMMARY is not aligned with spec.summary = <<-SUMMARY or beginning of method definition.
SUMMARY
^^^^^^^
hyrax.gemspec:18:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.homepage = "http://github.com/samvera/hyrax"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:20:24: C: [Correctable] Style/InverseMethods: Use reject instead of inverting select.
spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR).select { |f| File.dirname(f) !~ %r{\A"?spec\/?} }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:20:114: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR).select { |f| File.dirname(f) !~ %r{\A"?spec\/?} }
^^
hyrax.gemspec:22:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.name = "hyrax"
^^^^^^^
hyrax.gemspec:23:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.require_paths = ["lib"]
^^^^^
hyrax.gemspec:29:5: C: [Correctable] Style/CommentAnnotation: Annotation keywords like Note should be all upper case, followed by a colon, and a space, then a note describing the problem.
# Note: rails does not follow sem-ver conventions, it's
^^^^^^
hyrax.gemspec:45:3: C: [Correctable] Gemspec/OrderedDependencies: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency dry-equalizer should appear before dry-events.
spec.add_dependency 'dry-equalizer', '~> 0.2'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:54:49: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_dependency 'hydra-editor', '~> 5.0', ">= 5.0.4"
^^^^^^^^^^
hyrax.gemspec:56:48: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_dependency 'hydra-head', '~> 11.0', ">= 11.0.1"
^^^^^^^^^^^
hyrax.gemspec:88:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency "capybara", '~> 3.29'
^^^^^^^^^^
hyrax.gemspec:92:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency "equivalent-xml", '~> 0.5'
^^^^^^^^^^^^^^^^
hyrax.gemspec:93:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency "factory_bot", '~> 4.4'
^^^^^^^^^^^^^
hyrax.gemspec:95:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency "jasmine", '~> 2.3', '< 2.99'
^^^^^^^^^
hyrax.gemspec:96:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency "jasmine-core", '~> 2.3', '< 2.99'
^^^^^^^^^^^^^^
hyrax.gemspec:103:3: C: [Correctable] Gemspec/OrderedDependencies: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency rspec_junit_formatter should appear before rspec-rails.
spec.add_development_dependency 'rspec_junit_formatter'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:104:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency "selenium-webdriver"
^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:105:3: C: [Correctable] Gemspec/OrderedDependencies: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency i18n-debug should appear before selenium-webdriver.
spec.add_development_dependency 'i18n-debug'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hyrax.gemspec:109:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec.add_development_dependency 'bixby', '~> 3.0', ">= 3.0.2"
^^^^^^^^^^
lib/generators/hyrax/arkivo_api_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Hyrax::ArkivoApiGenerator < Rails::Generators::Base
^
lib/generators/hyrax/arkivo_api_generator.rb:3:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/arkivo_api_generator.rb:5:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc """
^^
lib/generators/hyrax/arkivo_api_generator.rb:7:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"""
^^
lib/generators/hyrax/arkivo_api_generator.rb:10:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
say_status("info", "ADDING ZOTERO/ARKIVO API INTEGRATION", :blue)
^^^^^^
lib/generators/hyrax/arkivo_api_generator.rb:10:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
say_status("info", "ADDING ZOTERO/ARKIVO API INTEGRATION", :blue)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/assets_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/assets_generator.rb:5:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc """
^^
lib/generators/hyrax/assets_generator.rb:7:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"""
^^
lib/generators/hyrax/assets_generator.rb:9:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/assets_generator.rb:12:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
remove_file "app/assets/stylesheets/blacklight.scss"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/assets_generator.rb:16:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "hyrax.scss", "app/assets/stylesheets/hyrax.scss"
^^^^^^^^^^^^
lib/generators/hyrax/assets_generator.rb:16:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "hyrax.scss", "app/assets/stylesheets/hyrax.scss"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/assets_generator.rb:20:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if hyrax_javascript_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/assets_generator.rb:36:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
IO.read("app/assets/javascripts/application.js").include?('hyrax')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/clamav_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/clamav_generator.rb:5:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/collection_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/collection_generator.rb:6:22: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/config_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/config_generator.rb:5:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc """
^^
lib/generators/hyrax/config_generator.rb:16:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"""
^^
lib/generators/hyrax/config_generator.rb:18:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/config_generator.rb:21:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "config/authorities/licenses.yml"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/config_generator.rb:22:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "config/authorities/rights_statements.yml"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/config_generator.rb:23:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "config/authorities/resource_types.yml"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/health_check_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/health_check_generator.rb:5:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc """
^^
lib/generators/hyrax/health_check_generator.rb:7:4: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"""
^^
lib/generators/hyrax/health_check_generator.rb:9:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/generators/hyrax/install_generator.rb:4:22: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:6:51: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
argument :model_name, type: :string, default: "user", desc: "Model name for User model (primarily passed to devise, but also used elsewhere)"
^^^^^^
lib/generators/hyrax/install_generator.rb:6:65: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
argument :model_name, type: :string, default: "user", desc: "Model name for User model (primarily passed to devise, but also used elsewhere)"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:6:121: C: [Correctable] Layout/LineLength: Line is too long. [145/120]
argument :model_name, type: :string, default: "user", desc: "Model name for User model (primarily passed to devise, but also used elsewhere)"
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:8:71: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
class_option :'skip-riiif', type: :boolean, default: false, desc: "Skip generating RIIIF image service."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:10:77: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
class_option :'skip-health-check', type: :boolean, default: true, desc: "Generate the default health check endpoints."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:10:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
class_option :'skip-health-check', type: :boolean, default: true, desc: "Generate the default health check endpoints."
^^
lib/generators/hyrax/install_generator.rb:12:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc """
^^
lib/generators/hyrax/install_generator.rb:36:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"""
^^
lib/generators/hyrax/install_generator.rb:73:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:73:42: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:85:121: C: Layout/LineLength: Line is too long. [175/120]
puts " \e[31mFailure\e[0m Hyrax requires a SolrDocument object. This generators assumes that the model is defined in the file #{file_path}, which does not exist."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:90:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
template('workflow.json.erb', "config/workflows/default_workflow.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:91:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
template('mediated_deposit_workflow.json.erb', "config/workflows/mediated_deposit_workflow.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:95:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generate "hyrax:config"
^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:99:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generate "mailboxer:install"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:116:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
file_path = "app/controllers/application_controller.rb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:123:121: C: Layout/LineLength: Line is too long. [195/120]
puts " \e[31mFailure\e[0m Could not find #{file_path}. To add Hyrax behaviors to your Controllers, you must include the Hyrax::Controller module in the Controller class definition."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:136:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generate "hyrax:assets"
^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:146:16: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generate "blacklight_gallery:install"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/install_generator.rb:193:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
insert_into_file "app/controllers/application_controller.rb", after: "include Blacklight::Controller\n" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/models_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class Hyrax::ModelsGenerator < Rails::Generators::Base
^
lib/generators/hyrax/models_generator.rb:3:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/models_generator.rb:24:56: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
inject_into_file file_path, after: /include Hydra\:\:User.*$/ do
^^
lib/generators/hyrax/models_generator.rb:24:58: C: [Correctable] Style/RedundantRegexpEscape: Redundant escape inside regexp literal
inject_into_file file_path, after: /include Hydra\:\:User.*$/ do
^^
lib/generators/hyrax/models_generator.rb:31:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"generator assumes that the model is defined in the file " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/models_generator.rb:33:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"name, please re-run the generator and provide that name as an " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/models_generator.rb:37:20: W: [Correctable] Lint/RedundantCopEnableDirective: Unnecessary enabling of Metrics/MethodLength.
# rubocop:enable Metrics/MethodLength
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/riiif_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/riiif_generator.rb:5:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/riiif_generator.rb:23:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
run "bundle install"
^^^^^^^^^^^^^^^^
lib/generators/hyrax/sample_data_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/sample_data_generator.rb:6:22: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/templates/app/models/collection.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Generated by hyrax:models
^
lib/generators/hyrax/templates/app/models/file_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Generated by hyrax:models:install
^
lib/generators/hyrax/templates/catalog_controller.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
class CatalogController < ApplicationController
^
lib/generators/hyrax/templates/catalog_controller.rb:12:5: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"system_create_dtsi"
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:16:5: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"system_modified_dtsi"
^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:32:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
qt: "search",
^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:34:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
qf: "title_tesim description_tesim creator_tesim keyword_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:38:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.index.title_field = "title_tesim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:39:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.index.display_type_field = "has_model_ssim"
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:44:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "human_readable_type_sim", label: "Type", limit: 5
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:44:62: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "human_readable_type_sim", label: "Type", limit: 5
^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:45:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "resource_type_sim", label: "Resource Type", limit: 5
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:45:56: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "resource_type_sim", label: "Resource Type", limit: 5
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:46:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "creator_sim", limit: 5
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:47:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "contributor_sim", label: "Contributor", limit: 5
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:47:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "contributor_sim", label: "Contributor", limit: 5
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:48:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "keyword_sim", limit: 5
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:49:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "subject_sim", limit: 5
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:50:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "language_sim", limit: 5
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:51:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "based_near_label_sim", limit: 5
^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:52:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "publisher_sim", limit: 5
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:53:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "file_format_sim", limit: 5
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:54:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "member_of_collection_ids_ssim", limit: 5, label: 'Collections', helper_method: :collection_title_by_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:54:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
config.add_facet_field "member_of_collection_ids_ssim", limit: 5, label: 'Collections', helper_method: :collection_title_by_id
^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:58:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "generic_type_sim", if: false
^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:59:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "depositor_ssim", label: "Depositor", if: false
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:59:53: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_facet_field "depositor_ssim", label: "Depositor", if: false
^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:68:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "title_tesim", label: "Title", itemprop: 'name', if: false
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:68:50: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "title_tesim", label: "Title", itemprop: 'name', if: false
^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:69:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "description_tesim", itemprop: 'description', helper_method: :iconify_auto_link
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:70:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "keyword_tesim", itemprop: 'keywords', link_to_search: "keyword_sim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:70:83: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "keyword_tesim", itemprop: 'keywords', link_to_search: "keyword_sim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:71:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "subject_tesim", itemprop: 'about', link_to_search: "subject_sim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:71:80: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "subject_tesim", itemprop: 'about', link_to_search: "subject_sim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:72:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "creator_tesim", itemprop: 'creator', link_to_search: "creator_sim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:72:82: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "creator_tesim", itemprop: 'creator', link_to_search: "creator_sim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:73:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "contributor_tesim", itemprop: 'contributor', link_to_search: "contributor_sim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:73:90: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "contributor_tesim", itemprop: 'contributor', link_to_search: "contributor_sim"
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:74:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "proxy_depositor_ssim", label: "Depositor", helper_method: :link_to_profile
^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:74:59: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "proxy_depositor_ssim", label: "Depositor", helper_method: :link_to_profile
^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:75:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "depositor_tesim", label: "Owner", helper_method: :link_to_profile
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:75:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "depositor_tesim", label: "Owner", helper_method: :link_to_profile
^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:76:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "publisher_tesim", itemprop: 'publisher', link_to_search: "publisher_sim"
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:76:86: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "publisher_tesim", itemprop: 'publisher', link_to_search: "publisher_sim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:77:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "based_near_label_tesim", itemprop: 'contentLocation', link_to_search: "based_near_label_sim"
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:77:99: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "based_near_label_tesim", itemprop: 'contentLocation', link_to_search: "based_near_label_sim"
^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:78:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "language_tesim", itemprop: 'inLanguage', link_to_search: "language_sim"
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:78:86: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "language_tesim", itemprop: 'inLanguage', link_to_search: "language_sim"
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:79:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "date_uploaded_dtsi", itemprop: 'datePublished', helper_method: :human_readable_date
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:80:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "date_modified_dtsi", itemprop: 'dateModified', helper_method: :human_readable_date
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:81:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "date_created_tesim", itemprop: 'dateCreated'
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:82:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "rights_statement_tesim", helper_method: :rights_statement_links
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:83:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "license_tesim", helper_method: :license_links
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:84:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "resource_type_tesim", label: "Resource Type", link_to_search: "resource_type_sim"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:84:58: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "resource_type_tesim", label: "Resource Type", link_to_search: "resource_type_sim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:84:91: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "resource_type_tesim", label: "Resource Type", link_to_search: "resource_type_sim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:85:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "file_format_tesim", link_to_search: "file_format_sim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:85:65: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "file_format_tesim", link_to_search: "file_format_sim"
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:86:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field "identifier_tesim", helper_method: :index_field_link, field_name: 'identifier'
^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:87:82: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field Hydra.config.permissions.embargo.release_date, label: "Embargo release date", helper_method: :human_readable_date
^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:87:121: C: [Correctable] Layout/LineLength: Line is too long. [140/120]
config.add_index_field Hydra.config.permissions.embargo.release_date, label: "Embargo release date", helper_method: :human_readable_date
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:88:83: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_index_field Hydra.config.permissions.lease.expiration_date, label: "Lease expiration date", helper_method: :human_readable_date
^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:88:121: C: [Correctable] Layout/LineLength: Line is too long. [142/120]
config.add_index_field Hydra.config.permissions.lease.expiration_date, label: "Lease expiration date", helper_method: :human_readable_date
^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:92:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "title_tesim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:93:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "description_tesim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:94:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "keyword_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:95:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "subject_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:96:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "creator_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:97:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "contributor_tesim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:98:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "publisher_tesim"
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:99:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "based_near_label_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:100:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "language_tesim"
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:101:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "date_uploaded_tesim"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:102:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "date_modified_tesim"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:103:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "date_created_tesim"
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:104:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "rights_statement_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:105:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "license_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:106:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "resource_type_tesim", label: "Resource Type"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:106:57: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "resource_type_tesim", label: "Resource Type"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:107:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "format_tesim"
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:108:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_show_field "identifier_tesim"
^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:128:63: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
all_names = config.show_fields.values.map(&:field).join(" ")
^^^
lib/generators/hyrax/templates/catalog_controller.rb:129:20: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title_name = "title_tesim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:148:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "contributor_tesim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:156:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "creator_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:164:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "title_tesim"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:172:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field.label = "Description"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:173:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "description_tesim"
^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:181:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "publisher_tesim"
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:189:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "created_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:197:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "subject_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:205:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "language_tesim"
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:213:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "resource_type_tesim"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:221:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "format_tesim"
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:229:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "id_tesim"
^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:237:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
field.label = "Location"
^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:238:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "based_near_label_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:246:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "keyword_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:254:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "depositor_ssim"
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:262:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "rights_statement_tesim"
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:270:19: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
solr_name = "license_tesim"
^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/catalog_controller.rb:282:72: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.add_sort_field "score desc, #{uploaded_field} desc", label: "relevance"
^^^^^^^^^^^
lib/generators/hyrax/templates/config/action_dispatch_http_upload_monkey_patch.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module ActionDispatch
^
lib/generators/hyrax/templates/config/arkivo_constraint.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/generators/hyrax/templates/config/clamav.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
ClamAV.instance.loaddb if defined? ClamAV
^
lib/generators/hyrax/templates/config/initializers/hyrax.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Hyrax.config do |config|
^
lib/generators/hyrax/templates/config/initializers/hyrax.rb:83:121: C: Layout/LineLength: Line is too long. [125/120]
# How many seconds back from the current time that we should show by default of the user's activity on the user's dashboard
^^^^^
lib/generators/hyrax/templates/config/initializers/hyrax.rb:221:121: C: Layout/LineLength: Line is too long. [131/120]
# baseparts = 2 + [(Noid::Rails::Config.template.gsub(/\.[rsz]/, '').length.to_f / 2).ceil, 4].min
^^^^^^^^^^^
lib/generators/hyrax/templates/config/initializers/hyrax.rb:225:121: C: Layout/LineLength: Line is too long. [123/120]
# "#{ActiveFedora.fedora.host}#{ActiveFedora.fedora.base_path}/#{Noid::Rails.treeify(id)}"
^^^
lib/generators/hyrax/templates/config/initializers/hyrax.rb:259:25: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.warn "BrowseEverything is not installed"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/config/initializers/hyrax.rb:291:33: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
^^^^^^^^^^
lib/generators/hyrax/templates/config/initializers/mini_magick.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'mini_magick'
^
lib/generators/hyrax/templates/config/initializers/mini_magick.rb:5:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
config.shell_api = "posix-spawn"
^^^^^^^^^^^^^
lib/generators/hyrax/templates/config/initializers/redis_config.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'redis'
^
lib/generators/hyrax/templates/config/initializers/redis_config.rb:3:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
config = YAML.safe_load(ERB.new(IO.read(Rails.root.join('config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
^^^
lib/generators/hyrax/templates/config/initializers/riiif.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
ActiveSupport::Reloader.to_prepare do
^
lib/generators/hyrax/templates/config/initializers/riiif.rb:10:20: C: [Correctable] Style/RegexpLiteral: Use %r around regular expression.
fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/config/initializers/riiif.rb:13:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise "Unable to find solr document with id:#{fs_id}" unless doc
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/config/initializers/riiif.rb:14:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
{ height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
^^^
lib/generators/hyrax/templates/config/initializers/simple_form.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# NOTE: This is a modified version of simple_form's default config file.
^
lib/generators/hyrax/templates/config/initializers/simple_form_bootstrap.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# NOTE: This is a modified version of simple_form's default config file.
^
lib/generators/hyrax/templates/config/mime_types.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^
lib/generators/hyrax/templates/db/seeds.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# This file should contain all the record creation needed to seed the database with its default values.
^
lib/generators/hyrax/templates/db/seeds.rb:26:24: C: Naming/MethodParameterName: Method parameter must be at least 3 characters long.
def create_user(email, pw)
^^
lib/generators/hyrax/templates/db/seeds.rb:28:3: C: [Correctable] Style/RedundantAssignment: Redundant assignment before returning detected.
user = User.find_or_create_by(Hydra.config.user_key_field => email) do |u| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:38:3: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return coltype if coltype.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:42:121: C: Layout/LineLength: Line is too long. [175/120]
participants: [{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.admin_group_name, access: Hyrax::CollectionTypeParticipant::MANAGE_ACCESS },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:43:121: C: [Correctable] Layout/LineLength: Line is too long. [180/120]
{ agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE, agent_id: ::Ability.registered_group_name, access: Hyrax::CollectionTypeParticipant::CREATE_ACCESS }]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:46:121: C: [Correctable] Layout/LineLength: Line is too long. [134/120]
Hyrax::CollectionTypes::CreateService.create_collection_type(machine_id: machine_id, title: options[:title], options: final_options)
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:61:3: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return col.first if col.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:89:3: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return work.first if work.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:104:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "---------------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:105:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts " Create seeded objects for QA"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:106:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "---------------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:117:121: C: [Correctable] Layout/LineLength: Line is too long. [195/120]
_discoverable_gid = create_collection_type('discoverable_collection_type', title: 'Discoverable', description: 'Sample collection type allowing collections to be discovered.', discoverable: true)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:119:121: C: [Correctable] Layout/LineLength: Line is too long. [188/120]
_sharable_gid = create_collection_type('sharable_collection_type', title: 'Sharable', description: 'Sample collection type allowing collections to be shared.', sharable: true).to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:120:121: C: [Correctable] Layout/LineLength: Line is too long. [161/120]
options = { title: 'Multi-membership', description: 'Sample collection type allowing works to belong to multiple collections.', allow_multiple_membership: true }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:122:121: C: [Correctable] Layout/LineLength: Line is too long. [179/120]
_nestable_1_gid = create_collection_type('nestable_1_collection_type', title: 'Nestable 1', description: 'A sample collection type allowing nesting.', nestable: true).to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:123:121: C: [Correctable] Layout/LineLength: Line is too long. [185/120]
_nestable_2_gid = create_collection_type('nestable_2_collection_type', title: 'Nestable 2', description: 'Another sample collection type allowing nesting.', nestable: true).to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:124:121: C: [Correctable] Layout/LineLength: Line is too long. [176/120]
_empty_gid = create_collection_type('empty_collection_type', title: 'Test Empty Collection Type', description: 'A collection type with 0 collections of this type').to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:125:121: C: [Correctable] Layout/LineLength: Line is too long. [186/120]
inuse_gid = create_collection_type('inuse_collection_type', title: 'Test In-Use Collection Type', description: 'A collection type with at least one collection of this type').to_global_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:128:121: C: [Correctable] Layout/LineLength: Line is too long. [192/120]
inuse_col = create_public_collection(genuser, inuse_gid, 'inuse_col1', title: ['Public Collection of type In-Use'], description: ['Public collection of the type Test In-Use Collection Type.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:145:1: W: [Correctable] Lint/UselessTimes: Useless call to 1.times detected.
1.times do |i| ...
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:153:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "-------------------------------------------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:154:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts " Create seeded objects for collection nesting ad hoc testing"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:155:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "-------------------------------------------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:164:121: C: Layout/LineLength: Line is too long. [128/120]
options = { title: 'Non-Nestable Collection', description: 'Sample collection type that DOES NOT allow nesting of collections.',
^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:169:121: C: [Correctable] Layout/LineLength: Line is too long. [178/120]
pnc = create_public_collection(user, nestable_gid, 'public_nestable', title: ['Public Nestable Collection'], description: ['Public nestable collection for use in ad hoc tests.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:170:121: C: [Correctable] Layout/LineLength: Line is too long. [179/120]
pc = create_public_collection(user, nestable_gid, 'parent_nested', title: ['A Parent Collection'], description: ['Public collection that will be a parent of another collection.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:171:121: C: [Correctable] Layout/LineLength: Line is too long. [176/120]
cc = create_public_collection(user, nestable_gid, 'child_nested', title: ['A Child Collection'], description: ['Public collection that will be a child of another collection.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:183:121: C: [Correctable] Layout/LineLength: Line is too long. [187/120]
mcc = create_public_collection(user, nestable_gid, "child_nested_#{i}", title: ["Child Collection #{i}"], description: ['Public collection that will be a child of another collection.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:202:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
col_two_parents = create_public_collection(user, nestable_gid, "col_two_parents", title: ["Collection - 2 parents"], description: ['Collection that has two parents.'])
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:202:91: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
col_two_parents = create_public_collection(user, nestable_gid, "col_two_parents", title: ["Collection - 2 parents"], description: ['Collection that has two parents.'])
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:202:121: C: [Correctable] Layout/LineLength: Line is too long. [167/120]
col_two_parents = create_public_collection(user, nestable_gid, "col_two_parents", title: ["Collection - 2 parents"], description: ['Collection that has two parents.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:203:121: C: [Correctable] Layout/LineLength: Line is too long. [148/120]
2.times { |i| Hyrax::Collections::NestedCollectionPersistenceService.persist_nested_collection_for(parent: parent_pool[i], child: col_two_parents) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:205:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
col_six_parents = create_public_collection(user, nestable_gid, "col_six_parents", title: ["Collection - 6 parents"], description: ['Collection that has six parents.'])
^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:205:91: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
col_six_parents = create_public_collection(user, nestable_gid, "col_six_parents", title: ["Collection - 6 parents"], description: ['Collection that has six parents.'])
^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:205:121: C: [Correctable] Layout/LineLength: Line is too long. [167/120]
col_six_parents = create_public_collection(user, nestable_gid, "col_six_parents", title: ["Collection - 6 parents"], description: ['Collection that has six parents.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:206:121: C: [Correctable] Layout/LineLength: Line is too long. [148/120]
6.times { |i| Hyrax::Collections::NestedCollectionPersistenceService.persist_nested_collection_for(parent: parent_pool[i], child: col_six_parents) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:208:67: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
col_twelve_parents = create_public_collection(user, nestable_gid, "col_twelve_parents", title: ["Collection - 12 parents"], description: ['Collection that has twelve parents.'])
^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:208:97: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
col_twelve_parents = create_public_collection(user, nestable_gid, "col_twelve_parents", title: ["Collection - 12 parents"], description: ['Collection that has twelve parents.'])
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:208:121: C: [Correctable] Layout/LineLength: Line is too long. [177/120]
col_twelve_parents = create_public_collection(user, nestable_gid, "col_twelve_parents", title: ["Collection - 12 parents"], description: ['Collection that has twelve parents.'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:209:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
12.times { |i| Hyrax::Collections::NestedCollectionPersistenceService.persist_nested_collection_for(parent: parent_pool[i], child: col_twelve_parents) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:226:1: W: [Correctable] Lint/UselessTimes: Useless call to 1.times detected.
1.times do |i| ...
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:234:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "-----------------------------------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:235:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts " Create seeded objects for embargo ad hoc testing"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:236:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "-----------------------------------------------------"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:243:121: C: [Correctable] Layout/LineLength: Line is too long. [175/120]
work.apply_embargo(Date.tomorrow.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:251:121: C: [Correctable] Layout/LineLength: Line is too long. [181/120]
work.apply_embargo(Date.tomorrow.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:256:1: W: [Correctable] Lint/UselessTimes: Useless call to 1.times detected.
1.times do |i| ...
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:257:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
GenericWork.create(title: ["Expired Authenticated #{i}"], read_groups: [Hyrax.config.registered_user_group_name]) do |work|
^^^^^
lib/generators/hyrax/templates/db/seeds.rb:259:121: C: [Correctable] Layout/LineLength: Line is too long. [183/120]
work.apply_embargo(Date.yesterday.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:267:121: C: [Correctable] Layout/LineLength: Line is too long. [176/120]
work.apply_embargo(Date.yesterday.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:275:121: C: [Correctable] Layout/LineLength: Line is too long. [173/120]
work.apply_lease(Date.tomorrow.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:281:121: C: [Correctable] Layout/LineLength: Line is too long. [124/120]
GenericWork.create(title: ["Active Authenticated #{i}"], read_groups: [Hyrax.config.registered_user_group_name]) do |work|
^^^^
lib/generators/hyrax/templates/db/seeds.rb:283:121: C: [Correctable] Layout/LineLength: Line is too long. [180/120]
work.apply_lease(Date.tomorrow.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:288:1: W: [Correctable] Lint/UselessTimes: Useless call to 1.times detected.
1.times do |i| ...
^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:289:121: C: [Correctable] Layout/LineLength: Line is too long. [125/120]
GenericWork.create(title: ["Expired Authenticated #{i}"], read_groups: [Hyrax.config.registered_user_group_name]) do |work|
^^^^^
lib/generators/hyrax/templates/db/seeds.rb:291:121: C: [Correctable] Layout/LineLength: Line is too long. [180/120]
work.apply_lease(Date.yesterday.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/db/seeds.rb:299:121: C: [Correctable] Layout/LineLength: Line is too long. [181/120]
work.apply_lease(Date.yesterday.to_s, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/hyrax_helper.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module HyraxHelper
^
lib/generators/hyrax/templates/spec/models/collection_spec.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails_helper'
^
lib/generators/hyrax/templates/spec/models/collection_spec.rb:5:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "has tests" do
^^^^^^^^^^^
lib/generators/hyrax/templates/spec/models/collection_spec.rb:6:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
skip "Add your tests here"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/templates/spec/models/file_set_spec.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails_helper'
^
lib/generators/hyrax/templates/spec/models/file_set_spec.rb:5:6: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "has tests" do
^^^^^^^^^^^
lib/generators/hyrax/templates/spec/models/file_set_spec.rb:6:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
skip "Add your tests here"
^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/work/work_generator.rb:12:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:20:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
say_status("info", "DESTROYING WORK MODEL: #{class_name}", :blue)
^^^^^^
lib/generators/hyrax/work/work_generator.rb:22:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
say_status("info", "GENERATING WORK MODEL: #{class_name}", :blue)
^^^^^^
lib/generators/hyrax/work/work_generator.rb:83:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:88:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:89:121: C: [Correctable] Layout/LineLength: Line is too long. [130/120]
template('controller_spec.rb.erb', File.join('spec/controllers/hyrax/', class_path, "#{plural_file_name}_controller_spec.rb"))
^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:93:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:98:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:103:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:108:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work/work_generator.rb:127:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ":#{file_name}" if class_path.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rails/generators'
^
lib/generators/hyrax/work_resource/work_resource_generator.rb:12:20: C: [Correctable] Style/ExpandPathArguments: Use expand_path('templates', __dir__) instead of expand_path('../templates', __FILE__).
source_root File.expand_path('../templates', __FILE__)
^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:21:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless name.strip.casecmp("work").zero?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:21:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return unless name.strip.casecmp("work").zero?
^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:24:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Please use a different name.", :red)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:29:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
say_status("info", "DESTROYING VALKYRIE WORK MODEL: #{class_name}", :blue)
^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:31:18: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
say_status("info", "GENERATING VALKYRIE WORK MODEL: #{class_name}", :blue)
^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:41:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if attributes.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:52:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:55:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if attributes.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:89:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:102:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless rspec_installed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/generators/hyrax/work_resource/work_resource_generator.rb:114:5: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ":#{file_name}" if class_path.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'select2-rails'
^
lib/hyrax/active_fedora_dummy_model.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/arkivo.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/arkivo/config'
^
lib/hyrax/arkivo/actor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'base64'
^
lib/hyrax/arkivo/actor.rb:60:121: C: Layout/LineLength: Line is too long. [178/120]
# @return [Hash<String, Array>] a list of properties to set on the work. Keys must be strings in order for them to correctly merge with the values from arkivio (in `@item`)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:64:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"resource_type" => [],
^^^^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:65:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"title" => [],
^^^^^^^
lib/hyrax/arkivo/actor.rb:66:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"rights" => [],
^^^^^^^^
lib/hyrax/arkivo/actor.rb:67:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"keyword" => [],
^^^^^^^^^
lib/hyrax/arkivo/actor.rb:68:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"creator" => [],
^^^^^^^^^
lib/hyrax/arkivo/actor.rb:69:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"description" => [],
^^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:70:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"publisher" => [],
^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:71:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"date_created" => [],
^^^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:72:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"based_near" => [],
^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:73:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"identifier" => [],
^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:74:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"related_url" => [],
^^^^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:75:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"language" => [],
^^^^^^^^^^
lib/hyrax/arkivo/actor.rb:76:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"contributor" => []
^^^^^^^^^^^^^
lib/hyrax/arkivo/config.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/arkivo/config.rb:5:121: C: [Correctable] Layout/LineLength: Line is too long. [133/120]
@config ||= YAML.safe_load(ERB.new(IO.read(Rails.root.join('config', 'arkivo.yml'))).result).with_indifferent_access[Rails.env]
^^^^^^^^^^^^^
lib/hyrax/arkivo/create_subscription_job.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/arkivo/create_subscription_job.rb:54:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
name: "hyrax",
^^^^^^^
lib/hyrax/arkivo/metadata_munger.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/arkivo/metadata_munger.rb:4:21: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
CREATOR_TYPES = ['author', 'interviewer', 'director', 'scriptwriter', ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/arkivo/metadata_munger.rb:8:25: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
CONTRIBUTOR_TYPES = ['contributor', 'editor', 'translator', 'seriesEditor', ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/arkivo/schema_validator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'json-schema'
^
lib/hyrax/arkivo/schema_validator.rb:51:47: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of exception.
rescue JSON::Schema::ValidationError => exception
^^^^^^^^^
lib/hyrax/configuration.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/role_registry'
^
lib/hyrax/configuration.rb:108:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :analytics
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:108:17: C: Style/BisectedAttrAccessor: Combine both accessors into attr_accessor :analytics.
attr_writer :analytics
^^^^^^^^^^
lib/hyrax/configuration.rb:109:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :analytics
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:109:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_reader attributes.
attr_reader :analytics
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:109:17: C: Style/BisectedAttrAccessor: Combine both accessors into attr_accessor :analytics.
attr_reader :analytics
^^^^^^^^^^
lib/hyrax/configuration.rb:117:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :analytics_provider
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:130:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :analytics_start_date
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:137:17: C: Style/BisectedAttrAccessor: Combine both accessors into attr_accessor :analytic_start_date.
attr_writer :analytic_start_date
^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:138:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_reader attributes.
attr_reader :analytic_start_date
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:138:17: C: Style/BisectedAttrAccessor: Combine both accessors into attr_accessor :analytic_start_date.
attr_reader :analytic_start_date
^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:143:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("google_analytics_id is deprecated; use analytics_id from config/analytics.yml instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:150:24: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("google_analytics_id is deprecated; use analytics_id from config/analytics.yml instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:166:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :public_user_group_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:167:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :registered_user_group_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:193:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :enable_noids
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:193:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :enable_noids
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:195:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @enable_noids unless @enable_noids.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:199:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :noid_template
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:199:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :noid_template
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:204:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :noid_minter_class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:204:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :noid_minter_class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:209:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :minter_statefile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:209:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :minter_statefile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:217:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_image_compliance_level_uri
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:218:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_image_server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:219:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_image_size_default
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:220:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_image_url_builder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:221:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_info_url_builder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:222:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_metadata_fields
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:223:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :iiif_manifest_cache_duration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:224:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :rendering_predicate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:243:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @iiif_image_server unless @iiif_image_server.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:251:121: C: [Correctable] Layout/LineLength: Line is too long. [127/120]
@iiif_image_url_builder ||= ->(file_id, base_url, _size, _format) { "#{base_url}/downloads/#{file_id.split('/').first}" }
^^^^^^^
lib/hyrax/configuration.rb:307:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :bagit_dir
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:309:22: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@bagit_dir ||= "tmp/descriptions"
^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:313:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :derivatives_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:319:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :working_path
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:326:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :upload_path
^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:328:26: C: [Correctable] Style/EmptyLambdaParameter: Omit parentheses for the empty lambda parameters.
@upload_path ||= ->() { ENV.fetch('HYRAX_UPLOAD_PATH') { Rails.root.join('tmp', 'uploads') } }
^^
lib/hyrax/configuration.rb:331:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :cache_path
^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:331:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :cache_path
^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:333:25: C: [Correctable] Style/EmptyLambdaParameter: Omit parentheses for the empty lambda parameters.
@cache_path ||= ->() { ENV.fetch('HYRAX_CACHE_PATH') { Rails.root.join('tmp', 'cache') } }
^^
lib/hyrax/configuration.rb:337:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :branding_path
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:345:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :enable_ffmpeg
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:345:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :enable_ffmpeg
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:347:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @enable_ffmpeg unless @enable_ffmpeg.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:351:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :ffmpeg_path
^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:351:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :ffmpeg_path
^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:359:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :fits_path
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:359:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :fits_path
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:367:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :fits_message_length
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:367:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :fits_message_length
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:374:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :import_export_jar_file_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:376:40: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@import_export_jar_file_path ||= "tmp/fcrepo-import-export.jar"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:381:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :virus_scanner
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:394:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :banner_image
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:394:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :banner_image
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:403:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @disable_wings unless @disable_wings.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:406:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :disable_wings
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:408:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :display_media_download_link
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:408:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :display_media_download_link
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:411:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @display_media_download_link unless @display_media_download_link.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:447:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :query_index_from_valkyrie
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:456:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :feature_config_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:456:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :feature_config_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:461:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_accessor attributes.
attr_accessor :temp_file_base, :enable_local_ingest
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:463:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :display_microdata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:463:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :display_microdata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:465:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @display_microdata unless @display_microdata.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:469:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :microdata_default_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:469:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :microdata_default_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:474:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :fixity_service
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:474:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :fixity_service
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:479:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :max_days_between_fixity_checks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:479:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :max_days_between_fixity_checks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:492:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :characterization_service
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:501:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :lock_retry_count
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:508:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :lock_time_to_live
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:515:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :lock_retry_delay
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:522:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :ingest_queue_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:543:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :registered_ingest_dirs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:548:121: C: Layout/LineLength: Line is too long. [153/120]
# Include the Rails tmp directory for cases where the BrowseEverything provider is required to download the file to a temporary directory first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:589:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :license_service_class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:600:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :rights_statement_service_class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:605:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :persistent_hostpath
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:605:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :persistent_hostpath
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:607:32: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@persistent_hostpath ||= "http://localhost/files/"
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:610:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :redis_namespace
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:610:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :redis_namespace
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:612:28: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@redis_namespace ||= "hyrax"
^^^^^^^
lib/hyrax/configuration.rb:615:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :libreoffice_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:615:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :libreoffice_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:617:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@libreoffice_path ||= "soffice"
^^^^^^^^^
lib/hyrax/configuration.rb:620:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :browse_everything
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:620:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :browse_everything
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:625:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :citations
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:625:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :citations
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:630:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :max_notifications_for_dashboard
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:630:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :max_notifications_for_dashboard
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:635:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :activity_to_show_default_seconds_since_now
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:635:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :activity_to_show_default_seconds_since_now
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:640:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :arkivo_api
^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:640:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :arkivo_api
^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:646:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :realtime_notifications
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:656:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @realtime_notifications unless @realtime_notifications.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:665:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :active_deposit_agreement_acceptance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:665:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :active_deposit_agreement_acceptance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:667:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if @active_deposit_agreement_acceptance.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:671:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :admin_set_predicate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:671:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :admin_set_predicate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:676:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :work_requires_files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:676:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :work_requires_files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:678:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if @work_requires_files.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:682:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :show_work_item_rows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:682:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :show_work_item_rows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:690:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :system_user_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:695:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :batch_user_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:695:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :batch_user_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:700:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :audit_user_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:700:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :audit_user_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:705:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :collection_type_index_field
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:705:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :collection_type_index_field
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:710:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :collection_model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:710:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :collection_model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:724:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :admin_set_model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:724:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :admin_set_model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:759:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :id_field
^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:759:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :id_field
^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:764:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :index_field_mapper
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:764:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :index_field_mapper
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:770:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :display_share_button_when_not_logged_in
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:772:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return true if @display_share_button_when_not_logged_in.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:776:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :permission_levels
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:776:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :permission_levels
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:778:74: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@permission_levels ||= { I18n.t('hyrax.permission_levels.read') => "read",
^^^^^^
lib/hyrax/configuration.rb:779:74: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
I18n.t('hyrax.permission_levels.edit') => "edit" }
^^^^^^
lib/hyrax/configuration.rb:782:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :owner_permission_levels
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:782:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :owner_permission_levels
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:784:86: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@owner_permission_levels ||= { I18n.t('hyrax.permission_levels.owner.edit') => "edit" }
^^^^^^
lib/hyrax/configuration.rb:787:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :permission_options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:787:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :permission_options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:789:83: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@permission_options ||= { I18n.t('hyrax.permission_levels.options.none') => "none",
^^^^^^
lib/hyrax/configuration.rb:790:83: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
I18n.t('hyrax.permission_levels.options.read') => "read",
^^^^^^
lib/hyrax/configuration.rb:791:83: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
I18n.t('hyrax.permission_levels.options.edit') => "edit" }
^^^^^^
lib/hyrax/configuration.rb:794:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :publisher
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:794:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :publisher
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:799:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :translate_uri_to_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:812:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :translate_id_to_uri
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:812:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :translate_id_to_uri
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:819:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :resource_id_to_uri_transformer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:819:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :resource_id_to_uri_transformer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:830:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :contact_email
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:830:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :contact_email
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:832:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@contact_email ||= "repo-admin@example.org"
^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:835:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :subject_prefix
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:835:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :subject_prefix
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:837:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@subject_prefix ||= "Contact form:"
^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:840:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :extract_full_text
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:840:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :extract_full_text
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:842:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return @extract_full_text unless @extract_full_text.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:846:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :uploader
^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:846:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :uploader
^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:856:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_accessor attributes.
attr_accessor :nested_relationship_reindexer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:862:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :solr_select_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:862:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :solr_select_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:867:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_writer :identifier_registrars
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/configuration.rb:867:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_writer attributes.
attr_writer :identifier_registrars
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/controlled_vocabularies.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/controlled_vocabularies/location.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/controlled_vocabularies/location.rb:9:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [rdf_subject.to_s] if rdf_label.first.to_s.blank? || rdf_label.first.to_s == rdf_subject.to_s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/controlled_vocabulary/importer/downloader.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'ruby-progressbar'
^
lib/hyrax/controlled_vocabulary/importer/downloader.rb:9:11: C: Security/Open: The use of Kernel#open is a serious security risk.
open(url) do |io|
^^^^
lib/hyrax/controlled_vocabulary/importer/language.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require_relative 'downloader'
^
lib/hyrax/controlled_vocabulary/importer/language.rb:11:38: C: [Correctable] Style/GlobalStdStream: Use $stdout instead of STDOUT.
stdout_logger = Logger.new(STDOUT)
^^^^^^
lib/hyrax/controlled_vocabulary/importer/language.rb:29:23: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
logger.info "Import complete"
^^^^^^^^^^^^^^^^^
lib/hyrax/controlled_vocabulary/importer/language.rb:39:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if File.exist?(rdf_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/controlled_vocabulary/importer/language.rb:46:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if File.exist?(rdf_path) || File.exist?(download_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/controller_resource.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/engine.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/engine.rb:45:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"ActiveFedora::ObjectNotFoundError" => :not_found, # We can remove this when we use ActiveFedora 11.2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/engine.rb:46:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Blacklight::Exceptions::RecordNotFound" => :not_found,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/engine.rb:47:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Valkyrie::Persistence::ObjectNotFoundError" => :not_found,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/engine.rb:48:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax::ObjectNotFoundError" => :not_found
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/engine.rb:66:21: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 66, 20 is not aligned with can_connect = begin at 63, 6.
rescue StandardError
^^^^^^
lib/hyrax/engine.rb:72:27: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Rails.logger.info("Hyrax::Engine.after_initialize - persisting registered roles!")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/engine.rb:74:36: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 74, 35 is not aligned with can_persist = can_connect && begin at 70, 6.
rescue ActiveRecord::StatementInvalid
^^^^^^
lib/hyrax/errors.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/form_fields.rb:28:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(schema_name, definition_loader: SimpleSchemaLoader.new) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/health_checks/solr_check.rb:6:7: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(service: Hyrax::SolrService) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/health_checks/solr_check.rb:15:49: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue RSolr::Error::ConnectionRefused => err
^^^
lib/hyrax/health_checks/solr_check.rb:18:30: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue RuntimeError => err
^^^
lib/hyrax/inflections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
ActiveSupport::Inflector.inflections(:en) do |inflect|
^
lib/hyrax/model_decorator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/move_all_works_to_admin_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# If you want to move all your works to an admin set run this.
^
lib/hyrax/name.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/name.rb:18:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@route_key += "_index" if @plural == @singular
^^^^^^^^
lib/hyrax/publisher.rb:1:1: C: [Correctable] Style/Encoding: Unnecessary utf-8 encoding comment.
# coding: utf-8
^^^^^^^^^^^^^^^
lib/hyrax/rails/routes.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module ActionDispatch::Routing
^
lib/hyrax/redis_event_store.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/redis_event_store.rb:10:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
event_id = instance.incr("events:latest_id")
^^^^^^^^^^^^^^^^^^
lib/hyrax/redis_event_store.rb:11:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
instance.hmset("events:#{event_id}", "action", action, "timestamp", timestamp)
^^^^^^^^
lib/hyrax/redis_event_store.rb:11:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
instance.hmset("events:#{event_id}", "action", action, "timestamp", timestamp)
^^^^^^^^^^^
lib/hyrax/redis_event_store.rb:49:71: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
action: RedisEventStore.instance.hget("events:#{event_id}", "action"),
^^^^^^^^
lib/hyrax/redis_event_store.rb:50:74: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
timestamp: RedisEventStore.instance.hget("events:#{event_id}", "timestamp")
^^^^^^^^^^^
lib/hyrax/resource_sync.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/resource_sync/capability_list_writer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/resource_sync/capability_list_writer.rb:5:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :resource_list_url, :change_list_url, :description_url
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/capability_list_writer.rb:16:121: C: Layout/LineLength: Line is too long. [169/120]
# I would like this to be above the builder declaration, but Rubocop can't figure out if it should be indented at the method depth or the private declaration depth
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/capability_list_writer.rb:24:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].ln(rel: "up", href: description_url)
^^^^
lib/hyrax/resource_sync/capability_list_writer.rb:25:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].md(capability: "capabilitylist")
^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:10:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :resource_host, :capability_list_url
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:29:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].ln(rel: "up", href: capability_list_url)
^^^^
lib/hyrax/resource_sync/change_list_writer.rb:30:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].md(capability: "changelist", from: from)
^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:39:93: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
results = relation.search_with_conditions(public_access, rows: 1, sort: MODIFIED_DATE_FIELD + ' asc')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:39:121: C: [Correctable] Layout/LineLength: Line is too long. [121/120]
results = relation.search_with_conditions(public_access, rows: 1, sort: MODIFIED_DATE_FIELD + ' asc')
^
lib/hyrax/resource_sync/change_list_writer.rb:45:19: W: [Correctable] Layout/BeginEndAlignment: end at 45, 18 is not aligned with @from ||= begin at 38, 8.
end
^^^
lib/hyrax/resource_sync/change_list_writer.rb:49:17: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
{ sort: MODIFIED_DATE_FIELD + ' desc' }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:77:35: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
modified_date = doc.fetch("system_modified_dtsi")
^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:78:34: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
created_date = doc.fetch("system_create_dtsi")
^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:81:31: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
xml.loc routes.send(key + "_url", doc['id'], host: resource_host)
^^^^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:81:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml.loc routes.send(key + "_url", doc['id'], host: resource_host)
^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:83:64: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].md(change: modified_date == created_date ? "created" : "updated")
^^^^^^^^^
lib/hyrax/resource_sync/change_list_writer.rb:83:76: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].md(change: modified_date == created_date ? "created" : "updated")
^^^^^^^^^
lib/hyrax/resource_sync/resource_list_writer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/resource_sync/resource_list_writer.rb:26:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].ln(rel: "up", href: capability_list_url)
^^^^
lib/hyrax/resource_sync/resource_list_writer.rb:27:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].md(capability: "resourcelist", at: Time.now.utc.iso8601)
^^^^^^^^^^^^^^
lib/hyrax/resource_sync/resource_list_writer.rb:35:121: C: [Correctable] Layout/LineLength: Line is too long. [132/120]
def build_collections(xml, searcher: AbstractTypeRelation.new(allowable_types: [::Collection, Hyrax.config.collection_class]))
^^^^^^^^^^^^
lib/hyrax/resource_sync/resource_list_writer.rb:65:31: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
xml.loc routes.send(key + "_url", doc['id'], host: resource_host)
^^^^^^^^^^^^
lib/hyrax/resource_sync/resource_list_writer.rb:65:37: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml.loc routes.send(key + "_url", doc['id'], host: resource_host)
^^^^^^
lib/hyrax/resource_sync/source_description_writer.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/resource_sync/source_description_writer.rb:5:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :capability_list_url
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/resource_sync/source_description_writer.rb:20:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].ln(rel: "up", href: capability_list_url)
^^^^
lib/hyrax/resource_sync/source_description_writer.rb:21:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
xml['rs'].md(capability: "description")
^^^^^^^^^^^^^
lib/hyrax/role_registry.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/schema.rb:64:5: W: Lint/MissingSuper: Call super to initialize state of the parent class.
def initialize(schema_name, schema_loader: SimpleSchemaLoader.new) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/search_state.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/search_state.rb:9:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return [hyrax, doc] if doc.collection?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/transactions.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/container'
^
lib/hyrax/transactions/admin_set_create.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/admin_set_destroy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/admin_set_update.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/apply_change_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/collection_create.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/collection_destroy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/collection_update.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/container.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require "dry/transaction"
^
lib/hyrax/transactions/container.rb:2:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "dry/transaction"
^^^^^^^^^^^^^^^^^
lib/hyrax/transactions/container.rb:3:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "dry/transaction/operation"
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/transactions/create_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/destroy_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/file_set_destroy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/steps/add_file_sets.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/add_to_collections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/add_to_parent.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/add_to_parent.rb:30:62: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue Valkyrie::Persistence::ObjectNotFoundError => _err
^^^^
lib/hyrax/transactions/steps/apply_collection_permission_template.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/apply_collection_permission_template.rb:26:48: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue ActiveRecord::RecordNotFound => err
^^^
lib/hyrax/transactions/steps/apply_collection_type_permissions.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/apply_collection_type_permissions.rb:22:40: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue URI::InvalidURIError => err
^^^
lib/hyrax/transactions/steps/apply_permission_template.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/apply_permission_template.rb:24:48: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue ActiveRecord::RecordNotFound => err
^^^
lib/hyrax/transactions/steps/apply_visibility.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/apply_visibility.rb:33:79: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Hyrax::VisibilityIntentionApplicator::InvalidIntentionError => err
^^^
lib/hyrax/transactions/steps/check_for_empty_admin_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/delete_access_control.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/delete_resource.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/destroy_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/destroy_work.rb:19:9: C: [Correctable] Style/RescueStandardError: Avoid rescuing without specifying an error class.
rescue => err
^^^^^^
lib/hyrax/transactions/steps/destroy_work.rb:19:19: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue => err
^^^
lib/hyrax/transactions/steps/ensure_admin_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/ensure_permission_template.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/remove_file_set_from_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/save.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/save.rb:37:35: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue StandardError => err
^^^
lib/hyrax/transactions/steps/save_access_control.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/save_access_control.rb:20:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Success(obj) unless obj.respond_to?(:permission_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/transactions/steps/save_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/set_collection_type_gid.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/set_default_admin_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/set_modified_date.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/set_uploaded_date_unless_present.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/steps/set_user_as_creator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/set_user_as_creator.rb:25:33: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue NoMethodError => err
^^^
lib/hyrax/transactions/steps/set_user_as_depositor.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/steps/set_user_as_depositor.rb:25:33: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue NoMethodError => err
^^^
lib/hyrax/transactions/steps/validate.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'dry/monads'
^
lib/hyrax/transactions/transaction.rb:76:22: C: [Correctable] Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
def initialize(container: Container, steps:)
^^^^^^^^^^^^^^^^^^^^
lib/hyrax/transactions/transaction.rb:147:25: C: [Correctable] Style/InverseMethods: Use reject instead of inverting select.
missing_steps = keys.select { |key| !step?(key) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/transactions/update_work.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/transactions/work_create.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/transactions/work_destroy.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/transactions/transaction'
^
lib/hyrax/valkyrie_can_can_adapter.rb:22:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return Hyrax.query_service.find_by(id: id) unless Hyrax.config.enable_noids?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hyrax/valkyrie_can_can_adapter.rb:24:58: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue Valkyrie::Persistence::ObjectNotFoundError => err
^^^
lib/hyrax/valkyrie_simple_path_generator.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/version.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/hyrax/zotero.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'hyrax/zotero/config'
^
lib/hyrax/zotero/config.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Hyrax
^
lib/tasks/collection_type_global_id.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/controlled_vocabularies.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/controlled_vocabularies.rake:4:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Load the lexvo vocabulary into the database"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_admin_set.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/default_admin_set.rake:4:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Create the Default Admin Set"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_admin_set.rake:8:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "Successfully created default admin set"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_admin_set.rake:10:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
warn "ERROR: Default admin set exists but it does not have an " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_admin_set.rake:12:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"database but you did not clear out metadata datasource (e.g. Fedora, Postgres) " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_admin_set.rake:14:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"You could manually create the permission template in the rails console" \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_collection_type.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/default_collection_type.rake:4:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Create Default Collection Types"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_collection_type.rake:11:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
warn "ERROR: A default collection type did not get created."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/default_collection_type.rake:16:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
warn "ERROR: The Admin Set collection type did not get created."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/hyrax.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/hyrax.rake:6:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "Number of objects in the repository:"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/hyrax_user.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/hyrax_user.rake:5:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
task "list_emails", [:file_name] => :environment do |_cmd, args|
^^^^^^^^^^^^^
lib/tasks/hyrax_user.rake:7:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
file_name ||= "user_emails.txt"
^^^^^^^^^^^^^^^^^
lib/tasks/hyrax_user.rake:9:31: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
f = File.new(file_name, "w")
^^^
lib/tasks/hyrax_user.rake:10:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
f.write(users.join(", "))
^^^^
lib/tasks/hyrax_user.rake:17:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "Zotero integration is not enabled"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/install.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/migrate.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/reindex.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :solr do
^
lib/tasks/reindex.rake:3:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Enqueue a job to resolrize the repository objects"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/stats_tasks.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/stats_tasks.rake:4:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Cache work view, file view & file download stats for all users"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/universal_viewer.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/universal_viewer.rake:4:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Install Universal Viewer"
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/universal_viewer.rake:7:121: C: [Correctable] Layout/LineLength: Line is too long. [122/120]
hyrax_templates_path = File.join(Gem.loaded_specs['hyrax'].full_gem_path, 'lib', 'generators', 'hyrax', 'templates')
^^
lib/tasks/universal_viewer.rake:13:121: C: Layout/LineLength: Line is too long. [122/120]
puts 'Universal Viewer (UV) configs copied into place, install UV by running yarn install or rake assets:precompile'
^^
lib/tasks/workflow.rake:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
namespace :hyrax do
^
lib/tasks/workflow.rake:4:10: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
desc "Load workflow configuration into the database"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/workflow.rake:6:27: C: [Correctable] Style/GlobalStdStream: Use $stdout instead of STDOUT.
logger = Logger.new(STDOUT)
^^^^^^
lib/valkyrie/indexing/null_indexing_adapter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Valkyrie
^
lib/valkyrie/indexing/solr/indexing_adapter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'rsolr'
^
lib/valkyrie/indexing/solr/indexing_adapter.rb:36:38: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
connection.delete_by_query("*:*")
^^^^^
lib/valkyrie/indexing/solr/indexing_adapter.rb:77:20: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 77, 19 is not aligned with config = begin at 75, 10.
rescue RuntimeError
^^^^^^
lib/valkyrie/indexing/solr/indexing_adapter.rb:79:20: W: [Correctable] Layout/BeginEndAlignment: end at 79, 19 is not aligned with config = begin at 75, 10.
end
^^^
lib/valkyrie/indexing_adapter.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Valkyrie
^
lib/valkyrie/indexing_adapter.rb:24:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return adapters[symbolized_key] if adapters.key?(symbolized_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings.rb:103:70: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue NameError, Hyrax::SimpleSchemaLoader::UndefinedSchemaError => err
^^^
lib/wings.rb:104:3: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise(err) if ENV['RAILS_ENV'] == 'production'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter.rb:78:19: C: [Correctable] Layout/RescueEnsureAlignment: rescue at 78, 18 is not aligned with klass = begin at 76, 10.
rescue NameError
^^^^^^
lib/wings/active_fedora_converter.rb:80:19: W: [Correctable] Layout/BeginEndAlignment: end at 80, 18 is not aligned with klass = begin at 76, 10.
end
^^^
lib/wings/active_fedora_converter.rb:94:49: W: [Correctable] Lint/RedundantSafeNavigation: Redundant safe navigation detected.
return resource[:id].to_s if resource[:id]&.is_a?(::Valkyrie::ID) && resource[:id].present?
^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter.rb:95:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
return "" unless resource.respond_to?(:alternate_ids)
^^
lib/wings/active_fedora_converter/default_work.rb:30:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return if klass.properties.keys.include?(name) || ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:30:19: C: [Correctable] Performance/InefficientHashSearch: Use #key? instead of #keys.include?.
return if klass.properties.keys.include?(name) ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:39:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return :indirectly_contains if @key.name == :member_of_collection_ids
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:47:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return :member_of_collections if @key.name == :member_of_collection_ids
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:78:42: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Naming/MethodName.
def self.DefaultWork(resource_class) # rubocop:disable Naming/MethodName
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:101:56: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
property :nested_resource, predicate: ::RDF::URI("http://example.com/nested_resource"), class_name: "Wings::ActiveFedoraConverter::NestedResource"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:101:107: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
property :nested_resource, predicate: ::RDF::URI("http://example.com/nested_resource"), class_name: "Wings::ActiveFedoraConverter::NestedResource"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/default_work.rb:101:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
property :nested_resource, predicate: ::RDF::URI("http://example.com/nested_resource"), class_name: "Wings::ActiveFedoraConverter::NestedResource"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/nested_resource.rb:9:56: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
property :nested_resource, predicate: ::RDF::URI("http://example.com/nested_resource"), class_name: NestedResource
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/active_fedora_converter/nested_resource.rb:11:55: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
property :ordered_nested, predicate: ::RDF::URI("http://example.com/ordered_nested")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/attribute_transformer.rb:18:5: C: Metrics/PerceivedComplexity: Perceived complexity for run is too high. [9/8]
def self.run(obj) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/attribute_transformer.rb:45:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless obj.respond_to?(attr_name) && !mem.key?(attr_name.to_sym)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/attribute_transformer.rb:52:5: C: Metrics/AbcSize: Assignment Branch Condition size for run is too high. [<10, 29, 4> 30.94/28]
def run(obj) ...
^^^^^^^^^^^^
lib/wings/attribute_transformer.rb:56:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next unless obj.respond_to?(attr_name) && !mem.key?(attr_name.to_sym)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# TODO: This should live in Hyrax::AddFileMetadataToFileSet service and should work for all valkyrie adapters.
^
lib/wings/hydra/works/services/add_file_to_file_set.rb:9:121: C: Layout/LineLength: Line is too long. [137/120]
# If file responds to :mime_type, :content_type, :original_name, or :original_filename, those will be called to provide metadata.
^^^^^^^^^^^^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:11:121: C: Layout/LineLength: Line is too long. [139/120]
# @param [Boolean] update_existing whether to update an existing file if there is one. When set to true, performs a create_or_update.
^^^^^^^^^^^^^^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:13:121: C: Layout/LineLength: Line is too long. [135/120]
# @param [Boolean] versioning whether to create new version entries (only applicable if +type+ corresponds to a versionable file)
^^^^^^^^^^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:15:90: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
raise ArgumentError, 'supplied object must be an instance of Valkyrie::Resource' unless file_set.is_a?(Valkyrie::Resource) && file_set.file_set?
^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:15:121: C: [Correctable] Layout/LineLength: Line is too long. [152/120]
raise ArgumentError, 'supplied object must be an instance of Valkyrie::Resource' unless file_set.is_a?(Valkyrie::Resource) && file_set.file_set?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:22:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
result = Hydra::Works::AddFileToFileSet.call(af_file_set, file, af_type, update_existing: update_existing, versioning: versioning)
^^^^^^^^^^^^^^^^^^
lib/wings/hydra/works/services/add_file_to_file_set.rb:36:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return type if [:original_file, :extracted_text, :thumbnail].include? type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:140:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return ordered_member_ids if ordered_member_ids.present?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:146:121: C: [Correctable] Layout/LineLength: Line is too long. [153/120]
result << ::Valkyrie::Persistence::OptimisticLockToken.new(adapter_id: 'wings-fedora-etag', token: pcdm_object.etag) unless pcdm_object.new_record?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:146:124: C: [Correctable] Style/IfUnlessModifier: Modifier form of unless makes the line too long.
result << ::Valkyrie::Persistence::OptimisticLockToken.new(adapter_id: 'wings-fedora-etag', token: pcdm_object.etag) unless pcdm_object.new_record?
^^^^^^
lib/wings/model_transformer.rb:149:70: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
last_modified_literal = graph_node.first_object([nil, RDF::URI("http://fedora.info/definitions/v4/repository#lastModified"), nil])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:149:131: C: [Correctable] Layout/LineLength: Line is too long. [136/120]
last_modified_literal = graph_node.first_object([nil, RDF::URI("http://fedora.info/definitions/v4/repository#lastModified"), nil])
^^^^^^
lib/wings/model_transformer.rb:151:121: C: [Correctable] Layout/LineLength: Line is too long. [129/120]
result << ::Valkyrie::Persistence::OptimisticLockToken.new(adapter_id: 'wings-fedora-last-modified', token: token) if token
^^^^^^^^^
lib/wings/model_transformer.rb:151:122: C: [Correctable] Style/IfUnlessModifier: Modifier form of if makes the line too long.
result << ::Valkyrie::Persistence::OptimisticLockToken.new(adapter_id: 'wings-fedora-last-modified', token: token) if token
^^
lib/wings/model_transformer.rb:156:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless pcdm_object.try(:embargo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:165:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless pcdm_object.try(:lease)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:173:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for append_permissions is too high. [8/7]
def append_permissions(attrs) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/model_transformer.rb:174:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return unless pcdm_object.try(:permissions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/orm_converter.rb:15:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return mapped_class if mapped_class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/orm_converter.rb:26:5: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/BlockLength.
# rubocop:disable Metrics/BlockLength
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/orm_converter.rb:96:31: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
attribute_name = (reflection_key.to_s.singularize + '_ids').to_sym
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/orm_converter.rb:99:31: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
attribute_name = (reflection_key.to_s.singularize + '_id').to_sym
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/orm_converter.rb:102:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
next if fields.include?(attribute_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_access_control.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Wings
^
lib/wings/services/custom_queries/find_access_control.rb:13:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_access_control.rb:31:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ::Valkyrie::Persistence::ObjectNotFoundError if resource.access_control_id.blank?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_collections_by_type.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Wings
^
lib/wings/services/custom_queries/find_collections_by_type.rb:15:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_file_metadata.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Wings
^
lib/wings/services/custom_queries/find_file_metadata.rb:21:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_file_metadata.rb:76:11: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
lib/wings/services/custom_queries/find_file_metadata.rb:77:121: C: [Correctable] Layout/LineLength: Line is too long. [123/120]
results << find_file_metadata_by_alternate_identifier(alternate_identifier: alt_id, use_valkyrie: use_valkyrie)
^^^
lib/wings/services/custom_queries/find_file_metadata.rb:113:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("use_valkyrie: is deprecated for valkyrie/wings queries")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_ids_by_model.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Wings
^
lib/wings/services/custom_queries/find_ids_by_model.rb:17:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_ids_by_model.rb:28:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return enum_for(:find_ids_by_model, model: model, ids: ids) unless block_given?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_ids_by_model.rb:40:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
break if (solr_response['start'] + solr_response['docs'].count) >= solr_response['numFound']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_ids_by_model.rb:41:121: C: [Correctable] Layout/LineLength: Line is too long. [153/120]
solr_response = ActiveFedora::SolrService.get(solr_query, fl: 'id', rows: @query_rows, start: solr_response['start'] + @query_rows)['response']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/custom_queries/find_many_by_alternate_ids.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Wings
^
lib/wings/services/custom_queries/find_many_by_alternate_ids.rb:13:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :query_service
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/file_converter_service.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Conversion service for going between files on a valkyrie resource and files on an active fedora object
^
lib/wings/services/file_converter_service.rb:9:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Use ModelTransformer.for(af_file) instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/file_converter_service.rb:14:26: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Deprecation.warn("Use ActiveFedoraConverter.convert(resource:) instead.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/file_metadata_builder.rb:10:5: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :storage_adapter, :persister
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/file_metadata_builder.rb:19:121: C: Layout/LineLength: Line is too long. [184/120]
# @param file_set [Valkyrie::Resouce, Hydra::Works::FileSet] the associated FileSet # TODO: WINGS - Remove Hydra::Works::FileSet as a potential type when valkyrization is complete.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/file_metadata_builder.rb:38:121: C: Layout/LineLength: Line is too long. [184/120]
# @param file_set [Valkyrie::Resouce, Hydra::Works::FileSet] the associated FileSet # TODO: WINGS - Remove Hydra::Works::FileSet as a potential type when valkyrization is complete.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/services/file_metadata_builder.rb:41:121: C: [Correctable] Layout/LineLength: Line is too long. [127/120]
file_set.is_a?(::Valkyrie::Resource) ? attach_file_metadata_to_valkyrie_file_set(file_metadata, file_set) : file_metadata
^^^^^^^
lib/wings/services/file_metadata_builder.rb:49:121: C: Layout/LineLength: Line is too long. [124/120]
# This is for storage adapters other than wings. The wings storage adapter already attached the file to the file_set.
^^^^
lib/wings/services/file_metadata_builder.rb:50:121: C: Layout/LineLength: Line is too long. [146/120]
# This process is a no-op for wings. # TODO: WINGS - May need to verify this is a no-op for wings once file_set is passed in as a resource.
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/setup.rb:47:8: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
["system_create_dtsi asc"]
^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/setup.rb:91:121: C: Layout/LineLength: Line is too long. [124/120]
# TODO: Custom query registration is not Wings specific. These custom_queries need to be registered for other adapters too.
^^^^
lib/wings/setup.rb:92:121: C: Layout/LineLength: Line is too long. [126/120]
# A refactor is needed to add the default implementations to hyrax.rb and only handle the wings specific overrides here.
^^^^^^
lib/wings/transformer_value_mapper.rb:24:121: C: Layout/LineLength: Line is too long. [121/120]
klass = Wings::ModelTransformer::ResourceClassCache.instance.fetch(Wings::ActiveFedoraConverter::NestedResource) do
^
lib/wings/transformer_value_mapper.rb:75:7: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return calling_mapper.for(value.first).result if value.length < 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/metadata_adapter.rb:18:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
to_hash = "active_fedora"
^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
module Wings
^
lib/wings/valkyrie/persister.rb:11:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :adapter
^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:15:121: C: Layout/LineLength: Line is too long. [122/120]
# @param adapter [Wings::Valkyrie::MetadataAdapter] The adapter which holds the resource_factory for this persister.
^^
lib/wings/valkyrie/persister.rb:33:121: C: [Correctable] Layout/LineLength: Line is too long. [137/120]
raise(FailedSaveError.new("#{af_object.class}#save! returned non-true. It might be missing required content.", obj: af_object))
^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:36:59: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue ActiveFedora::RecordInvalid, RuntimeError => err
^^^
lib/wings/valkyrie/persister.rb:48:59: C: [Correctable] Naming/RescuedExceptionsVariableName: Use _e instead of _err.
rescue ::Valkyrie::Persistence::StaleObjectError => _err
^^^^
lib/wings/valkyrie/persister.rb:50:15: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"One or more resources have been updated by another process.")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:65:44: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hyrax::SolrService.delete_by_query("*:*")
^^^^^
lib/wings/valkyrie/persister.rb:75:17: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
msg = "Failed to save object {obj}.\n" + msg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:82:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
msg = "Wings tried to save metadata for a file which has not " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:83:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"been saved. Fedora creates a metadata node when the file is " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/persister.rb:86:17: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Hyrax.storage_adapter to save the file before trying to " \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:8:7: C: [Correctable] Layout/EmptyLinesAroundAttributeAccessor: Add an empty line after attribute accessor.
attr_reader :adapter
^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:89:11: C: [Correctable] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
lib/wings/valkyrie/query_service.rb:113:62: C: [Correctable] Naming/RescuedExceptionsVariableName: Use e instead of err.
rescue ActiveFedora::ObjectNotFoundError, Ldp::Gone => err
^^^
lib/wings/valkyrie/query_service.rb:114:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise err unless use_valkyrie
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:147:32: C: [Correctable] Style/ClassEqualityComparison: Use instance_of?(model) instead of comparing classes.
results.select { |r| r.class.name == model.name }
^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:166:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for find_inverse_references_by is too high. [8/7]
def find_inverse_references_by(resource: nil, id: nil, model: nil, property:) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:166:38: C: [Correctable] Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
def find_inverse_references_by(resource: nil, id: nil, model: nil, property:)
^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:166:53: C: Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
def find_inverse_references_by(resource: nil, id: nil, model: nil, property:)
^^^^^^^
lib/wings/valkyrie/query_service.rb:166:62: C: Style/KeywordParametersOrder: Place optional keyword parameters at the end of the parameters list.
def find_inverse_references_by(resource: nil, id: nil, model: nil, property:)
^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:167:9: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError, "Provide resource or id" unless resource || id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:167:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "Provide resource or id" unless resource || id
^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/query_service.rb:169:30: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
raise ArgumentError, "Resource has no id; is it persisted?" unless id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/storage.rb:20:21: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
LINK_HEADER = "<http://www.w3.org/ns/ldp#NonRDFSource>; rel=\"type\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wings/valkyrie/storage.rb:26:121: C: Layout/LineLength: Line is too long. [136/120]
def initialize(connection: Ldp::Client.new(ActiveFedora.fedora.host), base_path: ActiveFedora.fedora.base_path, fedora_version: 4)
^^^^^^^^^^^^^^^^
lib/wings/valkyrie/storage.rb:27:39: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@sha1 = fedora_version == 5 ? "sha" : "sha1"
^^^^^
lib/wings/valkyrie/storage.rb:27:47: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@sha1 = fedora_version == 5 ? "sha" : "sha1"
^^^^^^
lib/wings/valkyrie/storage.rb:34:40: C: [Correctable] Style/RegexpLiteral: Use %r around regular expression.
::Valkyrie::ID.new(id.to_s.sub(/^.+\/\//, PROTOCOL))
^^^^^^^^^
lib/wings/valkyrie/storage.rb:99:11: C: [Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
raise ArgumentError unless other.respond_to?(:version_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'cancan/matchers'
^
spec/abilities/ability_spec.rb:4:1: C: RSpec/FilePath: Spec path should end with hyrax/ability*_spec.rb.
RSpec.describe Hyrax::Ability do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:15:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "#registered_user?" do
^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:18:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "with a guest user" do
^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:25:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "#can_create_any_work?" do
^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:34:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "when user can deposit into an admin set" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:44:7: C: [Correctable] RSpec/EmptyLineAfterHook: Add an empty line after before.
end
^^^
spec/abilities/ability_spec.rb:49:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "can?(:review, :submissions)" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:65:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context "as an administrator" do
^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:65:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "as an administrator" do
^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:72:49: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
allow(user).to receive_messages(groups: ['admin', 'registered'])
^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:78:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context "as a depositor" do
^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:78:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "as a depositor" do
^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:88:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context "as an approver" do
^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:88:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "as an approver" do
^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:95:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "a user with no roles" do
^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:106:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "a registered user" do
^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:117:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "a user in the admin group" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:120:5: C: [Correctable] RSpec/EmptyLineAfterHook: Add an empty line after before.
before { allow(user).to receive_messages(groups: ['admin', 'registered']) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:120:54: C: [Correctable] Style/WordArray: Use %w or %W for an array of words.
before { allow(user).to receive_messages(groups: ['admin', 'registered']) }
^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:133:12: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "AdminSets and PermissionTemplates" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/ability_spec.rb:152:7: C: [Correctable] RSpec/EmptyLineAfterExample: Add an empty line after it.
end
^^^
spec/abilities/ability_spec.rb:169:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage_any, AdminSet)
^^^^^^^^^^^
spec/abilities/ability_spec.rb:170:7: C: [Correctable] RSpec/EmptyLineAfterExample: Add an empty line after it.
end
^^^
spec/abilities/ability_spec.rb:174:14: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe "a user without edit access" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_ability_spec.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'cancan/matchers'
^
spec/abilities/admin_ability_spec.rb:4:1: C: RSpec/FilePath: Spec path should end with hyrax/ability*_spec.rb.
RSpec.describe Hyrax::Ability do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_ability_spec.rb:5:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "with a registered user" do
^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_ability_spec.rb:11:3: C: [Correctable] RSpec/EmptyLineAfterExampleGroup: Add an empty line after context.
end
^^^
spec/abilities/admin_ability_spec.rb:12:11: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
context "with an administrative user" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'cancan/matchers'
^
spec/abilities/admin_set_ability_spec.rb:4:1: C: RSpec/FilePath: Spec path should end with hyrax/ability*_spec.rb.
RSpec.describe Hyrax::Ability, :clean_repo do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:15:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:15:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:19:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities open to admins' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:19:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to admins' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:40:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:40:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:44:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities open to admins' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:44:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to admins' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:70:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:70:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:83:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities open to managers' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:83:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to managers' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:100:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities NOT open to managers' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:100:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to managers' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:107:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'and admin set is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:107:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:108:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
let!(:admin_set) { FactoryBot.valkyrie_create(:hyrax_admin_set, user: user, access_grants: grants, with_permission_template: true) }
^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:121:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'for abilities open to managers' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:121:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to managers' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:138:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'for abilities NOT open to managers' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:138:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to managers' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:140:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
it { is_expected.not_to be_able_to(:create_any, Hyrax::AdministrativeSet) } # granted by collection type, not collection
^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:150:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:150:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:163:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities open to depositor' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:163:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:177:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities NOT open to depositor' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:177:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:191:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'and admin set is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:191:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:192:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
let!(:admin_set) { FactoryBot.valkyrie_create(:hyrax_admin_set, user: user, access_grants: grants, with_permission_template: true) }
^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:205:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'for abilities open to depositor' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:205:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:219:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'for abilities NOT open to depositor' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:219:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:222:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
it { is_expected.not_to be_able_to(:create_any, Hyrax::AdministrativeSet) } # granted by collection type, not collection
^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:238:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:238:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:251:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities open to viewer' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:251:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:262:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities NOT open to viewer' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:262:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:278:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'and admin set is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:278:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:279:121: C: [Correctable] Layout/LineLength: Line is too long. [138/120]
let!(:admin_set) { FactoryBot.valkyrie_create(:hyrax_admin_set, user: user, access_grants: grants, with_permission_template: true) }
^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:292:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'for abilities open to viewer' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:292:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities open to viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:303:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5]
context 'for abilities NOT open to viewer' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:303:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:306:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
it { is_expected.not_to be_able_to(:create_any, Hyrax::AdministrativeSet) } # granted by collection type, not collection
^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:324:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:324:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:328:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities NOT open to general user' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:328:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to general user' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:349:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'and admin set is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:349:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and admin set is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:353:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'for abilities NOT open to general user' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:353:15: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'for abilities NOT open to general user' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/admin_set_ability_spec.rb:356:121: C: [Correctable] Layout/LineLength: Line is too long. [128/120]
it { is_expected.not_to be_able_to(:create_any, Hyrax::AdministrativeSet) } # granted by collection type, not collection
^^^^^^^^
spec/abilities/collection_ability_spec.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
require 'cancan/matchers'
^
spec/abilities/collection_ability_spec.rb:4:1: C: RSpec/FilePath: Spec path should end with hyrax/ability*_spec.rb.
RSpec.describe Hyrax::Ability, :clean_repo do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:14:3: C: RSpec/BeforeAfterAll: Beware of using before :all as it may cause state to leak between tests. If you are using rspec-rails, and use_transactional_fixtures is enabled, then records created in before :all are not automatically rolled back.
before :all do
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:22:3: C: RSpec/BeforeAfterAll: Beware of using after :all as it may cause state to leak between tests. If you are using rspec-rails, and use_transactional_fixtures is enabled, then records created in after :all are not automatically rolled back.
after :all do
^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:28:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'when admin user' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:32:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:32:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:41:7: C: RSpec/MultipleExpectations: Example has too many expectations [16/1].
it 'can do everything' do
^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:42:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:43:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:44:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:create_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:45:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:46:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:47:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:48:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:49:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:50:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:51:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:52:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:53:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:54:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:55:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:56:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:57:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:61:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:61:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:69:7: C: RSpec/MultipleExpectations: Example has too many expectations [16/1].
it 'can do everything' do
^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:70:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:71:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:72:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:create_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:73:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:74:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:75:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:76:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:77:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:78:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:79:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:80:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:81:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:82:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:83:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:84:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:85:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:90:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'when collection manager' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:94:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:94:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:112:7: C: RSpec/MultipleExpectations: Example has too many expectations [14/1].
it 'can do everything for the collection they manage' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:113:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:114:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:115:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:116:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:117:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:118:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:119:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:120:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:121:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:122:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:123:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:124:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:125:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection) # edit access grants read and write
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:126:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:130:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:134:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [9/5]
context 'and collection is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:134:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:153:7: C: RSpec/MultipleExpectations: Example has too many expectations [14/1].
it 'can do everything for the collection they manage' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:154:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:manage_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:155:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:156:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:157:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:158:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:159:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:160:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:161:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:162:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:163:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:164:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:165:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:166:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection) # edit access grants read and write
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:167:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:171:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:176:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'when collection depositor' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:180:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:180:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:198:7: C: RSpec/MultipleExpectations: Example has too many expectations [7/1].
it 'can view and deposit in the collection where they are a depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:199:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:200:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:201:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:202:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:203:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:204:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:205:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:208:7: C: RSpec/MultipleExpectations: Example has too many expectations [8/1].
it 'cannot edit or update collections where they are a depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:209:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:210:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:211:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:212:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:213:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:214:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:215:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:216:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:220:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [9/5]
context 'and collection is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:220:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:239:7: C: RSpec/MultipleExpectations: Example has too many expectations [7/1].
it 'can view and deposit in the collection where they are a depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:240:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:241:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:242:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:243:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:244:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:245:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:246:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:249:7: C: RSpec/MultipleExpectations: Example has too many expectations [8/1].
it 'cannot edit or update collections where they are a depositor' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:250:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:251:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:252:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:253:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:254:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:255:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:256:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:257:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:262:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'when collection viewer' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:266:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:266:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:284:7: C: RSpec/MultipleExpectations: Example has too many expectations [5/1].
it 'can view the collection where they are a viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:285:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:286:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:287:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:288:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:289:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:292:7: C: RSpec/MultipleExpectations: Example has too many expectations [10/1].
it 'cannot modify in any way collections where they are a viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:293:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:294:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:295:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:296:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:297:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:298:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:299:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:300:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:301:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:302:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:306:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [9/5]
context 'and collection is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:306:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:325:7: C: RSpec/MultipleExpectations: Example has too many expectations [5/1].
it 'can view the collection where they are a viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:326:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:327:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:328:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:329:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:330:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.to be_able_to(:read, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:333:7: C: RSpec/MultipleExpectations: Example has too many expectations [10/1].
it 'cannot modify in any way collections where they are a viewer' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:334:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:335:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:336:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:337:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:338:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:339:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:340:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:341:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:342:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:343:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:348:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5]
context 'when user has no special access' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:352:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is an ActiveFedora::Base' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:352:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is an ActiveFedora::Base' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:361:7: C: RSpec/MultipleExpectations: Example has too many expectations [15/1].
it 'cannot view or modify in any way collections with restricted access' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:362:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:363:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:364:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:view_admin_show_any, Collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:365:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:366:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:367:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:368:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:369:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:370:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:371:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:deposit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:372:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:deposit, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:373:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:view_admin_show, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:374:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:view_admin_show, solr_document)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:375:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:read, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:376:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:read, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:380:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [8/5]
context 'and collection is a valkyrie resource' do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:380:13: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
context 'and collection is a valkyrie resource' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:388:7: C: RSpec/MultipleExpectations: Example has too many expectations [15/1].
it 'cannot view or modify in any way collections with restricted access' do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:389:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:390:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:manage_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:391:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:view_admin_show_any, Hyrax::PcdmCollection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:392:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:393:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:edit, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:394:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:395:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:update, solr_document) # defined in solr_document_ability.rb
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:396:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.not_to be_able_to(:destroy, collection)
^^^^^^^^^^^
spec/abilities/collection_ability_spec.rb:397:9: C: [Correctable] RSpec/ImplicitSubject: Don't use implicit subject.
is_expected.no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment