fb_graph 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.gitignore +21 -0
  2. data/VERSION +1 -1
  3. data/fb_graph.gemspec +284 -281
  4. data/lib/fb_graph/connections/comments.rb +1 -4
  5. data/lib/fb_graph/connections/likes.rb +1 -4
  6. data/lib/fb_graph/node.rb +1 -1
  7. data/spec/fake_json/statuses/with_likes.json +17 -0
  8. data/spec/fb_graph/checkin_spec.rb +1 -1
  9. data/spec/fb_graph/collection_spec.rb +1 -1
  10. data/spec/fb_graph/connection_spec.rb +2 -3
  11. data/spec/fb_graph/connections/accounts_spec.rb +1 -1
  12. data/spec/fb_graph/connections/activities_spec.rb +1 -1
  13. data/spec/fb_graph/connections/albums_spec.rb +1 -1
  14. data/spec/fb_graph/connections/attending_spec.rb +1 -1
  15. data/spec/fb_graph/connections/books_spec.rb +1 -1
  16. data/spec/fb_graph/connections/checkins_spec.rb +2 -2
  17. data/spec/fb_graph/connections/declined_spec.rb +1 -1
  18. data/spec/fb_graph/connections/events_spec.rb +1 -1
  19. data/spec/fb_graph/connections/feed_spec.rb +1 -1
  20. data/spec/fb_graph/connections/friend_lists_spec.rb +1 -1
  21. data/spec/fb_graph/connections/friends_spec.rb +1 -1
  22. data/spec/fb_graph/connections/groups_spec.rb +1 -1
  23. data/spec/fb_graph/connections/home_spec.rb +1 -1
  24. data/spec/fb_graph/connections/insights_spec.rb +2 -2
  25. data/spec/fb_graph/connections/interests_spec.rb +1 -1
  26. data/spec/fb_graph/connections/invited_spec.rb +1 -1
  27. data/spec/fb_graph/connections/likes_spec.rb +40 -1
  28. data/spec/fb_graph/connections/links_spec.rb +1 -1
  29. data/spec/fb_graph/connections/maybe_spec.rb +1 -1
  30. data/spec/fb_graph/connections/members_spec.rb +1 -1
  31. data/spec/fb_graph/connections/movies_spec.rb +1 -1
  32. data/spec/fb_graph/connections/music_spec.rb +1 -1
  33. data/spec/fb_graph/connections/noreply_spec.rb +1 -1
  34. data/spec/fb_graph/connections/notes_spec.rb +1 -1
  35. data/spec/fb_graph/connections/photos_spec.rb +1 -1
  36. data/spec/fb_graph/connections/posts_spec.rb +1 -1
  37. data/spec/fb_graph/connections/statuses_spec.rb +2 -2
  38. data/spec/fb_graph/connections/subscriptions_spec.rb +1 -1
  39. data/spec/fb_graph/connections/tagged_spec.rb +1 -1
  40. data/spec/fb_graph/connections/television_spec.rb +1 -1
  41. data/spec/fb_graph/connections/videos_spec.rb +1 -1
  42. data/spec/fb_graph/page_spec.rb +1 -1
  43. data/spec/fb_graph/post_spec.rb +2 -2
  44. data/spec/fb_graph/user_spec.rb +1 -1
  45. data/spec/spec_helper.rb +1 -8
  46. metadata +8 -6
@@ -3,10 +3,7 @@ module FbGraph
3
3
  module Comments
4
4
  def comments(options = {})
5
5
  comments = if @_comments_ && options.blank?
6
- # Note:
7
- # "comments" is a connection, but included in fetched object
8
- # this improves performance when rendering the stream with comments
9
- @_comments_
6
+ self.connection(:comments, options.merge(:cached_collection => @_comments_))
10
7
  else
11
8
  self.connection(:comments, options)
12
9
  end
@@ -3,10 +3,7 @@ module FbGraph
3
3
  module Likes
4
4
  def likes(options = {})
5
5
  likes = if @_likes_ && options.blank?
6
- # Note:
7
- # "likes" is a connection, but included in fetched object
8
- # this improves performance when rendering the stream with likes
9
- @_likes_
6
+ self.connection(:likes, options.merge(:cached_collection => @_likes_))
10
7
  else
11
8
  self.connection(:likes, options)
12
9
  end
data/lib/fb_graph/node.rb CHANGED
@@ -21,7 +21,7 @@ module FbGraph
21
21
  end
22
22
 
23
23
  def connection(connection, options = {})
24
- collection = FbGraph::Collection.new(get(options.merge(:connection => connection)))
24
+ collection = options[:cached_collection] || FbGraph::Collection.new(get(options.merge(:connection => connection)))
25
25
  Connection.new(self, connection, options.merge(:collection => collection))
26
26
  end
27
27
 
@@ -0,0 +1,17 @@
1
+ {
2
+ "id": "115838235152172",
3
+ "from": {
4
+ "name": "Nov Matake",
5
+ "id": "579612276"
6
+ },
7
+ "message": "\u3053\u306eUI\u3067\u3082\u30b9\u30c6\u30fc\u30bf\u30b9\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u304c\u591a\u3044Facebook\u3063\u3066\u3001\u3042\u308b\u610f\u5473\u3059\u3054\u3044\u306a\u3002",
8
+ "updated_time": "2010-12-21T14:43:12+0000",
9
+ "likes": {
10
+ "data": [
11
+ {
12
+ "id": "604578140",
13
+ "name": "K Hiromi"
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -5,7 +5,7 @@ describe FbGraph::Checkin, '.new' do
5
5
  end
6
6
 
7
7
  describe FbGraph::Checkin, '.search' do
8
- before(:all) do
8
+ before do
9
9
  fake_json(:get, 'search?type=checkin', 'checkins/search_public')
10
10
  fake_json(:get, 'search?type=checkin&access_token=access_token', 'checkins/search_private')
11
11
  end
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../spec_helper')
2
2
 
3
3
  describe FbGraph::Collection, '.new' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'platform/statuses?access_token=access_token', 'pages/statuses/platform_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../spec_helper')
2
2
 
3
3
  describe FbGraph::Connection, '.new' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'platform/statuses?access_token=access_token', 'pages/statuses/platform_private')
6
6
  end
7
7
 
@@ -16,7 +16,7 @@ describe FbGraph::Connection, '.new' do
16
16
  end
17
17
 
18
18
  describe FbGraph::Connection do
19
- before(:all) do
19
+ before do
20
20
  fake_json(:get, 'me/home?access_token=access_token', 'users/home/me_private')
21
21
  fake_json(:get, 'me/home?limit=25&since=2010-04-27T13%3A06%3A14%2B0000&access_token=access_token', 'users/home/me_private_previous')
22
22
  fake_json(:get, 'me/home?limit=25&access_token=access_token&until=2010-04-27T11%3A07%3A48%2B0000', 'users/home/me_private_next')
@@ -34,5 +34,4 @@ describe FbGraph::Connection do
34
34
  next_posts.first.created_time.should == Time.parse('2010-04-27T11:06:29+0000')
35
35
  next_posts.last.created_time.should == Time.parse('2010-04-27T09:44:28+0000')
36
36
  end
37
-
38
37
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Accounts, '#accounts' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/accounts', 'users/accounts/matake_public')
7
7
  fake_json(:get, 'matake/accounts?access_token=access_token', 'users/accounts/matake_private')
8
8
  fake_json(:get, 'matake/accounts?access_token=access_token_with_manage_pages_permission', 'users/accounts/matake_private_with_manage_pages_permission')
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Activities, '#activities' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'arjun/activities', 'users/activities/arjun_public')
7
7
  fake_json(:get, 'arjun/activities?access_token=access_token', 'users/activities/arjun_private')
8
8
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Albums, '#albums' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/albums', 'users/albums/matake_public')
7
7
  fake_json(:get, 'matake/albums?access_token=access_token', 'users/albums/matake_private')
8
8
  end
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Attending, '#attending' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'smartday/attending?access_token=access_token', 'events/attending/smartday_private')
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Books, '#books' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/books', 'users/books/matake_public')
7
7
  fake_json(:get, 'matake/books?access_token=access_token', 'users/books/matake_private')
8
8
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Checkins, '#checkins' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'mattt/checkins', 'users/checkins/mattt_public')
7
7
  fake_json(:get, 'mattt/checkins?access_token=access_token', 'users/checkins/mattt_private')
8
8
  end
@@ -54,7 +54,7 @@ describe FbGraph::Connections::Checkins, '#checkins' do
54
54
  end
55
55
 
56
56
  context 'when included by FbGraph::Page' do
57
- before(:all) do
57
+ before do
58
58
  fake_json(:get, 'gowalla/checkins', 'pages/checkins/gowalla_public')
59
59
  fake_json(:get, 'gowalla/checkins?access_token=access_token', 'pages/checkins/gowalla_private')
60
60
  end
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Declined, '#declined' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'smartday/declined?access_token=access_token', 'events/declined/smartday_private')
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Events, '#events' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/events', 'users/events/matake_public')
7
7
  fake_json(:get, 'matake/events?access_token=access_token', 'users/events/matake_private')
8
8
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Feed, '#feed' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'arjun/feed', 'users/feed/arjun_public')
7
7
  fake_json(:get, 'arjun/feed?access_token=access_token', 'users/feed/arjun_private')
8
8
  end
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::FriendLists, '#friend_lists' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'matake/friendlists?access_token=access_token', 'users/friend_lists/matake')
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Friends, '#friends' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'me/friends', 'users/friends/me_public')
7
7
  fake_json(:get, 'me/friends?access_token=access_token', 'users/friends/me_private')
8
8
  fake_json(:get, 'arjun/friends', 'users/friends/arjun_public')
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Groups, '#groups' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/groups', 'users/groups/matake_public')
7
7
  fake_json(:get, 'matake/groups?access_token=access_token', 'users/groups/matake_private')
8
8
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Home, '#home' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'me/home', 'users/home/me_public')
7
7
  fake_json(:get, 'me/home?access_token=access_token', 'users/home/me_private')
8
8
  fake_json(:get, 'arjun/home', 'users/home/arjun_public')
@@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
3
3
  describe FbGraph::Connections::Insights, '#insights' do
4
4
 
5
5
  context 'when included by FbGraph::Page' do
6
- before(:all) do
6
+ before do
7
7
  fake_json(:get, 'FbGraph/insights', 'pages/insights/FbGraph_public')
8
8
  fake_json(:get, 'FbGraph/insights?access_token=access_token', 'pages/insights/FbGraph_private')
9
9
  end
@@ -38,7 +38,7 @@ describe FbGraph::Connections::Insights, '#insights' do
38
38
  end
39
39
 
40
40
  context 'when metrics is given' do
41
- before(:all) do
41
+ before do
42
42
  fake_json(:get, 'FbGraph/insights/page_like_adds?access_token=access_token', 'pages/insights/page_like_adds/FbGraph_private')
43
43
  fake_json(:get, 'FbGraph/insights/page_like_adds/day?access_token=access_token', 'pages/insights/page_like_adds/day/FbGraph_private')
44
44
  end
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Interests, '#interests' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'matake/interests?access_token=access_token', 'users/interests/matake_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Invited, '#invited' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'smartday/invited?access_token=access_token', 'events/invited/smartday_private')
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Likes, '#likes' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'arjun/likes', 'users/likes/arjun_public')
7
7
  fake_json(:get, 'arjun/likes?access_token=access_token', 'users/likes/arjun_private')
8
8
  end
@@ -30,4 +30,43 @@ describe FbGraph::Connections::Likes, '#likes' do
30
30
  end
31
31
  end
32
32
  end
33
+
34
+ context 'when included by FbGraph::Status' do
35
+ context 'when cached collection exists' do
36
+ before do
37
+ fake_json(:get, 'with_likes?access_token=access_token', 'statuses/with_likes')
38
+ @status = FbGraph::Status.new('with_likes').fetch(:access_token => 'access_token')
39
+ end
40
+
41
+ context 'when no options given' do
42
+ it 'should not access to Graph API' do
43
+ @status.likes.should == [FbGraph::User.new(
44
+ '604578140',
45
+ :access_token => 'access_token',
46
+ :name => 'K Hiromi'
47
+ )]
48
+ @status.likes.next.should == []
49
+ @status.likes.previous.should == []
50
+ end
51
+ end
52
+
53
+ context 'when any options given' do
54
+ it 'should access to Graph API' do
55
+ lambda do
56
+ @status.likes(:no_cache => true) # :no_cache has no meaning, just putting some value as options
57
+ end.should raise_error(FakeWeb::NetConnectNotAllowedError)
58
+ lambda do
59
+ @status.likes(:limit => 10)
60
+ end.should raise_error(FakeWeb::NetConnectNotAllowedError)
61
+ end
62
+
63
+ context 'when next/previous are obviously blank' do
64
+ it 'should not access to Graph API' do
65
+ @status.likes.next(:no_cache => true).should == []
66
+ @status.likes.previous(:no_cache => true).should == []
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
33
72
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Links, '#links' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/links?access_token=access_token', 'users/links/matake_private')
7
7
  end
8
8
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Maybe, '#maybe' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'smartday/maybe?access_token=access_token', 'events/maybe/smartday_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Friends, '#friends' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'emacs/members?access_token=access_token', 'groups/members/emacs_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Movies, '#movies' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'matake/movies?access_token=access_token', 'users/movies/matake_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Music, '#music' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'matake/music?access_token=access_token', 'users/music/matake_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Noreply, '#noreply' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'smartday/noreply?access_token=access_token', 'events/noreply/smartday_private')
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Notes, '#notes' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'matake/notes?access_token=access_token', 'users/notes/matake_private')
7
7
  end
8
8
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Photos, '#photos' do
4
4
  context 'when included by FbGraph::Album' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, '12345/photos?access_token=access_token', 'albums/photos/matake_private')
7
7
  end
8
8
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Posts, '#posts' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'arjun/posts', 'users/posts/arjun_public')
7
7
  fake_json(:get, 'arjun/posts?access_token=access_token', 'users/posts/arjun_private')
8
8
  end
@@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
3
3
  describe FbGraph::Connections::Statuses, '#statuses' do
4
4
 
5
5
  context 'when included by FbGraph::User' do
6
- before(:all) do
6
+ before do
7
7
  fake_json(:get, 'arjun/statuses', 'users/statuses/arjun_public')
8
8
  fake_json(:get, 'arjun/statuses?access_token=access_token', 'users/statuses/arjun_private')
9
9
  end
@@ -37,7 +37,7 @@ describe FbGraph::Connections::Statuses, '#statuses' do
37
37
  end
38
38
 
39
39
  context 'when included by FbGraph::Page' do
40
- before(:all) do
40
+ before do
41
41
  fake_json(:get, 'platform/statuses', 'pages/statuses/platform_public')
42
42
  fake_json(:get, 'platform/statuses?access_token=access_token', 'pages/statuses/platform_private')
43
43
  end
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Subscriptions, '#subscriptions' do
4
4
  context 'when included by FbGraph::Application' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'fb_graph/subscriptions?access_token=access_token', 'applications/subscriptions/fb_graph_private')
7
7
  end
8
8
 
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Tagged, '#tagged' do
4
4
  context 'when included by FbGraph::User' do
5
- before(:all) do
5
+ before do
6
6
  fake_json(:get, 'arjun/tagged', 'users/tagged/arjun_public')
7
7
  fake_json(:get, 'arjun/tagged?access_token=access_token', 'users/tagged/arjun_private')
8
8
  end
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Television, '#television' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'matake/television?access_token=access_token', 'users/television/matake_private')
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '../../spec_helper')
2
2
 
3
3
  describe FbGraph::Connections::Videos, '#videos' do
4
- before(:all) do
4
+ before do
5
5
  fake_json(:get, 'kirk/videos?access_token=access_token', 'users/videos/kirk_private')
6
6
  end
7
7
 
@@ -44,7 +44,7 @@ describe FbGraph::Page, '.new' do
44
44
  end
45
45
 
46
46
  describe FbGraph::Page, '.fetch' do
47
- before(:all) do
47
+ before do
48
48
  fake_json(:get, 'platform', 'pages/platform_public')
49
49
  fake_json(:get, 'platform?access_token=access_token', 'pages/platform_private')
50
50
  end
@@ -27,7 +27,7 @@ end
27
27
  describe FbGraph::Post, '#fetch' do
28
28
 
29
29
  context 'when no access_token given' do
30
- before(:all) do
30
+ before do
31
31
  fake_json(:get, 'platform', 'posts/platform_public')
32
32
  end
33
33
 
@@ -48,7 +48,7 @@ describe FbGraph::Post, '#fetch' do
48
48
  end
49
49
 
50
50
  context 'when access_token given' do
51
- before(:all) do
51
+ before do
52
52
  fake_json(:get, 'platform?access_token=access_token', 'posts/platform_private')
53
53
  end
54
54
 
@@ -20,7 +20,7 @@ describe FbGraph::User, '.me' do
20
20
  end
21
21
 
22
22
  describe FbGraph::User, '.fetch' do
23
- before(:all) do
23
+ before do
24
24
  fake_json(:get, 'me', 'users/me_public')
25
25
  fake_json(:get, 'me?access_token=access_token', 'users/me_private')
26
26
  fake_json(:get, 'arjun', 'users/arjun_public')
data/spec/spec_helper.rb CHANGED
@@ -8,11 +8,4 @@ require 'fb_graph'
8
8
  require 'fakeweb'
9
9
  require 'helpers/fake_json_helper'
10
10
  include FakeJsonHelper
11
- FakeWeb.allow_net_connect = false
12
-
13
-
14
- Spec::Runner.configure do |config|
15
- config.before(:all) do
16
-
17
- end
18
- end
11
+ FakeWeb.allow_net_connect = false
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb_graph
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 6
10
- version: 1.1.6
9
+ - 7
10
+ version: 1.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - nov matake
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-22 00:00:00 +09:00
18
+ date: 2010-12-23 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -133,6 +133,7 @@ extra_rdoc_files:
133
133
  - README.rdoc
134
134
  files:
135
135
  - .document
136
+ - .gitignore
136
137
  - LICENSE
137
138
  - README.rdoc
138
139
  - Rakefile
@@ -237,6 +238,7 @@ files:
237
238
  - spec/fake_json/posts/likes/post_without_access_token.json
238
239
  - spec/fake_json/posts/platform_private.json
239
240
  - spec/fake_json/posts/platform_public.json
241
+ - spec/fake_json/statuses/with_likes.json
240
242
  - spec/fake_json/users/accounts/matake_private.json
241
243
  - spec/fake_json/users/accounts/matake_private_with_manage_pages_permission.json
242
244
  - spec/fake_json/users/accounts/matake_public.json
@@ -356,8 +358,8 @@ homepage: http://github.com/nov/fb_graph
356
358
  licenses: []
357
359
 
358
360
  post_install_message:
359
- rdoc_options: []
360
-
361
+ rdoc_options:
362
+ - --charset=UTF-8
361
363
  require_paths:
362
364
  - lib
363
365
  required_ruby_version: !ruby/object:Gem::Requirement