socialite 0.0.1.beta2 → 0.0.1.beta4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- socialite (0.0.1.beta2)
4
+ socialite (0.0.1.beta4)
5
5
  grackle (~> 0.1.10)
6
6
  haml (~> 3.1.2)
7
7
  koala (~> 1.2.0beta4)
@@ -74,7 +74,7 @@ GEM
74
74
  faraday (0.7.4)
75
75
  addressable (~> 2.2.6)
76
76
  multipart-post (~> 1.1.0)
77
- rack (< 2, >= 1.1.0)
77
+ rack (>= 1.1.0, < 2)
78
78
  ffi (1.0.9)
79
79
  gherkin (2.5.1)
80
80
  json (>= 1.4.6)
@@ -176,7 +176,7 @@ GEM
176
176
  sprockets (2.0.0)
177
177
  hike (~> 1.2)
178
178
  rack (~> 1.0)
179
- tilt (!= 1.3.0, ~> 1.1)
179
+ tilt (~> 1.1, != 1.3.0)
180
180
  sqlite3 (1.3.4)
181
181
  term-ansicolor (1.0.6)
182
182
  thor (0.14.6)
@@ -184,7 +184,7 @@ GEM
184
184
  treetop (1.4.10)
185
185
  polyglot
186
186
  polyglot (>= 0.3.1)
187
- tzinfo (0.3.29)
187
+ tzinfo (0.3.30)
188
188
  xpath (0.1.4)
189
189
  nokogiri (~> 1.3)
190
190
  yard (0.7.2)
@@ -1,5 +1,5 @@
1
1
  module Socialite
2
- class UserController < ApplicationController
2
+ class UsersController < ApplicationController
3
3
  unloadable
4
4
 
5
5
  before_filter :ensure_user
@@ -4,7 +4,7 @@ Socialite::Engine.routes.draw do
4
4
  match '/auth/failure' => 'identities#failure'
5
5
  match '/logout' => 'session#destroy', :as => :logout
6
6
 
7
- resource :user, :controller => 'user', :except => [:new, :create] do
7
+ resource :user, :except => [:new, :create] do
8
8
  resources :identities
9
9
  end
10
10
  end
@@ -13,9 +13,6 @@ module Socialite
13
13
 
14
14
  module Controllers
15
15
  autoload :Helpers, 'socialite/controllers/helpers'
16
- autoload :Identities, 'socialite/controllers/identities'
17
- autoload :Session, 'socialite/controllers/session'
18
- autoload :User, 'socialite/controllers/user'
19
16
  end
20
17
 
21
18
  module Helpers
@@ -28,7 +25,7 @@ module Socialite
28
25
  autoload :FacebookIdentity, 'socialite/models/facebook_identity.rb'
29
26
  end
30
27
 
31
- mattr_accessor :service_configs, :root_path, :mount_prefix
28
+ mattr_accessor :service_configs, :root_path, :mount_prefix, :mounted_engine
32
29
  @@service_configs = {}
33
30
 
34
31
  def self.generate_token
@@ -39,6 +36,10 @@ module Socialite
39
36
  block.call self if block_given?
40
37
  end
41
38
 
39
+ def self.mounted_engine?
40
+ !!mounted_engine
41
+ end
42
+
42
43
  # config.twitter APP_KEY, APP_SECRET, :scope => ['foo', 'bar']
43
44
  def self.twitter(app_key, app_secret, options = {})
44
45
  @@service_configs[:twitter] = ServiceConfig.new(app_key, app_secret, options)
@@ -8,16 +8,29 @@ module Socialite
8
8
 
9
9
  initializer 'socialite.load_middleware', :after => :load_config_initializers do
10
10
  if Socialite.service_configs[:twitter]
11
- middleware.use OmniAuth::Strategies::Twitter,
12
- Socialite.service_configs[:twitter].app_key,
13
- Socialite.service_configs[:twitter].app_secret
11
+ if Socialite.mounted_engine?
12
+ middleware.use OmniAuth::Strategies::Twitter,
13
+ Socialite.service_configs[:twitter].app_key,
14
+ Socialite.service_configs[:twitter].app_secret
15
+ else
16
+ config.app_middleware.use OmniAuth::Strategies::Twitter,
17
+ Socialite.service_configs[:twitter].app_key,
18
+ Socialite.service_configs[:twitter].app_secret
19
+ end
14
20
  end
15
21
 
16
22
  if Socialite.service_configs[:facebook]
17
- middleware.use OmniAuth::Strategies::Facebook,
18
- Socialite.service_configs[:facebook].app_key,
19
- Socialite.service_configs[:facebook].app_secret,
20
- Socialite.service_configs[:facebook].options
23
+ if Socialite.mounted_engine?
24
+ middleware.use OmniAuth::Strategies::Facebook,
25
+ Socialite.service_configs[:facebook].app_key,
26
+ Socialite.service_configs[:facebook].app_secret,
27
+ Socialite.service_configs[:facebook].options
28
+ else
29
+ config.app_middleware.use OmniAuth::Strategies::Facebook,
30
+ Socialite.service_configs[:facebook].app_key,
31
+ Socialite.service_configs[:facebook].app_secret,
32
+ Socialite.service_configs[:facebook].options
33
+ end
21
34
  end
22
35
  end
23
36
 
@@ -1,3 +1,3 @@
1
1
  module Socialite
2
- VERSION = '0.0.1.beta2'
2
+ VERSION = '0.0.1.beta4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta2
4
+ version: 0.0.1.beta4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-28 00:00:00.000000000Z
12
+ date: 2011-10-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70251593638160 !ruby/object:Gem::Requirement
16
+ requirement: &70258980161920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70251593638160
24
+ version_requirements: *70258980161920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sass-rails
27
- requirement: &70251593636940 !ruby/object:Gem::Requirement
27
+ requirement: &70258980161100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70251593636940
35
+ version_requirements: *70258980161100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: simple_form
38
- requirement: &70251593635780 !ruby/object:Gem::Requirement
38
+ requirement: &70258980160380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.5.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70251593635780
46
+ version_requirements: *70258980160380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: haml
49
- requirement: &70251593634700 !ruby/object:Gem::Requirement
49
+ requirement: &70258980159800 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.1.2
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70251593634700
57
+ version_requirements: *70258980159800
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: oa-core
60
- requirement: &70251593633480 !ruby/object:Gem::Requirement
60
+ requirement: &70258980159280 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.3.0.rc3
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70251593633480
68
+ version_requirements: *70258980159280
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: oa-oauth
71
- requirement: &70251593632660 !ruby/object:Gem::Requirement
71
+ requirement: &70258980158660 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.3.0.rc3
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70251593632660
79
+ version_requirements: *70258980158660
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: koala
82
- requirement: &70251593631600 !ruby/object:Gem::Requirement
82
+ requirement: &70258980157880 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.2.0beta4
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70251593631600
90
+ version_requirements: *70258980157880
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: grackle
93
- requirement: &70251593630500 !ruby/object:Gem::Requirement
93
+ requirement: &70258980157040 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.1.10
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70251593630500
101
+ version_requirements: *70258980157040
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: sqlite3
104
- requirement: &70251593629640 !ruby/object:Gem::Requirement
104
+ requirement: &70258980156460 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70251593629640
112
+ version_requirements: *70258980156460
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: yard
115
- requirement: &70251593628640 !ruby/object:Gem::Requirement
115
+ requirement: &70258980155660 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70251593628640
123
+ version_requirements: *70258980155660
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rdiscount
126
- requirement: &70251593627640 !ruby/object:Gem::Requirement
126
+ requirement: &70258980154860 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70251593627640
134
+ version_requirements: *70258980154860
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rspec-rails
137
- requirement: &70251593626460 !ruby/object:Gem::Requirement
137
+ requirement: &70258980153900 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ~>
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 2.6.1
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *70251593626460
145
+ version_requirements: *70258980153900
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: factory_girl
148
- requirement: &70251593625280 !ruby/object:Gem::Requirement
148
+ requirement: &70258980147880 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ~>
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 2.1.0
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *70251593625280
156
+ version_requirements: *70258980147880
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: shoulda-matchers
159
- requirement: &70251593624400 !ruby/object:Gem::Requirement
159
+ requirement: &70258980147140 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *70251593624400
167
+ version_requirements: *70258980147140
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: cucumber-rails
170
- requirement: &70251593623300 !ruby/object:Gem::Requirement
170
+ requirement: &70258980145900 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 1.0.6
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *70251593623300
178
+ version_requirements: *70258980145900
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: database_cleaner
181
- requirement: &70251593622420 !ruby/object:Gem::Requirement
181
+ requirement: &70258980145100 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 0.6.7
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *70251593622420
189
+ version_requirements: *70258980145100
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: selenium-webdriver
192
- requirement: &70251593621060 !ruby/object:Gem::Requirement
192
+ requirement: &70258980144080 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ! '>='
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: 2.4.0
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *70251593621060
200
+ version_requirements: *70258980144080
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: launchy
203
- requirement: &70251593619900 !ruby/object:Gem::Requirement
203
+ requirement: &70258980143240 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ~>
@@ -208,7 +208,7 @@ dependencies:
208
208
  version: 2.0.5
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *70251593619900
211
+ version_requirements: *70258980143240
212
212
  description: Rails engine supporting multiple auth providers per user.
213
213
  email: justin.smestad@gmail.com
214
214
  executables: []
@@ -231,7 +231,7 @@ files:
231
231
  - app/assets/stylesheets/socialite/socialite.css
232
232
  - app/controllers/socialite/identities_controller.rb
233
233
  - app/controllers/socialite/session_controller.rb
234
- - app/controllers/socialite/user_controller.rb
234
+ - app/controllers/socialite/users_controller.rb
235
235
  - app/models/socialite/facebook_identity.rb
236
236
  - app/models/socialite/identity.rb
237
237
  - app/models/socialite/user.rb
@@ -338,7 +338,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
338
  version: '0'
339
339
  segments:
340
340
  - 0
341
- hash: 3505192399675819770
341
+ hash: -2813799985366239650
342
342
  required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  none: false
344
344
  requirements: