open_graph 0.1.6 → 0.1.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/build.md CHANGED
@@ -1,2 +1,4 @@
1
+ $ git submodule init
2
+ $ git submodule update
1
3
  $ rake build
2
4
  $ gem push pkg/open_graph-VERSION.gem
@@ -151,13 +151,14 @@ module OpenGraph
151
151
  response = HTTParty.get(url, @@request_options).response
152
152
  response_hash = parse_response(response)
153
153
  if response.is_a?(Net::HTTPOK)
154
+ options[:uid] = response_hash['id'] if options[:uid] == 'me' && requested_call == :info
154
155
  response_hash['location'] = fetch_codified_location(options.slice(:uid, :access_token)) if requested_call == :info
155
156
  end
156
157
  fb_cache(url, response_hash)
157
158
  end
158
159
 
159
160
  def default_options
160
- {:uid => uid, :access_token => access_token}
161
+ {:uid => uid || 'me', :access_token => access_token}
161
162
  end
162
163
 
163
164
  def build_url(options)
@@ -176,7 +177,8 @@ module OpenGraph
176
177
  #Craptacular way to get location of user (deprecated FB call to old api) REPLACE AT SOME POINT!
177
178
  def fetch_codified_location(options_for_fql)
178
179
  OpenGraph.logger.info("[OpenGraph] DEPRICATED - fetching codified location")
179
- fql_query('user', 'current_location').first['current_location']
180
+ fql_response = fql_query('user', 'current_location', options_for_fql[:uid]).first
181
+ fql_response.present? ? fql_response['current_location'] : nil
180
182
  end
181
183
 
182
184
  def parse_response(response)
@@ -1,3 +1,3 @@
1
1
  module OpenGraph
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.6.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_graph
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
4
+ hash: 93
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
9
  - 6
10
- version: 0.1.6
10
+ - 1
11
+ version: 0.1.6.1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Change.org Engineering
@@ -15,13 +16,11 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-06-16 00:00:00 -07:00
19
+ date: 2011-07-14 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
- name: rake
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
27
26
  - - ">="
@@ -30,8 +29,10 @@ dependencies:
30
29
  segments:
31
30
  - 0
32
31
  version: "0"
32
+ prerelease: false
33
+ name: rake
33
34
  type: :runtime
34
- version_requirements: *id001
35
+ requirement: *id001
35
36
  description: OpenGraph provides an easy to use wrapper for making facebook calls. It also provides javascript stubs allowing seemless testing against the javascript sdk.
36
37
  email:
37
38
  - engineering@change.org
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  requirements: []
90
91
 
91
92
  rubyforge_project: open_graph
92
- rubygems_version: 1.3.7
93
+ rubygems_version: 1.5.3
93
94
  signing_key:
94
95
  specification_version: 3
95
96
  summary: A ruby wrapper for the new facebook graph api