From 3df2bcf615ab019a41a156df943c2b306c0d20dc Mon Sep 17 00:00:00 2001 From: Andrey Baiburin Date: Sat, 21 Nov 2015 00:52:23 +0300 Subject: [PATCH] fix callback issue #25 --- .rubocop_todo.yml | 5 ++++- .travis.yml | 3 +-- Rakefile | 4 ++-- lib/omniauth/strategies/gplus.rb | 6 +++++- omniauth-gplus.gemspec | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b5a8f61..3bd9f41 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -65,6 +65,9 @@ EmptyLinesAroundAccessModifier: EndAlignment: AlignWith: variable +Metrics/AbcSize: + Max: 20 + # Indentation of when/else CaseIndentation: IndentWhenRelativeTo: end @@ -75,4 +78,4 @@ Lambda: FileName: Exclude: - - 'lib/omniauth-gplus.rb' \ No newline at end of file + - 'lib/omniauth-gplus.rb' diff --git a/.travis.yml b/.travis.yml index 44012fd..6464d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ before_install: - gem --version language: ruby rvm: - - 1.9.2 - 1.9.3 - 2.0.0 - 2.1 @@ -23,4 +22,4 @@ matrix: - rvm: jruby-head - rvm: ruby-head - rvm: rbx - fast_finish: true \ No newline at end of file + fast_finish: true diff --git a/Rakefile b/Rakefile index 2b235df..c774edf 100644 --- a/Rakefile +++ b/Rakefile @@ -27,10 +27,10 @@ end begin require 'rubocop/rake_task' - Rubocop::RakeTask.new + RuboCop::RakeTask.new rescue LoadError task :rubocop do - $stderr.puts 'Rubocop is disabled' + $stderr.puts 'RuboCop is disabled' end end diff --git a/lib/omniauth/strategies/gplus.rb b/lib/omniauth/strategies/gplus.rb index 365bd32..094dcfe 100644 --- a/lib/omniauth/strategies/gplus.rb +++ b/lib/omniauth/strategies/gplus.rb @@ -54,6 +54,10 @@ def authorize_params end end + def callback_url + full_host + script_name + callback_path + end + private def format_actions(actions) @@ -82,7 +86,7 @@ def add_key_to_params(params, key) def add_openid_realm_if_present(params) realm = options.send(:openid_realm) - params['openid.realm'] = realm if realm.present? + params['openid.realm'] = realm if realm end def raw_info diff --git a/omniauth-gplus.gemspec b/omniauth-gplus.gemspec index 95230a1..fb8a876 100644 --- a/omniauth-gplus.gemspec +++ b/omniauth-gplus.gemspec @@ -27,6 +27,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry' s.add_development_dependency 'coveralls' s.add_development_dependency 'rubocop' + s.add_development_dependency 'minitest' if RUBY_PLATFORM == 'rbx' s.add_development_dependency 'racc'