diff --git a/.rubocop.yml b/.rubocop.yml index 8dbbbf0..9b181f8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -38,5 +38,8 @@ Style/SpaceInsideHashLiteralBraces: Style/StringLiterals: EnforcedStyle: double_quotes -Style/TrailingComma: +Style/TrailingCommaInLiteral: + EnforcedStyleForMultiline: 'comma' + +Style/TrailingCommaInArguments: EnforcedStyleForMultiline: 'comma' diff --git a/.travis.yml b/.travis.yml index d2e47a0..0948e67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ rvm: - 2.0.0 - 2.1 - 2.2 + - 2.3.0 - jruby-18mode - jruby-19mode - jruby-head @@ -16,7 +17,8 @@ rvm: - ruby-head matrix: allow_failures: - - rvm: jruby-head - - rvm: ruby-head + - rvm: 1.8.7 + - rvm: jruby-18mode fast_finish: true +cache: bundler sudo: false diff --git a/Gemfile b/Gemfile index 8b100f4..e079ae7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,16 +1,16 @@ -source "http://rubygems.org" +source "https://rubygems.org" gem "rake" group :test do gem "coveralls" gem "json", :platforms => [:jruby, :ruby_18, :ruby_19] - gem "mime-types", "~> 1.25", :platforms => [:jruby, :ruby_18] + gem "mime-types", :platforms => [:jruby, :ruby_18] gem "rack-test" - gem "rest-client", "~> 1.6.0", :platforms => [:jruby, :ruby_18] - gem "rspec", "~> 3.2" - gem "rubocop", ">= 0.30", :platforms => [:ruby_19, :ruby_20, :ruby_21, :ruby_22] - gem "simplecov", ">= 0.9" + gem "rest-client", :platforms => [:jruby, :ruby_18] + gem "rspec" + gem "rubocop", :platforms => [:ruby_19, :ruby_20, :ruby_21, :ruby_22] + gem "simplecov" gem "webmock" end diff --git a/lib/omniauth-oauth2/version.rb b/lib/omniauth-oauth2/version.rb index 5a79a34..058af9b 100644 --- a/lib/omniauth-oauth2/version.rb +++ b/lib/omniauth-oauth2/version.rb @@ -1,5 +1,6 @@ +# frozen_string_literal: true module OmniAuth module OAuth2 - VERSION = "1.4.0" + VERSION = "1.4.0".freeze end end diff --git a/lib/omniauth/strategies/oauth2.rb b/lib/omniauth/strategies/oauth2.rb index 3ffff1b..34a238e 100644 --- a/lib/omniauth/strategies/oauth2.rb +++ b/lib/omniauth/strategies/oauth2.rb @@ -38,9 +38,9 @@ def client credentials do hash = {"token" => access_token.token} - hash.merge!("refresh_token" => access_token.refresh_token) if access_token.expires? && access_token.refresh_token - hash.merge!("expires_at" => access_token.expires_at) if access_token.expires? - hash.merge!("expires" => access_token.expires?) + hash["refresh_token"] = access_token.refresh_token if access_token.expires? && access_token.refresh_token + hash["expires_at"] = access_token.expires_at if access_token.expires? + hash["expires"] = access_token.expires? hash end diff --git a/omniauth-oauth2.gemspec b/omniauth-oauth2.gemspec index 53983a4..8224d91 100644 --- a/omniauth-oauth2.gemspec +++ b/omniauth-oauth2.gemspec @@ -6,7 +6,7 @@ Gem::Specification.new do |gem| gem.add_dependency "oauth2", "~> 1.0" gem.add_dependency "omniauth", "~> 1.2" - gem.add_development_dependency "bundler", "~> 1.0" + gem.add_development_dependency "bundler" gem.authors = ["Michael Bleigh", "Erik Michaels-Ober"] gem.email = ["michael@intridea.com", "sferik@gmail.com"]