fb_graph 2.7.7 → 2.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_graph/group.rb +2 -1
- data/lib/fb_graph/post.rb +2 -0
- data/lib/fb_graph/tagged_object.rb +3 -1
- data/spec/fb_graph/post_spec.rb +12 -4
- data/spec/fb_graph/tagged_object_spec.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75030694c1a456a60036f31947a67f7f3260cc9c
|
4
|
+
data.tar.gz: 2b054b01513d0f9ccb90b52b4e8f22b7dfe6c247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 017b232a913247b15ef67966e0daf75603adae2d45cb29eda01a0a9b6aae009d51a20d4677827c6a41b2cedb9201cdf4baa84d9253439bd6900490b47f5adabc
|
7
|
+
data.tar.gz: 4d7dcbda0c5618b662675dfc3735ee4de4ea4fb8b02ee0a180eb2b1e8259c8cb847907ecba8e7e672b7b45bd770c3f28560955e31013f7efec7afc1085d222f2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.8
|
data/lib/fb_graph/group.rb
CHANGED
data/lib/fb_graph/post.rb
CHANGED
@@ -11,7 +11,9 @@ module FbGraph
|
|
11
11
|
|
12
12
|
def fetch_with_class_determination
|
13
13
|
attributes = fetch_without_class_determination.raw_attributes
|
14
|
-
klass = if attributes[:
|
14
|
+
klass = if attributes[:namespace]
|
15
|
+
Application
|
16
|
+
elsif attributes[:category]
|
15
17
|
Page
|
16
18
|
else
|
17
19
|
User
|
data/spec/fb_graph/post_spec.rb
CHANGED
@@ -10,10 +10,17 @@ describe FbGraph::Post, '.new' do
|
|
10
10
|
:id => "579612276"
|
11
11
|
},
|
12
12
|
:to => {
|
13
|
-
:data => [
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
:data => [
|
14
|
+
{
|
15
|
+
:name => "Jr Nov",
|
16
|
+
:id => "1575327134"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
:name => "ESPN",
|
20
|
+
:namespace => "espnapp",
|
21
|
+
:id => "116656161708917"
|
22
|
+
}
|
23
|
+
]
|
17
24
|
},
|
18
25
|
:with_tags => {
|
19
26
|
:data => [{
|
@@ -64,6 +71,7 @@ describe FbGraph::Post, '.new' do
|
|
64
71
|
post.message.should == 'hello'
|
65
72
|
post.from.should == FbGraph::User.new("579612276", :name => 'Nov Matake')
|
66
73
|
post.to.first.should == FbGraph::User.new("1575327134", :name => 'Jr Nov')
|
74
|
+
post.to.last.should == FbGraph::Application.new("116656161708917", :name => 'ESPN', :namespace => "espnapp")
|
67
75
|
post.with_tags.first.should == FbGraph::User.new("1575327134", :name => 'Jr Nov')
|
68
76
|
post.icon.should == 'http://photos-d.ak.fbcdn.net/photos-ak-snc1/v27562/23/2231777543/app_2_2231777543_9553.gif'
|
69
77
|
post.type.should == 'status'
|
@@ -41,5 +41,15 @@ describe FbGraph::TaggedObject do
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
context 'when tagged object is an Application' do
|
46
|
+
it 'should return Application' do
|
47
|
+
mock_graph :get, 'object_id', 'applications/fbgraphsample' do
|
48
|
+
object = FbGraph::TaggedObject.new('object_id').fetch
|
49
|
+
object.should be_instance_of FbGraph::Application
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
44
54
|
end
|
45
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.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: 2013-
|
11
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -513,7 +513,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
513
513
|
version: '0'
|
514
514
|
requirements: []
|
515
515
|
rubyforge_project:
|
516
|
-
rubygems_version: 2.0.
|
516
|
+
rubygems_version: 2.0.3
|
517
517
|
signing_key:
|
518
518
|
specification_version: 4
|
519
519
|
summary: A full-stack Facebook Graph API wrapper in Ruby.
|