Skip to content

Commit d8ff611

Browse files
author
Andrew Lee
committed
Make changes to let Rubocop pass in CI
1 parent 2be50f6 commit d8ff611

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

bin/annotate

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ has_set_position = {}
2222
target_action = :do_annotations
2323
positions = %w(before top after bottom)
2424

25-
# rubocop:disable Metrics/BlockLength
2625
OptionParser.new do |opts|
2726
opts.banner = 'Usage: annotate [options] [model_file]*'
2827

@@ -207,7 +206,6 @@ OptionParser.new do |opts|
207206
ENV['with_comment'] = 'true'
208207
end
209208
end.parse!
210-
# rubocop:enable Metrics/BlockLength
211209

212210
options = Annotate.setup_options(
213211
is_rake: ENV['is_rake'] && !ENV['is_rake'].empty?

spec/annotate/annotate_models_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'active_support/core_ext/string'
66
require 'files'
77

8-
describe AnnotateModels do
8+
describe AnnotateModels do # rubocop:disable Metrics/BlockLength
99
def mock_index(name, params = {})
1010
double('IndexKeyDefinition',
1111
name: name,

spec/integration/rails_2.3_with_bundler/config/boot.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def load_rails_gem
6161
else
6262
gem 'rails'
6363
end
64-
rescue Gem::LoadError => load_error
65-
if load_error.message =~ /Could not find RubyGem rails/
64+
rescue Gem::LoadError => e
65+
if e.message =~ /Could not find RubyGem rails/
6666
$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."
6767
exit 1
6868
else

0 commit comments

Comments
 (0)