Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cbdda31
Configure rubocop to use the govuk gem
edavey Aug 14, 2025
bf9ce7a
Tidy Gemfile: remove comments
edavey Aug 14, 2025
c4e700f
Add govuk-recommended Gems
edavey Aug 14, 2025
63af27b
Update database.yml
edavey Aug 14, 2025
f8ec2b5
Replace encrypted creds file with a config for secrets
edavey Aug 14, 2025
6d7d476
Define initial healthcheck routes
edavey Aug 14, 2025
b88b408
Config JS and SCSS linting
edavey Aug 14, 2025
ef022a3
Add yarn lock file
edavey Aug 14, 2025
e8101b9
Apply Puma config from govuk_app_config gem
edavey Aug 18, 2025
76513fc
Add project licence (MIT)
edavey Aug 18, 2025
9bf1dfc
Add boilerplate headings to README
edavey Aug 18, 2025
56d4c42
Add erb_lint gem
edavey Aug 18, 2025
a23dc4b
Add Pry gems for debugging
edavey Aug 18, 2025
3fbec0b
Add rake task for linting
edavey Aug 18, 2025
b1e44b7
tmp add .erb_lint.yml
edavey Aug 18, 2025
3bb5cfd
Add mini-test gems and run test in default rake task
edavey Aug 18, 2025
bc64abf
Add GovUK Frontend and initial layout
edavey Aug 18, 2025
82c68d7
Run tests in default rake task
edavey Aug 18, 2025
95be3c6
Bulk addition of gem dependencies
edavey Aug 20, 2025
69c6752
Add cucumber testing with a single feature
edavey Aug 20, 2025
7e8c662
Add CBM models from Whitehall
edavey Aug 20, 2025
afc8c9e
Add some initial db tables
edavey Aug 20, 2025
93391a6
Add Playwright JS package
edavey Aug 20, 2025
27db582
Add kaminar view (for pagination)
edavey Aug 20, 2025
9d37f79
Add 2 'whitehall' libraries which are needed
edavey Aug 20, 2025
f06551d
Add routes from Whitehall engine
edavey Aug 20, 2025
94a6c16
Add main content configuration file from Whitehall engine
edavey Aug 20, 2025
c990793
Add helpers
edavey Aug 20, 2025
d11b2d7
Add to main helper file
edavey Aug 20, 2025
82b0662
Add validator classes
edavey Aug 20, 2025
1723450
Add Service classes
edavey Aug 20, 2025
bce9a34
Fix layout to reference domain-config script correctly
edavey Aug 20, 2025
f4695f7
Add confirmation copy presenter
edavey Aug 20, 2025
56fa245
Tweak application main file to match Whitehall
edavey Aug 20, 2025
d556f13
Ignore MacOS filesystem dotfiles
edavey Aug 20, 2025
effd5cd
Add controllers
edavey Aug 20, 2025
6c3fdd9
Add components
edavey Aug 20, 2025
e315203
Ignore test coverage reports
edavey Aug 20, 2025
986ff4b
Add views
edavey Aug 20, 2025
c1d9263
Add config for Better Errors gem
edavey Aug 20, 2025
ac10336
Add test fixture factories (FactoryBot)
edavey Aug 20, 2025
c641308
Add test helper
edavey Aug 20, 2025
a7ba92b
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 20, 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
37 changes: 37 additions & 0 deletions .erb_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
glob: "**/*.erb"
exclude:
- '**/vendor/**/*'
- 'test/fixtures/**'
linters:
Rubocop:
enabled: true
exclude:
- "**/vendor/**/*"
- "**/vendor/**/.*"
- "bin/**"
- "db/**/*"
- "config/**/*"
rubocop_config:
inherit_from:
- .rubocop.yml
AllCops:
DisabledByDefault: true
Layout/InitialIndentation:
Enabled: false
Layout/TrailingEmptyLines:
Enabled: false
Layout/TrailingWhitespace:
Enabled: false
Naming/FileName:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Layout/LineLength:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Layout/FirstHashElementIndentation:
Enabled: false
Rails/SaveBang:
Enabled: false
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
# belong in git's global ignore instead:
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`

# System files
.DS_Store

# Ignore bundler config.
/.bundle

# Ignore all environment files.
/.env*

# Ignore caches
.cache

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
Expand All @@ -30,8 +36,19 @@

/public/assets

# Ignore built assets
/app/assets/builds/*
!/app/assets/builds/.keep

# Ignore master key for decrypting credentials and more.
/config/master.key

# Ignore version files other than .ruby-version
mise.toml

# Ignore JS artefacts
node_modules
.yarn

# test coverage reports
/coverage
14 changes: 14 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
semi: false,
singleQuote: true,
trailingComma: 'none',
overrides: [
{
files: '*.scss',
options: {
printWidth: 120,
singleQuote: false
}
}
]
}
28 changes: 22 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Omakase Ruby styling for Rails
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
inherit_gem:
rubocop-govuk:
- config/default.yml
- config/rails.yml
- config/rake.yml
- config/rspec.yml

# Overwrite or add rules to create your own house style
inherit_mode:
merge:
- Exclude

# **************************************************************
# TRY NOT TO ADD OVERRIDES IN THIS FILE
#
# This repo is configured to follow the RuboCop GOV.UK styleguide.
# Any rules you override here will cause this repo to diverge from
# the way we write code in all other GOV.UK repos.
#
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
# Layout/SpaceInsideArrayLiteralBrackets:
# Enabled: false
# See https://github.com/alphagov/rubocop-govuk/blob/main/CONTRIBUTING.md
# **************************************************************

Rails/SaveBang:
Exclude:
- 'Rakefile'
2 changes: 2 additions & 0 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends: stylelint-config-gds/scss
ignoreFiles:
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.9.2.cjs
76 changes: 47 additions & 29 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,60 @@
source "https://rubygems.org"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 8.0.2", ">= 8.0.2.1"
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
gem "propshaft"
# Use postgresql as the database for Active Record
gem "babosa"
gem "bootsnap", require: false
gem "content_block_tools"
gem "dartsass-rails"
gem "friendly_id"
gem "gds-api-adapters"
gem "gds-sso"
gem "govuk_app_config"
gem "govuk_frontend_toolkit"
gem "govuk_publishing_components"
gem "jbuilder"
gem "kaminari"
gem "pg", "~> 1.1"
# Use the Puma web server [https://github.com/puma/puma]
gem "plek"
gem "puma", ">= 5.0"
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"
# Use Redis adapter to run Action Cable in production
# gem "redis", ">= 4.0.1"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ windows jruby ]

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

# Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/]
gem "rails", "~> 8.0.2", ">= 8.0.2.1"
gem "record_tag_helper", require: false
gem "sprockets-rails"
gem "thruster", require: false
gem "transitions", require: ["transitions", "active_record/transitions"]
gem "tzinfo-data", platforms: %i[windows jruby]
gem "view_component"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"

# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
gem "brakeman", require: false
gem "byebug"
gem "debug", platforms: %i[mri windows], require: "debug/prelude"
gem "erb_lint"
gem "govuk_test"
gem "pry-byebug"
gem "pry-rails"
gem "rspec-rails"
gem "rubocop-govuk"
end

# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem "rubocop-rails-omakase", require: false
group :test do
gem "database_cleaner-active_record"
gem "factory_bot"
gem "minitest"
gem "minitest-fail-fast"
gem "minitest-stub-const"
gem "mocha"
gem "simplecov"
gem "webmock", require: false
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
gem "better_errors"
gem "binding_of_caller"
end

group :cucumber, :test do
gem "capybara"
gem "capybara-playwright-driver"
gem "cucumber"
gem "cucumber-rails", require: false
gem "launchy"
end
Loading
Loading