From ece2b158631356168f2aa3747691a3213e43cd78 Mon Sep 17 00:00:00 2001 From: Al Snow Date: Mon, 18 Jan 2016 13:56:31 -0500 Subject: [PATCH 1/4] Fixed rubocop errors; Fixed SSL in Gemfile; Added 1 line to .travis.yml file --- .rubocop.yml | 5 ++++- .travis.yml | 1 + Gemfile | 2 +- lib/omniauth-oauth2/version.rb | 2 +- lib/omniauth/strategies/oauth2.rb | 6 +++--- 5 files changed, 10 insertions(+), 6 deletions(-) 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..0ba0d64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,5 @@ matrix: - rvm: jruby-head - rvm: ruby-head fast_finish: true +cache: bundler sudo: false diff --git a/Gemfile b/Gemfile index 8b100f4..3a39960 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source "http://rubygems.org" +source "https://rubygems.org" gem "rake" diff --git a/lib/omniauth-oauth2/version.rb b/lib/omniauth-oauth2/version.rb index 5a79a34..739f739 100644 --- a/lib/omniauth-oauth2/version.rb +++ b/lib/omniauth-oauth2/version.rb @@ -1,5 +1,5 @@ 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 From f31e9d4de94a990f132bc991cef0666e4845764a Mon Sep 17 00:00:00 2001 From: Al Snow Date: Mon, 18 Jan 2016 17:22:46 -0500 Subject: [PATCH 2/4] Upgraded to 2.3.0 --- .travis.yml | 1 + lib/omniauth-oauth2/version.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0ba0d64..9d455e3 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 diff --git a/lib/omniauth-oauth2/version.rb b/lib/omniauth-oauth2/version.rb index 739f739..058af9b 100644 --- a/lib/omniauth-oauth2/version.rb +++ b/lib/omniauth-oauth2/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module OmniAuth module OAuth2 VERSION = "1.4.0".freeze From 095df6c235966b006ae861a307930256724c0335 Mon Sep 17 00:00:00 2001 From: Al Snow Date: Mon, 18 Jan 2016 17:28:40 -0500 Subject: [PATCH 3/4] Changed allow_failures in .travis.yml file --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d455e3..0948e67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +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 From d352b091038078ce57635e791699f8ec0ec489ca Mon Sep 17 00:00:00 2001 From: Al Snow Date: Mon, 18 Jan 2016 19:54:57 -0500 Subject: [PATCH 4/4] Removed all but 2 gem restrictions --- Gemfile | 10 +++++----- omniauth-oauth2.gemspec | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 3a39960..e079ae7 100644 --- a/Gemfile +++ b/Gemfile @@ -5,12 +5,12 @@ 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/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"]