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

STAGING - Release 1.7.0 #541

Merged
merged 42 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
716c2df
Merge pull request #477 from Crown-Commercial-Service/release-1.6.0
tim-s-ccs Jun 27, 2023
be34099
build(deps): bump jwt from 2.7.0 to 2.7.1
dependabot[bot] Jun 18, 2023
c26e4bb
build(deps-dev): bump rubocop from 1.50.2 to 1.52.1
dependabot[bot] Jun 18, 2023
1f9e6e4
build(deps): bump ruby/setup-ruby from 1.151.0 to 1.152.0
dependabot[bot] Jun 18, 2023
5abc552
build(deps): bump canonical-rails from `7d6d958` to `52fbad6`
dependabot[bot] Jun 18, 2023
4d24460
build(deps): bump paambaati/codeclimate-action from 4.0.0 to 5.0.0
dependabot[bot] Jul 9, 2023
e36c501
build(deps): bump govuk-frontend from 4.6.0 to 4.7.0
dependabot[bot] Jul 9, 2023
aaab7a9
build(deps): bump actions/checkout from 3 to 4
dependabot[bot] Sep 10, 2023
0248bfe
Remove google analytics (not Google Tag Manager)
tim-s-ccs Sep 11, 2023
ec56272
Update rails version and run rails update.
tim-s-ccs Sep 11, 2023
8a6aa66
build(deps): bump semver from 5.7.1 to 5.7.2
dependabot[bot] Jul 11, 2023
01ed9e7
build(deps): bump jquery from 3.7.0 to 3.7.1
dependabot[bot] Sep 3, 2023
3da827c
build(deps): bump puma from 6.2.2 to 6.3.1
dependabot[bot] Sep 11, 2023
f365e6f
build(deps-dev): bump rubocop-performance from 1.17.1 to 1.19.0
dependabot[bot] Sep 11, 2023
e4d8cc9
build(deps-dev): bump rspec-rails from 6.0.1 to 6.0.3
dependabot[bot] Sep 11, 2023
b8e12c5
build(deps): bump aws-sdk-ssm from 1.150.0 to 1.156.0
dependabot[bot] Sep 11, 2023
e8e06be
build(deps): bump aws-sdk-cognitoidentityprovider from 1.73.0 to 1.81.0
dependabot[bot] Sep 11, 2023
4747052
Fix issue with error summary due to deprecated methods
tim-s-ccs Sep 11, 2023
efcdbd4
Update to Ruby v3.2.1 and run rubocop
tim-s-ccs Sep 11, 2023
1cd4789
Add GTM to the CSP to prevent XSS
tim-s-ccs Sep 11, 2023
ad0db7d
build(deps): bump ruby/setup-ruby from 1.152.0 to 1.153.0
dependabot[bot] Sep 17, 2023
fbae5db
build(deps): bump aws-sdk-s3 from 1.120.1 to 1.134.0
dependabot[bot] Sep 17, 2023
daf33d1
build(deps): bump rack-attack from 6.6.1 to 6.7.0
dependabot[bot] Sep 17, 2023
22205cf
build(deps-dev): bump brakeman from 5.4.1 to 6.0.1
dependabot[bot] Sep 17, 2023
3898968
build(deps-dev): bump web-console from 4.2.0 to 4.2.1
dependabot[bot] Sep 17, 2023
7e3140c
build(deps-dev): bump rubocop-performance from 1.19.0 to 1.19.1
dependabot[bot] Sep 24, 2023
f261a3b
build(deps): bump ruby/setup-ruby from 1.153.0 to 1.154.0
dependabot[bot] Sep 24, 2023
6711457
build(deps): bump sqlite3 from 1.6.2 to 1.6.6
dependabot[bot] Sep 26, 2023
3a45f9e
GMBP-113: Add Dockerfile to application ready for AWS migration (#526)
georges1996 Sep 27, 2023
5675af7
build(deps): bump aws-sdk-ssm from 1.156.0 to 1.158.0
dependabot[bot] Oct 1, 2023
820faeb
build(deps): bump aws-sdk-cognitoidentityprovider from 1.81.0 to 1.82.0
dependabot[bot] Oct 2, 2023
14727a8
build(deps): bump aws-sdk-s3 from 1.134.0 to 1.136.0
dependabot[bot] Oct 2, 2023
c30aea4
build(deps-dev): bump rubocop from 1.52.1 to 1.56.4
dependabot[bot] Oct 1, 2023
69b41d4
build(deps): bump puma from 6.3.1 to 6.4.0
dependabot[bot] Oct 3, 2023
8030355
build(deps): bump pg from 1.5.3 to 1.5.4
dependabot[bot] Oct 3, 2023
4d3a1ea
build(deps-dev): bump rubocop-rails from 2.19.1 to 2.21.2
dependabot[bot] Oct 1, 2023
6153a8c
build(deps-dev): bump rubocop-rails from 2.19.1 to 2.21.2
dependabot[bot] Oct 3, 2023
cbaa511
Run rubocop
tim-s-ccs Oct 3, 2023
42743b1
Update the cookie names to match the unified approach.
tim-s-ccs Oct 4, 2023
365d9d4
build(deps-dev): bump rubocop-rspec from 2.22.0 to 2.24.1
dependabot[bot] Oct 4, 2023
2ffa275
Run fixes for rubocop
tim-s-ccs Oct 4, 2023
5bf4685
build(deps): bump activerecord-postgis-adapter from 8.0.2 to 8.0.3
dependabot[bot] Oct 8, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:

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

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1.151.0
uses: ruby/setup-ruby@v1.154.0
with:
bundler-cache: true

Expand All @@ -46,7 +46,7 @@ jobs:
run: bin/rake

- name: publish code coverage
uses: paambaati/codeclimate-action@v4.0.0
uses: paambaati/codeclimate-action@v5.0.0
with:
debug: true
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop' }}
172 changes: 5 additions & 167 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec # or rubocop-minitest
AllCops:
NewCops: enable
TargetRubyVersion: 3.0
TargetRubyVersion: 3.2
Exclude:
- 'db/**/*'
- 'script/**/*'
Expand Down Expand Up @@ -132,173 +132,11 @@ RSpec/MultipleMemoizedHelpers:

Metrics/ParameterLists:
Max: 6

Metrics/ModuleLength:
Exclude:
- 'spec/models/**/*'
- 'spec/controllers/**/*'
Layout/BeginEndAlignment: # (new in 0.91)
Enabled: true
Layout/EmptyLinesAroundAttributeAccessor: # (new in 0.83)
Enabled: true
Layout/SpaceAroundMethodCallOperator: # (new in 0.82)
Enabled: true
Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89)
Enabled: true
Lint/ConstantDefinitionInBlock: # (new in 0.91)
Enabled: true
Lint/DeprecatedOpenSSLConstant: # (new in 0.84)
Enabled: true
Lint/DuplicateElsifCondition: # (new in 0.88)
Enabled: true
Lint/DuplicateRequire: # (new in 0.90)
Enabled: true
Lint/DuplicateRescueException: # (new in 0.89)
Enabled: true
Lint/EmptyConditionalBody: # (new in 0.89)
Enabled: true
Lint/EmptyFile: # (new in 0.90)
Enabled: true
Lint/FloatComparison: # (new in 0.89)
Enabled: true
Lint/HashCompareByIdentity: # (new in 0.93)
Enabled: true
Lint/IdentityComparison: # (new in 0.91)
Enabled: true
Lint/MissingSuper: # (new in 0.89)
Enabled: true
Lint/MixedRegexpCaptureTypes: # (new in 0.85)
Enabled: true
Lint/OutOfRangeRegexpRef: # (new in 0.89)
Enabled: true
Lint/RaiseException: # (new in 0.81)
Enabled: true
Lint/RedundantSafeNavigation: # (new in 0.93)
Enabled: true
Lint/SelfAssignment: # (new in 0.89)
Enabled: true
Lint/StructNewOverride: # (new in 0.81)
Enabled: true
Lint/TopLevelReturnWithArgument: # (new in 0.89)
Enabled: true
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
Enabled: true
Lint/UnreachableLoop: # (new in 0.89)
Enabled: true
Lint/UselessMethodDefinition: # (new in 0.90)
Enabled: true
Lint/UselessTimes: # (new in 0.91)
Enabled: true
Style/AccessorGrouping: # (new in 0.87)
Enabled: true
Style/ArrayCoercion: # (new in 0.88)
Enabled: true
Style/BisectedAttrAccessor: # (new in 0.87)
Enabled: true
Style/CaseLikeIf: # (new in 0.88)
Enabled: true
Style/ClassEqualityComparison: # (new in 0.93)
Enabled: true
Style/CombinableLoops: # (new in 0.90)
Enabled: true
Style/ExplicitBlockArgument: # (new in 0.89)
Enabled: true
Style/ExponentialNotation: # (new in 0.82)
Enabled: true
Style/GlobalStdStream: # (new in 0.89)
Enabled: true
Style/HashAsLastArrayItem: # (new in 0.88)
Enabled: true
Style/HashEachMethods: # (new in 0.80)
Enabled: true
Style/HashLikeCase: # (new in 0.88)
Enabled: true
Style/HashTransformKeys: # (new in 0.80)
Enabled: true
Style/HashTransformValues: # (new in 0.80)
Enabled: true
Style/KeywordParametersOrder: # (new in 0.90)
Enabled: true
Style/OptionalBooleanParameter: # (new in 0.89)
Enabled: true
Style/RedundantAssignment: # (new in 0.87)
Enabled: true
Style/RedundantFetchBlock: # (new in 0.86)
Enabled: true
Style/RedundantFileExtensionInRequire: # (new in 0.88)
Enabled: true
Style/RedundantRegexpCharacterClass: # (new in 0.85)
Enabled: true
Style/RedundantRegexpEscape: # (new in 0.85)
Enabled: true
Style/RedundantSelfAssignment: # (new in 0.90)
Enabled: true
Style/SingleArgumentDig: # (new in 0.89)
Enabled: true
Style/SlicingWithRange: # (new in 0.83)
Enabled: true
Style/SoleNestedConditional: # (new in 0.89)
Enabled: true
Style/StringConcatenation: # (new in 0.89)
Enabled: true
Performance/AncestorsInclude: # (new in 1.7)
Enabled: true
Performance/BigDecimalWithNumericArgument: # (new in 1.7)
Enabled: true
Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
Enabled: true
Performance/CollectionLiteralInLoop: # (new in 1.8)
Enabled: true
Performance/ConstantRegexp: # (new in 1.9)
Enabled: true
Performance/MethodObjectAsBlock: # (new in 1.9)
Enabled: true
Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
Enabled: true
Performance/RedundantSortBlock: # (new in 1.7)
Enabled: true
Performance/RedundantSplitRegexpArgument: # (new in 1.10)
Enabled: true
Performance/RedundantStringChars: # (new in 1.7)
Enabled: true
Performance/ReverseFirst: # (new in 1.7)
Enabled: true
Performance/SortReverse: # (new in 1.7)
Enabled: true
Performance/Squeeze: # (new in 1.7)
Enabled: true
Performance/StringInclude: # (new in 1.7)
Enabled: true
Performance/Sum: # (new in 1.8)
Enabled: true
Rails/ActiveRecordCallbacksOrder: # (new in 2.7)
Enabled: true
Rails/AfterCommitOverride: # (new in 2.8)
Enabled: true
Rails/FindById: # (new in 2.7)
Enabled: true
Rails/Inquiry: # (new in 2.7)
Enabled: true
Rails/MailerName: # (new in 2.7)
Enabled: true
Rails/MatchRoute: # (new in 2.7)
Enabled: true
Rails/NegateInclude: # (new in 2.7)
Enabled: true
Rails/Pluck: # (new in 2.7)
Enabled: true
Rails/PluckInWhere: # (new in 2.7)
Enabled: true
Rails/RenderInline: # (new in 2.7)
Enabled: true
Rails/RenderPlainText: # (new in 2.7)
Enabled: true
Rails/ShortI18n: # (new in 2.7)
Enabled: true
Rails/SquishedSQLHeredocs: # (new in 2.8)
Enabled: true
RSpec/StubbedMock: # (new in 1.44)
Enabled: true
Rails/WhereExists: # (new in 2.7)
Enabled: true
Rails/WhereNot: # (new in 2.8)
Enabled: true

Style/HashSyntax:
EnforcedShorthandSyntax: consistent
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.6
3.2.1
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dist: bionic
language: ruby
rvm:
— 3.0.6
— 3.2.1
deploy:
edge: true
provider: cloudfoundry
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ruby:3.2.1

WORKDIR /app

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get update && \
apt-get install -y nodejs && \
npm install -g [email protected]

COPY Gemfile Gemfile.lock ./

RUN yarn install --check-files

RUN gem install bundler && bundle install --jobs 20 --retry 5

COPY . .

RUN rake assets:precompile

EXPOSE 3000

CMD ["rails", "server", "-b", "0.0.0.0"]
51 changes: 25 additions & 26 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.6'
ruby '3.2.1'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.7'
gem 'rails', '~> 7.0.8'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.6'
# Use Puma as the app server
gem 'puma', '~> 6.2'
gem 'puma', '~> 6.4'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.4', '>= 5.4.4'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
Expand All @@ -20,60 +20,59 @@ gem 'jbuilder', '~> 2.11', '>= 2.11.5'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# for cognito
gem 'aws-sdk-cognitoidentityprovider', '~> 1.73.0'
gem 'aws-sdk-cognitoidentityprovider', '~> 1.82.0'
# importing creds
gem 'aws-sdk-s3', '~> 1'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
gem 'bootsnap', '~> 1.16.0', '>= 1.16.0', require: false

# For scheduling tasks
gem 'arask', '1.2.3'
gem 'arask', '~> 1.2.3'

# for postgresql
gem 'activerecord-postgis-adapter', '~> 7.1.1'
gem 'pg', '~> 1.5.3'
gem 'activerecord-postgis-adapter', '~> 8.0.3'
gem 'pg', '~> 1.5.4'
# remove if not option two taken in project
gem 'jwt'
gem 'jwt', '~> 2.7.1'
gem 'rest-client', '~> 2.1'
gem 'rollbar'
gem 'rollbar', '~> 3.4.0'
gem 'roo', '~> 2.10.0'
# remove if not option two taken in project

# For canonical urls
gem 'canonical-rails', github: 'jumph4x/canonical-rails'

# For environment variables
gem 'aws-sdk-ssm'
gem 'aws-sdk-ssm', '~> 1.158.0'

# Add rate limiting on the API
gem 'rack-attack'
gem 'rack-attack', '~> 6.7.0'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'dotenv-rails', '>= 2.8.1'
gem 'i18n-tasks', '>= 1.0.12'
gem 'rspec-rails', '>= 6.0.1'
gem 'rubocop', '>= 0.91.1'
gem 'rubocop-performance', '>= 1.8.1'
gem 'rubocop-rails', '>= 2.18.0'
gem 'rubocop-rspec', '>= 1.43.2' # or gem 'rubocop-minitest'
gem 'brakeman'
gem 'pry-rails'
gem 'byebug', '~> 11.1.3', platforms: %i[mri mingw x64_mingw]
gem 'dotenv-rails', '~> 2.8.1', '>= 2.8.1'
gem 'i18n-tasks', '~> 1.0.12', '>= 1.0.12'
gem 'rspec-rails', '~> 6.0.3', '>= 6.0.3'
gem 'rubocop', '~> 1.56.4'
gem 'rubocop-performance', '~> 1.19.1'
gem 'rubocop-rails', '~> 2.21.2'
gem 'rubocop-rspec', '~> 2.24.1' # or gem 'rubocop-minitest'
gem 'brakeman', '~> 6.0.1'
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'listen', '~> 3.8'
gem 'web-console', '>= 4.2.0'
gem 'web-console', '~> 4.2.1'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring', '~> 4.1.1'
gem 'spring-watcher-listen', '~> 2.1.0'
end

group :test do
gem 'rails-controller-testing', '>= 1.0.5'
gem 'simplecov', '>= 0.16.1', require: false
gem 'rails-controller-testing', '~> 1.0.5', '>= 1.0.5'
gem 'simplecov', '~> 0.22.0', '>= 0.16.1', require: false
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
Loading