Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e068924
Upgrade from Rails 6.1 to 7.0
rbclark Jan 26, 2025
e61e669
Downgrade to Ruby 3.0 due to settingslogic not supporting 3.1
rbclark Jan 26, 2025
675993c
Run tests against node 16
rbclark Jan 26, 2025
ab4c309
Update yarn.lock for Rails 7 upgrade
aaronlippold Jun 9, 2025
2afd095
Fix Rubocop offenses for Rails 7 upgrade
aaronlippold Jun 9, 2025
3cb8469
Fix additional Rubocop offenses for Rails 7
aaronlippold Jun 9, 2025
1ddea33
Fix more Rubocop offenses for Rails 7
aaronlippold Jun 9, 2025
261ccc8
Fix all remaining Rubocop offenses for Rails 7 upgrade
aaronlippold Jun 9, 2025
73bc415
Fix Audited::Audit constant error for Rails 7 compatibility
aaronlippold Jun 9, 2025
1001439
Fix polymorphic user association issue in VulcanAudit for Rails 7
aaronlippold Jun 9, 2025
0bbfca5
Fix Rubocop trailing whitespace offense
aaronlippold Jun 9, 2025
7314f2c
Add .ruby-version file and update Gemfile to use it
aaronlippold Jun 9, 2025
c9e211f
Generalize dev setup script to support multiple auth modes
aaronlippold Jun 9, 2025
10cc6ab
Fix audited gem validation issue for Rails 7
aaronlippold Jun 9, 2025
35229e6
Fix all Rubocop offenses
aaronlippold Jun 9, 2025
d2762c9
Test Overcommit pre-commit hook
aaronlippold Jun 9, 2025
108d7a2
Remove test file
aaronlippold Jun 9, 2025
9dbbc97
Add Overcommit for pre-commit linting hooks
aaronlippold Jun 9, 2025
83b5550
Fix audit validation errors for Rails 7 compatibility
aaronlippold Jun 9, 2025
4bb191c
Fix remaining test failures for Rails 7 upgrade
aaronlippold Jun 9, 2025
32315e6
Update gems for Rails 7 compatibility and fix login test
aaronlippold Jun 9, 2025
55d7a53
Fix Rails 7 Vue binding issues and login test
aaronlippold Jun 9, 2025
7397e79
Fix local login test to use correct form selector
aaronlippold Jun 9, 2025
8198911
Clean up development scripts and add ShellCheck linting (disabled by …
aaronlippold Jun 9, 2025
961dd66
Update README.md
aaronlippold Jun 10, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: ruby/setup-ruby@v1
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '16'
- name: Cache ruby gems
uses: actions/cache@v4
with:
Expand Down
159 changes: 159 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Overcommit configuration for Rails projects
# https://github.com/sds/overcommit

# Don't use Bundler context since overcommit is installed globally
gemfile: false

# Hooks that run during `git commit`
CommitMsg:
# Enforce proper commit message format
CapitalizedSubject:
enabled: true
description: 'Check subject capitalization'
EmptyMessage:
enabled: true
description: 'Check for empty commit message'
TextWidth:
enabled: true
description: 'Check text width'
max_subject_width: 72
max_body_width: 80
TrailingPeriod:
enabled: true
description: 'Check for trailing periods in subject'
SingleLineSubject:
enabled: true
description: 'Check subject is single line'

# Hooks that run before `git commit`
PreCommit:
# Ruby/Rails specific hooks
RuboCop:
enabled: true
description: 'Analyze Ruby code with RuboCop'
required_executable: 'bundle'
command: ['bundle', 'exec', 'rubocop']
flags: ['--autocorrect-all', '--display-cop-names']
on_warn: fail # Treat warnings as failures
problem_on_unmodified_line: report
include:
- '**/*.rb'
- '**/*.rake'
- '**/Gemfile'
- '**/Rakefile'

RailsBestPractices:
enabled: false # Enable when ready
description: 'Analyze with rails_best_practices'
required_executable: 'bundle'
command: ['bundle', 'exec', 'rails_best_practices']

RailsSchemaUpToDate:
enabled: true
description: 'Check if db/schema.rb matches migrations'

BundleCheck:
enabled: true
description: 'Check Gemfile dependencies'

# JavaScript/Vue specific hooks
EsLint:
enabled: true
description: 'Analyze JavaScript/Vue with ESLint'
required_executable: 'yarn'
command: ['yarn', 'lint']
include:
- '**/*.js'
- '**/*.vue'

# Shell script hooks
ShellCheck:
enabled: false
description: 'Analyze shell scripts with ShellCheck'
include:
- '**/*.sh'
- '**/bin/*'
exclude:
- '**/bin/*.rb'
- '**/bin/bundle'
- '**/bin/rails'
- '**/bin/rake'
- '**/bin/spring'
- '**/bin/webpack'
- '**/bin/webpack-dev-server'
- '**/bin/yarn'

# General hooks
TrailingWhitespace:
enabled: true
exclude:
- '**/db/schema.rb'
- '**/db/structure.sql'
- '**/*.md'

MergeConflicts:
enabled: true

YamlSyntax:
enabled: true
include:
- '**/*.yml'
- '**/*.yaml'

JsonSyntax:
enabled: true
include:
- '**/*.json'

HardTabs:
enabled: true
exclude:
- '**/Makefile'
- '**/*.mk'

# Security scanning (disabled by default for speed)
Brakeman:
enabled: false
description: 'Security scan with Brakeman'
command: ['bundle', 'exec', 'brakeman', '--quiet', '--summary']

BundleAudit:
enabled: false
description: 'Check for vulnerable gem versions'

# Hooks that run after `git checkout`
PostCheckout:
BundleInstall:
enabled: true
description: 'Install bundle dependencies'

YarnInstall:
enabled: true
description: 'Install yarn dependencies'
required_executable: 'yarn'
command: ['yarn', 'install']

ActiveRecordMigrations:
enabled: true
description: 'Run pending migrations'

# Hooks that run after `git merge`
PostMerge:
BundleInstall:
enabled: true

YarnInstall:
enabled: true
required_executable: 'yarn'
command: ['yarn', 'install']

ActiveRecordMigrations:
enabled: true

# Hooks that run after `git rewrite`
PostRewrite:
BundleInstall:
enabled: true

YarnInstall:
enabled: true
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require:
plugins:
- rubocop-rails
- rubocop-performance

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.5
3.0.6
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ruby 2.7.5
ruby 3.0.6
nodejs 16.20.2
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7
FROM ruby:3.0.7

RUN curl -sS https://deb.nodesource.com/setup_16.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
Expand All @@ -10,7 +10,7 @@ ENV RAILS_ENV=production
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

RUN gem install bundler:2.2.32
RUN gem install bundler:2.3.10
ADD Gemfile* $APP_HOME/
RUN bundle install --without development test

Expand Down
28 changes: 16 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

source 'https://rubygems.org'

ruby '~> 2.7'
ruby File.read('.ruby-version').strip

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.4'
gem 'rails', '~> 7.0.0'
# TODO: Remove this once upgrading to Rails 7.1, this is required for a bug specific to Rails 7.0
gem 'concurrent-ruby', '1.3.4'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
Expand Down Expand Up @@ -45,7 +47,7 @@ gem 'settingslogic', '~> 2.0.9'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

gem 'audited', '~> 5.3.3'
gem 'audited', '~> 5.8.0'

gem 'activerecord-import'

Expand All @@ -61,6 +63,8 @@ gem 'fast_excel'
# For writing excel files
gem 'ruh-roo', '~> 3.0.0', require: 'roo'

gem 'rexml'

gem 'ox'

gem 'rubyzip'
Expand All @@ -69,37 +73,37 @@ gem 'mitre-inspec-objects'
gem 'rest-client'

group :development do
gem 'listen', '~> 3.1.5'
gem 'listen'
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'letter_opener'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'spring-watcher-listen'
# Process manager for Procfile-based applications (development only)
gem 'foreman'
# Git hook manager for automated linting and formatting
gem 'overcommit', '~> 0.60', require: false
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
# gem 'webdrivers'

gem 'capybara'
gem 'database_cleaner-active_record'
gem 'rubocop', require: false
gem 'rubocop-performance'
gem 'rubocop-rails'
gem 'selenium-webdriver'
gem 'simplecov', require: false
end

group :development, :test do
gem 'brakeman'
gem 'byebug'
gem 'factory_bot_rails', '~> 5.2.0'
gem 'factory_bot_rails', '~> 6.4.0'
gem 'pry'
gem 'rspec-mocks'
gem 'rspec-rails', '~> 4.0.0'
gem 'rspec-rails', '~> 6.0.0'
# Load environment variables from .env files in development and test
gem 'dotenv-rails'
end
Expand Down
Loading