-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* speed up spec run by removing unneeded helpers that run on each spec * spec magic comment and other rubocop fixes * lib magic comment and other rubocop fixes * app magic comment and other rubocop fixes * updated rubocop config * more generic settings email, asset fix for browse everything bug * Last of the magic comments * fix account spec * increase spec coverage * rubocop fixes * Update spec/lib/stanford/importer/mods_parser_spec.rb Co-authored-by: Chris Colvard <[email protected]> * Update spec/lib/stanford/importer/mods_parser_spec.rb Co-authored-by: Chris Colvard <[email protected]> * updates from Chris feedback Co-authored-by: Chris Colvard <[email protected]>
- Loading branch information
1 parent
b625711
commit edafd85
Showing
252 changed files
with
736 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,186 @@ | ||
# Turn on RSpec cops | ||
require: rubocop-rspec | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2016-08-30 08:01:37 -0500 using RuboCop version 0.42.0. | ||
# on 2020-05-15 17:53:23 +0000 using RuboCop version 0.52.1. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Style/SafeNavigation: | ||
Enabled: false | ||
# Offense count: 1 | ||
Lint/AmbiguousBlockAssociation: | ||
Exclude: | ||
- 'app/controllers/catalog_controller.rb' | ||
|
||
Metrics/MethodLength: | ||
# Offense count: 5 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect. | ||
# SupportedStylesAlignWith: keyword, variable, start_of_line | ||
Lint/EndAlignment: | ||
Exclude: | ||
- 'app/jobs/import_work_from_purl_job.rb' | ||
- 'spec/support/rake.rb' | ||
- 'app/helpers/blacklight/catalog_helper_behavior.rb' | ||
|
||
RSpec/SubjectStub: | ||
# Offense count: 2 | ||
Lint/UselessAssignment: | ||
Exclude: | ||
- 'spec/models/solr_endpoint_spec.rb' | ||
- 'app/forms/hyrax/forms/admin/appearance.rb' | ||
- 'spec/controllers/proprietor/users_controller_spec.rb' | ||
|
||
# Offense count: 10 | ||
RSpec/LeadingSubject: | ||
Exclude: | ||
- 'spec/controllers/hyrax/generic_works_controller_spec.rb' | ||
- 'spec/helpers/admin_stats_helper_spec.rb' | ||
- 'spec/lib/active_job_tenant_spec.rb' | ||
- 'spec/lib/importer/factory/string_literal_processor_spec.rb' | ||
- 'spec/lib/stanford/importer/mods_parser_spec.rb' | ||
- 'spec/services/create_account_spec.rb' | ||
- 'spec/services/iiif_thumbnail_path_service_spec.rb' | ||
- 'spec/services/solr_config_uploader_spec.rb' | ||
|
||
# Offense count: 13 | ||
RSpec/LetSetup: | ||
Exclude: | ||
- 'spec/lib/importer/factory/etd_factory_spec.rb' | ||
- 'spec/lib/importer/factory/image_factory_spec.rb' | ||
- 'spec/lib/stanford/importer/purl_importer_spec.rb' | ||
- 'spec/models/account_spec.rb' | ||
- 'spec/models/role_spec.rb' | ||
- 'spec/models/user_spec.rb' | ||
Metrics/AbcSize: | ||
Max: 49 | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: CountComments. | ||
Metrics/ClassLength: | ||
Max: 112 | ||
|
||
# Offense count: 2 | ||
Metrics/CyclomaticComplexity: | ||
Max: 12 | ||
|
||
# Offense count: 23 | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | ||
# URISchemes: http, https | ||
Metrics/LineLength: | ||
Max: 376 | ||
|
||
# Offense count: 7 | ||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 35 | ||
|
||
# Offense count: 4 | ||
# Configuration parameters: MaxNesting. | ||
RSpec/NestedGroups: | ||
Exclude: | ||
- 'spec/services/iiif_authorization_service_spec.rb' | ||
# Offense count: 1 | ||
# Configuration parameters: CountComments. | ||
Metrics/ModuleLength: | ||
Max: 168 | ||
|
||
RSpec/ContextWording: | ||
Enabled: false | ||
# Offense count: 2 | ||
Metrics/PerceivedComplexity: | ||
Max: 14 | ||
|
||
RSpec/IteratedExpectation: | ||
# Offense count: 1 | ||
# Configuration parameters: Blacklist. | ||
# Blacklist: END, (?-mix:EO[A-Z]{1}) | ||
Naming/HeredocDelimiterNaming: | ||
Exclude: | ||
- 'spec/tasks/rake_spec.rb' | ||
- 'spec/jobs/import_work_from_purl_job_spec.rb' | ||
|
||
RSpec/BeforeAfterAll: | ||
# Offense count: 6 | ||
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros. | ||
# NamePrefix: is_, has_, have_ | ||
# NamePrefixBlacklist: is_, has_, have_ | ||
# NameWhitelist: is_a? | ||
# MethodDefinitionMacros: define_method, define_singleton_method | ||
Naming/PredicateName: | ||
Exclude: | ||
- 'spec/tasks/rake_spec.rb' | ||
- 'spec/models/uploaded_file_spec.rb' | ||
- 'spec/**/*' | ||
- 'app/controllers/application_controller.rb' | ||
- 'app/helpers/blacklight/catalog_helper_behavior.rb' | ||
- 'app/models/user.rb' | ||
|
||
Style/MixinUsage: | ||
# Offense count: 6 | ||
RSpec/BeforeAfterAll: | ||
Exclude: | ||
- 'spec/support/devise.rb' | ||
- 'spec/features/create_image_spec.rb' | ||
- 'spec/spec_helper.rb' | ||
- 'spec/rails_helper.rb' | ||
- 'spec/support/**/*.rb' | ||
- 'spec/models/hyku/group_spec.rb' | ||
- 'spec/models/uploaded_file_spec.rb' | ||
- 'spec/tasks/rake_spec.rb' | ||
|
||
RSpec/ScatteredLet: | ||
# Offense count: 85 | ||
# Configuration parameters: Prefixes. | ||
# Prefixes: when, with, without | ||
RSpec/ContextWording: | ||
Enabled: false | ||
|
||
RSpec/HookArgument: | ||
# Offense count: 3 | ||
RSpec/ExpectInHook: | ||
Exclude: | ||
- 'spec/rails_helper.rb' | ||
- 'spec/controllers/sites_controller_spec.rb' | ||
- 'spec/models/uploaded_file_spec.rb' | ||
|
||
RSpec/ExpectInHook: | ||
# Offense count: 1 | ||
RSpec/IteratedExpectation: | ||
Exclude: | ||
- 'spec/models/uploaded_file_spec.rb' | ||
- 'spec/controllers/sites_controller_spec.rb' | ||
Style/FormatStringToken: | ||
- 'spec/tasks/rake_spec.rb' | ||
|
||
# Offense count: 4 | ||
RSpec/LetSetup: | ||
Exclude: | ||
- 'spec/models/account_spec.rb' | ||
- 'app/models/account.rb' | ||
|
||
Rails/ApplicationJob: | ||
Enabled: false | ||
|
||
Rails/ApplicationRecord: | ||
Enabled: false | ||
- 'spec/models/role_spec.rb' | ||
- 'spec/models/user_spec.rb' | ||
|
||
RSpec/BeforeAfterAll: | ||
# Offense count: 2 | ||
RSpec/MessageChain: | ||
Exclude: | ||
- 'spec/models/hyku/group_spec.rb' | ||
- 'spec/tasks/rake_spec.rb' | ||
- 'spec/models/uploaded_file_spec.rb' | ||
- 'spec/views/shared/select_work_type_modal.html.erb_spec.rb' | ||
|
||
Naming/HeredocDelimiterNaming: | ||
# Offense count: 8 | ||
RSpec/ScatteredLet: | ||
Exclude: | ||
- 'spec/controllers/account_sign_up_controller_spec.rb' | ||
- 'spec/controllers/admin/accounts_controller_spec.rb' | ||
- 'spec/controllers/proprietor/accounts_controller_spec.rb' | ||
- 'spec/jobs/import_work_from_purl_job_spec.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: Include. | ||
# Include: app/models/**/*.rb | ||
Rails/HasManyOrHasOneDependent: | ||
Exclude: | ||
- 'app/models/endpoint.rb' | ||
|
||
FactoryBot/DynamicAttributeDefinedStatically: | ||
# Offense count: 5 | ||
Rails/OutputSafety: | ||
Exclude: | ||
- 'spec/factories/users.rb' | ||
- 'app/forms/hyrax/forms/admin/appearance.rb' | ||
- 'app/helpers/blacklight/catalog_helper_behavior.rb' | ||
|
||
Performance/RegexpMatch: | ||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: AutoCorrect, EnforcedStyle. | ||
# SupportedStyles: nested, compact | ||
Style/ClassAndModuleChildren: | ||
Exclude: | ||
- 'app/helpers/blacklight/catalog_helper_behavior.rb' | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: annotated, template, unannotated | ||
Style/FormatStringToken: | ||
Exclude: | ||
- 'lib/importer/csv_parser.rb' | ||
- 'app/services/solr_config_uploader.rb' | ||
- 'app/models/account.rb' | ||
- 'spec/models/account_spec.rb' | ||
|
||
ClassLength: | ||
Max: 120 | ||
# Offense count: 4 | ||
# Configuration parameters: MinBodyLength. | ||
Style/GuardClause: | ||
Exclude: | ||
- 'app/controllers/application_controller.rb' | ||
- 'app/controllers/hyrax/downloads_controller.rb' | ||
- 'app/helpers/blacklight/catalog_helper_behavior.rb' | ||
- 'app/models/bulkrax/entry.rb' | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: line_count_dependent, lambda, literal | ||
Style/Lambda: | ||
Exclude: | ||
- 'app/models/user.rb' | ||
|
||
# Offense count: 1 | ||
Style/MixinUsage: | ||
Exclude: | ||
- 'spec/support/devise.rb' | ||
|
||
# Offense count: 2 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: AutoCorrect, EnforcedStyle. | ||
# SupportedStyles: predicate, comparison | ||
Style/NumericPredicate: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'app/helpers/blacklight/catalog_helper_behavior.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work GenericWork` | ||
module Hyrax | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work Image` | ||
module Hyrax | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class ContactsController < SitesController | ||
# GET /sites/1/edit | ||
def edit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.