fb_graph 1.1.2 → 1.1.3
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/VERSION +1 -1
- data/fb_graph.gemspec +1 -1
- data/lib/fb_graph/connections/insights.rb +1 -1
- data/lib/fb_graph/node.rb +1 -6
- data/spec/fb_graph/connections/insights_spec.rb +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/fb_graph.gemspec
CHANGED
data/lib/fb_graph/node.rb
CHANGED
@@ -62,12 +62,7 @@ module FbGraph
|
|
62
62
|
private
|
63
63
|
|
64
64
|
def build_endpoint(params = {})
|
65
|
-
_endpoint_ =
|
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 =>
|
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 =>
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- nov matake
|