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

Production release #670

Merged
merged 101 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
cc3b8c9
upgrade ruby to 3.2.2
dreamfall Nov 1, 2023
8e0dcd7
update rails and move forms
dreamfall Nov 2, 2023
7b86842
renaming classes for zeitwerk
dreamfall Nov 2, 2023
cfeb71b
update statesman
dreamfall Nov 6, 2023
cc9ccec
fix models specs
dreamfall Nov 6, 2023
af35a86
fix migration error
dreamfall Nov 6, 2023
0ce5dc3
update papertrail and modify configs
dreamfall Nov 6, 2023
de1f475
fix specs initialization on CI
dreamfall Nov 6, 2023
83540de
fixing specs
dreamfall Nov 6, 2023
4206ef4
update rspec and capybara
dreamfall Nov 6, 2023
01bdd39
change rspec configs
dreamfall Nov 7, 2023
3b45110
modify helper
dreamfall Nov 7, 2023
bc9e565
fix factories specs
dreamfall Nov 7, 2023
a002379
fixing miscelannious spec errors
dreamfall Nov 7, 2023
fe343e3
fixing jquery double loading issue
dreamfall Nov 16, 2023
f3b0f51
specify mail delivery job
dreamfall Nov 16, 2023
87a16f4
remove commented out code
dreamfall Nov 20, 2023
225a5cb
update gems
dreamfall Nov 20, 2023
34117ba
Revert "update gems"
dreamfall Nov 21, 2023
3ba47ef
update gems, fix factory bot version
dreamfall Nov 21, 2023
b761064
Merge pull request #623 from bitzesty/rails-upgrade
dreamfall Nov 21, 2023
4144fbf
add missing state translation
dreamfall Nov 24, 2023
08a3246
fix admin verdict not being shown for assessors
dreamfall Nov 24, 2023
71d17aa
Merge pull request #625 from bitzesty/rails-upgrade-after-qa
dreamfall Nov 24, 2023
0525f89
update base image
dreamfall Nov 29, 2023
3e58af6
remove comment from dockerfile
dreamfall Nov 29, 2023
22712aa
modify dockerfile for new image
dreamfall Nov 29, 2023
4a6c9a5
Copy changer on GL nomination mailer
TheDancingClown Nov 29, 2023
5d25181
Merge pull request #626 from bitzesty/mailer-copy
TheDancingClown Nov 29, 2023
cba742c
Bump carrierwave from 2.2.4 to 2.2.5
dependabot[bot] Nov 29, 2023
810a598
fix docker image building
dreamfall Nov 30, 2023
1239b8f
Merge pull request #630 from bitzesty/fix-docker-image
dreamfall Nov 30, 2023
b67ec0f
Allow admins to edit letters of support
TheDancingClown Nov 30, 2023
d033de9
use pure ruby image to build with gcloud
dreamfall Nov 30, 2023
9f9e3ce
Merge pull request #632 from bitzesty/fix-docker-image
dreamfall Nov 30, 2023
01581a6
Merge pull request #631 from bitzesty/support-letters-admin
TheDancingClown Nov 30, 2023
e91aabd
Add support letter policy for removal
TheDancingClown Nov 30, 2023
369d1e8
Merge pull request #633 from bitzesty/support_letter_policy
TheDancingClown Dec 1, 2023
9b28a4b
Fix typo causing duplicate support letters
TheDancingClown Dec 3, 2023
31c440f
Merge pull request #634 from bitzesty/los-typo
TheDancingClown Dec 4, 2023
dfd69cc
remove year duplication on GL dashboard
dreamfall Dec 4, 2023
bf86829
Merge pull request #637 from bitzesty/remove-year-duplication
dreamfall Dec 4, 2023
84eb2b0
Merge pull request #639 from bitzesty/main
dreamfall Dec 6, 2023
5cc57b2
add ability to restore lieutenants for admins
dreamfall Dec 7, 2023
4149da6
Merge pull request #640 from bitzesty/add-ability-to-restore-lieutenants
dreamfall Dec 7, 2023
16f0d48
remove link to deleted lieutenants
dreamfall Dec 8, 2023
fb554e6
Merge pull request #641 from bitzesty/add-ability-to-restore-lieutenants
dreamfall Dec 8, 2023
8becfbf
Merge pull request #642 from bitzesty/main
dreamfall Dec 8, 2023
f097f19
Class and form update for new year
TheDancingClown Jan 9, 2024
b1424ff
Merge pull request #644 from bitzesty/new-year
dreamfall Jan 31, 2024
eade8ed
add ability to remove letter of support right after upload
dreamfall Jan 31, 2024
5c7093a
Merge pull request #645 from bitzesty/fix-letter-of-support-removal
dreamfall Jan 31, 2024
202dfda
hide buttons after submission deadline is passed if form is not editable
dreamfall Jan 31, 2024
4efa279
Merge pull request #646 from bitzesty/letters-of-support-post-deadlin…
dreamfall Feb 1, 2024
60fb69e
remove ability for assessors/lieutenants to delete support letters
dreamfall Feb 1, 2024
a5dc4b3
open privacy notice in new tab
dreamfall Feb 1, 2024
a875bdb
validation copy update
dreamfall Feb 1, 2024
baebcce
Merge pull request #648 from bitzesty/privacy-notice-link
dreamfall Feb 1, 2024
d61a737
Merge pull request #649 from bitzesty/change-validation-copy-supporters
dreamfall Feb 1, 2024
6f57517
Merge pull request #647 from bitzesty/restrict-assessor-view-form-sup…
dreamfall Feb 1, 2024
55d2363
Merge pull request #650 from bitzesty/main
dreamfall Feb 1, 2024
57d7482
Add slack notification only for tests
saenom Feb 13, 2024
0db928f
Merge pull request #651 from bitzesty/add-slack-notification
saenom Feb 13, 2024
e340936
Increase password minimum length to 14 characters
TheDancingClown Feb 13, 2024
a0fb022
Merge pull request #653 from bitzesty/password-length
TheDancingClown Feb 13, 2024
db243a1
Add min password to views
TheDancingClown Feb 13, 2024
3799387
Merge pull request #654 from bitzesty/password
matthewford Feb 13, 2024
5c5cd56
Merge pull request #627 from bitzesty/dependabot/bundler/carrierwave-…
matthewford Feb 13, 2024
b4e4660
Bump follow-redirects from 1.15.3 to 1.15.5
dependabot[bot] Feb 13, 2024
5b517b5
Bump puma from 5.6.7 to 5.6.8
dependabot[bot] Feb 13, 2024
40fc166
Merge pull request #657 from bitzesty/dependabot/bundler/puma-5.6.8
matthewford Feb 13, 2024
8cc0a90
Bump nokogiri from 1.15.5 to 1.16.2
dependabot[bot] Feb 13, 2024
dfe38e4
Merge pull request #655 from bitzesty/dependabot/npm_and_yarn/follow-…
matthewford Feb 13, 2024
c059ba5
Merge pull request #656 from bitzesty/dependabot/bundler/nokogiri-1.16.2
matthewford Feb 13, 2024
8edd4b5
Adds new links to assessors dashboard
TheDancingClown Feb 16, 2024
ed868dc
Adds target _blank to nomination table links
TheDancingClown Feb 16, 2024
55a55be
Add page params when viewing nominations
TheDancingClown Feb 16, 2024
0c77f22
Adds search and page params to user navigation
TheDancingClown Feb 16, 2024
d10730f
Adds search and page params to admin lieutenant paths
TheDancingClown Feb 16, 2024
deed886
Pass search params in admin group leader paths
TheDancingClown Feb 16, 2024
fa7e8e4
Pass search params to admin assessor paths
TheDancingClown Feb 16, 2024
fe1b964
Pass search params to admin admins paths
TheDancingClown Feb 16, 2024
6ed0799
Adds guard for search params
TheDancingClown Feb 16, 2024
8675b1a
Merge pull request #659 from bitzesty/new-tab-nominations
TheDancingClown Feb 16, 2024
ca717c7
Merge pull request #658 from bitzesty/assessor-dashboard
TheDancingClown Feb 16, 2024
6c4ea01
Merge branch 'main' into page-params
TheDancingClown Feb 16, 2024
42eb511
Merge pull request #660 from bitzesty/page-params
TheDancingClown Feb 16, 2024
6ada51d
Assessor dashboard copy change
TheDancingClown Feb 19, 2024
f022c3a
Merge pull request #661 from bitzesty/na-copy
TheDancingClown Feb 19, 2024
4046f76
Adds assessment status
TheDancingClown Feb 19, 2024
d8ac708
Update app/views/assessor/form_answers/_list_body.html.slim
TheDancingClown Feb 21, 2024
c856cea
Merge pull request #662 from bitzesty/assessor-status
TheDancingClown Feb 21, 2024
010bd3a
Merge pull request #664 from bitzesty/main
TheDancingClown Feb 22, 2024
e829768
Copy changes to assessor dashboard
TheDancingClown Feb 22, 2024
8eee9bb
Merge pull request #665 from bitzesty/assessor-dashboard
TheDancingClown Feb 22, 2024
46492b9
Adds new assessor guidance link
TheDancingClown Feb 23, 2024
b27152f
Merge pull request #666 from bitzesty/assessor-guidance
TheDancingClown Feb 23, 2024
1cd764c
Merge pull request #667 from bitzesty/main
TheDancingClown Feb 23, 2024
58f312b
Merge remote-tracking branch 'origin/production' into main-prod-sync-…
dreamfall Feb 27, 2024
1ae0c05
Merge pull request #668 from bitzesty/main-prod-sync-270224
dreamfall Feb 27, 2024
561151c
Merge pull request #669 from bitzesty/main
dreamfall Feb 27, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
ruby-version: 3.2.2
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
node-version: '16'
- run: npm install -g yarn
- uses: nanasess/setup-chromedriver@master
- name: Build and run tests
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/slack_notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check for tests or deployment results
on:
workflow_run:
workflows: ["CI"]
types: [completed]

jobs:
notify-slack:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Extract Slack ID for author
id: extract_slack_id
run: |
#!/bin/bash
# user_string="johndoe:U12345678, janedoe:U87654321, alice:U98765432"
user_string="${{ vars.SLACK_USER_IDS }}"
suid=""

IFS=", " read -r -a users <<< "$user_string"
for user in "${users[@]}"; do
IFS=':' read -r github_username slack_user_id <<< "$user"
if [ "$github_username" == "${{github.actor}}" ]; then
suid="$slack_user_id"
break
fi
done

echo "::set-output name=suid::$suid"
- name: tests
uses: ravsamhq/notify-slack-action@v2
if: ${{ github.event.workflow_run.head_branch != 'main' && github.event.workflow_run.head_branch != 'staging' && github.event.workflow_run.head_branch != 'production' }}
with:
status: ${{ github.event.workflow_run.conclusion }}
notification_title: "Tests ${{github.event.workflow_run.conclusion}} on *${{github.event.workflow_run.head_branch}}* - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View ${{github.event.workflow_run.conclusion}}>"
message_format: "{emoji} *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <{repo_url}|{repo}>"
footer: "Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View ${{github.event.workflow_run.conclusion}}>"
mention_users: ${{ steps.extract_slack_id.outputs.suid }}
mention_users_when: "failure,warnings"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
3.2.2
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
ARG RUBY_VERSION=2.7.7
ARG RUBY_VERSION=3.2.2

FROM ruby:2.7.7
FROM ruby:${RUBY_VERSION}

ENV HOME=/app
WORKDIR /app

# ENV SSL_CERT_DIR=/etc/ssl/certs
# ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

# Install NodeJS
RUN apt-get update
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs npm
RUN npm install yarn -g

# ENV SSL_CERT_DIR=/etc/ssl/certs
# ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

ENV CURL_CONNECT_TIMEOUT=0 CURL_TIMEOUT=0 GEM_PATH="$HOME/vendor/bundle/ruby/${RUBY_VERSION}:$GEM_PATH" LANG=${LANG:-en_US.UTF-8} PATH="$HOME/bin:$HOME/vendor/bundle/bin:$HOME/vendor/bundle/ruby/${RUBY_VERSION}/bin:$PATH" RACK_ENV=${RACK_ENV:-production} RAILS_ENV=${RAILS_ENV:-production} RAILS_SERVE_STATIC_FILES=${RAILS_SERVE_STATIC_FILES:-enabled} SECRET_KEY_BASE=${SECRET_KEY_BASE:-PLACEHOLDERSECRETBASEKEY}

# Cache bundler
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock

RUN bundle config set --local path 'vendor/bundle'
RUN bundle config set --local without 'development test'
RUN bundle install --jobs 4 --retry 3

COPY . /app


RUN yarn install
RUN RAILS_ENV=production NODE_ENV=production DATABASE_URL=postgresql://localhost/dummy_url bundle exec rake assets:precompile
30 changes: 15 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ source 'https://rubygems.org'

git_source(:github) { |name| "https://github.com/#{name}.git" }

ruby '~> 2.7.7'
ruby '~> 3.2.2'

gem 'rails', '6.1.7.1'
gem 'rails', '7.1.1'
gem 'websocket-extensions', '~> 0.1.5'

# SSL redirect
Expand All @@ -15,22 +15,22 @@ gem 'pg'
gem 'activerecord-import'

# Track Changes
gem 'paper_trail', '~> 10.3'
gem 'paper_trail', '~> 15.0'

# Assets & Templates
gem 'sprockets', '~> 3.7.2'
gem 'sprockets-rails', '>= 2.0.0'
gem 'slim-rails', '~> 3.2.0'
gem 'coffee-rails', '5.0'
gem 'jquery-rails', '4.4.0'
gem 'jquery-rails', '~> 4.4'
gem 'jquery-ui-rails', '6.0.1'
gem 'bootstrap-sass', '~> 3.4'
gem 'govuk_frontend_toolkit', '~> 3.1.0'
gem 'govuk_template', '0.12.0'
gem 'uglifier', '>= 2.7.2'
gem "terser", "~> 1.1"
gem 'js_cookie_rails', '2.1.4'
gem 'ckeditor'
gem 'webpacker', '6.0.0.beta.7'
gem 'webpacker'

# Autolinking in admin mass user mailer
gem 'rails_autolink'
Expand Down Expand Up @@ -70,7 +70,7 @@ gem 'kaminari'
gem 'wicked', '~> 1.1'

# Statemachine
gem 'statesman', '3.5.0'
gem 'statesman', '~> 11.0'

# Form & Data helpers
gem 'simple_form', '~> 5.0'
Expand All @@ -84,7 +84,7 @@ gem 'prawn-table'
gem 'nokogiri'

# Uploads
gem 'carrierwave', '~> 2.2.2'
gem 'carrierwave', '~> 2.2.5'
gem 'google-cloud-storage', '~> 1.34.1'
gem 'carrierwave-google-storage', github: "bitzesty/carrierwave-google-storage", ref: 'c706a21c6c25045cae2e39bcab5bf594af0bcf46'
gem 'vigilion', '~> 1.0.4', github: 'vigilion/vigilion-ruby', ref: '7d6a7e5'
Expand Down Expand Up @@ -124,7 +124,7 @@ gem 'nilify_blanks'
gem 'curb', '0.9.10'

# Web server
gem 'puma', '~> 5.6.7'
gem 'puma', '~> 5.6.8'

# Performance & Error reporting
gem 'appsignal'
Expand All @@ -150,15 +150,15 @@ gem 'rack-canonical-host'

gem 'rails-healthcheck'

gem 'matrix', '~> 0.4.1'

group :development do
gem 'letter_opener'
gem 'rack-mini-profiler', '>= 0.10.1', require: false
gem 'binding_of_caller'
gem 'rubocop', '~> 0.52', require: false
# When need to copy model with nested associations
gem 'amoeba', '3.0.0'
# for RailsPanel Chrome extension
gem 'meta_request'
gem 'listen'

# Fixes https://github.com/rails/rails/issues/26658#issuecomment-255590071
Expand All @@ -169,20 +169,20 @@ gem 'dotenv-rails'

group :development, :test do
# Enviroment variables
gem 'rspec-rails', '~> 4.0.1'
gem 'rspec-rails', '~> 6.0'
gem 'rspec-github', require: false
gem "pry-byebug"
gem 'rails-controller-testing'
gem "selenium-webdriver"
end

group :test do
gem 'factory_bot_rails'
gem 'capybara', '3.33'
gem 'factory_bot_rails', '6.2' # https://github.com/thoughtbot/factory_bot_rails/issues/433
gem 'capybara', '~> 3.39'
gem 'poltergeist'
gem 'database_cleaner-active_record'
gem 'launchy'
gem 'turnip', '~> 4.2.0'
gem 'turnip', '~> 4.4.0'
gem 'shoulda-matchers', require: false
gem 'pdf-inspector', require: 'pdf/inspector'
gem 'codeclimate_circle_ci_coverage'
Expand Down
Loading
Loading