Skip to content

Commit

Permalink
Merge pull request #16 from samvera-labs/prime_main
Browse files Browse the repository at this point in the history
🎁 Contribute back from HykuUp Knapsack
  • Loading branch information
ShanaLMoore authored Apr 3, 2024
2 parents 0bdd510 + 35bd9f7 commit aee1a57
Show file tree
Hide file tree
Showing 21 changed files with 795 additions and 682 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
build:
uses: scientist-softserv/actions/.github/workflows/[email protected].15
uses: scientist-softserv/actions/.github/workflows/[email protected].18
secrets: inherit
with:
platforms: 'linux/amd64'
Expand All @@ -26,7 +26,7 @@ jobs:

test:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected].15
uses: scientist-softserv/actions/.github/workflows/[email protected].18
with:
confdir: '/app/samvera/hyrax-webapp/solr/conf'
webTarget: hyku-web
Expand All @@ -35,7 +35,7 @@ jobs:

lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected].15
uses: scientist-softserv/actions/.github/workflows/[email protected].18
with:
webTarget: hyku-web
workerTarget: hyku-worker
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scratch.md
.DS_Store

/coverage
file_cache/
78 changes: 78 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
inherit_gem:
bixby: bixby_default.yml

AllCops:
NewCops: disable
TargetRubyVersion: 3.2.2
DisplayCopNames: true
Exclude:
# NOTE: When we run knapsack's rubocop, we don't want to check the submodule
# for Hyku. We'll assume it's okay and has it's own policing policies.
- "hyrax-webapp/**/*"

Metrics/BlockLength:
IgnoredMethods: ['included', 'describe', 'it', 'context']
Exclude:
- "spec/**/*.rb"

Style/AsciiComments:
Enabled: false

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

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

Style/SymbolArray:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Style/SingleLineBlockParams:
Enabled: false

Rails/ApplicationJob:
Enabled: false

Rails/ApplicationMailer:
Enabled: false

Rails/ApplicationRecord:
Enabled: false

Rails/RakeEnvironment:
Enabled: false

# We define custom methods like `find_by_user_key`,
# `find_by_created_date`, etc
Rails/DynamicFindBy:
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.
# # The default assumes EnforcedStyle is 'have_received'. Most of our specs are 'receive'
RSpec/MessageSpies:
Enabled: false

RSpec/ExpectActual:
Enabled: false

RSpec/LetSetup:
Enabled: false

RSpec/MessageExpectation:
Enabled: false

RSpec/NestedGroups:
Enabled: false

RSpec/LeadingSubject:
Enabled: false
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ FROM ghcr.io/samvera/hyku/base:latest as hyku-knap-base

# This is specifically NOT $APP_PATH but the parent directory
COPY --chown=1001:101 . /app/samvera
COPY --chown=1001:101 bundler.d/ /app/.bundler.d/
ENV BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera
ENV BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true

RUN bundle install --jobs "$(nproc)"

# Ensure root permissions for installing Tesseract data
USER root

Expand Down
Loading

0 comments on commit aee1a57

Please sign in to comment.