Skip to content

Commit

Permalink
Merge pull request #541 from Crown-Commercial-Service/release-1.7.0
Browse files Browse the repository at this point in the history
STAGING - Release 1.7.0
  • Loading branch information
tim-s-ccs authored Oct 10, 2023
2 parents 75ea9ab + 5bf4685 commit dc749ff
Show file tree
Hide file tree
Showing 48 changed files with 490 additions and 583 deletions.
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

0 comments on commit dc749ff

Please sign in to comment.