Skip to content

Commit

Permalink
Merge pull request #3 from tauil/master
Browse files Browse the repository at this point in the history
Fixes auth callback url (https)
  • Loading branch information
sabotatore committed Jan 12, 2016
2 parents 52487c6 + cfe208b commit bdcff45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/omniauth-untappd/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module OmniAuth
module Untappd
VERSION = "0.1.1"
VERSION = "0.1.2"
end
end
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/untappd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def token_params
def raw_info
access_token.options[:mode] = :query
access_token.options[:param_name] = :access_token
@raw_info ||= access_token.get('http://api.untappd.com/v4/user/info').parsed['response']['user']
@raw_info ||= access_token.get('https://api.untappd.com/v4/user/info').parsed['response']['user']
end

private
Expand Down
6 changes: 3 additions & 3 deletions spec/omniauth/strategies/untappd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'first_name' => 'John',
'last_name' => 'Doe',
'user_name' => 'john_doe',
'untappd_url' => 'http://untappd.com/user/john_doe',
'untappd_url' => 'https://untappd.com/user/john_doe',
'settings' => {
'email_address' => 'john@doe'
}
Expand Down Expand Up @@ -62,7 +62,7 @@
subject { strategy.raw_info }
let(:access_token) { double('AccessToken', options: {}) }
let(:response) { double('Response', parsed: parsed_response) }
let(:user_info_url) { 'http://api.untappd.com/v4/user/info' }
let(:user_info_url) { 'https://api.untappd.com/v4/user/info' }

before { strategy.stub(access_token: access_token) }
before { expect(access_token).to receive(:get).with(user_info_url).and_return(response) }
Expand All @@ -81,7 +81,7 @@
it { expect(info[:name]).to eql 'John Doe' }
it { expect(info[:nickname]).to eql 'john_doe' }
it { expect(info[:email]).to eql 'john@doe' }
it { expect(info[:urls]['Untappd']).to eql 'http://untappd.com/user/john_doe' }
it { expect(info[:urls]['Untappd']).to eql 'https://untappd.com/user/john_doe' }
end

context '#extra' do
Expand Down

0 comments on commit bdcff45

Please sign in to comment.