Skip to content

Commit

Permalink
Merge pull request #6644 from alphagov/dependabot/bundler/rubocop-gov…
Browse files Browse the repository at this point in the history
…uk-4.13.0

Bump rubocop-govuk from 4.12.0 to 4.13.0
  • Loading branch information
cynthia-anya authored Feb 5, 2024
2 parents e4790e1 + bbb536e commit 66b5284
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
35 changes: 18 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ GEM
opentelemetry-semantic_conventions
opentelemetry-semantic_conventions (1.10.0)
opentelemetry-api (~> 1.0)
parallel (1.23.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -508,37 +508,38 @@ GEM
rexml (3.2.6)
rinku (2.0.6)
rouge (4.2.0)
rubocop (1.55.0)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-govuk (4.12.0)
rubocop (= 1.55.0)
rubocop-ast (= 1.29.0)
rubocop-rails (= 2.20.2)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-govuk (4.13.0)
rubocop (= 1.59.0)
rubocop-ast (= 1.30.0)
rubocop-rails (= 2.23.0)
rubocop-rake (= 0.6.0)
rubocop-rspec (= 2.22.0)
rubocop-rails (2.20.2)
rubocop-rspec (= 2.25.0)
rubocop-rails (2.23.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
Expand Down Expand Up @@ -605,7 +606,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
webmock (3.19.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand Down
11 changes: 8 additions & 3 deletions lib/smart_answer/calculators/redundancy_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ def initialize(rate, age, years, weekly_pay)
end

def ratio(age)
return 0.5 if (0..22).include?(age)
return 1.0 if (23..41).include?(age)
return 1.5 if (42..1000).include?(age)
case age
when 0..22
0.5
when 23..41
1.0
when 42..1000
1.5
end
end

def format_money(amount)
Expand Down
4 changes: 2 additions & 2 deletions lib/smart_answer/calculators/self_assessment_penalties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def filing_deadline
end

def filed_during_covid_deadline_easement?
covid_easement_first_year = (tax_year == "2019-20" && filing_date < Date.parse("2021-03-01"))
covid_easement_second_year = (tax_year == "2020-21" && filing_date < Date.parse("2022-03-01"))
covid_easement_first_year = tax_year == "2019-20" && filing_date < Date.parse("2021-03-01")
covid_easement_second_year = tax_year == "2020-21" && filing_date < Date.parse("2022-03-01")

(covid_easement_first_year || covid_easement_second_year) && submission_method == "online"
end
Expand Down
2 changes: 1 addition & 1 deletion test/support/fixture_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def require_fixture_flows
end

def setup_fixture_flows
stub_request(:get, %r{#{Plek.new.find("content-store")}/content/(.*)})
stub_request(:get, %r{#{Plek.new.find('content-store')}/content/(.*)})
.to_return(status: 404, body: {}.to_json)

require_fixture_flows
Expand Down
2 changes: 1 addition & 1 deletion test/unit/method_invocations_parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def method_with_no_args; end # rubocop:disable

should "identify invocations of method within return statement" do
block_invoking_method = lambda do
return method_with_no_args
method_with_no_args
end

invocations = @parser.invocations(block_invoking_method.source)
Expand Down

0 comments on commit 66b5284

Please sign in to comment.