Skip to content

Commit

Permalink
Merge pull request #2 from tsubery/master
Browse files Browse the repository at this point in the history
Fix omniauth-oauth2 v1.4 compatibility
  • Loading branch information
dreeves committed Mar 16, 2016
2 parents ef584a4 + ecf2bc3 commit e77759c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/omniauth-beeminder/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module OmniAuth
module Beeminder
VERSION = "0.1.0"
VERSION = "0.1.2"
end
end
end
8 changes: 6 additions & 2 deletions lib/omniauth/strategies/beeminder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Beeminder < OmniAuth::Strategies::OAuth2
:response_type => 'token'
}

uid {
raw_info['username']
uid {
raw_info['username']
}

info do
Expand All @@ -23,6 +23,10 @@ class Beeminder < OmniAuth::Strategies::OAuth2
}
end

def callback_url
full_host + script_name + callback_path
end

def raw_info
@raw_info ||= MultiJson.load(access_token.get("/api/v1/users/me.json?access_token=#{access_token.token}").body)
end
Expand Down
6 changes: 3 additions & 3 deletions omniauth-beeminder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Gem::Specification.new do |gem|
gem.homepage = 'https://github.com/beeminder/omniauth-beeminder'
gem.require_paths = ['lib']
gem.summary = %q{Omniauth strategy for Beeminder}
gem.add_dependency 'omniauth-oauth2', '>= 1.1.1'
gem.version = "0.1.0"
end
gem.add_dependency 'omniauth-oauth2', ['>= 1.1.1']
gem.version = "0.1.2"
end

0 comments on commit e77759c

Please sign in to comment.