diff --git a/lib/omniauth/strategies/twitter.rb b/lib/omniauth/strategies/twitter.rb index 26ada821..95d6b826 100644 --- a/lib/omniauth/strategies/twitter.rb +++ b/lib/omniauth/strategies/twitter.rb @@ -61,6 +61,12 @@ def request_phase old_request_phase end + def script_name + return if @env.nil? + + super + end + alias :old_callback_url :callback_url def callback_url diff --git a/omniauth-twitter.gemspec b/omniauth-twitter.gemspec index 0848407c..03409974 100644 --- a/omniauth-twitter.gemspec +++ b/omniauth-twitter.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.required_ruby_version = Gem::Requirement.new('>= 1.9.3') - s.add_dependency 'omniauth-oauth', '~> 1.1' + s.add_dependency 'omniauth-oauth', '~> 1.2' s.add_dependency 'rack' s.add_development_dependency 'bundler', '~> 2.0' end