fb_graph 2.7.7 → 2.7.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f505d72a4895180923d34b2b619c0043e149b1a
4
- data.tar.gz: f9cdf4f3b9c07fe992628ad0281a3b39bfb8d685
3
+ metadata.gz: 75030694c1a456a60036f31947a67f7f3260cc9c
4
+ data.tar.gz: 2b054b01513d0f9ccb90b52b4e8f22b7dfe6c247
5
5
  SHA512:
6
- metadata.gz: 43dc929049c7d635a7b0c0b7646c532463e61b1e5525d56f534c7a238372847c7b43e91c489d0bf6d95313c46a20df468892f83a56224f973a3a3cd69fad913c
7
- data.tar.gz: 2742e0b6c9f9564006c3bbe13cb8ee0ded1bf139455cdf9e2ac1805518744a44c0234a652d78c7868a469d49cd24324ef588a5c1040ad73bb322f90d66675b4a
6
+ metadata.gz: 017b232a913247b15ef67966e0daf75603adae2d45cb29eda01a0a9b6aae009d51a20d4677827c6a41b2cedb9201cdf4baa84d9253439bd6900490b47f5adabc
7
+ data.tar.gz: 4d7dcbda0c5618b662675dfc3735ee4de4ea4fb8b02ee0a180eb2b1e8259c8cb847907ecba8e7e672b7b45bd770c3f28560955e31013f7efec7afc1085d222f2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.7
1
+ 2.7.8
@@ -1,6 +1,7 @@
1
1
  module FbGraph
2
2
  class Group < Node
3
3
  include Connections::Docs
4
+ include Connections::Events
4
5
  include Connections::Feed
5
6
  include Connections::Members
6
7
  include Connections::Picture
@@ -26,4 +27,4 @@ module FbGraph
26
27
  end
27
28
  end
28
29
  end
29
- end
30
+ end
@@ -26,6 +26,8 @@ module FbGraph
26
26
  Event.new(to[:id], to)
27
27
  elsif to[:version]
28
28
  Group.new(to[:id], to)
29
+ elsif to[:namespace]
30
+ Application.new(to[:id], to)
29
31
  else
30
32
  User.new(to[:id], to)
31
33
  end
@@ -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[:category]
14
+ klass = if attributes[:namespace]
15
+ Application
16
+ elsif attributes[:category]
15
17
  Page
16
18
  else
17
19
  User
@@ -10,10 +10,17 @@ describe FbGraph::Post, '.new' do
10
10
  :id => "579612276"
11
11
  },
12
12
  :to => {
13
- :data => [{
14
- :name => "Jr Nov",
15
- :id => "1575327134"
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.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-07-06 00:00:00.000000000 Z
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.2
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.