Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ Style/SpaceInsideHashLiteralBraces:
Style/StringLiterals:
EnforcedStyle: double_quotes

Style/TrailingComma:
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: 'comma'

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: 'comma'
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3.0
- jruby-18mode
- jruby-19mode
- jruby-head
- rbx-2
- 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
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion lib/omniauth-oauth2/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true
module OmniAuth
module OAuth2
VERSION = "1.4.0"
VERSION = "1.4.0".freeze
end
end
6 changes: 3 additions & 3 deletions lib/omniauth/strategies/oauth2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion omniauth-oauth2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down