From e2e7759508a2c45538c6c8a9ecfba216c4d37c0a Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Thu, 26 Apr 2018 14:24:06 -0700 Subject: [PATCH] rubocop: upgrade to 0.55 --- .rubocop.yml | 1 - .rubocop_todo.yml | 9 +-------- Gemfile | 2 +- Gemfile.lock | 4 ++-- app/models/time_span.rb | 4 ++-- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 22b1f8bb3..80d16943f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,4 @@ require: rubocop-rspec - inherit_from: .rubocop_todo.yml AllCops: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 799f8f052..42b95055e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --no-auto-gen-timestamp` -# using RuboCop version 0.53.0. +# using RuboCop version 0.55.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -130,13 +130,6 @@ RSpec/VerifiedDoubles: - 'spec/inputs/controlled_vocabulary_select_input_spec.rb' - 'spec/inputs/relator_input_spec.rb' -# Offense count: 1 -# Configuration parameters: Include. -# Include: app/models/**/*.rb -Rails/InverseOf: - Exclude: - - 'app/models/concerns/with_admin_policy.rb' - # Offense count: 2 # Configuration parameters: Include. # Include: app/controllers/**/*.rb diff --git a/Gemfile b/Gemfile index f9315f696..b2a9a68df 100644 --- a/Gemfile +++ b/Gemfile @@ -70,7 +70,7 @@ group :development, :test do gem "poltergeist" gem "rspec-activemodel-mocks" gem "rspec-rails" - gem "rubocop", "~> 0.53.0", require: false + gem "rubocop", "~> 0.53", require: false gem "rubocop-rspec", require: false gem "spring" gem "spring-commands-rspec", group: :development diff --git a/Gemfile.lock b/Gemfile.lock index 6dfc19aa8..ebca4fd98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -706,7 +706,7 @@ GEM rspec-mocks (~> 3.7.0) rspec-support (~> 3.7.0) rspec-support (3.7.1) - rubocop (0.53.0) + rubocop (0.55.0) parallel (~> 1.10) parser (>= 2.5) powerpack (~> 0.1) @@ -897,7 +897,7 @@ DEPENDENCIES rsolr rspec-activemodel-mocks rspec-rails - rubocop (~> 0.53.0) + rubocop (~> 0.53) rubocop-rspec sass-rails (~> 5.0) settingslogic diff --git a/app/models/time_span.rb b/app/models/time_span.rb index d64f590a8..5b6c9d9ba 100644 --- a/app/models/time_span.rb +++ b/app/models/time_span.rb @@ -67,9 +67,9 @@ def as_array end def earliest_year - start.reject(&:blank?).sort do |a, b| + start.reject(&:blank?).min do |a, b| extract_year(a) <=> extract_year(b) - end.first + end end private