From e5e5f48b2e2f3b6be9619d53507880d1f5aaaefe Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sat, 5 Apr 2014 01:07:43 +0200 Subject: [PATCH] Fix RuboCop offenses introduced in version 0.20.0 --- .rubocop.yml | 5 ++++- Gemfile | 2 +- lib/twitter/rest/client.rb | 2 +- spec/helper.rb | 5 +---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 331688a00..b5eeb58a7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - Includes: + Include: - 'Gemfile' - 'Rakefile' - 'twitter.gemspec' @@ -90,3 +90,6 @@ PercentLiteralDelimiters: '%w': '[]' '%W': '[]' '%x': () + +NonNilCheck: + Enabled: false diff --git a/Gemfile b/Gemfile index 6903896d8..611ebb9d0 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ group :test do gem 'coveralls', :require => false gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18] gem 'rspec', '>= 2.14' - gem 'rubocop', '>= 0.16', :platforms => [:ruby_19, :ruby_20, :ruby_21] + gem 'rubocop', '>= 0.20', :platforms => [:ruby_19, :ruby_20, :ruby_21] gem 'simplecov', :require => false gem 'timecop', '0.6.1' gem 'webmock' diff --git a/lib/twitter/rest/client.rb b/lib/twitter/rest/client.rb index 369e79cc4..5c5b9c86c 100644 --- a/lib/twitter/rest/client.rb +++ b/lib/twitter/rest/client.rb @@ -107,7 +107,7 @@ def request(method, path, params = {}, headers = {}) rescue Faraday::Error::TimeoutError, Timeout::Error => error raise(Twitter::Error::RequestTimeout.new(error)) rescue Faraday::Error::ClientError, JSON::ParserError => error - fail(Twitter::Error.new(error)) + raise(Twitter::Error.new(error)) end def request_headers(method, path, params = {}, signature_params = params) diff --git a/spec/helper.rb b/spec/helper.rb index f3ef07b3e..9dc6e79ab 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -1,10 +1,7 @@ require 'simplecov' require 'coveralls' -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter -] +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter] SimpleCov.start do add_filter '/spec/'