From 2be50f62c3dced649da8b93b324c983df730f999 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 15 Apr 2019 15:48:05 +0000 Subject: [PATCH 1/2] Update rubocop requirement from ~> 0.46.0 to ~> 0.67.2 Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version. - [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.46.0...v0.67.2) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ebdd3846e..8e80a7a1f 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,7 @@ group :development, :test do gem 'guard-rspec', require: false gem 'rspec', require: false - gem 'rubocop', '~> 0.65.0', require: false unless RUBY_VERSION =~ /^1.8/ + gem 'rubocop', '~> 0.67.2', require: false unless RUBY_VERSION =~ /^1.8/ gem 'simplecov', require: false gem 'terminal-notifier-guard', require: false From d8ff6116234285deab61d236b208cbeffc5f601b Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 15 Apr 2019 10:06:50 -0700 Subject: [PATCH 2/2] Make changes to let Rubocop pass in CI --- bin/annotate | 2 -- spec/annotate/annotate_models_spec.rb | 2 +- spec/integration/rails_2.3_with_bundler/config/boot.rb | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/annotate b/bin/annotate index 3e0d8ad39..2f27d5d73 100755 --- a/bin/annotate +++ b/bin/annotate @@ -22,7 +22,6 @@ has_set_position = {} target_action = :do_annotations positions = %w(before top after bottom) -# rubocop:disable Metrics/BlockLength OptionParser.new do |opts| opts.banner = 'Usage: annotate [options] [model_file]*' @@ -207,7 +206,6 @@ OptionParser.new do |opts| ENV['with_comment'] = 'true' end end.parse! -# rubocop:enable Metrics/BlockLength options = Annotate.setup_options( is_rake: ENV['is_rake'] && !ENV['is_rake'].empty? diff --git a/spec/annotate/annotate_models_spec.rb b/spec/annotate/annotate_models_spec.rb index 01db9ce99..21dff3966 100644 --- a/spec/annotate/annotate_models_spec.rb +++ b/spec/annotate/annotate_models_spec.rb @@ -5,7 +5,7 @@ require 'active_support/core_ext/string' require 'files' -describe AnnotateModels do +describe AnnotateModels do # rubocop:disable Metrics/BlockLength def mock_index(name, params = {}) double('IndexKeyDefinition', name: name, diff --git a/spec/integration/rails_2.3_with_bundler/config/boot.rb b/spec/integration/rails_2.3_with_bundler/config/boot.rb index 190b37add..1be033ee9 100644 --- a/spec/integration/rails_2.3_with_bundler/config/boot.rb +++ b/spec/integration/rails_2.3_with_bundler/config/boot.rb @@ -61,8 +61,8 @@ def load_rails_gem else gem 'rails' end - rescue Gem::LoadError => load_error - if load_error.message =~ /Could not find RubyGem rails/ + rescue Gem::LoadError => e + if e.message =~ /Could not find RubyGem rails/ $stderr.puts "Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed." exit 1 else