omniauth 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of omniauth might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/.yardopts +4 -0
- data/{LICENSE → LICENSE.md} +1 -1
- data/README.md +41 -27
- data/lib/omniauth.rb +1 -1
- data/lib/omniauth/form.rb +1 -1
- data/lib/omniauth/strategies/developer.rb +1 -1
- data/lib/omniauth/strategy.rb +4 -4
- data/lib/omniauth/test/strategy_macros.rb +8 -8
- data/lib/omniauth/version.rb +1 -1
- data/omniauth.gemspec +24 -25
- data/spec/omniauth/auth_hash_spec.rb +38 -38
- data/spec/omniauth/builder_spec.rb +12 -10
- data/spec/omniauth/failure_endpoint_spec.rb +13 -13
- data/spec/omniauth/form_spec.rb +10 -10
- data/spec/omniauth/strategies/developer_spec.rb +21 -21
- data/spec/omniauth/strategy_spec.rb +236 -228
- data/spec/omniauth_spec.rb +40 -40
- data/spec/spec_helper.rb +3 -0
- metadata +41 -101
- metadata.gz.sig +0 -0
- data/Gemfile +0 -17
- data/Gemfile.rack-1.3.x +0 -4
- data/Guardfile +0 -10
data/spec/omniauth_spec.rb
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe OmniAuth do
|
4
|
-
describe
|
5
|
-
it
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
describe ".strategies" do
|
5
|
+
it "increases when a new strategy is made" do
|
6
|
+
expect{
|
7
|
+
class ExampleStrategy
|
8
|
+
include OmniAuth::Strategy
|
9
|
+
end
|
10
|
+
}.to change(OmniAuth.strategies, :size).by(1)
|
11
|
+
expect(OmniAuth.strategies.last).to eq(ExampleStrategy)
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
|
-
context
|
14
|
-
describe
|
15
|
-
it
|
16
|
-
OmniAuth::Configuration.defaults.
|
15
|
+
context "configuration" do
|
16
|
+
describe ".defaults" do
|
17
|
+
it "is a hash of default configuration" do
|
18
|
+
expect(OmniAuth::Configuration.defaults).to be_kind_of(Hash)
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
20
|
-
it
|
22
|
+
it "is callable from .configure" do
|
21
23
|
OmniAuth.configure do |c|
|
22
|
-
c.
|
24
|
+
expect(c).to be_kind_of(OmniAuth::Configuration)
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
@@ -35,76 +37,74 @@ describe OmniAuth do
|
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
|
-
it
|
40
|
+
it "is able to set the path" do
|
39
41
|
OmniAuth.configure do |config|
|
40
42
|
config.path_prefix = '/awesome'
|
41
43
|
end
|
42
44
|
|
43
|
-
OmniAuth.config.path_prefix.
|
45
|
+
expect(OmniAuth.config.path_prefix).to eq('/awesome')
|
44
46
|
end
|
45
47
|
|
46
|
-
it
|
48
|
+
it "is able to set the on_failure rack app" do
|
47
49
|
OmniAuth.configure do |config|
|
48
50
|
config.on_failure do
|
49
51
|
'yoyo'
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
53
|
-
OmniAuth.config.on_failure.call.
|
55
|
+
expect(OmniAuth.config.on_failure.call).to eq('yoyo')
|
54
56
|
end
|
55
|
-
describe
|
57
|
+
describe "mock auth" do
|
56
58
|
before do
|
57
59
|
OmniAuth.config.add_mock(:facebook, :uid => '12345',:info=>{:name=>'Joe', :email=>'joe@example.com'})
|
58
60
|
end
|
59
|
-
it
|
61
|
+
it "default should be AuthHash" do
|
60
62
|
OmniAuth.configure do |config|
|
61
|
-
config.mock_auth[:default].
|
63
|
+
expect(config.mock_auth[:default]).to be_kind_of(OmniAuth::AuthHash)
|
62
64
|
end
|
63
65
|
end
|
64
|
-
it
|
66
|
+
it "facebook should be AuthHash" do
|
65
67
|
OmniAuth.configure do |config|
|
66
|
-
config.mock_auth[:facebook].
|
67
|
-
end
|
68
|
+
expect(config.mock_auth[:facebook]).to be_kind_of(OmniAuth::AuthHash)
|
69
|
+
end
|
68
70
|
end
|
69
|
-
it
|
71
|
+
it "sets facebook attributes" do
|
70
72
|
OmniAuth.configure do |config|
|
71
|
-
config.mock_auth[:facebook].uid.
|
72
|
-
config.mock_auth[:facebook].info.name.
|
73
|
-
config.mock_auth[:facebook].info.email.
|
73
|
+
expect(config.mock_auth[:facebook].uid).to eq('12345')
|
74
|
+
expect(config.mock_auth[:facebook].info.name).to eq('Joe')
|
75
|
+
expect(config.mock_auth[:facebook].info.email).to eq('joe@example.com')
|
74
76
|
end
|
75
77
|
end
|
76
78
|
end
|
77
79
|
end
|
78
80
|
|
79
|
-
describe
|
80
|
-
it
|
81
|
+
describe ".logger" do
|
82
|
+
it "calls through to the configured logger" do
|
81
83
|
OmniAuth.stub(:config => mock(:logger => "foo"))
|
82
|
-
OmniAuth.logger.
|
84
|
+
expect(OmniAuth.logger).to eq("foo")
|
83
85
|
end
|
84
86
|
end
|
85
87
|
|
86
|
-
describe
|
87
|
-
describe
|
88
|
-
it
|
89
|
-
OmniAuth::Utils.deep_merge({'abc' => {'def' => 123}}, {'abc' => {'foo' => 'bar'}}).
|
90
|
-
'abc' => {'def' => 123, 'foo' => 'bar'}
|
91
|
-
}
|
88
|
+
describe "::Utils" do
|
89
|
+
describe ".deep_merge" do
|
90
|
+
it "combines hashes" do
|
91
|
+
expect(OmniAuth::Utils.deep_merge({'abc' => {'def' => 123}}, {'abc' => {'foo' => 'bar'}})).to eq({'abc' => {'def' => 123, 'foo' => 'bar'}})
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
describe
|
96
|
-
it
|
95
|
+
describe ".camelize" do
|
96
|
+
it "works on normal cases" do
|
97
97
|
{
|
98
98
|
'some_word' => 'SomeWord',
|
99
99
|
'AnotherWord' => 'AnotherWord',
|
100
100
|
'one' => 'One',
|
101
101
|
'three_words_now' => 'ThreeWordsNow'
|
102
|
-
}.each_pair{ |k,v| OmniAuth::Utils.camelize(k).
|
102
|
+
}.each_pair{ |k,v| expect(OmniAuth::Utils.camelize(k)).to eq(v) }
|
103
103
|
end
|
104
104
|
|
105
|
-
it
|
105
|
+
it "works in special cases that have been added" do
|
106
106
|
OmniAuth.config.add_camelization('oauth', 'OAuth')
|
107
|
-
OmniAuth::Utils.camelize(:oauth).
|
107
|
+
expect(OmniAuth::Utils.camelize(:oauth)).to eq('OAuth')
|
108
108
|
end
|
109
109
|
end
|
110
110
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -15,6 +15,9 @@ OmniAuth.config.logger = Logger.new("/dev/null")
|
|
15
15
|
RSpec.configure do |config|
|
16
16
|
config.include Rack::Test::Methods
|
17
17
|
config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
|
18
|
+
config.expect_with :rspec do |c|
|
19
|
+
c.syntax = :expect
|
20
|
+
end
|
18
21
|
end
|
19
22
|
|
20
23
|
class ExampleStrategy
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,25 +9,36 @@ authors:
|
|
9
9
|
- Erik Michaels-Ober
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
|
-
cert_chain:
|
13
|
-
|
12
|
+
cert_chain:
|
13
|
+
- !binary |-
|
14
|
+
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMakNDQWhhZ0F3SUJB
|
15
|
+
Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE5TVE4d0RRWURWUVFEREFaelpt
|
16
|
+
VnkKYVdzeEZUQVRCZ29Ka2lhSmsvSXNaQUVaRmdWbmJXRnBiREVUTUJFR0Nn
|
17
|
+
bVNKb21UOGl4a0FSa1dBMk52YlRBZQpGdzB4TXpBeU1ETXhNREF5TWpkYUZ3
|
18
|
+
MHhOREF5TURNeE1EQXlNamRhTUQweER6QU5CZ05WQkF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BEbGNQdGdB
|
34
|
+
NmllSTE5UFpPRjZIVkxtYy9JRC9kUC9OZ1pXV3pFZXFRS21jSwoyK0hNK1NF
|
35
|
+
RURoWmtTY1lla3c0Wk9lMTY0WnRaRzgxNm9BdjV4MHBHaXRTSWt1bVVwN1Y4
|
36
|
+
aUVaLzZlaHI3WTllClhPZzRlZXVuNUwvSmptakFSb1cya05kdmtSRDNjMkVl
|
37
|
+
U0xxV3ZRUnNCbHlwSGZoczZKSnVMbHlaUEdoVTNSL3YKU2YzbFZLcEJDV2dS
|
38
|
+
cEdUdnk0NVhWcEIrNTl5MzNQSm1FdVExUFRFT1l2UXlhbzlVS01BQWFBTi83
|
39
|
+
cVdRdGpsMApobHc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
40
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
14
41
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: rack
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ! '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ! '>='
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '0'
|
31
42
|
- !ruby/object:Gem::Dependency
|
32
43
|
name: hashie
|
33
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,62 +56,14 @@ dependencies:
|
|
45
56
|
- !ruby/object:Gem::Version
|
46
57
|
version: '1.2'
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
|
-
requirements:
|
60
|
-
- - ! '>='
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: simplecov
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ! '>='
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
|
-
type: :development
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ! '>='
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '0'
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
|
-
name: rack-test
|
81
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ! '>='
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '0'
|
87
|
-
type: :development
|
88
|
-
prerelease: false
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
|
-
requirements:
|
92
|
-
- - ! '>='
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '0'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rake
|
59
|
+
name: rack
|
97
60
|
requirement: !ruby/object:Gem::Requirement
|
98
61
|
none: false
|
99
62
|
requirements:
|
100
63
|
- - ! '>='
|
101
64
|
- !ruby/object:Gem::Version
|
102
65
|
version: '0'
|
103
|
-
type: :
|
66
|
+
type: :runtime
|
104
67
|
prerelease: false
|
105
68
|
version_requirements: !ruby/object:Gem::Requirement
|
106
69
|
none: false
|
@@ -109,13 +72,13 @@ dependencies:
|
|
109
72
|
- !ruby/object:Gem::Version
|
110
73
|
version: '0'
|
111
74
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
75
|
+
name: bundler
|
113
76
|
requirement: !ruby/object:Gem::Requirement
|
114
77
|
none: false
|
115
78
|
requirements:
|
116
79
|
- - ~>
|
117
80
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
81
|
+
version: '1.0'
|
119
82
|
type: :development
|
120
83
|
prerelease: false
|
121
84
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -123,23 +86,7 @@ dependencies:
|
|
123
86
|
requirements:
|
124
87
|
- - ~>
|
125
88
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
127
|
-
- !ruby/object:Gem::Dependency
|
128
|
-
name: yard
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
|
-
requirements:
|
132
|
-
- - ! '>='
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
135
|
-
type: :development
|
136
|
-
prerelease: false
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
|
-
requirements:
|
140
|
-
- - ! '>='
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
89
|
+
version: '1.0'
|
143
90
|
description: A generalized Rack framework for multiple-provider authentication.
|
144
91
|
email:
|
145
92
|
- michael@intridea.com
|
@@ -148,30 +95,23 @@ executables: []
|
|
148
95
|
extensions: []
|
149
96
|
extra_rdoc_files: []
|
150
97
|
files:
|
151
|
-
- .gemtest
|
152
|
-
- .gitignore
|
153
|
-
- .rspec
|
154
|
-
- .travis.yml
|
155
98
|
- .yardopts
|
156
|
-
-
|
157
|
-
- Gemfile.rack-1.3.x
|
158
|
-
- Guardfile
|
159
|
-
- LICENSE
|
99
|
+
- LICENSE.md
|
160
100
|
- README.md
|
161
101
|
- Rakefile
|
162
|
-
-
|
102
|
+
- omniauth.gemspec
|
163
103
|
- lib/omniauth/auth_hash.rb
|
164
104
|
- lib/omniauth/builder.rb
|
165
105
|
- lib/omniauth/failure_endpoint.rb
|
166
106
|
- lib/omniauth/form.rb
|
167
107
|
- lib/omniauth/strategies/developer.rb
|
168
108
|
- lib/omniauth/strategy.rb
|
169
|
-
- lib/omniauth/test.rb
|
170
109
|
- lib/omniauth/test/phony_session.rb
|
171
110
|
- lib/omniauth/test/strategy_macros.rb
|
172
111
|
- lib/omniauth/test/strategy_test_case.rb
|
112
|
+
- lib/omniauth/test.rb
|
173
113
|
- lib/omniauth/version.rb
|
174
|
-
- omniauth.
|
114
|
+
- lib/omniauth.rb
|
175
115
|
- spec/omniauth/auth_hash_spec.rb
|
176
116
|
- spec/omniauth/builder_spec.rb
|
177
117
|
- spec/omniauth/failure_endpoint_spec.rb
|
@@ -181,7 +121,8 @@ files:
|
|
181
121
|
- spec/omniauth_spec.rb
|
182
122
|
- spec/spec_helper.rb
|
183
123
|
homepage: http://github.com/intridea/omniauth
|
184
|
-
licenses:
|
124
|
+
licenses:
|
125
|
+
- MIT
|
185
126
|
post_install_message:
|
186
127
|
rdoc_options: []
|
187
128
|
require_paths:
|
@@ -213,4 +154,3 @@ test_files:
|
|
213
154
|
- spec/omniauth/strategy_spec.rb
|
214
155
|
- spec/omniauth_spec.rb
|
215
156
|
- spec/spec_helper.rb
|
216
|
-
has_rdoc:
|
metadata.gz.sig
ADDED
Binary file
|
data/Gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gem 'growl'
|
4
|
-
gem 'guard'
|
5
|
-
gem 'guard-bundler'
|
6
|
-
gem 'guard-rspec'
|
7
|
-
gem 'rack', '~> 1.4'
|
8
|
-
gem 'rb-fsevent'
|
9
|
-
#gem 'plymouth'
|
10
|
-
#gem 'pry'
|
11
|
-
#gem 'pry-nav'
|
12
|
-
|
13
|
-
platforms :jruby do
|
14
|
-
gem 'jruby-openssl'
|
15
|
-
end
|
16
|
-
|
17
|
-
gemspec
|
data/Gemfile.rack-1.3.x
DELETED
data/Guardfile
DELETED