From 6ffc78d124d8c88580985be6a6f511091f9a8778 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 05:28:53 +0000 Subject: [PATCH 1/2] Bump standard from 0.6.0 to 0.8.1 Bumps [standard](https://github.com/testdouble/standard) from 0.6.0 to 0.8.1. - [Release notes](https://github.com/testdouble/standard/releases) - [Changelog](https://github.com/testdouble/standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/testdouble/standard/compare/v0.6.0...v0.8.1) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6f6525c873..135f216333 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -176,7 +176,7 @@ GEM validate_url webfinger (>= 1.0.1) parallel (1.19.2) - parser (2.7.1.4) + parser (2.7.2.0) ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) @@ -226,7 +226,7 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) - regexp_parser (1.7.1) + regexp_parser (1.8.2) rexml (3.2.4) rollbar (2.27.0) rspec-core (3.9.2) @@ -246,19 +246,20 @@ GEM rspec-mocks (~> 3.9) rspec-support (~> 3.9) rspec-support (3.9.3) - rubocop (0.90.0) + rubocop (1.0.0) parallel (~> 1.10) - parser (>= 2.7.1.1) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) + regexp_parser (>= 1.8) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 0.6.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) - parser (>= 2.7.1.4) - rubocop-performance (1.8.0) + rubocop-ast (1.1.0) + parser (>= 2.7.1.5) + rubocop-performance (1.8.1) rubocop (>= 0.87.0) + rubocop-ast (>= 0.4.0) ruby-progressbar (1.10.1) rubyzip (2.3.0) sass-rails (6.0.0) @@ -289,9 +290,9 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - standard (0.6.0) - rubocop (~> 0.90) - rubocop-performance (~> 1.8.0) + standard (0.8.1) + rubocop (= 1.0.0) + rubocop-performance (= 1.8.1) swd (1.2.0) activesupport (>= 3) attr_required (>= 0.0.5) From bdd4d4221afa3ade7c6168c07a03ec222ddc5e74 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 05:28:53 +0000 Subject: [PATCH 2/2] Bump standard from 0.6.0 to 0.8.1 Bumps [standard](https://github.com/testdouble/standard) from 0.6.0 to 0.8.1. - [Release notes](https://github.com/testdouble/standard/releases) - [Changelog](https://github.com/testdouble/standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/testdouble/standard/compare/v0.6.0...v0.8.1) Lawrence: I had to change some constant definitions within blocks to instead define local variables, to fix: > Lint/ConstantDefinitionInBlock: Do not define constants this way > within a block. Signed-off-by: dependabot-preview[bot] Co-authored-by: Lawrence Forooghian --- config/routes.rb | 6 ++--- spec/models/admin/presenter_methods_spec.rb | 2 +- .../maths_and_physics/dqt_record_spec.rb | 24 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 2bc379bcab..cbea3721eb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,7 +17,7 @@ # Used to constrain claim journey routing so only slugs # that are part of a policy’s slug sequence are routed. - class RestrictToSequenceSlugs + restrict_to_sequence_slugs = Class.new { attr_reader :policy def initialize(policy) @@ -27,11 +27,11 @@ def initialize(policy) def matches?(request) request["policy"] == policy.routing_name && policy::SlugSequence::SLUGS.include?(request["slug"]) end - end + } # Define routes that are specific to each Policy's page sequence Policies.all.each do |policy| - constraints(RestrictToSequenceSlugs.new(policy)) do + constraints(restrict_to_sequence_slugs.new(policy)) do scope path: ":policy" do resources :claims, only: [:show, :update], param: :slug, path: "/" end diff --git a/spec/models/admin/presenter_methods_spec.rb b/spec/models/admin/presenter_methods_spec.rb index 652a978a1f..99509f2d57 100644 --- a/spec/models/admin/presenter_methods_spec.rb +++ b/spec/models/admin/presenter_methods_spec.rb @@ -2,7 +2,7 @@ RSpec.describe Admin::PresenterMethods do subject(:admin_presenter) do - class DummyClass + Class.new do include Admin::PresenterMethods end end diff --git a/spec/models/maths_and_physics/dqt_record_spec.rb b/spec/models/maths_and_physics/dqt_record_spec.rb index 5b2fe3f15c..9a5f8b3791 100644 --- a/spec/models/maths_and_physics/dqt_record_spec.rb +++ b/spec/models/maths_and_physics/dqt_record_spec.rb @@ -1,18 +1,18 @@ require "rails_helper" RSpec.describe MathsAndPhysics::DQTRecord do - MATHS_JAC_CODES = %w[G100 G290 G310 G320 G900] - PHYSICS_JAC_CODES = %w[F300 F310 F320 F321 F331] - EXAMPLE_ELIGIBLE_JAC_CODES = MATHS_JAC_CODES + PHYSICS_JAC_CODES - EXAMPLE_NON_ELIGIBLE_JAC_CODES = %w[X100 L800 F100 C700 R100] + maths_jac_codes = %w[G100 G290 G310 G320 G900] + physics_jac_codes = %w[F300 F310 F320 F321 F331] + example_eligible_jac_codes = maths_jac_codes + physics_jac_codes + example_non_eligible_jac_codes = %w[X100 L800 F100 C700 R100] - ELIGIBLE_MATHS_HECOS_CODES = %w[100400 100401 100402 100403 100404 100405 100406 101027 101028 101029 101030 101031 101032 101033 101034].freeze - ELIGIBLE_PHYSICS_HECOS_CODES = %w[100416 100419 100425 100426 101060 101061 101068 101071 101074 101075 101076 101077 101223 101300 101390 101391].freeze - EXAMPLE_ELIGIBLE_HECOS_CODES = ELIGIBLE_MATHS_HECOS_CODES + ELIGIBLE_PHYSICS_HECOS_CODES - EXAMPLE_NON_ELIGIBLE_HECOS_CODES = %w[100430 101066 101078 100300 100396 100427].freeze + eligible_maths_hecos_codes = %w[100400 100401 100402 100403 100404 100405 100406 101027 101028 101029 101030 101031 101032 101033 101034].freeze + eligible_physics_hecos_codes = %w[100416 100419 100425 100426 101060 101061 101068 101071 101074 101075 101076 101077 101223 101300 101390 101391].freeze + example_eligible_hecos_codes = eligible_maths_hecos_codes + eligible_physics_hecos_codes + example_non_eligible_hecos_codes = %w[100430 101066 101078 100300 100396 100427].freeze describe "#eligible?" do - EXAMPLE_ELIGIBLE_JAC_CODES.each do |jac_code| + example_eligible_jac_codes.each do |jac_code| context "when the given ITT subject (#{jac_code}) is eligible" do let(:attributes) { {itt_subject_codes: [jac_code], degree_codes: []} } @@ -50,7 +50,7 @@ end end - EXAMPLE_ELIGIBLE_HECOS_CODES.each do |hecos_code| + example_eligible_hecos_codes.each do |hecos_code| context "when the given ITT subject HECoS code (#{hecos_code}) is eligible" do let(:attributes) { {itt_subject_codes: [hecos_code], degree_codes: []} } @@ -88,7 +88,7 @@ end end - EXAMPLE_NON_ELIGIBLE_JAC_CODES.each do |jac_code| + example_non_eligible_jac_codes.each do |jac_code| context "when the given ITT subject or degree (#{jac_code}) isn't eligible" do let(:attributes) { {itt_subject_codes: [jac_code], degree_codes: [jac_code]} } @@ -98,7 +98,7 @@ end end - EXAMPLE_NON_ELIGIBLE_HECOS_CODES.each do |hecos_code| + example_non_eligible_hecos_codes.each do |hecos_code| context "when given ITT subject or degree (#{hecos_code}) - HECOS code isn't eligible" do let(:attributes) { {itt_subject_codes: [hecos_code], degree_codes: [hecos_code]} } it "always returns false" do