Skip to content

Commit

Permalink
Merge branch 'main' into import-shelf-tsv
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Feb 1, 2025
2 parents b94cbcf + abcddcc commit ebf8dd3
Show file tree
Hide file tree
Showing 290 changed files with 5,685 additions and 5,716 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ENJU_LEAF_EXTRACT_TEXT=
ENJU_LEAF_EXTRACT_FILESIZE_LIMIT=2097152
# ENJU_LEAF_RESOURCESYNC_BASE_URL=http://localhost:8080

CANTALOUPE_BASE_URI=http://cantaloupe:8182
CANTALOUPE_BASE_URL=http://localhost:8182

NODE_OPTIONS=--openssl-legacy-provider

Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,32 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: docker/metadata-action@v4
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/next-l/enju_leaf
images: |
enju_leaf
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Docker Login
uses: docker/login-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: |
projectnextl/${{ steps.meta.outputs.tags }}
ghcr.io/next-l/${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 3 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
Expand All @@ -47,4 +47,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
4 changes: 0 additions & 4 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:
POSTGRES_DB: enju_leaf_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
redis:
image: redis:6
ports:
- "6379:6379"
env:
RAILS_ENV: test
ENJU_LEAF_BIND_ADDRESS: 127.0.0.1
Expand Down
68 changes: 7 additions & 61 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,8 @@
require: rubocop-rails
# Omakase Ruby styling for Rails
inherit_gem: { rubocop-rails-omakase: rubocop.yml }

Rails:
Enabled: true
AllCops:
TargetRubyVersion: 2.6
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
Layout/SpaceInsideBlockBraces:
Enabled: false
Layout/SpaceBeforeBlockBraces:
Enabled: false
Style/WordArray:
Enabled: false
Style/Documentation:
Enabled: false
Style/StringLiterals:
Enabled: false
Style/AsciiComments:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/BlockDelimiters:
Enabled: false
Naming/VariableNumber:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Style/EmptyMethod:
Enabled: false
Layout/LeadingCommentSpace:
Enabled: false
Metrics/AbcSize:
Enabled: false
Layout/ArgumentAlignment:
Enabled: false
Layout/HashAlignment:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/SoleNestedConditional:
Enabled: false
Rails/ActiveRecordCallbacksOrder: # new in 2.7
Enabled: true
Rails/WhereNot: # new in 2.8
Enabled: true
Rails/RedundantPresenceValidationOnBelongsTo: # new in 2.13
Enabled: true
Style/GuardClause:
Enabled: false
Layout/EmptyLinesAroundAccessModifier:
Enabled: false
# Overwrite or add rules to create your own house style
#
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
# Layout/SpaceInsideArrayLiteralBrackets:
# Enabled: false
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.5
3.2.6
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.2.5
ARG RUBY_VERSION=3.2.6
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base

# Rails app lives here
Expand All @@ -28,7 +28,7 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -y curl gnupg
apt-get install --no-install-recommends -y build-essential git libpq-dev libvips pkg-config nodejs yarn

# Install application gems
COPY Gemfile Gemfile.lock ./
COPY Gemfile Gemfile.lock package.json yarn.lock ./
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile && \
Expand All @@ -41,7 +41,8 @@ COPY . .
RUN bundle exec bootsnap precompile app/ lib/

# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
# RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
ARG NODE_OPTIONS=--openssl-legacy-provider
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile


# Final stage for app image
Expand Down
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.5"
ruby "3.2.6"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.1.3", ">= 7.1.3.4"
Expand Down Expand Up @@ -51,6 +51,9 @@ gem "image_processing", "~> 1.2"
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ]

# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem "rubocop-rails-omakase", require: false
end

group :development do
Expand Down Expand Up @@ -95,8 +98,8 @@ gem 'addressable'
gem 'progress_bar'
gem 'rails_autolink'
gem 'kramdown'
gem 'solid_queue'
gem 'mission_control-jobs'
gem 'solid_queue', "~> 1.0"
gem 'mission_control-jobs', "~> 0.5.0"
gem 'acts-as-taggable-on'
gem 'resync' # , github: 'nabeta/resync', branch: 'add-datetime'
gem 'pretender'
Expand All @@ -109,7 +112,6 @@ gem 'rdf-turtle', require: 'rdf/turtle'
gem 'rdf-vocab', require: 'rdf/vocab'
gem 'oai'
gem 'active_storage_validations'
gem 'sprockets', '~> 3.7'
gem 'webpacker', '~> 5.0'
gem 'faraday-multipart'

Expand Down
Loading

0 comments on commit ebf8dd3

Please sign in to comment.