Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "cron"
cronjob: "0 9 1 1,7 *" # Runs every 6 months at 9am on 1 January and 1 July
cooldown:
default-days: 7 # Wait 7 days after publication
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # actions/checkout@v6 see https://github.com/actions/checkout/releases/tag/v6
with:
fetch-depth: 0 # fetch everything
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # ruby/setup-ruby@v1 see https://github.com/ruby/setup-ruby/tree/v1
with:
ruby-version: 3.4
ruby-version: 4.0
- name: Install dependencies
run: bundle install
- name: Run RuboCop against BASE..HEAD changes
Expand Down
74 changes: 29 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,17 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- '3.4'
- '4.0'
gemfile:
- gemfiles/Gemfile.rails61
- gemfiles/Gemfile.rails70
- gemfiles/Gemfile.rails71
- gemfiles/Gemfile.rails72
- gemfiles/Gemfile.rails80
- gemfiles/Gemfile.rails81
exclude:
# rails 6.1 requires ruby < 3.4
- ruby-version: '3.4'
gemfile: 'gemfiles/Gemfile.rails61'
# rails 7.0 requires ruby >= 2.7, < 3.4
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.4'
gemfile: 'gemfiles/Gemfile.rails70'
# rails 7.2 requires ruby >= 3.1
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.0'
gemfile: 'gemfiles/Gemfile.rails72'
# rails 8.0 requires ruby >= 3.2
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.0'
gemfile: 'gemfiles/Gemfile.rails80'
- ruby-version: '3.1'
gemfile: 'gemfiles/Gemfile.rails80'

Expand All @@ -46,9 +30,9 @@ jobs:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # actions/checkout@v6 see https://github.com/actions/checkout/releases/tag/v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # ruby/setup-ruby@v1 see https://github.com/ruby/setup-ruby/tree/v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
Expand All @@ -70,28 +54,28 @@ jobs:
if: ${{ needs.test.result != 'success' }}
run: exit 1

notify:
# Run only on master, but regardless of whether tests past:
if: ${{ always() && github.ref == 'refs/heads/master' }}

needs: test_matrix

runs-on: ubuntu-latest

steps:
- uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,commit,author
custom_payload: |
{
channel: 'C7FQWGDHP',
username: 'CI – ' + '${{ github.repository }}'.split('/')[1],
icon_emoji: ':hammer_and_wrench:',
attachments: [{
color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.`
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# notify:
# # Run only on master, but regardless of whether tests past:
# if: ${{ always() && github.ref == 'refs/heads/master' }}
#
# needs: test_matrix
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: 8398a7/action-slack@v3
# with:
# status: custom
# fields: workflow,commit,author
# custom_payload: |
# {
# channel: 'C7FQWGDHP',
# username: 'CI – ' + '${{ github.repository }}'.split('/')[1],
# icon_emoji: ':hammer_and_wrench:',
# attachments: [{
# color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning',
# text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.`
# }]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## [Unreleased]
* no unreleased changes

## 2.3.4 / 2026-07-10
### Fixed
* Support Rails 8.1, Ruby 4.0. Drop support for Ruby 3.2 [backported from v2.4.3]

## 2.3.3 / 2025-11-24
### Fixed
* Support Ruby 3.4, Rails 8.0 [backported from v2.4.3]
Expand Down
35 changes: 35 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Security

NHS England takes security and the protection of private data extremely seriously. If you believe you have found a vulnerability or other issue which has compromised or could compromise the security of any of our systems and/or private data managed by our systems, please do not hesitate to contact us using the methods outlined below.

## Table of Contents

- [Security](#security)
- [Table of Contents](#table-of-contents)
- [Reporting a vulnerability](#reporting-a-vulnerability)
- [Email](#email)
- [NCSC](#ncsc)
- [General Security Enquiries](#general-security-enquiries)

## Reporting a vulnerability

Please note, email is our preferred method of receiving reports.

### Email

If you wish to notify us of a vulnerability via email, please include detailed information on the nature of the vulnerability and any steps required to reproduce it.

You can reach us at:

- [Brian.Shand@nhs.net](mailto:Brian.Shand@nhs.net)
- [cybersecurity@nhs.net](mailto:cybersecurity@nhs.net)

### NCSC

You can send your report to the National Cyber Security Centre, who will assess your report and pass it on to NHS England if necessary.

You can report vulnerabilities here: [https://www.ncsc.gov.uk/information/vulnerability-reporting](https://www.ncsc.gov.uk/information/vulnerability-reporting)

## General Security Enquiries

If you have general enquiries regarding our cybersecurity, please reach out to us at [cybersecurity@nhs.net](mailto:cybersecurity@nhs.net)
12 changes: 0 additions & 12 deletions gemfiles/Gemfile.rails61

This file was deleted.

12 changes: 0 additions & 12 deletions gemfiles/Gemfile.rails70

This file was deleted.

3 changes: 3 additions & 0 deletions gemfiles/Gemfile.rails71
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ gem 'rails', '~> 7.1.0'

# sqlite3 2.x is not supported on ruby 3.0
gem 'sqlite3', '~> 1.7'

# Rails <= 8.0 does not support minitest 6
gem 'minitest', '>= 5.11', '< 6.0'
3 changes: 3 additions & 0 deletions gemfiles/Gemfile.rails72
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ source 'https://rubygems.org'
gemspec path: '..'

gem 'rails', '~> 7.2.0'

# Rails <= 8.0 does not support minitest 6
gem 'minitest', '>= 5.11', '< 6.0'
5 changes: 5 additions & 0 deletions gemfiles/Gemfile.rails81
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gemspec path: '..'

gem 'rails', '~> 8.1.0'
2 changes: 1 addition & 1 deletion lib/ndr_error/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# Contains the version of NdrError. Sourced by the gemspec.
module NdrError
VERSION = '2.3.3'
VERSION = '2.3.4'
end
26 changes: 3 additions & 23 deletions ndr_error.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,11 @@ Gem::Specification.new do |s|
s.license = 'MIT'

s.files = Dir['{app,config,db,lib}/**/*', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md',
'MIT-LICENSE', 'Rakefile', 'README.md'] - ['.travis.yml']
'MIT-LICENSE', 'Rakefile', 'README.md', 'SECURITY.md']

s.required_ruby_version = '>= 3.0'
s.required_ruby_version = '>= 3.3'

s.add_dependency 'rails', '>= 6.1', '< 8.1'

# Support rails 6.1 with Ruby 3.1
s.add_dependency 'net-imap'
s.add_dependency 'net-pop'
s.add_dependency 'net-smtp'
s.add_dependency 'rails', '>= 7.1', '< 8.2'

s.add_dependency 'will_paginate'

Expand All @@ -35,23 +30,8 @@ Gem::Specification.new do |s|
s.add_development_dependency 'pry'
s.add_development_dependency 'puma'

# Rails 6.1 and 7.0 do not support sqlite3 2.x; they specify gem "sqlite3", "~> 1.4"
# in lib/active_record/connection_adapters/sqlite3_adapter.rb
# cf. gemfiles/Gemfile.rails70
s.add_development_dependency 'sqlite3'

# Workaround build issue on GitHub Actions with ruby <= 3.1 when installing sass-embedded
# gem version 1.81.0: NoMethodError: undefined method `parse' for #<Psych::Parser...>
# https://bugs.ruby-lang.org/issues/19371
s.add_development_dependency 'psych', '< 5'

# Workaround build issue on GitHub Actions with ruby <= 3.1 when installing sass-embedded
# Versions 1.77.0 and above require ruby >= 3.2 for packaged x86_64-linux binaries
# but say they're compatible with ruby 3.1.
# 1.76.0 has a bug that was fixed in 1.77.1, which we can't use yet.
# https://github.com/sass/dart-sass/issues/2239
s.add_development_dependency 'sass-embedded', '~> 1.75.0' if RUBY_VERSION.start_with?('3.1') # rubocop:disable Gemspec/RubyVersionGlobalsUsage

s.add_development_dependency 'mocha'
s.add_development_dependency 'test-unit', '~> 3.0'

Expand Down