fb_graph 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.3
1
+ 1.3.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fb_graph}
8
- s.version = "1.3.3"
8
+ s.version = "1.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["nov matake"]
12
- s.date = %q{2011-01-06}
12
+ s.date = %q{2011-01-15}
13
13
  s.description = %q{A full-stack Facebook Graph API wrapper in Ruby.}
14
14
  s.email = %q{nov@matake.jp}
15
15
  s.extra_rdoc_files = [
@@ -16,7 +16,7 @@ module FbGraph
16
16
  include Connections::Videos
17
17
  extend Searchable
18
18
 
19
- attr_accessor :name, :username, :link, :category, :founded, :is_community_page, :company_overview, :general_info, :mission, :products, :release_date, :fan_count, :location, :website, :like_count, :checkin_count, :with, :created_time
19
+ attr_accessor :name, :username, :link, :category, :founded, :is_community_page, :company_overview, :general_info, :mission, :products, :release_date, :location, :website, :like_count, :checkin_count, :with, :created_time
20
20
 
21
21
  def initialize(identifier, attributes = {})
22
22
  super
@@ -37,7 +37,6 @@ module FbGraph
37
37
  if (release_date = attributes[:release_date])
38
38
  @release_date = Date.parse(release_date) rescue release_date
39
39
  end
40
- @fan_count = attributes[:fan_count]
41
40
  if (location = attributes[:location])
42
41
  @location = Venue.new(location)
43
42
  end
@@ -4,7 +4,7 @@ module FbGraph
4
4
  include Connections::Likes
5
5
  extend Searchable
6
6
 
7
- attr_accessor :from, :to, :message, :picture, :link, :name, :caption, :description, :source, :icon, :attribution, :actions, :like_count, :type, :privacy, :targeting, :created_time, :updated_time
7
+ attr_accessor :from, :to, :message, :picture, :link, :name, :caption, :description, :source, :icon, :attribution, :actions, :type, :privacy, :targeting, :created_time, :updated_time
8
8
 
9
9
  def initialize(identifier, attributes = {})
10
10
  super
@@ -40,7 +40,6 @@ module FbGraph
40
40
  @actions << Action.new(action)
41
41
  end
42
42
  end
43
- @like_count = attributes[:likes]
44
43
  @type = attributes[:type]
45
44
  if attributes[:privacy]
46
45
  @privacy = if attributes[:privacy].is_a?(Privacy)
@@ -64,6 +63,7 @@ module FbGraph
64
63
  end
65
64
 
66
65
  # cached connection
66
+ @_likes_ = Collection.new(attributes[:likes])
67
67
  @_comments_ = Collection.new(attributes[:comments])
68
68
  end
69
69
  end
@@ -21,12 +21,19 @@ describe FbGraph::Node, '#stringfy_params' do
21
21
  params[:array].should == '["a","b"]'
22
22
  end
23
23
 
24
- it 'should support OAuth2::AccessToken' do
24
+ it 'should support OAuth2::AccessToken as self.access_token' do
25
25
  client = OAuth2::Client.new('client_id', 'client_secret')
26
26
  node = FbGraph::Node.new('identifier', :access_token => OAuth2::AccessToken.new(client, 'token', 'secret'))
27
27
  params = node.send :stringfy_params, {}
28
28
  params[:access_token].should == 'token'
29
29
  end
30
+
31
+ it 'should support OAuth2::AccessToken as options[:access_token]' do
32
+ client = OAuth2::Client.new('client_id', 'client_secret')
33
+ node = FbGraph::Node.new('identifier')
34
+ params = node.send :stringfy_params, {:access_token => OAuth2::AccessToken.new(client, 'token', 'secret')}
35
+ params[:access_token].should == 'token'
36
+ end
30
37
  end
31
38
 
32
39
  describe FbGraph::Node, '#handle_response' do
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: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 3
10
- version: 1.3.3
9
+ - 4
10
+ version: 1.3.4
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: 2011-01-06 00:00:00 +09:00
18
+ date: 2011-01-15 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency