fb_graph2 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/fb_graph2/edge/test_users.rb +7 -1
- data/spec/fb_graph2/edge/test_users_spec.rb +14 -2
- data/spec/fb_graph2/edge/videos_spec.rb +7 -6
- data/spec/mock_json/post/test_users.json +7 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68a1005cf3e165e5c3aab49736d685ebd70b3578
|
4
|
+
data.tar.gz: 3e6775221c4f27db65875c11476c08ffc65b991a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b675333d6b1aa1083b1eddb7289e7ffa657f85a93c00301658c1c4763f5624ae00cf622e91aa263f7817b24ddf2da576db7cd5fcf4af29a95c13c8e863b1ad37
|
7
|
+
data.tar.gz: c0e50b7be47436601eecc9f9c9707b37986ca7007429439379e541e3f6f2757389df18a6ee22248e1f65926a459b585b60979b723abccc1213e305cd023cf4d1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.8
|
@@ -7,6 +7,12 @@ module FbGraph2
|
|
7
7
|
User.new(user[:id], user)
|
8
8
|
end
|
9
9
|
end
|
10
|
+
|
11
|
+
def test_users!(params = {})
|
12
|
+
user = self.post params, edge: :accounts, edge_scope: :'test-users'
|
13
|
+
params.delete(:access_token) # so as not to keep app token
|
14
|
+
User.new(user[:id], user.merge(params))
|
15
|
+
end
|
10
16
|
end
|
11
17
|
end
|
12
|
-
end
|
18
|
+
end
|
@@ -2,8 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe FbGraph2::Edge::TestUsers do
|
4
4
|
context 'included in App' do
|
5
|
+
let(:app) { FbGraph2::App.app('app_token') }
|
6
|
+
|
5
7
|
describe '#test_users' do
|
6
|
-
let(:app) { FbGraph2::App.app('app_token') }
|
7
8
|
it 'should return an Array of FbGraph2::User with test_user token' do
|
8
9
|
users = mock_graph :get, 'app/accounts/test-users', 'app/test_users', access_token: 'app_token' do
|
9
10
|
app.test_users
|
@@ -16,5 +17,16 @@ describe FbGraph2::Edge::TestUsers do
|
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
20
|
+
|
21
|
+
describe '#test_users!' do
|
22
|
+
it 'should create an Object of FbGraph2::User with test_user token' do
|
23
|
+
permissions = %w[public_profile,email,user_friends].join(',')
|
24
|
+
user = mock_graph :post, 'app/accounts/test-users', 'post/test_users', access_token: 'app_token', permissions: permissions do
|
25
|
+
app.test_users!
|
26
|
+
end
|
27
|
+
user.should be_instance_of FbGraph2::User
|
28
|
+
user.access_token.should == 'test_user_token'
|
29
|
+
end
|
30
|
+
end
|
19
31
|
end
|
20
|
-
end
|
32
|
+
end
|
@@ -18,12 +18,13 @@ describe FbGraph2::Edge::Videos do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
describe '#video!' do
|
21
|
-
it
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
it 'skip until webmock support multipart'
|
22
|
+
# it do
|
23
|
+
# video = mock_graph :post, 'me/videos', 'success_with_id', access_token: 'token' do
|
24
|
+
# me.video! source: File.new(__FILE__), message: 'hello'
|
25
|
+
# end
|
26
|
+
# video.should be_instance_of FbGraph2::Video
|
27
|
+
# end
|
27
28
|
end
|
28
29
|
end
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -433,6 +433,7 @@ files:
|
|
433
433
|
- spec/mock_json/post/liked_and_commented.json
|
434
434
|
- spec/mock_json/post/likes.json
|
435
435
|
- spec/mock_json/post/shared_posts.json
|
436
|
+
- spec/mock_json/post/test_users.json
|
436
437
|
- spec/mock_json/search/user.json
|
437
438
|
- spec/mock_json/success_true.json
|
438
439
|
- spec/mock_json/success_with_id.json
|
@@ -499,7 +500,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
499
500
|
version: '0'
|
500
501
|
requirements: []
|
501
502
|
rubyforge_project:
|
502
|
-
rubygems_version: 2.
|
503
|
+
rubygems_version: 2.5.1
|
503
504
|
signing_key:
|
504
505
|
specification_version: 4
|
505
506
|
summary: Facebook Graph API v2.x Wrapper in Ruby
|