Skip to content

Commit

Permalink
Merge branch 'hyrax-5-upgrade' into bump-hyku-version
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaLMoore authored Jan 3, 2024
2 parents 6f97be3 + a8d190b commit e573197
Show file tree
Hide file tree
Showing 527 changed files with 7,280 additions and 10,415 deletions.
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
orbs:
samvera: samvera/circleci-orb@1
browser-tools: circleci/browser-tools@1.3
browser-tools: circleci/browser-tools@1.4.6
ruby: circleci/ruby@2
node: circleci/node@5

Expand All @@ -10,13 +10,13 @@ jobs:
parameters:
ruby_version:
type: string
default: 2.7.8
default: 3.2.2
bundler_version:
type: string
default: 2.4.8
rails_version:
type: string
default: '5.1.6'
default: '6.1.7.6'
solr_config_path:
type: string
fcrepo_version:
Expand Down Expand Up @@ -61,6 +61,7 @@ jobs:
BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
HYKU_CACHE_ROOT: /tmp/hyku-cache
HYKU_RESTRICT_CREATE_AND_DESTROY_PERMISSIONS: 'true'
SOLR_ADMIN_USER: admin
SOLR_ADMIN_PASSWORD: admin
Expand All @@ -79,7 +80,9 @@ jobs:
ruby_version: << parameters.ruby_version >>
bundler_version: << parameters.bundler_version >>
- samvera/rubocop
- browser-tools/install-chrome
- browser-tools/install-chrome:
chrome-version: 114.0.5735.90 # see https://github.com/CircleCI-Public/browser-tools-orb/pull/96
replace-existing: true
- browser-tools/install-chromedriver
- run:
name: Check Chrome install
Expand All @@ -95,6 +98,6 @@ workflows:
ci:
jobs:
- bundle:
ruby_version: "2.7.8"
name: "ruby2-7-8"
ruby_version: "3.2.2"
name: "ruby3-2-2"
solr_config_path: 'solr/conf'
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
./coverage
./docker
./fcrepo
./importer
./log
./pg
./public/assets
Expand Down
11 changes: 7 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CHROME_HOSTNAME=chrome
COMPOSE_DOCKER_CLI_BUILD=1
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
DB_ADAPTER=postgresql
DB_HOST=db
DB_HOST=db
Expand All @@ -13,25 +14,27 @@ FCREPO_BASE_PATH=/hykudemo
FCREPO_HOST=fcrepo
FCREPO_PORT=8080
FCREPO_REST_PATH=rest
HYRAX_ACTIVE_JOB_QUEUE=sidekiq
HYRAX_FITS_PATH=/app/fits/fits.sh
INITIAL_ADMIN_EMAIL=[email protected]
INITIAL_ADMIN_PASSWORD=testing123
JAVA_OPTS=-Xmx4g -Xms1g
IN_DOCKER=true
JAVA_OPTS=-Xmx4g -Xms1g
LD_LIBRARY_PATH=/opt/fits/tools/mediainfo/linux
NEGATIVE_CAPTCHA_SECRET=default-value-change-me
PASSENGER_APP_ENV=development
RAILS_LOG_TO_STDOUT=true
REDIS_HOST=redis
SECRET_KEY_BASE=asdf
HYRAX_ACTIVE_JOB_QUEUE=sidekiq
HYRAX_FITS_PATH=/app/fits/fits.sh
NEGATIVE_CAPTCHA_SECRET=default-value-change-me
SOLR_ADMIN_PASSWORD=SolrRocks
SOLR_ADMIN_USER=solr
SOLR_COLLECTION_NAME=hydra-development
SOLR_CONFIGSET_NAME=hyku
SOLR_HOST=solr
SOLR_PORT=8983
SOLR_URL=http://solr:SolrRocks@solr:8983/solr/
TB_RSPEC_FORMATTER=progress
TB_RSPEC_OPTIONS="--format RspecJunitFormatter --out rspec.xml"

# Comment out these 5 for single tenancy / Uncomment for multi
HYKU_ADMIN_HOST=hyku.test
Expand Down
180 changes: 99 additions & 81 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,129 +1,147 @@
# Turn on RSpec cops
require: rubocop-rspec
inherit_from: .rubocop_todo.yml
inherit_from:
- .rubocop_fixme.yml

# With the rubocop 0.47.0 and rubocop-rspec 1.8.0 the following stderr message was sent:
# An error occurred while RSpec/DescribedClass cop was inspecting path/to/file
RSpec/DescribedClass:
Enabled: false
inherit_gem:
bixby: bixby_default.yml

AllCops:
NewCops: disable
TargetRubyVersion: 3.2.2
DisplayCopNames: true
TargetRubyVersion: 2.3
Exclude:
- 'bin/**/*'
- 'db/**/*'
- 'config/**/*'
- 'vendor/**/*'
- '.internal_test_app/**/*'
- 'spec/fixtures/**/*'
- 'spec/internal/**/*'
- 'script/**/*'
- 'spec/test_app_templates/**/*'
- 'Rakefile'
- 'lib/tasks/rubocop.rake'
# disabling collections controller as most of the rubocop errors are in hyrax
- 'app/controllers/hyrax/dashboard/collections_controller.rb'

Rails:
Enabled: true
- 'vendor/**/*'
- 'lib/hyrax/specs/**/*'
- 'bin/graph'
- 'bin/import_from_purl'

Rails/DynamicFindBy:
Whitelist:
- find_by_user_key
Lint/ImplicitStringConcatenation:
Exclude:
- 'lib/importer/factory/object_factory.rb'
- 'lib/generators/hyrax/**/*'

Rails/UnknownEnv:
Environments:
- development
- production
- staging
- test
Rails/Output:
Exclude:
- 'lib/generators/**/*'

Metrics/LineLength:
Max: 120
Metrics/BlockLength:
IgnoredMethods: ['included']
Exclude:
- 'app/controllers/catalog_controller.rb'
- 'spec/controllers/curation_concerns/generic_works_controller_spec.rb'
- 'spec/services/iiif_collection_thumbnail_path_service_spec.rb'
- 'spec/services/iiif_work_thumbnail_path_service_spec.rb'
- 'spec/routing/proprietor/accounts_routing_spec.rb'
- 'hyrax.gemspec'
- 'app/models/concerns/hyrax/content_block_behavior.rb'
- 'app/services/hyrax/workflow/workflow_schema.rb'
- 'config/initializers/simple_form.rb'
- 'config/features.rb'
- 'config/routes.rb'
- 'lib/generators/hyrax/templates/catalog_controller.rb'
- 'lib/generators/hyrax/templates/config/initializers/simple_form_bootstrap.rb'
- 'lib/hyrax/rails/routes.rb'
- 'lib/tasks/*.rake'
- 'spec/**/*.rb'
- 'tasks/benchmark.rake'

Layout/IndentationConsistency:
EnforcedStyle: rails
Style/AsciiComments:
Enabled: false

Layout/DotPosition:
EnforcedStyle: leading
# rubocop suggests !thing.nil? instead, but that is NOT equivalent
Style/DoubleNegation:
Enabled: false

Style/Documentation:
Style/CollectionMethods:
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'find'
find_all: 'select'

Style/SymbolArray:
Enabled: false

Style/StringLiterals:
Style/ClassAndModuleChildren:
Enabled: false

Style/WordArray:
Style/SingleLineBlockParams:
Enabled: false

Metrics/ClassLength:
Exclude:
- 'app/controllers/catalog_controller.rb'
Rails/ApplicationJob:
Enabled: false

Rails/ApplicationMailer:
Enabled: false

Metrics/ModuleLength:
Max: 200
Rails/ApplicationRecord:
Enabled: false

Rails/HasAndBelongsToMany:
Exclude:
- 'app/models/role.rb'

RSpec/AnyInstance:
Rails/HasManyOrHasOneDependent:
Exclude:
- 'app/models/endpoint.rb'

Rails/RakeEnvironment:
Enabled: false

RSpec/InstanceVariable:
# We define custom methods like `find_by_user_key`,
# `find_by_created_date`, etc
Rails/DynamicFindBy:
Enabled: false

Rails/FilePath:
Exclude:
- 'spec/controllers/hyku/registrations_controller_spec.rb'
- 'spec/abilities/**/*'

RSpec/NamedSubject:
Enabled: false
Rails/OutputSafety:
Exclude:
- 'app/builders/hyrax/form_builder.rb'
- 'app/helpers/hyrax/citations_behaviors/formatters/apa_formatter.rb'
- 'app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb'
- 'app/helpers/hyrax/citations_behaviors/formatters/mla_formatter.rb'
- 'app/helpers/hyrax/collections_helper.rb'
- 'app/helpers/hyrax/content_block_helper_behavior.rb'
- 'app/helpers/hyrax/hyrax_helper_behavior.rb'
- 'app/presenters/hyrax/fixity_status_presenter.rb'
- 'app/presenters/hyrax/presents_attributes.rb'
- 'app/renderers/hyrax/renderers/attribute_renderer.rb'
- 'spec/views/hyrax/my/works/_list_works.html.erb_spec.rb'

Rails/UniqueValidationWithoutIndex:
Exclude:
- 'app/models/account.rb'
- 'app/models/domain_name.rb'
- 'app/models/hyrax/group.rb'

RSpec/DescribeClass:
Exclude:
- 'spec/requests/**/*'
- 'spec/abilities/**/*'
- 'spec/config/hyrax_events_spec.rb'
- 'spec/conversions/**/*'
- 'spec/features/**/*'
- 'spec/inputs/**/*'
- 'spec/javascripts/jasmine_spec.rb'
- 'spec/tasks/rake_spec.rb'
- 'spec/views/**/*'
- 'spec/routing/**/*'
- 'spec/tasks/**/*'

Rails/FilePath:
Exclude:
- 'spec/routing/**/*'
# # By default RSpec/MessageSpies has the following:
# # Prefer have_received for setting message expectations. Setup form as a spy using allow or instance_spy.
# # The default assumes EnforcedStyle is 'have_received'. Most of our specs are 'receive'
RSpec/MessageSpies:
Enabled: false

RSpec/ExpectActual:
Exclude:
- 'spec/routing/**/*'
Enabled: false

RSpec/VerifiedDoubles:
RSpec/LetSetup:
Enabled: false

RSpec/MessageExpectation:
Enabled: false

# By default RSpec/MessageSpies has the following:
# Prefer have_received for setting message expectations. Setup form as a spy using allow or instance_spy.
RSpec/MessageSpies:
Enabled: true
EnforcedStyle: receive

RSpec/ExampleLength:
Max: 20

RSpec/NestedGroups:
Max: 4

RSpec/MultipleExpectations:
Enabled: false

Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- 'lib/tasks/*.rake'
- 'app/controllers/catalog_controller.rb'
RSpec/LeadingSubject:
Enabled: false
Loading

0 comments on commit e573197

Please sign in to comment.