Skip to content

Commit

Permalink
Merge pull request #2671 from tulibraries/qa
Browse files Browse the repository at this point in the history
Rails 7
  • Loading branch information
cdoyle-temple authored Jan 11, 2023
2 parents bb6feff + 0aa414c commit 1362801
Show file tree
Hide file tree
Showing 234 changed files with 6,539 additions and 9,847 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

30 changes: 16 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ orbs:
coveralls: coveralls/[email protected]

workflows:
version: 2
run_tests:
jobs:
- run_tests
Expand Down Expand Up @@ -33,14 +34,14 @@ workflows:
jobs:
run_tests:
docker:
- image: cimg/ruby:2.7.6-node
- image: cimg/ruby:3.1.3-node
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
environment:
TZ: "America/New_York"

- image: cimg/postgres:13.4
- image: cimg/postgres:14.5
environment:
TZ: "America/New_York"
resource_class: small
Expand All @@ -50,13 +51,13 @@ jobs:
name: make sure we have the latest bundler
command: |
sudo gem update --system
gem install -f bundler:2.1.4
gem install -f bundler:2.3.26
- restore_cache:
keys:
- gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- gem-cache-v1-{{ arch }}-{{ .Branch }}
- gem-cache-v1
- gem-cache-v3-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- gem-cache-v3-{{ arch }}-{{ .Branch }}
- gem-cache-v3

- run:
name: bundle install w/ dependent libs
Expand All @@ -67,7 +68,7 @@ jobs:
bundle install --path vendor/bundle
- save_cache:
key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
key: gem-cache-v3-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

Expand All @@ -92,7 +93,6 @@ jobs:
- run:
name: Ruby Lint
command: bundle exec rubocop

- run:
name: Brakeman
command: bundle exec brakeman --no-pager --no-threads
Expand All @@ -101,6 +101,11 @@ jobs:
name: Install ActionText
command: printf "n\nn\n" | bundle exec rails action_text:install && git clean -f db

- run:
name: Precompile assets
command: |
bundle exec rails assets:precompile
- run:
name: Ruby tests
command: |
Expand All @@ -121,8 +126,7 @@ jobs:
- checkout
- add_ssh_keys:
fingerprints:
- "08:05:8e:1f:ff:2e:4d:59:60:3e:a2:d5:e3:e2:b8:68"
- "2f:37:66:17:11:ae:f9:0f:9e:52:98:41:fe:d0:0c:78"
- "f7:95:df:23:81:5e:03:3e:73:0f:de:6f:1d:47:be:96"
- run:
command: bash .circleci/deploy-qa.sh

Expand All @@ -138,8 +142,7 @@ jobs:
- checkout
- add_ssh_keys:
fingerprints:
- "08:05:8e:1f:ff:2e:4d:59:60:3e:a2:d5:e3:e2:b8:68"
- "2f:37:66:17:11:ae:f9:0f:9e:52:98:41:fe:d0:0c:78"
- "f7:95:df:23:81:5e:03:3e:73:0f:de:6f:1d:47:be:96"
- run:
command: bash .circleci/deploy-stage.sh

Expand All @@ -155,7 +158,6 @@ jobs:
- checkout
- add_ssh_keys:
fingerprints:
- "08:05:8e:1f:ff:2e:4d:59:60:3e:a2:d5:e3:e2:b8:68"
- "2f:37:66:17:11:ae:f9:0f:9e:52:98:41:fe:d0:0c:78"
- "f7:95:df:23:81:5e:03:3e:73:0f:de:6f:1d:47:be:96"
- run:
command: bash .circleci/deploy-prod.sh
30 changes: 14 additions & 16 deletions .docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM harbor.k8s.temple.edu/library/ruby:2.7-alpine
FROM harbor.k8s.temple.edu/library/ruby:3.1-alpine

WORKDIR /app

Expand All @@ -15,25 +15,23 @@ ARG S3_SECRET_ACCESS_KEY
ARG RAILS_MASTER_KEY

RUN apk add -U --no-cache \
bash=5.1.16-r2 \
busybox=1.35.0-r14 \
imagemagick=7.1.0.35-r0 \
libc6-compat=1.2.3-r0 \
libxslt=1.1.35-r0 \
postgresql14-client=14.4-r0 \
shared-mime-info=2.2-r0 \
ssl_client=1.35.0-r14 \
tzdata=2022a-r0 && \
bash=5.2.12-r0 \
busybox=1.35.0-r29 \
imagemagick=7.1.0.52-r0 \
libc6-compat=1.2.3-r4 \
libxslt=1.1.37-r0 \
postgresql14-client=14.6-r1 \
shared-mime-info=2.2-r2 \
ssl_client=1.35.0-r29 \
tzdata=2022f-r1 && \
apk add -U --no-cache --virtual build-dependencies \
git=2.36.1-r0 \
git=2.38.1-r0 \
build-base=0.5-r3 \
libxslt-dev=1.1.35-r0 \
postgresql14-dev=14.4-r0 \
nodejs=16.15.0-r1 \
libxslt-dev=1.1.37-r0 \
postgresql14-dev=14.6-r1 \
nodejs=16.17.1-r0 \
yarn=1.22.19-r0 && \
if [ "${RAILS_ENV}" = "production" ]; then bundle config set --local without "development test"; fi && \
gem install bundler:2.2.18 && \
bundle config build.nokogiri --use-system-libraries && \
bundle install --jobs=8 && \
find "$GEM_HOME" -name Gemfile.lock -exec rm "{}" \; && \
find "$GEM_HOME" -name yarn.lock -exec rm "{}" \; && \
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DOCKER_IMAGE_VERSION=0.2.38
BASE_IMAGE=ruby:2.7-alpine
BASE_IMAGE=ruby:3.1-alpine
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ gem.tags
/db/account_seeds.rb
coverage

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
.DS_Store
/spec/.DS_Store
/public/alerts.json

/app/assets/builds/*
!/app/assets/builds/.keep
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

40 changes: 0 additions & 40 deletions Dockerfile

This file was deleted.

57 changes: 30 additions & 27 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,66 @@

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "2.7.6"
ruby "3.1.3"

gem "rails", "~> 6.1.6"
gem "timecop"
gem "administrate", ">= 0.16.0"
gem "rails", "~> 7.0.4"
gem "action-draft"
gem "active_storage_validations"
gem "activestorage-validator"
gem "administrate", "~> 0.17.0"
gem "administrate-field-date_picker", "~> 0.3.0"
gem "administrate-field-ordered_has_many"
gem "administrate-field-scoped_has_many"
gem "ancestry"
gem "attr_json"
gem "auto_strip_attributes"
gem "aws-sdk-s3"
gem "bootsnap", ">= 1.1.0", require: false
gem "bootstrap", "~> 4.6.1", "< 5.0.0"
gem "bootsnap", require: false
gem "bootstrap"
gem "browser"
gem "cancancan", "~> 3.4"
gem "coffee-rails", "~> 4.2"
gem "cssbundling-rails"
gem "devise"
gem "diffy"
gem "dotenv-rails"
gem "fast_jsonapi", "~> 1.0"
gem "feedjira"
gem "font-awesome-rails"
gem "friendly_id"
gem "fuzzy_match"
gem "google-analytics-rails", "1.1.1"
gem "google-api-client", "~> 0.53"
gem "honeybadger", "~> 5.0"
gem "httparty"
gem "jbuilder", "~> 2.11"
gem "jquery-rails"
gem "image_processing", "~> 1.2"
gem "jbuilder"
gem "jsbundling-rails"
gem "json-ld"
gem "kaminari"
gem "listen", ">= 3.0.5", "< 3.8"
gem "listen", ">= 3.0.5", "< 3.9"
gem "lockbox"
gem "mail_form"
gem "meta-tags"
gem "mimemagic", "0.4.3"
gem "mini_magick"
gem "nokogiri", "1.13.10"
gem "okcomputer"
gem "omniauth", "~> 2.1.0"
gem "omniauth-google-oauth2"
gem "omniauth-rails_csrf_protection"
gem "paper_trail"
gem "paper_trail", git: "https://github.com/paper-trail-gem/paper_trail"
gem "pg"
gem "popper_js", "~> 1.16.0", "< 2.0.0"
gem "puma", "~> 6.0"
gem "puma", "~> 6.0.2"
gem "rswag-api"
gem "rswag-ui"
gem "sass-rails", "~> 6.0"
gem "simple_form"
gem "sitemap_generator"
gem "skylight", "4.3.2"
gem "turbolinks", "~> 5"
gem "sprockets-rails"
gem "stimulus-rails"
gem "timecop"
gem "turbo-rails"
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "uglifier", ">= 1.3.0"
gem "yaml_db"
gem "friendly_id", "~> 5.5.0"
gem "action-draft"
gem "webpacker"
gem "image_processing", "~> 1.12"
gem "mimemagic", "0.4.3"
gem "active_storage_validations"

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand All @@ -83,14 +86,14 @@ group :development do
end

group :test do
gem "capybara", ">= 2.15", "< 4.0"
gem "factory_bot_rails", "~> 6.2.0"
gem "capybara", ">= 2.15"
gem "factory_bot_rails"
gem "guard-rspec", require: false
gem "mutant-rspec"
gem "rails-controller-testing"
gem "rspec-activemodel-mocks"
gem "rspec-rails", ">=3.8.0"
gem "selenium-webdriver", "~> 4.7.1"
gem "rspec-rails"
gem "selenium-webdriver"
gem "simplecov"
gem "simplecov-lcov"
gem "webmock"
Expand Down
Loading

0 comments on commit 1362801

Please sign in to comment.