Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎁 Contribute back from HykuUp Knapsack #16

Merged
merged 15 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading