authlogic_facebook_koala 0.3.0 → 0.3.2
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/README.md +4 -0
- data/authlogic_facebook_koala.gemspec +25 -22
- metadata +31 -165
- data/LICENSE +0 -20
- data/README.rdoc +0 -76
- data/Rakefile +0 -39
- data/VERSION +0 -1
- data/init.rb +0 -1
- data/lib/authlogic_facebook_koala.rb +0 -17
- data/lib/authlogic_facebook_koala/acts_as_authentic.rb +0 -20
- data/lib/authlogic_facebook_koala/adapter.rb +0 -35
- data/lib/authlogic_facebook_koala/config.rb +0 -80
- data/lib/authlogic_facebook_koala/helper.rb +0 -4
- data/lib/authlogic_facebook_koala/session.rb +0 -68
- data/rails/init.rb +0 -1
- data/test/rails_root/app/controllers/application_controller.rb +0 -10
- data/test/rails_root/app/helpers/application_helper.rb +0 -3
- data/test/rails_root/app/models/user.rb +0 -7
- data/test/rails_root/app/models/user_session.rb +0 -7
- data/test/rails_root/config/boot.rb +0 -110
- data/test/rails_root/config/database.yml +0 -10
- data/test/rails_root/config/environment.rb +0 -31
- data/test/rails_root/config/environments/development.rb +0 -0
- data/test/rails_root/config/environments/test.rb +0 -0
- data/test/rails_root/config/facebook.yml +0 -7
- data/test/rails_root/config/initializers/authlogic_facebook_koala.rb +0 -5
- data/test/rails_root/config/initializers/new_rails_defaults.rb +0 -21
- data/test/rails_root/config/initializers/session_store.rb +0 -15
- data/test/rails_root/config/locales/en.yml +0 -5
- data/test/rails_root/config/routes.rb +0 -43
- data/test/rails_root/db/migrate/20101217000008_create_users.rb +0 -37
- data/test/rails_root/db/seeds.rb +0 -7
- data/test/rails_root/script/console +0 -3
- data/test/rails_root/script/dbconsole +0 -3
- data/test/rails_root/script/generate +0 -3
- data/test/test_helper.rb +0 -43
- data/test/units/adapter_test.rb +0 -182
- data/test/units/config_test.rb +0 -145
- data/test/units/session_test.rb +0 -221
data/README.md
ADDED
@@ -1,31 +1,34 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{authlogic_facebook_koala}
|
3
|
-
s.version = "0.3.
|
4
|
-
|
5
|
-
s.required_rubygems_version = Gem::Requirement.new(">=1.2.0") if s.respond_to? :required_rubygems_version=
|
3
|
+
s.version = "0.3.2"
|
6
4
|
s.authors = ["James McCarthy"]
|
7
|
-
s.date = %q{
|
8
|
-
s.description = %q{Authlogic plugin to support Facebook
|
5
|
+
s.date = %q{2011-04-17}
|
6
|
+
s.description = %q{Authlogic plugin to support Facebook OAuth2 javascript sessions. This is now just a facade for authlogic_facebook_shim so please use that instead.}
|
9
7
|
s.email = %q{james2mccarthy@gmail.com}
|
10
|
-
s.
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
s.homepage = %q{http://github.com/james2m/authlogic_facebook_shim}
|
9
|
+
s.summary = %q{Authlogic plugin to support Facebook Javascript OAuth2 Sessions. Superseded by authlogic_facebook_shim}
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">=1.2.0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.rubygems_version = %q{1.3.5}
|
13
|
+
|
14
14
|
s.files = Dir.glob('**/*') - Dir.glob('authlogic_facebook_koala*.gem')
|
15
|
-
|
15
|
+
|
16
16
|
s.rdoc_options = ["--charset=UTF-8"]
|
17
|
-
s.
|
18
|
-
|
19
|
-
s.
|
20
|
-
s.
|
17
|
+
s.extra_rdoc_files = ["README.md"]
|
18
|
+
|
19
|
+
s.add_runtime_dependency('authlogic', "~>2.1.3")
|
20
|
+
s.add_runtime_dependency('authlogic_facebook_shim', ">=0.3.3")
|
21
|
+
|
22
|
+
s.post_install_message = %q{
|
23
|
+
================================================================================
|
24
|
+
|
25
|
+
The authlogic_facebook_koala gem has been superseded by authlogic_facebook_shim.
|
26
|
+
It has been installed for you as a dependency but in the future you can install
|
27
|
+
it directly.
|
28
|
+
|
29
|
+
$ gem install authlogic_facebook_shim
|
21
30
|
|
22
|
-
|
23
|
-
|
24
|
-
s.add_development_dependency('rails', '=2.3.5')
|
25
|
-
s.add_development_dependency('flexmock')
|
26
|
-
s.add_development_dependency('jeweler')
|
27
|
-
s.add_development_dependency('shoulda')
|
28
|
-
s.add_development_dependency('sqlite3-ruby')
|
29
|
-
s.add_development_dependency('test-unit')
|
31
|
+
================================================================================
|
32
|
+
}
|
30
33
|
end
|
31
34
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic_facebook_koala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James McCarthy
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-04-17 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
hash: 13
|
30
30
|
segments:
|
@@ -35,159 +35,48 @@ dependencies:
|
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
name:
|
38
|
+
name: authlogic_facebook_shim
|
39
39
|
prerelease: false
|
40
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
hash:
|
45
|
+
hash: 21
|
46
46
|
segments:
|
47
47
|
- 0
|
48
|
-
-
|
49
|
-
-
|
50
|
-
version: 0.
|
48
|
+
- 3
|
49
|
+
- 3
|
50
|
+
version: 0.3.3
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
|
-
|
54
|
-
name: rails
|
55
|
-
prerelease: false
|
56
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - "="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
hash: 9
|
62
|
-
segments:
|
63
|
-
- 2
|
64
|
-
- 3
|
65
|
-
- 5
|
66
|
-
version: 2.3.5
|
67
|
-
type: :development
|
68
|
-
version_requirements: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: flexmock
|
71
|
-
prerelease: false
|
72
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
hash: 3
|
78
|
-
segments:
|
79
|
-
- 0
|
80
|
-
version: "0"
|
81
|
-
type: :development
|
82
|
-
version_requirements: *id004
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: jeweler
|
85
|
-
prerelease: false
|
86
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
hash: 3
|
92
|
-
segments:
|
93
|
-
- 0
|
94
|
-
version: "0"
|
95
|
-
type: :development
|
96
|
-
version_requirements: *id005
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: shoulda
|
99
|
-
prerelease: false
|
100
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
101
|
-
none: false
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
hash: 3
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
version: "0"
|
109
|
-
type: :development
|
110
|
-
version_requirements: *id006
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: sqlite3-ruby
|
113
|
-
prerelease: false
|
114
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
|
-
requirements:
|
117
|
-
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
hash: 3
|
120
|
-
segments:
|
121
|
-
- 0
|
122
|
-
version: "0"
|
123
|
-
type: :development
|
124
|
-
version_requirements: *id007
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: test-unit
|
127
|
-
prerelease: false
|
128
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
|
-
requirements:
|
131
|
-
- - ">="
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
hash: 3
|
134
|
-
segments:
|
135
|
-
- 0
|
136
|
-
version: "0"
|
137
|
-
type: :development
|
138
|
-
version_requirements: *id008
|
139
|
-
description: Authlogic plugin to support Facebook Javascript OAuth2 Sessions, using the koala gem for facebook graph access.
|
53
|
+
description: Authlogic plugin to support Facebook OAuth2 javascript sessions. This is now just a facade for authlogic_facebook_shim so please use that instead.
|
140
54
|
email: james2mccarthy@gmail.com
|
141
55
|
executables: []
|
142
56
|
|
143
57
|
extensions: []
|
144
58
|
|
145
59
|
extra_rdoc_files:
|
146
|
-
-
|
147
|
-
- README.rdoc
|
60
|
+
- README.md
|
148
61
|
files:
|
149
62
|
- authlogic_facebook_koala.gemspec
|
150
|
-
-
|
151
|
-
- lib/authlogic_facebook_koala/acts_as_authentic.rb
|
152
|
-
- lib/authlogic_facebook_koala/adapter.rb
|
153
|
-
- lib/authlogic_facebook_koala/config.rb
|
154
|
-
- lib/authlogic_facebook_koala/helper.rb
|
155
|
-
- lib/authlogic_facebook_koala/session.rb
|
156
|
-
- lib/authlogic_facebook_koala.rb
|
157
|
-
- LICENSE
|
158
|
-
- rails/init.rb
|
159
|
-
- Rakefile
|
160
|
-
- README.rdoc
|
161
|
-
- test/rails_root/app/controllers/application_controller.rb
|
162
|
-
- test/rails_root/app/helpers/application_helper.rb
|
163
|
-
- test/rails_root/app/models/user.rb
|
164
|
-
- test/rails_root/app/models/user_session.rb
|
165
|
-
- test/rails_root/config/boot.rb
|
166
|
-
- test/rails_root/config/database.yml
|
167
|
-
- test/rails_root/config/environment.rb
|
168
|
-
- test/rails_root/config/environments/development.rb
|
169
|
-
- test/rails_root/config/environments/test.rb
|
170
|
-
- test/rails_root/config/facebook.yml
|
171
|
-
- test/rails_root/config/initializers/authlogic_facebook_koala.rb
|
172
|
-
- test/rails_root/config/initializers/new_rails_defaults.rb
|
173
|
-
- test/rails_root/config/initializers/session_store.rb
|
174
|
-
- test/rails_root/config/locales/en.yml
|
175
|
-
- test/rails_root/config/routes.rb
|
176
|
-
- test/rails_root/db/migrate/20101217000008_create_users.rb
|
177
|
-
- test/rails_root/db/seeds.rb
|
178
|
-
- test/rails_root/script/console
|
179
|
-
- test/rails_root/script/dbconsole
|
180
|
-
- test/rails_root/script/generate
|
181
|
-
- test/test_helper.rb
|
182
|
-
- test/units/adapter_test.rb
|
183
|
-
- test/units/config_test.rb
|
184
|
-
- test/units/session_test.rb
|
185
|
-
- VERSION
|
63
|
+
- README.md
|
186
64
|
has_rdoc: true
|
187
|
-
homepage: http://github.com/james2m/
|
65
|
+
homepage: http://github.com/james2m/authlogic_facebook_shim
|
188
66
|
licenses: []
|
189
67
|
|
190
|
-
post_install_message:
|
68
|
+
post_install_message: |
|
69
|
+
|
70
|
+
================================================================================
|
71
|
+
|
72
|
+
The authlogic_facebook_koala gem has been superseded by authlogic_facebook_shim.
|
73
|
+
It has been installed for you as a dependency but in the future you can install
|
74
|
+
it directly.
|
75
|
+
|
76
|
+
$ gem install authlogic_facebook_shim
|
77
|
+
|
78
|
+
================================================================================
|
79
|
+
|
191
80
|
rdoc_options:
|
192
81
|
- --charset=UTF-8
|
193
82
|
require_paths:
|
@@ -215,32 +104,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
104
|
requirements: []
|
216
105
|
|
217
106
|
rubyforge_project:
|
218
|
-
rubygems_version: 1.
|
107
|
+
rubygems_version: 1.4.2
|
219
108
|
signing_key:
|
220
109
|
specification_version: 3
|
221
|
-
summary: Authlogic plugin to support Facebook OAuth2
|
222
|
-
test_files:
|
223
|
-
|
224
|
-
- test/rails_root/app/helpers/application_helper.rb
|
225
|
-
- test/rails_root/app/models/user.rb
|
226
|
-
- test/rails_root/app/models/user_session.rb
|
227
|
-
- test/rails_root/config/boot.rb
|
228
|
-
- test/rails_root/config/database.yml
|
229
|
-
- test/rails_root/config/environment.rb
|
230
|
-
- test/rails_root/config/environments/development.rb
|
231
|
-
- test/rails_root/config/environments/test.rb
|
232
|
-
- test/rails_root/config/facebook.yml
|
233
|
-
- test/rails_root/config/initializers/authlogic_facebook_koala.rb
|
234
|
-
- test/rails_root/config/initializers/new_rails_defaults.rb
|
235
|
-
- test/rails_root/config/initializers/session_store.rb
|
236
|
-
- test/rails_root/config/locales/en.yml
|
237
|
-
- test/rails_root/config/routes.rb
|
238
|
-
- test/rails_root/db/migrate/20101217000008_create_users.rb
|
239
|
-
- test/rails_root/db/seeds.rb
|
240
|
-
- test/rails_root/script/console
|
241
|
-
- test/rails_root/script/dbconsole
|
242
|
-
- test/rails_root/script/generate
|
243
|
-
- test/test_helper.rb
|
244
|
-
- test/units/adapter_test.rb
|
245
|
-
- test/units/config_test.rb
|
246
|
-
- test/units/session_test.rb
|
110
|
+
summary: Authlogic plugin to support Facebook Javascript OAuth2 Sessions. Superseded by authlogic_facebook_shim
|
111
|
+
test_files: []
|
112
|
+
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2010 James McCarthy
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
= authlogic_facebook_koala
|
2
|
-
|
3
|
-
This is a plugin for integrating facebook sessions into authlogic.
|
4
|
-
|
5
|
-
This requires a config/facebook.yml file that looks like this:
|
6
|
-
|
7
|
-
development:
|
8
|
-
app_id: appid
|
9
|
-
api_key: apikey
|
10
|
-
secret_key: secretkey
|
11
|
-
|
12
|
-
production:
|
13
|
-
app_id: appid
|
14
|
-
api_key: apikey
|
15
|
-
secret_key: secretkey
|
16
|
-
|
17
|
-
If you don't have different facebook credentials for different environments you can set these in UserSession
|
18
|
-
|
19
|
-
facebook_app_id 'appid'
|
20
|
-
facebook_api_key 'apikey'
|
21
|
-
facebook_secret_key 'secretkey'
|
22
|
-
|
23
|
-
In your controller you probably have something like this;
|
24
|
-
|
25
|
-
def current_user_session
|
26
|
-
@current_user_session ||= AccountSession.find
|
27
|
-
end
|
28
|
-
|
29
|
-
def current_user
|
30
|
-
@current_user ||= current_user_session.try(:user)
|
31
|
-
end
|
32
|
-
|
33
|
-
def logged_in?
|
34
|
-
current_user && !current_user_session.stale?
|
35
|
-
end
|
36
|
-
|
37
|
-
To get hold of the facebook particulars you will need to add something like this;
|
38
|
-
|
39
|
-
def facebook_user
|
40
|
-
current_user_session.try(:facebook_user)
|
41
|
-
end
|
42
|
-
|
43
|
-
def facebook_user?
|
44
|
-
!facebook_user.nil?
|
45
|
-
end
|
46
|
-
|
47
|
-
def facebook_session?
|
48
|
-
current_user_session.try(:facebook_session?)
|
49
|
-
end
|
50
|
-
|
51
|
-
If you have conventional signin and want to ignore facebook for it you will need to do this in your user_sessions_controller;
|
52
|
-
|
53
|
-
def create
|
54
|
-
@account_session = AccountSession.new(params[:account_session])
|
55
|
-
@account_session.skip_facebook_authentication = true
|
56
|
-
if @account_session.save
|
57
|
-
redirect_to member_home_path
|
58
|
-
else
|
59
|
-
render :action => :new
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
== Note on Patches/Pull Requests
|
65
|
-
|
66
|
-
* Fork the project.
|
67
|
-
* Make your feature addition or bug fix.
|
68
|
-
* Add tests for it. This is important so I don't break it in a future version unintentionally.
|
69
|
-
* Commit, do not mess with rakefile, version, or history. (if you want to have
|
70
|
-
your own version, that is fine but bump version in a commit by itself I can
|
71
|
-
ignore when I pull)
|
72
|
-
* Send me a pull request. Bonus points for topic branches.
|
73
|
-
|
74
|
-
== Copyright
|
75
|
-
|
76
|
-
Copyright (c) 2010 James McCarthy. See LICENSE for details.
|
data/Rakefile
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
require 'jeweler'
|
4
|
-
require 'rake/rdoctask'
|
5
|
-
|
6
|
-
Jeweler::Tasks.new
|
7
|
-
|
8
|
-
Rake::RDocTask.new do |rdoc|
|
9
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
10
|
-
|
11
|
-
rdoc.rdoc_dir = 'rdoc'
|
12
|
-
rdoc.title = "authlogic_facebook_koala #{version}"
|
13
|
-
rdoc.rdoc_files.include('README*')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
-
end
|
16
|
-
|
17
|
-
require 'rake/testtask'
|
18
|
-
Rake::TestTask.new(:test) do |test|
|
19
|
-
test.libs << 'test'
|
20
|
-
test.pattern = 'test/**/*_test.rb'
|
21
|
-
test.verbose = true
|
22
|
-
end
|
23
|
-
|
24
|
-
begin
|
25
|
-
require 'rcov/rcovtask'
|
26
|
-
Rcov::RcovTask.new do |test|
|
27
|
-
test.libs << 'test'
|
28
|
-
test.pattern = 'test/**/*_test.rb'
|
29
|
-
test.verbose = true
|
30
|
-
end
|
31
|
-
rescue LoadError
|
32
|
-
task :rcov do
|
33
|
-
abort "RCov is not available. In order to run rcov, you must: gem install rcov"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
task :test => :check_dependencies
|
38
|
-
|
39
|
-
task :default => :test
|