fb_rails 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/fb_rails/connect.rb +6 -8
  2. metadata +6 -6
@@ -6,17 +6,14 @@ module FbRails
6
6
  end
7
7
  end
8
8
 
9
- extend ActiveSupport::Memoizable
10
-
11
9
  attr_reader :cookies
12
10
  def initialize(cookies)
13
11
  @cookies = cookies
14
12
  end
15
13
 
16
14
  def cookie
17
- FbRails::Cookie.decode(cookies[self.class.cookie_name], FbRails::Config.secret)
15
+ @cookie ||= FbRails::Cookie.decode(cookies[self.class.cookie_name], FbRails::Config.secret)
18
16
  end
19
- memoize :cookie
20
17
 
21
18
  def connected?
22
19
  cookie.present?
@@ -32,12 +29,13 @@ module FbRails
32
29
 
33
30
  def user
34
31
  if connected?
35
- record = FbRails::Config.user_class.find_or_initialize_by_fb_uid(uid)
36
- record.access_token = access_token
37
- record
32
+ @user ||= begin
33
+ record = FbRails::Config.user_class.find_or_initialize_by_fb_uid(uid)
34
+ record.access_token = access_token
35
+ record
36
+ end
38
37
  end
39
38
  end
40
- memoize :user
41
39
  end
42
40
  end
43
41
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
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-12-10 00:00:00.000000000 Z
12
+ date: 2011-12-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70111865339960 !ruby/object:Gem::Requirement
16
+ requirement: &70148942553520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70111865339960
24
+ version_requirements: *70148942553520
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fakeweb
27
- requirement: &70111865339500 !ruby/object:Gem::Requirement
27
+ requirement: &70148942552880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70111865339500
35
+ version_requirements: *70148942552880
36
36
  description: A Rails 3 gem for the latest facebook API
37
37
  email: developer@matthewhiggins.com
38
38
  executables: []