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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
sed -i "s@/home/runner/work/DEFRA/pafs_core@/github/workspace@g" coverage/coverage.json

- name: Analyze with SonarCloud
uses: sonarsource/sonarqube-scan-action@master
uses: sonarsource/sonarqube-scan-action@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This is provided automatically by GitHub
SONAR_TOKEN: ${{ secrets.RUBY_SONAR_TOKEN }} # This needs to be set in your repo; settings -> secrets
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ group :development, :test do
gem "rspec-rails"
gem "rubocop"
gem "rubocop-capybara"
gem "rubocop-factory_bot"
gem "rubocop-rails"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "rubocop-rspec_rails"
gem "shoulda-matchers"
Expand Down
42 changes: 20 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,27 @@ GEM
async-pool (0.11.0)
async (>= 2.0)
aws-eventstream (1.4.0)
aws-partitions (1.1164.0)
aws-sdk-core (3.233.0)
aws-partitions (1.1175.0)
aws-sdk-core (3.234.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
bigdecimal
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.112.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-kms (1.115.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.199.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-s3 (1.201.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.3)
benchmark (0.5.0)
bigdecimal (3.3.1)
bstard (0.2.4)
builder (3.3.0)
byebug (12.0.0)
Expand Down Expand Up @@ -184,11 +184,7 @@ GEM
date (3.4.1)
defra_ruby_alert (2.2.1)
airbrake
defra_ruby_style (0.4.0)
rubocop (>= 1.0, < 2.0)
rubocop-factory_bot
rubocop-rake
rubocop-rspec
defra_ruby_style (0.4.1)
defra_ruby_template (5.11.0)
diff-lcs (1.6.2)
docile (1.4.1)
Expand All @@ -203,7 +199,7 @@ GEM
railties (>= 6.1.0)
faker (3.5.2)
i18n (>= 1.8.11, < 2)
faraday (2.13.4)
faraday (2.14.0)
faraday-net_http (>= 2.0, < 3.5)
json
logger
Expand Down Expand Up @@ -248,7 +244,7 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jmespath (1.6.2)
json (2.15.0)
json (2.15.1)
json_schemer (2.4.0)
bigdecimal
hana (~> 1.3)
Expand Down Expand Up @@ -284,7 +280,7 @@ GEM
metrics (0.15.0)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
minitest (5.25.5)
minitest (5.26.0)
multi_json (1.17.0)
net-http (0.6.0)
uri
Expand Down Expand Up @@ -312,7 +308,7 @@ GEM
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
prism (1.5.1)
prism (1.6.0)
protocol-hpack (1.5.1)
protocol-http (0.54.0)
protocol-http1 (0.35.1)
Expand All @@ -330,7 +326,7 @@ GEM
stringio
public_suffix (6.0.2)
racc (1.8.1)
rack (2.2.17)
rack (2.2.20)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-session (1.0.2)
Expand Down Expand Up @@ -405,15 +401,15 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.6)
rubocop (1.80.2)
rubocop (1.81.6)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.46.0, < 2.0)
rubocop-ast (>= 1.47.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.47.1)
Expand All @@ -425,7 +421,7 @@ GEM
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.33.3)
rubocop-rails (2.33.4)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
Expand Down Expand Up @@ -478,7 +474,7 @@ GEM
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)
uri (1.0.3)
uri (1.0.4)
useragent (0.16.11)
vcr (6.3.1)
base64
Expand Down Expand Up @@ -521,7 +517,9 @@ DEPENDENCIES
rspec-retry
rubocop
rubocop-capybara
rubocop-factory_bot
rubocop-rails
rubocop-rake
rubocop-rspec
rubocop-rspec_rails
rubyzip
Expand Down
3 changes: 2 additions & 1 deletion app/steps/pafs_core/carbon_operational_cost_forecast_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class CarbonOperationalCostForecastStep < BasicStep
include PafsCore::Carbon

validates :carbon_operational_cost_forecast, presence: {
message: "You must enter a value"
message: "You must enter a value. If there is no operation or maintenance " \
"element enter 0. Otherwise enter an estimate above 0."
}

validates :carbon_operational_cost_forecast, numericality: {
Expand Down
Loading