sinatra-google-auth 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ vendor
data/Gemfile CHANGED
@@ -3,6 +3,10 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in sinatra-google-auth.gemspec
4
4
  gemspec
5
5
 
6
+ gem "ruby-openid",
7
+ :git => "git://github.com/kendagriff/ruby-openid.git",
8
+ :ref => "79beaa419d4754e787757f2545331509419e222e"
9
+
6
10
  group :development do
7
11
  gem 'turn'
8
12
  gem 'sinatra'
data/README.md CHANGED
@@ -8,6 +8,25 @@ Add this line to your application's Gemfile:
8
8
 
9
9
  gem 'sinatra-google-auth'
10
10
 
11
+
12
+ ### Temporary Workaround
13
+
14
+ Google has changed their implementation that requires a patch to the `ruby-openid` gem.
15
+
16
+ See here for discussion:
17
+ https://github.com/openid/ruby-openid/issues/51
18
+
19
+ For now, you have to add:
20
+
21
+ gem "ruby-openid",
22
+ :git => "git://github.com/kendagriff/ruby-openid.git",
23
+ :ref => "79beaa419d4754e787757f2545331509419e222e"
24
+
25
+ To your Gemfile if you're getting an OmniAuth Error
26
+
27
+
28
+ ### Installation Continued
29
+
11
30
  And then execute:
12
31
 
13
32
  $ bundle
@@ -52,9 +52,7 @@ module Sinatra
52
52
  raise "Must supply ENV var GOOGLE_AUTH_DOMAIN" unless ENV['GOOGLE_AUTH_DOMAIN']
53
53
  app.helpers GoogleAuth::Helpers
54
54
  app.use ::Rack::Session::Cookie, :secret => secret
55
- app.use ::OmniAuth::Builder do
56
- provider :google_apps, domain: ENV['GOOGLE_AUTH_DOMAIN']
57
- end
55
+ app.use OmniAuth::Strategies::GoogleApps, :domain => ENV['GOOGLE_AUTH_DOMAIN'], :store => nil
58
56
 
59
57
  app.set :absolute_redirect, false
60
58
 
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module GoogleAuth
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -16,5 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Sinatra::GoogleAuth::VERSION
17
17
 
18
18
  gem.add_dependency 'omniauth-google-apps'
19
- gem.add_dependency 'oa-openid'
19
+ gem.add_dependency 'ruby-openid'
20
20
  end
@@ -0,0 +1,22 @@
1
+ require 'bundler'
2
+
3
+ require 'sinatra/base'
4
+ require 'sinatra/google-auth'
5
+
6
+ class Admin < Sinatra::Base
7
+ register Sinatra::GoogleAuth
8
+ use Sinatra::GoogleAuth::Middleware
9
+
10
+ get '*' do
11
+ 'welcome to the admin section'
12
+ end
13
+ end
14
+
15
+ class App < Sinatra::Base
16
+ get '/' do
17
+ "Public facing part"
18
+ end
19
+ end
20
+
21
+ map("/") { run App }
22
+ map("/admin") { run Admin }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-google-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-06 00:00:00.000000000 Z
12
+ date: 2013-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-google-apps
@@ -28,7 +28,7 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: oa-openid
31
+ name: ruby-openid
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
@@ -62,6 +62,7 @@ files:
62
62
  - test/classic_sytle.rb
63
63
  - test/classic_sytle.ru
64
64
  - test/modular_middleware.ru
65
+ - test/routed_middleware.ru
65
66
  - test/user_test.ru
66
67
  homepage: ''
67
68
  licenses: []
@@ -77,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
78
  version: '0'
78
79
  segments:
79
80
  - 0
80
- hash: 2097094025027831867
81
+ hash: -2083577921601217896
81
82
  required_rubygems_version: !ruby/object:Gem::Requirement
82
83
  none: false
83
84
  requirements:
@@ -86,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  version: '0'
87
88
  segments:
88
89
  - 0
89
- hash: 2097094025027831867
90
+ hash: -2083577921601217896
90
91
  requirements: []
91
92
  rubyforge_project:
92
93
  rubygems_version: 1.8.23
@@ -97,4 +98,5 @@ test_files:
97
98
  - test/classic_sytle.rb
98
99
  - test/classic_sytle.ru
99
100
  - test/modular_middleware.ru
101
+ - test/routed_middleware.ru
100
102
  - test/user_test.ru