1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2026-01-27 10:38:50 +01:00

21 Commits

Author SHA1 Message Date
dependabot[bot]
10752d5344 Bump bootstrap from 5.2.3 to 5.3.2
Bumps [bootstrap](https://github.com/twbs/bootstrap-rubygem) from 5.2.3 to 5.3.2.
- [Release notes](https://github.com/twbs/bootstrap-rubygem/releases)
- [Changelog](https://github.com/twbs/bootstrap-rubygem/blob/main/CHANGELOG.md)
- [Commits](https://github.com/twbs/bootstrap-rubygem/compare/v5.2.3...v5.3.2)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 15:29:06 +00:00
59c51f466a Merge pull request #350 from projekteuler/docker-build
Add Workflow for building and releasing Docker image
2023-08-19 22:07:00 +02:00
f014cffe41 Add Workflow for building and releasing Docker image 2023-08-18 15:55:33 +02:00
30b3a6f366 Merge pull request #346 from projekteuler/dependabot/bundler/rails-7.0.6
Bump rails from 7.0.5 to 7.0.6
2023-07-15 22:00:16 +02:00
dependabot[bot]
62ce619838 Bump rails from 7.0.5 to 7.0.6
Bumps [rails](https://github.com/rails/rails) from 7.0.5 to 7.0.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v7.0.5...v7.0.6)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-15 19:57:15 +00:00
d2c42f9f49 Merge pull request #344 from projekteuler/dependabot/bundler/bootstrap_form-5.2.3
Bump bootstrap_form from 5.2.2 to 5.2.3
2023-07-15 21:56:19 +02:00
dependabot[bot]
c063b111fd Bump bootstrap_form from 5.2.2 to 5.2.3
Bumps [bootstrap_form](https://github.com/bootstrap-ruby/bootstrap_form) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/bootstrap-ruby/bootstrap_form/releases)
- [Changelog](https://github.com/bootstrap-ruby/bootstrap_form/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.2...v5.2.3)

---
updated-dependencies:
- dependency-name: bootstrap_form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 15:57:09 +00:00
0b2af8dbe3 Merge pull request #341 from projekteuler/dependabot/bundler/bootstrap_form-5.2.2
Bump bootstrap_form from 5.1.0 to 5.2.2
2023-06-18 14:50:08 +02:00
0dedfd737c Merge pull request #342 from projekteuler/dependabot/bundler/rails-7.0.5
Bump rails from 7.0.4.3 to 7.0.5
2023-06-18 14:48:50 +02:00
dependabot[bot]
7c18bcd072 Bump rails from 7.0.4.3 to 7.0.5
Bumps [rails](https://github.com/rails/rails) from 7.0.4.3 to 7.0.5.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v7.0.4.3...v7.0.5)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-18 12:45:58 +00:00
b6c8d46eba Merge pull request #340 from projekteuler/dependabot/bundler/sqlite3-1.6.3
Bump sqlite3 from 1.6.2 to 1.6.3
2023-06-18 14:45:31 +02:00
5c9155da56 Merge pull request #343 from projekteuler/dependabot/bundler/puma-6.3.0
Bump puma from 6.2.2 to 6.3.0
2023-06-18 14:45:04 +02:00
dependabot[bot]
4e7ba85512 Bump puma from 6.2.2 to 6.3.0
Bumps [puma](https://github.com/puma/puma) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v6.2.2...v6.3.0)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 15:56:41 +00:00
dependabot[bot]
143e449fbd Bump bootstrap_form from 5.1.0 to 5.2.2
Bumps [bootstrap_form](https://github.com/bootstrap-ruby/bootstrap_form) from 5.1.0 to 5.2.2.
- [Release notes](https://github.com/bootstrap-ruby/bootstrap_form/releases)
- [Changelog](https://github.com/bootstrap-ruby/bootstrap_form/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.1.0...v5.2.2)

---
updated-dependencies:
- dependency-name: bootstrap_form
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 15:56:28 +00:00
dependabot[bot]
2ef0286e92 Bump sqlite3 from 1.6.2 to 1.6.3
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases)
- [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v1.6.2...v1.6.3)

---
updated-dependencies:
- dependency-name: sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 15:57:10 +00:00
4a53d6f3fb Merge pull request #336 from projekteuler/dependabot/bundler/omniauth-github-2.0.1
Bump omniauth-github from 2.0.0 to 2.0.1
2023-05-18 19:28:47 +02:00
dependabot[bot]
984cb2b925 Bump omniauth-github from 2.0.0 to 2.0.1
Bumps [omniauth-github](https://github.com/intridea/omniauth-github) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/intridea/omniauth-github/releases)
- [Commits](https://github.com/intridea/omniauth-github/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: omniauth-github
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 14:27:36 +00:00
14b33f553d Merge pull request #337 from projekteuler/dependabot/bundler/listen-3.8.0
Bump listen from 3.7.1 to 3.8.0
2023-05-18 16:26:42 +02:00
dependabot[bot]
ae7797109b Bump listen from 3.7.1 to 3.8.0
Bumps [listen](https://github.com/guard/listen) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: listen
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 14:21:41 +00:00
0c8600579e Merge pull request #338 from projekteuler/dependabot/bundler/rails-i18n-7.0.7
Bump rails-i18n from 7.0.6 to 7.0.7
2023-05-18 16:20:45 +02:00
dependabot[bot]
781257814d Bump rails-i18n from 7.0.6 to 7.0.7
Bumps [rails-i18n](https://github.com/svenfuchs/rails-i18n) from 7.0.6 to 7.0.7.
- [Changelog](https://github.com/svenfuchs/rails-i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svenfuchs/rails-i18n/compare/v7.0.6...v7.0.7)

---
updated-dependencies:
- dependency-name: rails-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 15:56:29 +00:00
14 changed files with 342 additions and 148 deletions

39
.dockerignore Normal file
View File

@@ -0,0 +1,39 @@
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
# Ignore git directory.
/.git/
# Ignore bundler config.
/.bundle
# Ignore all default key files.
/config/master.key
/config/credentials/*.key
# Ignore all environment files.
/.env*
!/.env.example
# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
# Ignore storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep
# Ignore assets.
/node_modules/
/app/assets/builds/*
!/app/assets/builds/.keep
/public/assets

9
.gitattributes vendored Normal file
View File

@@ -0,0 +1,9 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
# Mark the database schema as having been generated.
db/schema.rb linguist-generated
# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
config/credentials/*.yml.enc diff=rails_credentials
config/credentials.yml.enc diff=rails_credentials

View File

@@ -19,7 +19,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
- name: Install dependencies
run: bundle install --without production
- name: Run tests

48
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
#
name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ["release"]
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

23
.gitignore vendored
View File

@@ -12,13 +12,24 @@
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
# Ignore coverage data generated by coveralls
/coverage
# Ignore encrypted secrets key file.
config/secrets.yml.key
# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
# Ignore storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep
/public/assets
# Ignore master key for decrypting credentials and more.
/config/master.key

1
.ruby-version Normal file
View File

@@ -0,0 +1 @@
ruby-3.2.2

77
Dockerfile Normal file
View File

@@ -0,0 +1,77 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.2.2
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
# Rails app lives here
WORKDIR /rails
# Set production environment
ENV RAILS_ENV="production" \
BUNDLE_DEPLOYMENT="1" \
BUNDLE_PATH="/usr/local/bundle" \
BUNDLE_WITHOUT="development"
# Throw-away build stage to reduce size of final image
FROM base as build
# Install packages needed to build gems and node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git libvips pkg-config curl node-gyp default-libmysqlclient-dev
# Install JavaScript dependencies
ARG NODE_VERSION=20.5.0
ARG YARN_VERSION=1.22.19
ENV PATH=/usr/local/node/bin:$PATH
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build-master
# Install application gems
COPY Gemfile Gemfile.lock ./
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
# Install node modules
#COPY package.json yarn.lock ./
#RUN yarn install --frozen-lockfile
# Copy application code
COPY . .
# Precompile bootsnap code for faster boot times
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
# Final stage for app image
FROM base
LABEL org.opencontainers.image.source=https://github.com/projekteuler/projekteuler
LABEL org.opencontainers.image.description="Projekteuler production image"
LABEL org.opencontainers.image.licenses=MIT
# Install packages needed for deployment
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y curl node-gyp default-mysql-client libvips && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
# Copy built artifacts: gems, application
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build /rails /rails
# Run and own only the runtime files as a non-root user for security
RUN useradd rails --create-home --shell /bin/bash && \
chown -R rails:rails db log tmp
USER rails:rails
# Entrypoint prepares the database.
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD ["./bin/rails", "server"]

14
Gemfile
View File

@@ -2,11 +2,11 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.0.4', '>= 7.0.4.3'
gem 'rails', '~> 7.0.6'
# Use Puma as the app server
gem 'puma', '~> 6.2'
gem 'puma', '~> 6.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.6.2'
gem 'sqlite3', '~> 1.6.3'
gem 'mysql2', '~> 0.5.5', group: :production
@@ -21,7 +21,7 @@ gem 'coffee-rails', '~> 5.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'rails-i18n', '~> 7.0.6'
gem 'rails-i18n', '~> 7.0.7'
gem 'rails-controller-testing'
@@ -37,10 +37,10 @@ gem 'jbuilder', '~> 2.11.3'
gem 'sdoc', '~> 2.6.1', group: :doc
gem 'web-console', '~> 4.2.0', group: :development
gem 'listen', '~> 3.7.0', group: :development
gem 'listen', '~> 3.8.0', group: :development
gem 'bootstrap', '~> 5.2.3'
gem "bootstrap_form", "~> 5.1"
gem 'bootstrap', '~> 5.3.2'
gem "bootstrap_form", "~> 5.2"
gem 'font-awesome-sass', '~> 6.4.0'
# Use Diffy for showing translation diffs

View File

@@ -1,86 +1,85 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
actioncable (7.0.6)
actionpack (= 7.0.6)
activesupport (= 7.0.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
actionmailbox (7.0.6)
actionpack (= 7.0.6)
activejob (= 7.0.6)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4.3)
actionpack (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activesupport (= 7.0.4.3)
actionmailer (7.0.6)
actionpack (= 7.0.6)
actionview (= 7.0.6)
activejob (= 7.0.6)
activesupport (= 7.0.6)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
actionpack (7.0.6)
actionview (= 7.0.6)
activesupport (= 7.0.6)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.4.3)
actionpack (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
actiontext (7.0.6)
actionpack (= 7.0.6)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
actionview (7.0.6)
activesupport (= 7.0.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.4.3)
activesupport (= 7.0.4.3)
activejob (7.0.6)
activesupport (= 7.0.6)
globalid (>= 0.3.6)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activestorage (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activesupport (= 7.0.4.3)
activemodel (7.0.6)
activesupport (= 7.0.6)
activerecord (7.0.6)
activemodel (= 7.0.6)
activesupport (= 7.0.6)
activestorage (7.0.6)
actionpack (= 7.0.6)
activejob (= 7.0.6)
activerecord (= 7.0.6)
activesupport (= 7.0.6)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4.3)
activesupport (7.0.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
autoprefixer-rails (10.4.13.0)
autoprefixer-rails (10.4.15.0)
execjs (~> 2)
bcrypt (3.1.16)
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
bootstrap (5.2.3)
bootstrap (5.3.2)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 2.11.6, < 3)
sassc-rails (>= 2.0.0)
bootstrap_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
popper_js (>= 2.11.8, < 3)
bootstrap_form (5.2.3)
actionpack (>= 6.0)
activemodel (>= 6.0)
builder (3.2.4)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
@@ -103,38 +102,19 @@ GEM
diff-lcs (1.5.0)
diffy (3.4.2)
erubi (1.12.0)
execjs (2.8.1)
faraday (1.9.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
execjs (2.9.1)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5)
faraday-net_http (3.0.2)
ffi (1.16.3)
font-awesome-sass (6.4.0)
sassc (~> 2.0)
globalid (1.1.0)
activesupport (>= 5.0)
hashdiff (1.0.1)
hashie (5.0.0)
i18n (1.13.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
@@ -143,13 +123,13 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jwt (2.3.0)
listen (3.7.1)
jwt (2.7.0)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.20.0)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
@@ -158,14 +138,12 @@ GEM
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
minitest (5.18.0)
mini_portile2 (2.8.5)
minitest (5.20.0)
msgpack (1.6.0)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mysql2 (0.5.5)
net-imap (0.3.4)
net-imap (0.3.6)
date
net-protocol
net-pop (0.1.2)
@@ -175,76 +153,79 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
oauth2 (1.4.7)
faraday (>= 0.8, < 2.0)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
rack (>= 1.2, < 4)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
omniauth (2.1.1)
hashie (>= 3.4.6)
rack (>= 2.2.3)
rack-protection
omniauth-github (2.0.0)
omniauth-github (2.0.1)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.8)
omniauth-oauth2 (1.8.0)
oauth2 (>= 1.4, < 3)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.7.1)
omniauth-oauth2 (1.7.2)
oauth2 (~> 1.4)
omniauth (>= 1.9, < 3)
omniauth-rails_csrf_protection (1.0.1)
actionpack (>= 4.2)
omniauth (~> 2.0)
orm_adapter (0.5.0)
popper_js (2.11.7)
popper_js (2.11.8)
psych (5.1.0)
stringio
public_suffix (5.0.1)
puma (6.2.2)
puma (6.3.0)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.7)
racc (1.7.1)
rack (2.2.8)
rack-protection (3.0.6)
rack
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.4.3)
actioncable (= 7.0.4.3)
actionmailbox (= 7.0.4.3)
actionmailer (= 7.0.4.3)
actionpack (= 7.0.4.3)
actiontext (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activemodel (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
rails (7.0.6)
actioncable (= 7.0.6)
actionmailbox (= 7.0.6)
actionmailer (= 7.0.6)
actionpack (= 7.0.6)
actiontext (= 7.0.6)
actionview (= 7.0.6)
activejob (= 7.0.6)
activemodel (= 7.0.6)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
bundler (>= 1.15.0)
railties (= 7.0.4.3)
railties (= 7.0.6)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rails-i18n (7.0.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rails-i18n (7.0.7)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
railties (7.0.6)
actionpack (= 7.0.6)
activesupport (= 7.0.6)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
rb-fsevent (0.11.0)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.5.0)
@@ -264,19 +245,22 @@ GEM
tilt
sdoc (2.6.1)
rdoc (>= 5.0)
sprockets (4.2.0)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.2)
sqlite3 (1.6.3)
mini_portile2 (~> 2.8.0)
stringio (3.0.6)
thor (1.2.1)
tilt (2.1.0)
timeout (0.3.2)
thor (1.3.0)
tilt (2.3.0)
timeout (0.4.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
@@ -284,6 +268,7 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
version_gem (1.1.2)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
@@ -301,15 +286,15 @@ GEM
will_paginate (3.3.1)
will_paginate-bootstrap4 (0.2.2)
will_paginate (~> 3.0, >= 3.0.0)
zeitwerk (2.6.8)
zeitwerk (2.6.12)
PLATFORMS
ruby
DEPENDENCIES
bootsnap
bootstrap (~> 5.2.3)
bootstrap_form (~> 5.1)
bootstrap (~> 5.3.2)
bootstrap_form (~> 5.2)
coffee-rails (~> 5.0.0)
devise (~> 4.8.0)
diff-lcs
@@ -317,18 +302,18 @@ DEPENDENCIES
font-awesome-sass (~> 6.4.0)
jbuilder (~> 2.11.3)
jquery-rails (~> 4.5.1)
listen (~> 3.7.0)
listen (~> 3.8.0)
mysql2 (~> 0.5.5)
omniauth
omniauth-github
omniauth-rails_csrf_protection
puma (~> 6.2)
rails (~> 7.0.4, >= 7.0.4.3)
puma (~> 6.3)
rails (~> 7.0.6)
rails-controller-testing
rails-i18n (~> 7.0.6)
rails-i18n (~> 7.0.7)
sassc-rails (~> 2.1.2)
sdoc (~> 2.6.1)
sqlite3 (~> 1.6.2)
sqlite3 (~> 1.6.3)
turbolinks (~> 5.2.1)
tzinfo-data
uglifier (~> 4.2.0)

View File

@@ -47,6 +47,8 @@ Do you want to implement this improvement yourself? Follow these steps:
- `DATABASE_NAME`: The name of the MySQL database
- `DATABASE_USERNAME`: The username for the MYSQL database
- `DATABASE_PASSWORD`: The password for the MYSQL database
- `DATABASE_HOST`: The host of the MYSQL database
- `DATABASE_PORT`: The port of the MYSQL database
- `GITHUB_CLIENT_ID`: The client ID of your GitHub OAuth App (that you will need to create)
- `GITHUB_CLIENT_SECRET`: The client secret of the GitHub OAuth App
6. Install all required gems with `bundle install`.

8
bin/docker-entrypoint Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash -e
# If running the rails server then create or migrate existing database
if [ "${*}" == "./bin/rails server" ]; then
./bin/rails db:prepare
fi
exec "${@}"

View File

@@ -27,5 +27,5 @@ production:
database: <%= ENV['DATABASE_NAME'] %>
username: <%= ENV['DATABASE_USERNAME'] %>
password: <%= ENV['DATABASE_PASSWORD'] %>
host: 127.0.0.1
port: 3306
host: <%= ENV['DATABASE_HOST'] %>
port: <%= ENV['DATABASE_PORT'] %>

View File

@@ -1,5 +1,19 @@
# Load the Rails application.
require_relative "application"
# Replace when upgrading to Rails 7.1
# See https://github.com/rails/rails/issues/32947#issuecomment-1356391185
class Rails::Application
def secret_key_base
if Rails.env.development? || Rails.env.test? || ENV["SECRET_KEY_BASE_DUMMY"]
secrets.secret_key_base ||= generate_development_secret
else
validate_secret_key_base(
ENV["SECRET_KEY_BASE"] || credentials.secret_key_base || secrets.secret_key_base
)
end
end
end
# Initialize the Rails application.
Rails.application.initialize!

View File

@@ -18,7 +18,7 @@ Rails.application.configure do
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
config.require_master_key = true
config.require_master_key = false
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.