fb-core 1.0.0.beta6 → 1.0.0.beta7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4751bfa02cb3f296dfbc31247795e1c1d33546f
4
- data.tar.gz: 0e1354c44234f1143b7262713a76e179b85842da
3
+ metadata.gz: 4d853e976631a35311183b0d8f28bae65b4d90cc
4
+ data.tar.gz: a32067114ea8e9ccaf76b2a9cf7333bc8d0d1282
5
5
  SHA512:
6
- metadata.gz: d7a0a5c1d6ca774f9d089ad5fd5aeb80404e1de97488c6bb14cfb589d83b9e1f3151f17e423b6b4ed635013fb77fde7ad319953157ca4cbf7407e6a970b179a0
7
- data.tar.gz: 40a201c4bc36570e1b3ec6f6ac25a90cf85462f400b8efd48fceea82277f91ecf07aeacf834f354025051455e49feb0816efcf58502c45c357ade146056cfdf3
6
+ metadata.gz: 1c9bb54f6c5790fd0fcdc1aa14192c0aec44d91450f66a938fb3391d366bb982c10a04ede5f502757d0f0248a07bc583935a559e82aadcf14313797696647d9d
7
+ data.tar.gz: a9cd5b24460099063284245405a713d360ea8400729613631e9cefa19f93f3e8c8e8d8260e6648e2176422e01312aa518983f991194f0800c3775828179d45be
@@ -6,6 +6,15 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 1.0.0.beta7 - 2018/04/09
10
+
11
+ **How to upgrade**
12
+
13
+ If your code is expecting `Page#weekly_insights` method to return `0` value
14
+ when response is empty, now it returns `nil`. This is a breaking change.
15
+
16
+ * [IMPROVEMENT] Return `nil` for empty metric value in `weekly_insights`.
17
+
9
18
  ## 1.0.0.beta6 - 2018/04/05
10
19
 
11
20
  * [FEATURE] Add `backdated_time`, `total_impressions`, `total_impressions_unique`,
@@ -3,6 +3,6 @@ module Fb
3
3
  class Core
4
4
  # @return [String] the SemVer-compatible gem version.
5
5
  # @see http://semver.org
6
- VERSION = '1.0.0.beta6'
6
+ VERSION = '1.0.0.beta7'
7
7
  end
8
8
  end
@@ -43,7 +43,7 @@ module Fb
43
43
  since_date = options.fetch :until, Date.today - 1
44
44
  params = {period: :week, since: since_date, until: since_date + 2}
45
45
  insights = page_insights Array(metrics), params
46
- insights.map {|m| [m['name'].to_sym, m['values'].last.fetch('value', 0)]}.to_h
46
+ insights.map {|m| [m['name'].to_sym, m['values'].last.fetch('value', nil)]}.to_h
47
47
  end
48
48
 
49
49
  # @return [Integer] the number of views of the page.
@@ -80,13 +80,13 @@ module Fb
80
80
  @length = options.fetch(:properties, []).find(-> { {'text' => 'n/a'} }) do |property|
81
81
  property['name'] == 'Length'
82
82
  end['text']
83
- @engaged_users = options[:post_engaged_users] if options[:post_engaged_users]
84
- @video_views = options[:post_video_views] if options[:post_video_views]
85
- @video_views_organic = options[:post_video_views_organic] if options[:post_video_views_organic]
86
- @video_views_paid = options[:post_video_views_paid] if options[:post_video_views_paid]
87
- @video_view_time = options[:post_video_view_time] if options[:post_video_view_time]
88
- @impressions = options[:post_impressions] if options[:post_impressions]
89
- @video_avg_time_watched = options[:post_video_avg_time_watched] if options[:post_video_avg_time_watched]
83
+ @engaged_users = options[:post_engaged_users]
84
+ @video_views = options[:post_video_views]
85
+ @video_views_organic = options[:post_video_views_organic]
86
+ @video_views_paid = options[:post_video_views_paid]
87
+ @video_view_time = options[:post_video_view_time]
88
+ @impressions = options[:post_impressions]
89
+ @video_avg_time_watched = options[:post_video_avg_time_watched]
90
90
 
91
91
  @share_count = options[:shares] ? options[:shares]["count"] : 0
92
92
  @comment_count = options[:comments]['summary']['total_count'] if options[:comments]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta6
4
+ version: 1.0.0.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-04-05 00:00:00.000000000 Z
12
+ date: 2018-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fb-support