fb_graph 2.2.0.alpha → 2.2.0.alpha2

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 (2.1.13)
4
+ fb_graph (2.2.0.alpha)
5
5
  httpclient (>= 2.2.0.2)
6
6
  rack-oauth2 (>= 0.9.4)
7
7
 
@@ -44,6 +44,7 @@ GEM
44
44
  jruby-openssl (0.7.4)
45
45
  bouncy-castle-java
46
46
  json (1.6.1)
47
+ json (1.6.1-java)
47
48
  multi_json (1.0.3)
48
49
  rack (1.3.5)
49
50
  rack-cache (1.1)
data/Rakefile CHANGED
@@ -10,7 +10,9 @@ if RUBY_VERSION >= '1.9'
10
10
  CoverMe.config do |c|
11
11
  c.file_pattern = /(#{CoverMe.config.project.root}\/lib\/.+\.rb)/i
12
12
  end
13
- CoverMe.complete!
13
+ at_exit do
14
+ CoverMe.complete!
15
+ end
14
16
  end
15
17
  else
16
18
  RSpec::Core::RakeTask.new(:rcov) do |spec|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0.alpha
1
+ 2.2.0.alpha2
data/lib/fb_graph.rb CHANGED
@@ -100,6 +100,7 @@ require 'fb_graph/review'
100
100
  require 'fb_graph/status'
101
101
  require 'fb_graph/tab'
102
102
  require 'fb_graph/tag'
103
+ require 'fb_graph/tagged_object'
103
104
  require 'fb_graph/thread'
104
105
  require 'fb_graph/user'
105
106
  require 'fb_graph/user_achievement'
data/lib/fb_graph/post.rb CHANGED
@@ -5,7 +5,7 @@ module FbGraph
5
5
  include Connections::Likes
6
6
  extend Searchable
7
7
 
8
- attr_accessor :from, :to, :with_tags, :message, :picture, :link, :name, :caption, :description, :source, :properties, :icon, :actions, :privacy, :type, :graph_object_id, :application, :targeting, :created_time, :updated_time
8
+ attr_accessor :from, :to, :with_tags, :message, :message_tags, :picture, :link, :name, :caption, :description, :source, :properties, :icon, :actions, :privacy, :type, :graph_object_id, :application, :targeting, :created_time, :updated_time, :story, :story_tags
9
9
 
10
10
  def initialize(identifier, attributes = {})
11
11
  super
@@ -40,7 +40,15 @@ module FbGraph
40
40
  @with_tags << User.new(tagged[:id], tagged)
41
41
  end
42
42
  end
43
- @message = attributes[:message]
43
+ @message = attributes[:message]
44
+ @message_tags = []
45
+ if message_tags = attributes[:message_tags]
46
+ message_tags.each do |index, message_tag|
47
+ message_tag.each do |_message_tag_|
48
+ @message_tags << TaggedObject.new(_message_tag_[:id], _message_tag_)
49
+ end
50
+ end
51
+ end
44
52
  @picture = attributes[:picture]
45
53
  @link = attributes[:link]
46
54
  @name = attributes[:name]
@@ -85,6 +93,15 @@ module FbGraph
85
93
  if attributes[:updated_time]
86
94
  @updated_time = Time.parse(attributes[:updated_time]).utc
87
95
  end
96
+ @story = attributes[:story]
97
+ @story_tags = []
98
+ if story_tags = attributes[:story_tags]
99
+ story_tags.each do |index, story_tag|
100
+ story_tag.each do |_story_tag_|
101
+ @story_tags << TaggedObject.new(_story_tag_[:id], _story_tag_)
102
+ end
103
+ end
104
+ end
88
105
 
89
106
  # cached connection
90
107
  @_likes_ = Collection.new(attributes[:likes])
@@ -1,27 +1,29 @@
1
1
  module FbGraph
2
2
  class Query < Node
3
- ENDPOINT = 'https://api.facebook.com/method/fql.query'
4
-
5
- attr_accessor :access_token, :query
3
+ attr_accessor :query
6
4
 
7
5
  def initialize(query, access_token = nil)
6
+ super 'fql', :access_token => access_token
8
7
  @query = query
9
- @access_token = access_token
10
8
  end
11
9
 
12
10
  def fetch(access_token = nil)
13
11
  handle_response do
14
- http_client.get ENDPOINT, :query => build_params(access_token)
12
+ http_client.get endpoint, :query => build_params(access_token)
15
13
  end
16
14
  end
17
15
 
18
16
  private
19
17
 
20
18
  def build_params(access_token)
19
+ _query_ = if query.is_a?(Hash)
20
+ query.to_json
21
+ else
22
+ query
23
+ end
21
24
  super(
22
- :query => self.query,
23
- :access_token => access_token || self.access_token,
24
- :format => :json
25
+ :q => _query_,
26
+ :access_token => access_token || self.access_token
25
27
  )
26
28
  end
27
29
 
@@ -29,15 +31,15 @@ module FbGraph
29
31
  response = super do
30
32
  yield
31
33
  end
32
- case response
33
- when Hash
34
- if response[:error_code]
35
- raise Exception.new(response[:error_code], response[:error_msg])
36
- else
37
- response
38
- end
34
+ collection = Collection.new response
35
+ if self.query.is_a?(Hash)
36
+ collection.inject({}) do |results, result|
37
+ results.merge(
38
+ result['name'] => result['fql_result_set']
39
+ )
40
+ end.with_indifferent_access
39
41
  else
40
- response
42
+ collection
41
43
  end
42
44
  end
43
45
 
@@ -0,0 +1,24 @@
1
+ module FbGraph
2
+ class TaggedObject < Node
3
+ attr_accessor :name, :offset, :length, :raw_attributes
4
+
5
+ def initialize(identifier, attributes = {})
6
+ super
7
+ @raw_attributes = attributes
8
+ [:name, :offset, :length].each do |key|
9
+ self.send("#{key}=", attributes[key])
10
+ end
11
+ end
12
+
13
+ def fetch_with_class_determination
14
+ attributes = fetch_without_class_determination.raw_attributes
15
+ klass = if attributes[:category]
16
+ Page
17
+ else
18
+ User
19
+ end
20
+ klass.new attributes[:id], attributes
21
+ end
22
+ alias_method_chain :fetch, :class_determination
23
+ end
24
+ end
@@ -73,9 +73,9 @@ describe FbGraph::Auth do
73
73
  end
74
74
 
75
75
  it 'should exchange code with access token' do
76
- expect {
76
+ expect do
77
77
  auth.from_cookie(cookie)
78
- }.should request_to '/oauth/access_token', :post
78
+ end.should request_to '/oauth/access_token', :post
79
79
  end
80
80
 
81
81
  it 'should setup user and access_token' do
@@ -104,6 +104,16 @@ describe FbGraph::Auth do
104
104
  end.should raise_exception(FbGraph::Auth::VerificationFailed)
105
105
  end
106
106
  end
107
+
108
+ context 'when Rack::OAuth2::Client::Error occurred' do
109
+ it 'should raise FbGraph::Exception' do
110
+ mock_graph :post, 'oauth/access_token', 'blank', :status => [401, 'Unauthorized'] do
111
+ lambda do
112
+ auth.from_cookie(cookie)
113
+ end.should raise_exception FbGraph::Exception
114
+ end
115
+ end
116
+ end
107
117
  end
108
118
 
109
119
  describe '#from_signed_request' do
@@ -132,6 +142,17 @@ describe FbGraph::Auth do
132
142
  )
133
143
  end
134
144
 
145
+ context 'when expires included' do
146
+ let :signed_request do
147
+ "bzMUNepndPnmce-QdJqvkigxr_6iEzOf-ZNl-ZitvpA.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImV4cGlyZXMiOjEzMjA2NjAwMDAsImlzc3VlZF9hdCI6MTI5ODc4MzczOSwib2F1dGhfdG9rZW4iOiIxMzQxNDU2NDMyOTQzMjJ8MmI4YTZmOTc1NTJjNmRjZWQyMDU4MTBiLTU3OTYxMjI3NnxGS1o0akdKZ0JwN2k3bFlrOVhhUk1QZ3lhNnMiLCJ1c2VyIjp7ImNvdW50cnkiOiJqcCIsImxvY2FsZSI6ImVuX1VTIiwiYWdlIjp7Im1pbiI6MjF9fSwidXNlcl9pZCI6IjU3OTYxMjI3NiJ9"
148
+ end
149
+
150
+ it 'should have expires_in' do
151
+ auth.from_signed_request(signed_request)
152
+ auth.access_token.expires_in.should be_a Integer
153
+ end
154
+ end
155
+
135
156
  context 'when invalid signed_request given' do
136
157
  it 'should raise FbGraph::VerificationFailed' do
137
158
  lambda do
@@ -3,6 +3,15 @@ require 'spec_helper'
3
3
 
4
4
  describe FbGraph::Connections::Likes do
5
5
  describe '#likes' do
6
+ context 'when liked by a Page' do
7
+ it 'should handle the liker as a Page' do
8
+ mock_graph :get, 'post_id', 'posts/liked_by_page', :access_token => 'access_token' do
9
+ post = FbGraph::Post.new('post_id').fetch(:access_token => 'access_token')
10
+ post.likes.first.should be_instance_of FbGraph::Page
11
+ end
12
+ end
13
+ end
14
+
6
15
  context 'when included by FbGraph::Status' do
7
16
  context 'when cached collection exists' do
8
17
  before do
@@ -68,6 +68,15 @@ describe FbGraph::Node do
68
68
  'Graph API returned false, so probably it means your requested object is not found.'
69
69
  )
70
70
  end
71
+
72
+ it 'should raise FbGraph::Exception for invalid JSON response' do
73
+ node = FbGraph::Node.new('identifier')
74
+ expect do
75
+ node.send :handle_response do
76
+ HTTP::Message.new_response 'invalid'
77
+ end
78
+ end.should raise_error FbGraph::Exception
79
+ end
71
80
  end
72
81
 
73
82
  end
@@ -18,6 +18,16 @@ describe FbGraph::OpenGraph::UserContext do
18
18
  end
19
19
 
20
20
  describe '#og_action!' do
21
- it :TODO
21
+ it 'should return FbGraph::OpenGraph::Action' do
22
+ mock_graph :post, 'me/fbgraphsample:custom_action', 'open_graph/created', :access_token => 'access_token', :params => {
23
+ :custom_object => 'http://samples.ogp.me/264755040233381'
24
+ } do
25
+ action = me.og_action!(
26
+ app.og_action(:custom_action),
27
+ :custom_object => 'http://samples.ogp.me/264755040233381'
28
+ )
29
+ action.should be_instance_of FbGraph::OpenGraph::Action
30
+ end
31
+ end
22
32
  end
23
33
  end
@@ -171,6 +171,32 @@ describe FbGraph::Post, '#fetch' do
171
171
  end
172
172
  end
173
173
 
174
+ context 'when include "story"' do
175
+ it 'should include story and story_tags' do
176
+ mock_graph :get, 'post_id', 'posts/with_story', :access_token => 'access_token' do
177
+ post = FbGraph::Post.fetch('post_id', :access_token => 'access_token')
178
+ post.story.should == 'Nov Matake likes Instagram JP.'
179
+ post.story_tags.should be_a Array
180
+ post.story_tags.each do |story_tag|
181
+ story_tag.should be_instance_of FbGraph::TaggedObject
182
+ end
183
+ end
184
+ end
185
+ end
186
+
187
+ context 'when include "story"' do
188
+ it 'should include message and message_tags' do
189
+ mock_graph :get, 'post_id', 'posts/with_message', :access_token => 'access_token' do
190
+ post = FbGraph::Post.fetch('post_id', :access_token => 'access_token')
191
+ post.message.should == 'testing status message with tagged people. Jr Nov'
192
+ post.message_tags.should be_a Array
193
+ post.message_tags.each do |message_tag|
194
+ message_tag.should be_instance_of FbGraph::TaggedObject
195
+ end
196
+ end
197
+ end
198
+ end
199
+
174
200
  end
175
201
 
176
202
  describe FbGraph::Post, '#to' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe FbGraph::Query do
4
- let(:raw_query) { 'SELECT uid FROM user WHERE uid = me()' }
4
+ let(:raw_query) { 'SELECT name FROM user WHERE uid = me()' }
5
5
 
6
6
  describe '.new' do
7
7
  let(:query) { FbGraph::Query.new(raw_query, 'access_token') }
@@ -16,17 +16,17 @@ describe FbGraph::Query do
16
16
  let(:query) { FbGraph::Query.new(raw_query) }
17
17
 
18
18
  context 'when no access token given' do
19
- it 'should return blank Hash' do
19
+ it 'should return blank Array' do
20
20
  mock_fql raw_query, 'query/user/without_token' do
21
21
  response = query.fetch
22
- response.should == {}
22
+ response.should == []
23
23
  end
24
24
  end
25
25
  end
26
26
 
27
27
  context 'when invalid access token given' do
28
28
  it 'should raise exception' do
29
- mock_fql raw_query, 'query/user/with_invalid_token', :access_token => 'invalid' do
29
+ mock_fql raw_query, 'query/user/with_invalid_token', :access_token => 'invalid', :status => [400, 'Bad Request'] do
30
30
  lambda do
31
31
  query.fetch('invalid')
32
32
  end.should raise_error(FbGraph::Exception)
@@ -35,10 +35,37 @@ describe FbGraph::Query do
35
35
  end
36
36
 
37
37
  context 'when valid access token given' do
38
- it 'should return an Array of Hash' do
38
+ it 'should return an Collection of Hash' do
39
39
  mock_fql raw_query, 'query/user/with_valid_token', :access_token => 'valid' do
40
40
  response = query.fetch('valid')
41
- response.should == [{'uid' => 579612276}]
41
+ response.should be_instance_of FbGraph::Collection
42
+ response.should == [{'name' => 'Nov Matake'}]
43
+ end
44
+ end
45
+ end
46
+
47
+ context 'when multiquery given' do
48
+ let(:raw_query) do
49
+ {
50
+ :query1 => 'SELECT name FROM user WHERE uid = me()',
51
+ :query2 => 'SELECT name FROM user WHERE uid = me()'
52
+ }
53
+ end
54
+
55
+ it 'should return an Hash of Array of Hash' do
56
+ mock_fql raw_query.to_json, 'query/user/multi_query', :access_token => 'valid' do
57
+ response = query.fetch('valid')
58
+ response.should be_instance_of ActiveSupport::HashWithIndifferentAccess
59
+ response.each do |key, value|
60
+ value.should be_instance_of Array
61
+ value.each do |result|
62
+ result.should be_instance_of ActiveSupport::HashWithIndifferentAccess
63
+ end
64
+ end
65
+ response.should == {
66
+ "query1" => [{"name" => "Nov Matake"}],
67
+ "query2" => [{"name" => "Nov Matake"}]
68
+ }
42
69
  end
43
70
  end
44
71
  end
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph::TaggedObject do
4
+ let :attributes do
5
+ JSON.parse(json).with_indifferent_access
6
+ end
7
+ let :json do
8
+ <<-JSON
9
+ {
10
+ "id": "1575327134",
11
+ "name": "Jr Nov",
12
+ "offset": 43,
13
+ "length": 6
14
+ }
15
+ JSON
16
+ end
17
+
18
+ it 'should setup all supported attributes' do
19
+ tagged_object = FbGraph::TaggedObject.new attributes[:id], attributes
20
+ tagged_object.identifier.should == '1575327134'
21
+ tagged_object.name.should == 'Jr Nov'
22
+ tagged_object.offset.should == 43
23
+ tagged_object.length.should == 6
24
+ end
25
+
26
+ describe '#fetch' do
27
+ context 'when tagged object is an User' do
28
+ it 'should return User' do
29
+ mock_graph :get, 'object_id', 'users/arjun_public' do
30
+ object = FbGraph::TaggedObject.new('object_id').fetch
31
+ object.should be_instance_of FbGraph::User
32
+ end
33
+ end
34
+ end
35
+
36
+ context 'when tagged object is a Page' do
37
+ it 'should return Page' do
38
+ mock_graph :get, 'object_id', 'pages/platform_public' do
39
+ object = FbGraph::TaggedObject.new('object_id').fetch
40
+ object.should be_instance_of FbGraph::Page
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -23,16 +23,15 @@ module WebMockHelper
23
23
 
24
24
  def mock_fql(query, response_file, options = {})
25
25
  options.merge!(:params => {
26
- :query => query,
27
- :format => :json
26
+ :q => query
28
27
  })
29
- stub_request(:get, FbGraph::Query::ENDPOINT).with(
28
+ stub_request(:get, FbGraph::Query.new(query).endpoint).with(
30
29
  request_for(:get, options)
31
30
  ).to_return(
32
31
  response_for(response_file)
33
32
  )
34
33
  res = yield
35
- a_request(:get, FbGraph::Query::ENDPOINT).with(
34
+ a_request(:get, FbGraph::Query.new(query).endpoint).with(
36
35
  request_for(:get, options)
37
36
  ).should have_been_made.once
38
37
  res
File without changes
@@ -0,0 +1 @@
1
+ {"id":"1234567890"}
@@ -0,0 +1,35 @@
1
+ {
2
+ "id": "141477809244105_221706907887861",
3
+ "from": {
4
+ "name": "Rack::OAuth2",
5
+ "category": "Software",
6
+ "id": "141477809244105"
7
+ },
8
+ "message": "rack-oauth2 v.0.11.0 is there.\nFrom now on, when response_type=code+token, code is returned in fragment not in query.",
9
+ "actions": [{
10
+ "name": "Comment",
11
+ "link": "http:\/\/www.facebook.com\/141477809244105\/posts\/221706907887861"
12
+ },
13
+ {
14
+ "name": "Like",
15
+ "link": "http:\/\/www.facebook.com\/141477809244105\/posts\/221706907887861"
16
+ }],
17
+ "privacy": {
18
+ "description": "Public",
19
+ "value": "EVERYONE"
20
+ },
21
+ "type": "status",
22
+ "created_time": "2011-09-16T08:45:34+0000",
23
+ "updated_time": "2011-09-16T08:45:34+0000",
24
+ "likes": {
25
+ "data": [{
26
+ "name": "FbGraph",
27
+ "category": "Software",
28
+ "id": "117513961602338"
29
+ }],
30
+ "count": 1
31
+ },
32
+ "comments": {
33
+ "count": 0
34
+ }
35
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "id": "579612276_10150404761292277",
3
+ "from": {
4
+ "name": "Nov Matake",
5
+ "id": "579612276"
6
+ },
7
+ "to": {
8
+ "data": [{
9
+ "name": "Jr Nov",
10
+ "id": "1575327134"
11
+ }]
12
+ },
13
+ "message": "testing status message with tagged people. Jr Nov",
14
+ "message_tags": {
15
+ "43": [{
16
+ "id": "1575327134",
17
+ "name": "Jr Nov",
18
+ "offset": 43,
19
+ "length": 6
20
+ }]
21
+ },
22
+ "actions": [{
23
+ "name": "Comment",
24
+ "link": "http:\/\/www.facebook.com\/579612276\/posts\/10150404761292277"
25
+ },
26
+ {
27
+ "name": "Like",
28
+ "link": "http:\/\/www.facebook.com\/579612276\/posts\/10150404761292277"
29
+ }],
30
+ "privacy": {
31
+ "description": "Public",
32
+ "value": "EVERYONE"
33
+ },
34
+ "type": "status",
35
+ "created_time": "2011-11-07T07:16:58+0000",
36
+ "updated_time": "2011-11-07T07:16:58+0000",
37
+ "comments": {
38
+ "count": 0
39
+ }
40
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "id": "579612276_10150399553712277",
3
+ "from": {
4
+ "name": "Nov Matake",
5
+ "id": "579612276"
6
+ },
7
+ "story": "Nov Matake likes Instagram JP.",
8
+ "story_tags": {
9
+ "17": [{
10
+ "id": 101643243241666,
11
+ "name": "Instagram JP",
12
+ "offset": 17,
13
+ "length": 12
14
+ }],
15
+ "0": [{
16
+ "id": 579612276,
17
+ "name": "Nov Matake",
18
+ "offset": 0,
19
+ "length": 10
20
+ }]
21
+ },
22
+ "type": "status",
23
+ "created_time": "2011-11-03T01:38:04+0000",
24
+ "updated_time": "2011-11-03T01:38:04+0000",
25
+ "comments": {
26
+ "count": 0
27
+ }
28
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "data": [{
3
+ "name": "query1",
4
+ "fql_result_set": [{
5
+ "name": "Nov Matake"
6
+ }]
7
+ },
8
+ {
9
+ "name": "query2",
10
+ "fql_result_set": [{
11
+ "name": "Nov Matake"
12
+ }]
13
+ }]
14
+ }
@@ -1 +1 @@
1
- {"error_code":190,"error_msg":"Invalid OAuth 2.0 Access Token","request_args":[{"key":"method","value":"fql.query"},{"key":"access_token","value":"token"},{"key":"format","value":"json"},{"key":"query","value":"SELECT uid FROM user WHERE uid = me()"}]}
1
+ {"error":{"message":"(#601) Parser error: unexpected end of query.","type":"OAuthException"}}
@@ -1 +1 @@
1
- [{"uid":579612276}]
1
+ {"data":[{"name":"Nov Matake"}]}
@@ -1 +1 @@
1
- {}
1
+ {"data":[]}
@@ -0,0 +1 @@
1
+ access_token=token&expires=3600
metadata CHANGED
@@ -1,142 +1,101 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fb_graph
3
- version: !ruby/object:Gem::Version
4
- hash: -1851332210
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.0.alpha2
5
5
  prerelease: 6
6
- segments:
7
- - 2
8
- - 2
9
- - 0
10
- - alpha
11
- version: 2.2.0.alpha
12
6
  platform: ruby
13
- authors:
7
+ authors:
14
8
  - nov matake
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2011-11-05 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-11-07 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: httpclient
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70242145049700 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 123
30
- segments:
31
- - 2
32
- - 2
33
- - 0
34
- - 2
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
35
21
  version: 2.2.0.2
36
22
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: rack-oauth2
40
23
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70242145049700
25
+ - !ruby/object:Gem::Dependency
26
+ name: rack-oauth2
27
+ requirement: &70242145048900 !ruby/object:Gem::Requirement
42
28
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 51
47
- segments:
48
- - 0
49
- - 9
50
- - 4
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
51
32
  version: 0.9.4
52
33
  type: :runtime
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: rake
56
34
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70242145048900
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &70242145048200 !ruby/object:Gem::Requirement
58
39
  none: false
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- hash: 27
63
- segments:
64
- - 0
65
- - 8
66
- version: "0.8"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0.8'
67
44
  type: :development
68
- version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: rcov
71
45
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70242145048200
47
+ - !ruby/object:Gem::Dependency
48
+ name: cover_me
49
+ requirement: &70242145047540 !ruby/object:Gem::Requirement
73
50
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 25
78
- segments:
79
- - 0
80
- - 9
81
- version: "0.9"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.2.0
82
55
  type: :development
83
- version_requirements: *id004
84
- - !ruby/object:Gem::Dependency
85
- name: rspec
86
56
  prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70242145047540
58
+ - !ruby/object:Gem::Dependency
59
+ name: rspec
60
+ requirement: &70242145046600 !ruby/object:Gem::Requirement
88
61
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- hash: 7
93
- segments:
94
- - 2
95
- version: "2"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '2'
96
66
  type: :development
97
- version_requirements: *id005
98
- - !ruby/object:Gem::Dependency
99
- name: webmock
100
67
  prerelease: false
101
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *70242145046600
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: &70242145045320 !ruby/object:Gem::Requirement
102
72
  none: false
103
- requirements:
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- hash: 11
107
- segments:
108
- - 1
109
- - 6
110
- - 2
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
111
76
  version: 1.6.2
112
77
  type: :development
113
- version_requirements: *id006
114
- - !ruby/object:Gem::Dependency
115
- name: actionpack
116
78
  prerelease: false
117
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *70242145045320
80
+ - !ruby/object:Gem::Dependency
81
+ name: actionpack
82
+ requirement: &70242145044840 !ruby/object:Gem::Requirement
118
83
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 11
123
- segments:
124
- - 3
125
- - 0
126
- - 6
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
127
87
  version: 3.0.6
128
88
  type: :development
129
- version_requirements: *id007
89
+ prerelease: false
90
+ version_requirements: *70242145044840
130
91
  description: A full-stack Facebook Graph API wrapper in Ruby.
131
92
  email: nov@matake.jp
132
93
  executables: []
133
-
134
94
  extensions: []
135
-
136
- extra_rdoc_files:
95
+ extra_rdoc_files:
137
96
  - LICENSE
138
97
  - README.rdoc
139
- files:
98
+ files:
140
99
  - .document
141
100
  - .gitignore
142
101
  - .rspec
@@ -283,6 +242,7 @@ files:
283
242
  - lib/fb_graph/subscription.rb
284
243
  - lib/fb_graph/tab.rb
285
244
  - lib/fb_graph/tag.rb
245
+ - lib/fb_graph/tagged_object.rb
286
246
  - lib/fb_graph/targeting.rb
287
247
  - lib/fb_graph/test_user.rb
288
248
  - lib/fb_graph/thread.rb
@@ -415,6 +375,7 @@ files:
415
375
  - spec/fb_graph/status_spec.rb
416
376
  - spec/fb_graph/subscription_spec.rb
417
377
  - spec/fb_graph/tag_spec.rb
378
+ - spec/fb_graph/tagged_object_spec.rb
418
379
  - spec/fb_graph/targeting_spec.rb
419
380
  - spec/fb_graph/test_user_spec.rb
420
381
  - spec/fb_graph/thread_spec.rb
@@ -449,6 +410,7 @@ files:
449
410
  - spec/mock_json/applications/subscriptions/fb_graph_private.json
450
411
  - spec/mock_json/applications/test_users/created.json
451
412
  - spec/mock_json/applications/test_users/private.json
413
+ - spec/mock_json/blank.json
452
414
  - spec/mock_json/checkins/search_private.json
453
415
  - spec/mock_json/checkins/search_public.json
454
416
  - spec/mock_json/domains/search_public.json
@@ -465,6 +427,7 @@ files:
465
427
  - spec/mock_json/friend_lists/members/sample.json
466
428
  - spec/mock_json/groups/docs/private.json
467
429
  - spec/mock_json/groups/members/emacs_private.json
430
+ - spec/mock_json/open_graph/created.json
468
431
  - spec/mock_json/open_graph/custom_actions.json
469
432
  - spec/mock_json/open_graph/play_actions.json
470
433
  - spec/mock_json/pages/admins/blank.json
@@ -500,6 +463,7 @@ files:
500
463
  - spec/mock_json/posts/comments/post_with_invalid_access_token.json
501
464
  - spec/mock_json/posts/comments/post_with_valid_access_token.json
502
465
  - spec/mock_json/posts/comments/post_without_access_token.json
466
+ - spec/mock_json/posts/liked_by_page.json
503
467
  - spec/mock_json/posts/likes/post_with_invalid_access_token.json
504
468
  - spec/mock_json/posts/likes/post_with_valid_access_token.json
505
469
  - spec/mock_json/posts/likes/post_without_access_token.json
@@ -509,6 +473,9 @@ files:
509
473
  - spec/mock_json/posts/to_application.json
510
474
  - spec/mock_json/posts/to_event.json
511
475
  - spec/mock_json/posts/to_group.json
476
+ - spec/mock_json/posts/with_message.json
477
+ - spec/mock_json/posts/with_story.json
478
+ - spec/mock_json/query/user/multi_query.json
512
479
  - spec/mock_json/query/user/with_invalid_token.json
513
480
  - spec/mock_json/query/user/with_valid_token.json
514
481
  - spec/mock_json/query/user/without_token.json
@@ -518,6 +485,7 @@ files:
518
485
  - spec/mock_json/thread/participants/private.json
519
486
  - spec/mock_json/thread/senders/private.json
520
487
  - spec/mock_json/token_response.json
488
+ - spec/mock_json/token_with_expiry.json
521
489
  - spec/mock_json/true.json
522
490
  - spec/mock_json/users/accounts/matake_private.json
523
491
  - spec/mock_json/users/accounts/matake_private_with_manage_pages_permission.json
@@ -595,40 +563,30 @@ files:
595
563
  - spec/spec_helper.rb
596
564
  homepage: http://github.com/nov/fb_graph
597
565
  licenses: []
598
-
599
566
  post_install_message:
600
- rdoc_options:
567
+ rdoc_options:
601
568
  - --charset=UTF-8
602
- require_paths:
569
+ require_paths:
603
570
  - lib
604
- required_ruby_version: !ruby/object:Gem::Requirement
571
+ required_ruby_version: !ruby/object:Gem::Requirement
605
572
  none: false
606
- requirements:
607
- - - ">="
608
- - !ruby/object:Gem::Version
609
- hash: 3
610
- segments:
611
- - 0
612
- version: "0"
613
- required_rubygems_version: !ruby/object:Gem::Requirement
573
+ requirements:
574
+ - - ! '>='
575
+ - !ruby/object:Gem::Version
576
+ version: '0'
577
+ required_rubygems_version: !ruby/object:Gem::Requirement
614
578
  none: false
615
- requirements:
616
- - - ">"
617
- - !ruby/object:Gem::Version
618
- hash: 25
619
- segments:
620
- - 1
621
- - 3
622
- - 1
579
+ requirements:
580
+ - - ! '>'
581
+ - !ruby/object:Gem::Version
623
582
  version: 1.3.1
624
583
  requirements: []
625
-
626
584
  rubyforge_project:
627
585
  rubygems_version: 1.8.10
628
586
  signing_key:
629
587
  specification_version: 3
630
588
  summary: A full-stack Facebook Graph API wrapper in Ruby.
631
- test_files:
589
+ test_files:
632
590
  - spec/fb_graph/achievement_spec.rb
633
591
  - spec/fb_graph/ad_account_spec.rb
634
592
  - spec/fb_graph/ad_campaign_spec.rb
@@ -752,6 +710,7 @@ test_files:
752
710
  - spec/fb_graph/status_spec.rb
753
711
  - spec/fb_graph/subscription_spec.rb
754
712
  - spec/fb_graph/tag_spec.rb
713
+ - spec/fb_graph/tagged_object_spec.rb
755
714
  - spec/fb_graph/targeting_spec.rb
756
715
  - spec/fb_graph/test_user_spec.rb
757
716
  - spec/fb_graph/thread_spec.rb
@@ -786,6 +745,7 @@ test_files:
786
745
  - spec/mock_json/applications/subscriptions/fb_graph_private.json
787
746
  - spec/mock_json/applications/test_users/created.json
788
747
  - spec/mock_json/applications/test_users/private.json
748
+ - spec/mock_json/blank.json
789
749
  - spec/mock_json/checkins/search_private.json
790
750
  - spec/mock_json/checkins/search_public.json
791
751
  - spec/mock_json/domains/search_public.json
@@ -802,6 +762,7 @@ test_files:
802
762
  - spec/mock_json/friend_lists/members/sample.json
803
763
  - spec/mock_json/groups/docs/private.json
804
764
  - spec/mock_json/groups/members/emacs_private.json
765
+ - spec/mock_json/open_graph/created.json
805
766
  - spec/mock_json/open_graph/custom_actions.json
806
767
  - spec/mock_json/open_graph/play_actions.json
807
768
  - spec/mock_json/pages/admins/blank.json
@@ -837,6 +798,7 @@ test_files:
837
798
  - spec/mock_json/posts/comments/post_with_invalid_access_token.json
838
799
  - spec/mock_json/posts/comments/post_with_valid_access_token.json
839
800
  - spec/mock_json/posts/comments/post_without_access_token.json
801
+ - spec/mock_json/posts/liked_by_page.json
840
802
  - spec/mock_json/posts/likes/post_with_invalid_access_token.json
841
803
  - spec/mock_json/posts/likes/post_with_valid_access_token.json
842
804
  - spec/mock_json/posts/likes/post_without_access_token.json
@@ -846,6 +808,9 @@ test_files:
846
808
  - spec/mock_json/posts/to_application.json
847
809
  - spec/mock_json/posts/to_event.json
848
810
  - spec/mock_json/posts/to_group.json
811
+ - spec/mock_json/posts/with_message.json
812
+ - spec/mock_json/posts/with_story.json
813
+ - spec/mock_json/query/user/multi_query.json
849
814
  - spec/mock_json/query/user/with_invalid_token.json
850
815
  - spec/mock_json/query/user/with_valid_token.json
851
816
  - spec/mock_json/query/user/without_token.json
@@ -855,6 +820,7 @@ test_files:
855
820
  - spec/mock_json/thread/participants/private.json
856
821
  - spec/mock_json/thread/senders/private.json
857
822
  - spec/mock_json/token_response.json
823
+ - spec/mock_json/token_with_expiry.json
858
824
  - spec/mock_json/true.json
859
825
  - spec/mock_json/users/accounts/matake_private.json
860
826
  - spec/mock_json/users/accounts/matake_private_with_manage_pages_permission.json