Skip to content

Commit

Permalink
Merge pull request #13 from koshilife/allow-for-omniauth-2.0
Browse files Browse the repository at this point in the history
Allow for omniauth 2.0 series
  • Loading branch information
kkanazaw authored Mar 18, 2021
2 parents ca90b04 + 0af6a0f commit 5c22720
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/omniauth-freee/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module OmniAuth
module Freee
VERSION = "0.0.4"
VERSION = "1.0.0"
end
end
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/freee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def raw_info
end

def callback_url
full_host + script_name + callback_path
full_host + callback_path
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions omniauth-freee.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = OmniAuth::Freee::VERSION

gem.add_dependency 'omniauth', '~> 1.5'
gem.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
gem.add_dependency 'omniauth', '~> 2.0'
gem.add_dependency 'omniauth-oauth2', '~> 1.7.1'
gem.add_development_dependency 'rspec', '~> 3.5'
gem.add_development_dependency 'rack-test'
gem.add_development_dependency 'simplecov'
Expand Down
14 changes: 7 additions & 7 deletions spec/omniauth/strategies/freee_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@
end
end

# describe '#callback_url' do
# it 'is a combination of host, script name, and callback path' do
# allow(subject).to receive(:full_host).and_return('https://example.com')
# allow(subject).to receive(:script_name).and_return('/sub_uri')
describe '#callback_url' do
it 'is a combination of host, script name, and callback path' do
allow(subject).to receive(:full_host).and_return('https://example.com')
allow(subject).to receive(:script_name).and_return('/sub_uri')

# expect(subject.callback_url).to eq('https://example.com/sub_uri/auth/freee/callback')
# end
# end
expect(subject.callback_url).to eq('https://example.com/sub_uri/auth/freee/callback')
end
end
end

0 comments on commit 5c22720

Please sign in to comment.