diff --git a/Gemfile b/Gemfile index 6da3f4e..bee985e 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ group :test do gem 'mime-types', '~> 1.25', :platforms => [:jruby, :ruby_18] gem 'rack-test' 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 end diff --git a/lib/omniauth/auth_hash.rb b/lib/omniauth/auth_hash.rb index b2b05b3..5893478 100644 --- a/lib/omniauth/auth_hash.rb +++ b/lib/omniauth/auth_hash.rb @@ -40,7 +40,7 @@ module OmniAuth end def name? - !!name + !!name # rubocop:disable DoubleNegation end alias_method :valid?, :name? diff --git a/lib/omniauth/test/phony_session.rb b/lib/omniauth/test/phony_session.rb index dce23a5..581ea34 100644 --- a/lib/omniauth/test/phony_session.rb +++ b/lib/omniauth/test/phony_session.rb @@ -1,11 +1,15 @@ -class OmniAuth::Test::PhonySession - def initialize(app) - @app = app - end +module OmniAuth + module Test + class PhonySession + def initialize(app) + @app = app + end - def call(env) - @session ||= (env['rack.session'] || {}) - env['rack.session'] = @session - @app.call(env) + def call(env) + @session ||= (env['rack.session'] || {}) + env['rack.session'] = @session + @app.call(env) + end + end end end diff --git a/omniauth.gemspec b/omniauth.gemspec index 72f0ca2..67fe333 100644 --- a/omniauth.gemspec +++ b/omniauth.gemspec @@ -8,13 +8,13 @@ Gem::Specification.new do |spec| spec.add_dependency 'rack', '~> 1.0' spec.add_development_dependency 'bundler', '~> 1.0' 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.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) spec.homepage = 'http://github.com/intridea/omniauth' - spec.licenses = ['MIT'] + spec.licenses = %w(MIT) spec.name = 'omniauth' - spec.require_paths = ['lib'] + spec.require_paths = %w(lib) spec.required_rubygems_version = '>= 1.3.5' spec.summary = spec.description spec.test_files = spec.files.grep(/^spec\//) diff --git a/spec/omniauth/builder_spec.rb b/spec/omniauth/builder_spec.rb index 1988d12..92d13fb 100644 --- a/spec/omniauth/builder_spec.rb +++ b/spec/omniauth/builder_spec.rb @@ -10,7 +10,7 @@ describe OmniAuth::Builder do end it 'accepts a class' do - class ::ExampleClass; end + class ExampleClass; end expect do OmniAuth::Builder.new(nil) do