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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29779247ea4c8d68997114d9c8159ef2be6fdbc4
4
- data.tar.gz: 7e285f44b219fb2a5758cab2f3338dc7c2dd709c
3
+ metadata.gz: 68a1005cf3e165e5c3aab49736d685ebd70b3578
4
+ data.tar.gz: 3e6775221c4f27db65875c11476c08ffc65b991a
5
5
  SHA512:
6
- metadata.gz: ae6f18f8305cc9d61b917bff0df2eafca0f704690068fc586b56f04fb7bde85416aac947947228f12005b962f6fcd3d6691003b62e8b4793c41eb9b4850f9c0b
7
- data.tar.gz: 389647fd49c729b8a0e85abdfffbc3171282e7a464e9d7402e4c0e852531d726512cbe172886b4b86ef77850f6cc6e952bd2a4771ca2d4936ff99ed71d5ba2f2
6
+ metadata.gz: b675333d6b1aa1083b1eddb7289e7ffa657f85a93c00301658c1c4763f5624ae00cf622e91aa263f7817b24ddf2da576db7cd5fcf4af29a95c13c8e863b1ad37
7
+ data.tar.gz: c0e50b7be47436601eecc9f9c9707b37986ca7007429439379e541e3f6f2757389df18a6ee22248e1f65926a459b585b60979b723abccc1213e305cd023cf4d1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.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 do
22
- video = mock_graph :post, 'me/videos', 'success_with_id', access_token: 'token' do
23
- me.video! source: File.new(__FILE__), message: 'hello'
24
- end
25
- video.should be_instance_of FbGraph2::Video
26
- end
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
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": "106444709796298",
3
+ "login_url": "https://developers.facebook.com/checkpoint/test-user-login/106444709796298/",
4
+ "email": "hhndcqu_bowerssky_1469002228@tfbnw.net",
5
+ "password": "test_user_password",
6
+ "access_token": "test_user_token"
7
+ }
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.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-02-07 00:00:00.000000000 Z
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.4.5.1
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