fb_graph 1.9.4 → 1.9.5

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fb_graph (1.9.3)
4
+ fb_graph (1.9.4)
5
5
  httpclient (>= 2.2.0.2)
6
6
  rack-oauth2 (>= 0.8.0)
7
7
 
@@ -37,11 +37,10 @@ GEM
37
37
  jruby-openssl (0.7.4)
38
38
  bouncy-castle-java
39
39
  json (1.5.3)
40
- json (1.5.3-java)
41
40
  rack (1.2.3)
42
41
  rack-mount (0.6.14)
43
42
  rack (>= 1.0.0)
44
- rack-oauth2 (0.8.4)
43
+ rack-oauth2 (0.8.5)
45
44
  activesupport (>= 2.3)
46
45
  attr_required (>= 0.0.3)
47
46
  httpclient (>= 2.2.0.2)
data/README.rdoc CHANGED
@@ -39,7 +39,7 @@ https://github.com/nov/fb_graph/wiki
39
39
  user.identifier # => "matake"
40
40
  user.name # => nil
41
41
  user.link # => nil
42
- user.fetch
42
+ user = user.fetch
43
43
  user.name # => "Nov Matake"
44
44
  user.description # => "http://www.facebook.com/matake"
45
45
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.4
1
+ 1.9.5
@@ -7,6 +7,10 @@ module FbGraph
7
7
  arr
8
8
  end
9
9
  end
10
+
11
+ def revoke!(permission = nil, options = {})
12
+ destroy options.merge(:permission => permission, :connection => :permissions)
13
+ end
10
14
  end
11
15
  end
12
16
  end
@@ -1,16 +1,35 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe FbGraph::Connections::Permissions, '#permissions' do
4
- let :permissions do
5
- mock_graph :get, 'me/permissions', 'users/permissions/me_private', :access_token => 'access_token' do
6
- FbGraph::User.me('access_token').permissions
3
+ describe FbGraph::Connections::Permissions do
4
+ describe '#permissions' do
5
+ let :permissions do
6
+ mock_graph :get, 'me/permissions', 'users/permissions/me_private', :access_token => 'access_token' do
7
+ FbGraph::User.me('access_token').permissions
8
+ end
9
+ end
10
+
11
+ it 'should be an Array of Symbol' do
12
+ permissions.should be_instance_of Array
13
+ permissions.should_not be_blank
14
+ permissions.each do |permission|
15
+ permission.should be_instance_of Symbol
16
+ end
7
17
  end
8
18
  end
9
- it 'should be an Array of Symbol' do
10
- permissions.should be_instance_of Array
11
- permissions.should_not be_blank
12
- permissions.each do |permission|
13
- permission.should be_instance_of Symbol
19
+
20
+ describe '#revoke!' do
21
+ it 'should DELETE /:user_id/permissions' do
22
+ mock_graph :delete, 'me/permissions', 'true', :access_token => 'access_token' do
23
+ FbGraph::User.me('access_token').revoke!
24
+ end
25
+ end
26
+
27
+ it 'should support revoking specific permission' do
28
+ mock_graph :delete, 'me/permissions', 'true', :access_token => 'access_token', :params => {
29
+ :permission => :email
30
+ } do
31
+ FbGraph::User.me('access_token').revoke! :email
32
+ end
14
33
  end
15
34
  end
16
35
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: fb_graph
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.9.4
5
+ version: 1.9.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - nov matake
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-24 00:00:00 Z
13
+ date: 2011-08-08 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httpclient