From 72e153475ab8a5621bfe8eaed8f5a741385685ca Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
 <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Fri, 12 Jun 2020 14:39:08 +0100
Subject: [PATCH] Bump rubocop and rubocop-govuk in /psd-web (#704)

* Bump rubocop and rubocop-govuk in /psd-web

Bumps [rubocop](https://github.com/rubocop-hq/rubocop) and [rubocop-govuk](https://github.com/alphagov/rubocop-govuk). These dependencies needed to be updated together.

Updates `rubocop` from 0.83.0 to 0.85.1
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.83.0...v0.85.1)

Updates `rubocop-govuk` from 3.14.0 to 3.16.0
- [Release notes](https://github.com/alphagov/rubocop-govuk/releases)
- [Changelog](https://github.com/alphagov/rubocop-govuk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alphagov/rubocop-govuk/compare/v3.14.0...v3.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Rubocop fix

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Steve Lorek <steve@stevelorek.com>
---
 psd-web/Gemfile      |  2 +-
 psd-web/Gemfile.lock | 26 +++++++++++++++-----------
 psd-web/db/seeds.rb  |  2 +-
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/psd-web/Gemfile b/psd-web/Gemfile
index 4bc806b8b4..9f5fb0c512 100644
--- a/psd-web/Gemfile
+++ b/psd-web/Gemfile
@@ -63,7 +63,7 @@ group :development, :test do
   gem "rspec-mocks"
   gem "rspec-rails"
   gem "rubocop"
-  gem "rubocop-govuk", "~> 3.14.0"
+  gem "rubocop-govuk", "~> 3.16.0"
   gem "rubocop-performance"
   gem "rubocop-rspec", "~> 1.39", require: false
   gem "ruby-debug-ide"
diff --git a/psd-web/Gemfile.lock b/psd-web/Gemfile.lock
index 47f0864b47..a934b4a438 100644
--- a/psd-web/Gemfile.lock
+++ b/psd-web/Gemfile.lock
@@ -72,7 +72,7 @@ GEM
       public_suffix (>= 2.0.2, < 5.0)
     ansi (1.5.0)
     arel (9.0.0)
-    ast (2.4.0)
+    ast (2.4.1)
     awesome_print (1.8.0)
     aws-eventstream (1.1.0)
     aws-partitions (1.323.0)
@@ -391,24 +391,28 @@ GEM
       rspec-mocks (~> 3.9)
       rspec-support (~> 3.9)
     rspec-support (3.9.3)
-    rubocop (0.83.0)
+    rubocop (0.85.1)
       parallel (~> 1.10)
       parser (>= 2.7.0.1)
       rainbow (>= 2.2.2, < 4.0)
+      regexp_parser (>= 1.7)
       rexml
+      rubocop-ast (>= 0.0.3)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 2.0)
-    rubocop-govuk (3.14.0)
-      rubocop (= 0.83.0)
-      rubocop-rails (~> 2)
-      rubocop-rake (~> 0.5.1)
-      rubocop-rspec (~> 1.28)
+    rubocop-ast (0.0.3)
+      parser (>= 2.7.0.1)
+    rubocop-govuk (3.16.0)
+      rubocop (= 0.85.1)
+      rubocop-rails (= 2.6.0)
+      rubocop-rake (= 0.5.1)
+      rubocop-rspec (= 1.39.0)
     rubocop-performance (1.6.1)
       rubocop (>= 0.71.0)
-    rubocop-rails (2.5.2)
-      activesupport
+    rubocop-rails (2.6.0)
+      activesupport (>= 4.2.0)
       rack (>= 1.1)
-      rubocop (>= 0.72.0)
+      rubocop (>= 0.82.0)
     rubocop-rake (0.5.1)
       rubocop
     rubocop-rspec (1.39.0)
@@ -588,7 +592,7 @@ DEPENDENCIES
   rspec-mocks
   rspec-rails
   rubocop
-  rubocop-govuk (~> 3.14.0)
+  rubocop-govuk (~> 3.16.0)
   rubocop-performance
   rubocop-rspec (~> 1.39)
   ruby-debug-ide
diff --git a/psd-web/db/seeds.rb b/psd-web/db/seeds.rb
index 887c06ac41..f7900a5c13 100644
--- a/psd-web/db/seeds.rb
+++ b/psd-web/db/seeds.rb
@@ -435,7 +435,7 @@ def create_blob(filename, title: nil, description: nil)
 
   AddProductToCase.call(product: product, investigation: investigation, user: user)
 
-  if Rails.env.production? && (organisations = CF::App::Credentials.find_by_service_tag("psd-seeds").try(:[], "organisations")) # rubocop:disable Rails/DynamicFindBy
+  if Rails.env.production? && (organisations = CF::App::Credentials.find_by_service_tag("psd-seeds").try(:[], "organisations"))
     # The structure is as follows:
     # If you want to inspect the current structure on you review app you can inspect the review app env:
     # $ cf7 env REVIEW_APP_NAME