fb_graph 2.4.16 → 2.4.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +17 -17
- data/README.rdoc +7 -2
- data/VERSION +1 -1
- data/fb_graph.gemspec +1 -1
- data/lib/fb_graph/connections/app_requests.rb +2 -2
- data/spec/fb_graph/connections/app_requests_spec.rb +3 -1
- data/spec/fb_graph/node_spec.rb +6 -2
- data/spec/mock_json/users/app_requests/created.json +1 -1
- metadata +2 -8
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fb_graph (2.4.
|
4
|
+
fb_graph (2.4.16)
|
5
5
|
httpclient (>= 2.2.0.2)
|
6
6
|
rack-oauth2 (>= 0.14.4)
|
7
7
|
tzinfo
|
@@ -9,20 +9,20 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: http://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionpack (3.2.
|
13
|
-
activemodel (= 3.2.
|
14
|
-
activesupport (= 3.2.
|
12
|
+
actionpack (3.2.6)
|
13
|
+
activemodel (= 3.2.6)
|
14
|
+
activesupport (= 3.2.6)
|
15
15
|
builder (~> 3.0.0)
|
16
16
|
erubis (~> 2.7.0)
|
17
17
|
journey (~> 1.0.1)
|
18
18
|
rack (~> 1.4.0)
|
19
19
|
rack-cache (~> 1.2)
|
20
20
|
rack-test (~> 0.6.1)
|
21
|
-
sprockets (~> 2.1.
|
22
|
-
activemodel (3.2.
|
23
|
-
activesupport (= 3.2.
|
21
|
+
sprockets (~> 2.1.3)
|
22
|
+
activemodel (3.2.6)
|
23
|
+
activesupport (= 3.2.6)
|
24
24
|
builder (~> 3.0.0)
|
25
|
-
activesupport (3.2.
|
25
|
+
activesupport (3.2.6)
|
26
26
|
i18n (~> 0.6)
|
27
27
|
multi_json (~> 1.0)
|
28
28
|
addressable (2.2.8)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
i18n (0.6.0)
|
43
43
|
journey (1.0.3)
|
44
44
|
json (1.7.3)
|
45
|
-
multi_json (1.3.
|
45
|
+
multi_json (1.3.6)
|
46
46
|
rack (1.4.1)
|
47
47
|
rack-cache (1.2)
|
48
48
|
rack (>= 0.4)
|
@@ -56,14 +56,14 @@ GEM
|
|
56
56
|
rack-test (0.6.1)
|
57
57
|
rack (>= 1.0)
|
58
58
|
rake (0.9.2.2)
|
59
|
-
rspec (2.
|
60
|
-
rspec-core (~> 2.
|
61
|
-
rspec-expectations (~> 2.
|
62
|
-
rspec-mocks (~> 2.
|
63
|
-
rspec-core (2.
|
64
|
-
rspec-expectations (2.
|
59
|
+
rspec (2.10.0)
|
60
|
+
rspec-core (~> 2.10.0)
|
61
|
+
rspec-expectations (~> 2.10.0)
|
62
|
+
rspec-mocks (~> 2.10.0)
|
63
|
+
rspec-core (2.10.1)
|
64
|
+
rspec-expectations (2.10.0)
|
65
65
|
diff-lcs (~> 1.1.3)
|
66
|
-
rspec-mocks (2.
|
66
|
+
rspec-mocks (2.10.1)
|
67
67
|
sprockets (2.1.3)
|
68
68
|
hike (~> 1.2)
|
69
69
|
rack (~> 1.0)
|
@@ -84,5 +84,5 @@ DEPENDENCIES
|
|
84
84
|
fb_graph!
|
85
85
|
jruby-openssl (>= 0.7)
|
86
86
|
rake (>= 0.8)
|
87
|
-
rspec (>= 2
|
87
|
+
rspec (>= 2)
|
88
88
|
webmock (>= 1.6.2)
|
data/README.rdoc
CHANGED
@@ -234,11 +234,11 @@ See more here: http://developers.facebook.com/docs/authentication/fb_sig/
|
|
234
234
|
access_token = client.access_token! :client_auth_body # => Rack::OAuth2::AccessToken
|
235
235
|
FbGraph::User.me(access_token).fetch # => FbGraph::User
|
236
236
|
|
237
|
-
====
|
237
|
+
==== Extend Access Token Lifetime
|
238
238
|
|
239
239
|
# setup client
|
240
240
|
fb_auth = FbGraph::Auth.new(YOUR_APP_ID, YOUR_APPLICATION_SECRET)
|
241
|
-
fb_auth.
|
241
|
+
fb_auth.exchange_token! 'short-life-access-token'
|
242
242
|
fb_auth.access_token # => Rack::OAuth2::AccessToken
|
243
243
|
|
244
244
|
|
@@ -259,6 +259,11 @@ Not tested well yet.
|
|
259
259
|
Sample is here.
|
260
260
|
https://gist.github.com/752914
|
261
261
|
|
262
|
+
=== More Examples?
|
263
|
+
|
264
|
+
See GitHub wiki for more examples.
|
265
|
+
https://github.com/nov/fb_graph/wiki
|
266
|
+
|
262
267
|
== Note on Patches/Pull Requests
|
263
268
|
|
264
269
|
* Fork the project.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.17
|
data/fb_graph.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
else
|
22
22
|
s.add_development_dependency "rcov", ">= 0.9"
|
23
23
|
end
|
24
|
-
s.add_development_dependency "rspec", ">= 2"
|
24
|
+
s.add_development_dependency "rspec", ">= 2"
|
25
25
|
s.add_development_dependency "webmock", ">= 1.6.2"
|
26
26
|
s.add_development_dependency "actionpack", ">= 3.0.6"
|
27
27
|
end
|
@@ -11,8 +11,8 @@ module FbGraph
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def app_request!(options = {})
|
14
|
-
|
15
|
-
AppRequest.new
|
14
|
+
app_request = post options.merge(:connection => :apprequests)
|
15
|
+
AppRequest.new "#{app_request[:request]}_#{app_request[:to].first}", options.merge(
|
16
16
|
:access_token => options[:access_token] || self.access_token
|
17
17
|
)
|
18
18
|
end
|
@@ -19,7 +19,9 @@ describe FbGraph::Connections::AppRequests do
|
|
19
19
|
} do
|
20
20
|
app_request = FbGraph::User.me('access_token').app_request! :message => 'Message', :data => 'Data'
|
21
21
|
app_request.should be_instance_of FbGraph::AppRequest
|
22
|
-
app_request.identifier.should == "
|
22
|
+
app_request.identifier.should == "158192394305537_579612276"
|
23
|
+
app_request.message.should == 'Message'
|
24
|
+
app_request.data.should == 'Data'
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
data/spec/fb_graph/node_spec.rb
CHANGED
@@ -44,7 +44,9 @@ describe FbGraph::Node do
|
|
44
44
|
|
45
45
|
it 'should support Tempfile' do
|
46
46
|
params = node.send :build_params, :upload => tmpfile
|
47
|
-
params[:upload].should
|
47
|
+
(tmpfile.equal? params[:upload]).should be_true
|
48
|
+
# NOTE: For some reason, below fails with RSpec 2.10.0
|
49
|
+
# params[:upload].should == tmpfile
|
48
50
|
end
|
49
51
|
|
50
52
|
require 'action_dispatch/http/upload'
|
@@ -53,7 +55,9 @@ describe FbGraph::Node do
|
|
53
55
|
:tempfile => tmpfile
|
54
56
|
)
|
55
57
|
params = node.send :build_params, :upload => upload
|
56
|
-
params[:upload].should
|
58
|
+
(params[:upload].equal? tmpfile).should be_true
|
59
|
+
# NOTE: For some reason, below fails with RSpec 2.10.0
|
60
|
+
# params[:upload].should be_equal tmpfile
|
57
61
|
end
|
58
62
|
end
|
59
63
|
|
@@ -1 +1 @@
|
|
1
|
-
"
|
1
|
+
{"request":"158192394305537","to":["579612276"]}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|
@@ -99,9 +99,6 @@ dependencies:
|
|
99
99
|
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '2'
|
102
|
-
- - <
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 2.10.0
|
105
102
|
type: :development
|
106
103
|
prerelease: false
|
107
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -110,9 +107,6 @@ dependencies:
|
|
110
107
|
- - ! '>='
|
111
108
|
- !ruby/object:Gem::Version
|
112
109
|
version: '2'
|
113
|
-
- - <
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: 2.10.0
|
116
110
|
- !ruby/object:Gem::Dependency
|
117
111
|
name: webmock
|
118
112
|
requirement: !ruby/object:Gem::Requirement
|