Skip to content

Commit

Permalink
Merge pull request #82 from bengler/update-pebblebed
Browse files Browse the repository at this point in the history
Update pebblebed
  • Loading branch information
Thomas Drevon authored Jan 26, 2018
2 parents c7a5e14 + 6a1151c commit 7066d88
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 56 deletions.
44 changes: 22 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
source 'https://rubygems.org'

gem 'sinatra'
gem 'sinatra-contrib', require: false
gem 'sinatra', '~> 1.4.6'
gem 'sinatra-contrib', '~> 1.4.6', require: false
gem 'sinatra-activerecord', '~> 2.0'
gem 'rack-contrib'
gem 'rack-contrib', '~> 1.4.0'

# Remove this git reference after version > 1.5.2 is released
gem 'rack-protection', :git => 'https://github.com/rkh/rack-protection.git'
gem 'addressable'
gem 'addressable', '~> 2.3.8'
gem 'activerecord', '~> 4.2.7.1', :require => 'active_record'
gem 'activesupport', '~> 4.2.5'
gem 'rails-observers', '~> 0.1', require: false
gem 'pg', '~> 0.17'
gem 'omniauth', '~> 1.7.1'
gem 'omniauth-twitter'
gem 'omniauth-twitter', '~> 1.2.1'
gem 'omniauth-facebook', '~> 4.0.0'
gem 'omniauth-oauth'
gem 'omniauth-oauth', '~> 1.1.0'
gem 'omniauth-oauth2', '~> 1.3.1'
gem 'omniauth-origo'
gem 'omniauth-origo', '~> 1.2.0'
gem 'omniauth-vanilla', :git => 'https://github.com/bengler/omniauth-vanilla.git', :branch => 'omniauth1.2'
gem 'omniauth-evernote'
gem 'omniauth-aid'
gem 'omniauth-google-oauth2'
gem 'pebblebed', ">=0.2.0"
gem 'pebbles-uid'
gem 'omniauth-evernote', '~> 1.2.1'
gem 'omniauth-aid', :git => 'https://github.com/bengler/omniauth-aid.git'
gem 'omniauth-google-oauth2', '~> 0.2.8'
gem 'pebblebed', "~> 0.3.26"
gem 'pebbles-uid', '~> 0.0.22'
gem 'pebbles-cors', :git => 'https://github.com/bengler/pebbles-cors.git'
gem 'pebbles-path', '>=0.0.3'
gem 'yajl-ruby', '1.3.1', :require => 'yajl'
gem 'dalli', '~> 2.1.0'
gem 'thor'
gem 'petroglyph'
gem 'rake'
gem 'queryparams'
gem 'thor', '~> 0.19.1'
gem 'petroglyph', '~> 0.0.7'
gem 'rake', '~> 10.4.2'
gem 'queryparams', '~> 0.0.3'
gem 'simpleidn', '~> 0.0.4'
gem 'rest-client', :require => false # Used by origo.thor
gem 'rest-client', '~> 1.8.0', :require => false # Used by origo.thor
gem 'ar-tsvectors', '~> 1.0', :require => 'activerecord_tsvectors'
gem 'curb', '>= 0.8.8'

group :development, :test do
gem 'simplecov'
gem 'simplecov', '~> 0.10.0'
gem 'rspec', '~> 2.8'
gem 'webmock', '~> 1.8.11'
gem 'vcr'
gem 'vcr', '~> 2.9.3'
gem 'timecop', '~> 0.3.5'
gem 'rack-test'
gem "memcache_mock"
gem 'rack-test', '~> 0.6.3'
gem "memcache_mock", '~> 0.0.14'
end

group :production do
gem 'airbrake', '~> 3.1.4', :require => false
gem 'unicorn'
gem 'unicorn', '~> 4.9.0'
end
73 changes: 40 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
GIT
remote: https://github.com/bengler/omniauth-aid.git
revision: 41e20b552bbdb551a6984e7eb9fd3f4aad0e3bf3
specs:
omniauth-aid (2.0.6)
omniauth-oauth2 (~> 1.3.1)

GIT
remote: https://github.com/bengler/omniauth-vanilla.git
revision: d4e0eeab050cfb52c2a0e4457e82aee50189a81e
Expand Down Expand Up @@ -26,6 +33,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
absolute_time (1.0.0)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
Expand All @@ -43,18 +51,18 @@ GEM
airbrake (3.1.17)
builder
multi_json
amq-protocol (2.0.0)
amq-protocol (2.3.0)
ar-tsvectors (1.0.0)
activerecord (>= 3.0)
arel (6.0.4)
backports (3.6.6)
builder (3.2.3)
bunny (2.2.0)
amq-protocol (>= 2.0.0)
bunny (2.9.1)
amq-protocol (~> 2.3.0)
concurrent-ruby (1.0.5)
crack (0.4.2)
safe_yaml (~> 1.0.0)
curb (0.8.8)
curb (0.9.4)
dalli (2.1.0)
deepstruct (0.0.7)
diff-lcs (1.2.5)
Expand All @@ -69,15 +77,15 @@ GEM
hashie (3.5.6)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.9.1)
i18n (0.9.3)
concurrent-ruby (~> 1.0)
json (1.8.6)
jwt (1.5.1)
kgio (2.10.0)
memcache_mock (0.0.14)
mime-types (2.6.2)
mini_portile2 (2.3.0)
minitest (5.10.3)
minitest (5.11.2)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
Expand All @@ -94,8 +102,6 @@ GEM
omniauth (1.7.1)
hashie (>= 3.4.6, < 3.6.0)
rack (>= 1.6.2, < 3)
omniauth-aid (2.0.6)
omniauth-oauth2 (~> 1.3.1)
omniauth-evernote (1.2.1)
evernote-thrift
multi_json (~> 1.0)
Expand All @@ -121,10 +127,11 @@ GEM
json (~> 1.3)
omniauth-oauth (~> 1.1)
pathbuilder (0.0.2)
pebblebed (0.3.8)
pebblebed (0.3.26)
absolute_time
activesupport
bunny
curb (>= 0.8.4)
curb (>= 0.8.8)
deepstruct (>= 0.0.4)
futurevalue
nokogiri
Expand Down Expand Up @@ -206,47 +213,47 @@ PLATFORMS
DEPENDENCIES
activerecord (~> 4.2.7.1)
activesupport (~> 4.2.5)
addressable
addressable (~> 2.3.8)
airbrake (~> 3.1.4)
ar-tsvectors (~> 1.0)
curb (>= 0.8.8)
dalli (~> 2.1.0)
memcache_mock
memcache_mock (~> 0.0.14)
omniauth (~> 1.7.1)
omniauth-aid
omniauth-evernote
omniauth-aid!
omniauth-evernote (~> 1.2.1)
omniauth-facebook (~> 4.0.0)
omniauth-google-oauth2
omniauth-oauth
omniauth-google-oauth2 (~> 0.2.8)
omniauth-oauth (~> 1.1.0)
omniauth-oauth2 (~> 1.3.1)
omniauth-origo
omniauth-twitter
omniauth-origo (~> 1.2.0)
omniauth-twitter (~> 1.2.1)
omniauth-vanilla!
pebblebed (>= 0.2.0)
pebblebed (~> 0.3.26)
pebbles-cors!
pebbles-path (>= 0.0.3)
pebbles-uid
petroglyph
pebbles-uid (~> 0.0.22)
petroglyph (~> 0.0.7)
pg (~> 0.17)
queryparams
rack-contrib
queryparams (~> 0.0.3)
rack-contrib (~> 1.4.0)
rack-protection!
rack-test
rack-test (~> 0.6.3)
rails-observers (~> 0.1)
rake
rest-client
rake (~> 10.4.2)
rest-client (~> 1.8.0)
rspec (~> 2.8)
simplecov
simplecov (~> 0.10.0)
simpleidn (~> 0.0.4)
sinatra
sinatra (~> 1.4.6)
sinatra-activerecord (~> 2.0)
sinatra-contrib
thor
sinatra-contrib (~> 1.4.6)
thor (~> 0.19.1)
timecop (~> 0.3.5)
unicorn
vcr
unicorn (~> 4.9.0)
vcr (~> 2.9.3)
webmock (~> 1.8.11)
yajl-ruby (= 1.3.1)

BUNDLED WITH
1.13.2
1.13.6
17 changes: 16 additions & 1 deletion api/v1/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ def url_for_failure(params = {})

session[:force_dialog] = params[:force_dialog].to_s == 'true'
session[:display] = params[:display]
session[:site] = params[:site]
session[:stealth_mode] = params[:stealth_mode]

if on_primary_domain?
if on_primary_domain? || params[:no_transfer]
session[:redirect_to] = target_url.to_s
redirect to("/auth/#{params[:provider]}")
else
Expand Down Expand Up @@ -154,6 +156,19 @@ def url_for_failure(params = {})
end
strategy.options[:target_url] = session[:redirect_to]

if params[:provider] == 'aid'
if session[:site]
strategy.options[:client_options] ||= {}
strategy.options[:client_options] = strategy.options[:client_options].merge({
:site => session[:site]
})
end
if session[:stealth_mode]
strategy.options[:stealth_mode] = true
end
end


if strategy.options.respond_to?(:consumer_key)
strategy.options.consumer_key = service_keys.consumer_key
strategy.options.consumer_secret = service_keys.consumer_secret
Expand Down

0 comments on commit 7066d88

Please sign in to comment.