fb_graph 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.1.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fb_graph}
8
- s.version = "1.1.2"
8
+ s.version = "1.1.3"
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"]
@@ -14,7 +14,7 @@ module FbGraph
14
14
 
15
15
  def connection_scope(options)
16
16
  if metrics = options.delete(:metrics)
17
- File.join([metrics, options.delete(:period)].compact)
17
+ File.join([metrics, options.delete(:period)].compact.collect(&:to_s))
18
18
  else
19
19
  nil
20
20
  end
@@ -62,12 +62,7 @@ module FbGraph
62
62
  private
63
63
 
64
64
  def build_endpoint(params = {})
65
- _endpoint_ = if params[:connection]
66
- File.join([self.endpoint, params.delete(:connection).to_s, params.delete(:connection_scope)].compact)
67
- else
68
- self.endpoint.dup
69
- end
70
-
65
+ _endpoint_ = File.join([self.endpoint, params.delete(:connection), params.delete(:connection_scope)].compact.collect(&:to_s))
71
66
  params.delete_if do |k, v|
72
67
  v.blank?
73
68
  end
@@ -44,7 +44,7 @@ describe FbGraph::Connections::Insights, '#insights' do
44
44
  end
45
45
 
46
46
  it 'should treat metrics as connection scope' do
47
- insights = FbGraph::Page.new('FbGraph').insights(:access_token => 'access_token', :metrics => 'page_like_adds')
47
+ insights = FbGraph::Page.new('FbGraph').insights(:access_token => 'access_token', :metrics => :page_like_adds)
48
48
  insights.options.should == {
49
49
  :connection_scope => 'page_like_adds',
50
50
  :access_token => 'access_token'
@@ -69,7 +69,7 @@ describe FbGraph::Connections::Insights, '#insights' do
69
69
  end
70
70
 
71
71
  it 'should support period also' do
72
- insights = FbGraph::Page.new('FbGraph').insights(:access_token => 'access_token', :metrics => 'page_like_adds', :period => 'day')
72
+ insights = FbGraph::Page.new('FbGraph').insights(:access_token => 'access_token', :metrics => :page_like_adds, :period => :day)
73
73
  insights.options.should == {
74
74
  :connection_scope => 'page_like_adds/day',
75
75
  :access_token => 'access_token'
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 2
10
- version: 1.1.2
9
+ - 3
10
+ version: 1.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - nov matake