rest-graph 2.0.1 → 2.0.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/.travis.yml +4 -2
- data/CHANGES.md +13 -0
- data/Gemfile +1 -1
- data/README.md +14 -0
- data/lib/rest-graph/core.rb +5 -2
- data/lib/rest-graph/rails_util.rb +9 -2
- data/lib/rest-graph/version.rb +1 -1
- data/rest-graph.gemspec +3 -4
- metadata +4 -4
- data/CONTRIBUTORS +0 -11
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# CHANGES
|
2
2
|
|
3
|
+
## rest-graph 2.0.2 -- 2012-07-13
|
4
|
+
|
5
|
+
* [RestGraph] Adopt latest em-http-request.
|
6
|
+
|
7
|
+
### Bugs fixes back ported from [rest-more][]
|
8
|
+
|
9
|
+
* [RestGraph::RailsUtil] Change the redirect log level from WARN to INFO.
|
10
|
+
* [RestGraph::RailsUtil] Since Facebook would return correct URL now,
|
11
|
+
we don't have to try to use `URI.encode` anymore. Actually, that
|
12
|
+
causes bugs.
|
13
|
+
|
14
|
+
Please upgrade to [rest-more][].
|
15
|
+
|
3
16
|
## rest-graph 2.0.1 -- 2011-11-25
|
4
17
|
|
5
18
|
### Bugs fixes back ported from [rest-more][]
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -362,6 +362,20 @@ Takes a session key from the old REST API
|
|
362
362
|
# https://graph.facebook.com/oauth/exchange_sessions?sessions=SESSION
|
363
363
|
rg.exchange_sessions(:sessions => params[:fb_sig_session_key])
|
364
364
|
|
365
|
+
## CONTRIBUTORS:
|
366
|
+
|
367
|
+
* Andrew Liu (@eggegg)
|
368
|
+
* andy (@coopsite)
|
369
|
+
* Barnabas Debreczeni (@keo)
|
370
|
+
* Bruce Chu (@bruchu)
|
371
|
+
* Ethan Czahor (@ethanz5)
|
372
|
+
* Florent Vaucelle (@florent)
|
373
|
+
* Jaime Cham (@jcham)
|
374
|
+
* John Fan (@johnfan)
|
375
|
+
* Lin Jen-Shin (@godfat)
|
376
|
+
* Mariusz Pruszynski (@snicky)
|
377
|
+
* Nicolas Fouché (@nfo)
|
378
|
+
|
365
379
|
## LICENSE:
|
366
380
|
|
367
381
|
Apache License 2.0
|
data/lib/rest-graph/core.rb
CHANGED
@@ -496,9 +496,12 @@ class RestGraph < RestGraphStruct
|
|
496
496
|
end
|
497
497
|
r
|
498
498
|
}
|
499
|
-
|
499
|
+
|
500
|
+
m = EM::MultiRequest.new
|
501
|
+
rs.each.with_index{ |r, i| m.add(i, r) }
|
502
|
+
m.callback{
|
500
503
|
# TODO: how to deal with the failed?
|
501
|
-
clients = m.responses[:
|
504
|
+
clients = m.responses[:callback].sort.map(&:last)
|
502
505
|
results = clients.map{ |client|
|
503
506
|
post_request(opts, client.uri, client.response)
|
504
507
|
}
|
@@ -112,7 +112,7 @@ module RestGraph::RailsUtil
|
|
112
112
|
:rest_graph_on_access_token_error
|
113
113
|
|
114
114
|
def rest_graph_authorize error=nil, force_redirect=true
|
115
|
-
logger.
|
115
|
+
logger.info("INFO: RestGraph: #{error.inspect}")
|
116
116
|
|
117
117
|
if force_redirect || rest_graph_auto_authorize?
|
118
118
|
@rest_graph_authorize_url = rest_graph.authorize_url(
|
@@ -339,12 +339,19 @@ module RestGraph::RailsUtil
|
|
339
339
|
end
|
340
340
|
|
341
341
|
def rest_graph_filter_uri uri
|
342
|
-
URI.parse(
|
342
|
+
URI.parse(uri).tap{ |uri|
|
343
343
|
uri.query = uri.query.split('&').reject{ |q|
|
344
344
|
q =~ /^(code|session|signed_request)\=/
|
345
345
|
}.join('&') if uri.query
|
346
346
|
uri.query = nil if uri.query.blank?
|
347
347
|
}.to_s
|
348
|
+
rescue URI::InvalidURIError => e
|
349
|
+
if @rest_graph_facebook_filter_uri_retry
|
350
|
+
raise e
|
351
|
+
else
|
352
|
+
@rest_graph_facebook_filter_uri_retry = uri = URI.encode(uri)
|
353
|
+
retry
|
354
|
+
end
|
348
355
|
end
|
349
356
|
|
350
357
|
def rest_graph_in_canvas?
|
data/lib/rest-graph/version.rb
CHANGED
data/rest-graph.gemspec
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rest-graph"
|
5
|
-
s.version = "2.0.
|
5
|
+
s.version = "2.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [
|
9
9
|
"Cardinal Blue",
|
10
10
|
"Lin Jen-Shin (godfat)"]
|
11
|
-
s.date = "
|
11
|
+
s.date = "2012-07-13"
|
12
12
|
s.description = "A lightweight Facebook Graph API client\n\nWe have moved the development from rest-graph to [rest-core][].\nBy now on, we would only fix bugs in rest-graph rather than adding\nfeatures, and we would only backport important changes from rest-core\nonce in a period. If you want the latest goodies, please see [rest-core][]\nOtherwise, you can stay with rest-graph with bugs fixes.\n\n[rest-core]: https://github.com/cardinalblue/rest-core"
|
13
13
|
s.email = ["dev (XD) cardinalblue.com"]
|
14
14
|
s.files = [
|
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
|
|
16
16
|
".gitmodules",
|
17
17
|
".travis.yml",
|
18
18
|
"CHANGES.md",
|
19
|
-
"CONTRIBUTORS",
|
20
19
|
"Gemfile",
|
21
20
|
"LICENSE",
|
22
21
|
"README.md",
|
@@ -102,7 +101,7 @@ Gem::Specification.new do |s|
|
|
102
101
|
"test/test_timeout.rb"]
|
103
102
|
s.homepage = "https://github.com/cardinalblue/rest-graph"
|
104
103
|
s.require_paths = ["lib"]
|
105
|
-
s.rubygems_version = "1.8.
|
104
|
+
s.rubygems_version = "1.8.24"
|
106
105
|
s.summary = "A lightweight Facebook Graph API client"
|
107
106
|
s.test_files = [
|
108
107
|
"test/test_api.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2012-07-13 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: ! 'A lightweight Facebook Graph API client
|
16
16
|
|
@@ -37,7 +37,6 @@ files:
|
|
37
37
|
- .gitmodules
|
38
38
|
- .travis.yml
|
39
39
|
- CHANGES.md
|
40
|
-
- CONTRIBUTORS
|
41
40
|
- Gemfile
|
42
41
|
- LICENSE
|
43
42
|
- README.md
|
@@ -141,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
140
|
version: '0'
|
142
141
|
requirements: []
|
143
142
|
rubyforge_project:
|
144
|
-
rubygems_version: 1.8.
|
143
|
+
rubygems_version: 1.8.24
|
145
144
|
signing_key:
|
146
145
|
specification_version: 3
|
147
146
|
summary: A lightweight Facebook Graph API client
|
@@ -163,3 +162,4 @@ test_files:
|
|
163
162
|
- test/test_serialize.rb
|
164
163
|
- test/test_test_util.rb
|
165
164
|
- test/test_timeout.rb
|
165
|
+
has_rdoc:
|
data/CONTRIBUTORS
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Lin Jen-Shin (godfat)
|
2
|
-
Barnabas Debreczeni (keo)
|
3
|
-
John Fan (johnfan)
|
4
|
-
Jaime Cham (jcham)
|
5
|
-
Andrew Liu (eggegg)
|
6
|
-
Mariusz Pruszynski (snicky)
|
7
|
-
Florent Vaucelle (florent)
|
8
|
-
Ethan Czahor (ethanz5)
|
9
|
-
Nicolas Fouché (nfo)
|
10
|
-
andy (coopsite)
|
11
|
-
Bruce Chu (bruchu)
|