Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 - allow for omniauth 2.0 series #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion lib/omniauth-line/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module OmniAuth
module Line
VERSION = "0.1.0"
VERSION = "1.0.0"
end
end
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def callback_phase

def callback_url
# Fixes regression in omniauth-oauth2 v1.4.0 by https://github.com/intridea/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7
options[:callback_url] || (full_host + script_name + callback_path)
options[:callback_url] || (full_host + callback_path)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this gem broken with omni_auth 2 without this change?

end

uid { raw_info['userId'] }
Expand Down
3 changes: 2 additions & 1 deletion omniauth-line.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_dependency 'json', '>= 2.3.0'
s.add_dependency 'omniauth-oauth2', '~>1.3'
s.add_dependency 'omniauth', '~> 2.0'
s.add_dependency 'omniauth-oauth2', '~> 1.7.1'
s.add_development_dependency 'bundler', '~> 2.0'
end
9 changes: 9 additions & 0 deletions spec/omniauth/strategies/line_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@
end
end

describe '#callback_url' do
it 'should returns callback url' do
base_url = 'https://example.com'
allow(subject).to receive(:full_host) { base_url }
allow(subject).to receive(:script_name) { '/v1' }
expect(subject.send(:callback_url)).to eq "#{base_url}/v1/auth/line/callback"
end
end

end

private
Expand Down