Fix RuboCop offenses introduced in version 0.19.0

This commit is contained in:
Erik Michaels-Ober 2014-03-15 20:43:19 +01:00
parent 507132aa01
commit eb9d0412ae
5 changed files with 18 additions and 14 deletions

View File

@ -24,7 +24,7 @@ group :test do
gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18] gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18]
gem 'rack-test' gem 'rack-test'
gem 'rspec', '>= 2.14' gem 'rspec', '>= 2.14'
gem 'rubocop', '>= 0.17', :platforms => [:ruby_19, :ruby_20, :ruby_21] gem 'rubocop', '>= 0.19', :platforms => [:ruby_19, :ruby_20, :ruby_21]
gem 'simplecov', :require => false gem 'simplecov', :require => false
end end

View File

@ -40,7 +40,7 @@ module OmniAuth
end end
def name? def name?
!!name !!name # rubocop:disable DoubleNegation
end end
alias_method :valid?, :name? alias_method :valid?, :name?

View File

@ -1,4 +1,6 @@
class OmniAuth::Test::PhonySession module OmniAuth
module Test
class PhonySession
def initialize(app) def initialize(app)
@app = app @app = app
end end
@ -9,3 +11,5 @@ class OmniAuth::Test::PhonySession
@app.call(env) @app.call(env)
end end
end end
end
end

View File

@ -8,13 +8,13 @@ Gem::Specification.new do |spec|
spec.add_dependency 'rack', '~> 1.0' spec.add_dependency 'rack', '~> 1.0'
spec.add_development_dependency 'bundler', '~> 1.0' spec.add_development_dependency 'bundler', '~> 1.0'
spec.authors = ['Michael Bleigh', 'Erik Michaels-Ober'] spec.authors = ['Michael Bleigh', 'Erik Michaels-Ober']
spec.description = %q{A generalized Rack framework for multiple-provider authentication.} spec.description = %q(A generalized Rack framework for multiple-provider authentication.)
spec.email = ['michael@intridea.com', 'sferik@gmail.com'] spec.email = ['michael@intridea.com', 'sferik@gmail.com']
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
spec.homepage = 'http://github.com/intridea/omniauth' spec.homepage = 'http://github.com/intridea/omniauth'
spec.licenses = ['MIT'] spec.licenses = %w(MIT)
spec.name = 'omniauth' spec.name = 'omniauth'
spec.require_paths = ['lib'] spec.require_paths = %w(lib)
spec.required_rubygems_version = '>= 1.3.5' spec.required_rubygems_version = '>= 1.3.5'
spec.summary = spec.description spec.summary = spec.description
spec.test_files = spec.files.grep(/^spec\//) spec.test_files = spec.files.grep(/^spec\//)

View File

@ -10,7 +10,7 @@ describe OmniAuth::Builder do
end end
it 'accepts a class' do it 'accepts a class' do
class ::ExampleClass; end class ExampleClass; end
expect do expect do
OmniAuth::Builder.new(nil) do OmniAuth::Builder.new(nil) do