funky 0.2.29 → 0.2.30

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: b52ea915d7f3e91a672141136653d9c091d0130b
4
- data.tar.gz: b0e29324904b42bed6ec943be492f95f2a23f0df
3
+ metadata.gz: 6b53cf7d46fc1e0239f652d63baa3002070d88d1
4
+ data.tar.gz: 456d2a4815de31838938dd5a03aa0bb2921c0923
5
5
  SHA512:
6
- metadata.gz: ca8ae886ee93939e33526c1d56632b5e2c7159e840a6ca5f251ca560f95818680aad0a51151710b486fed1fde2376a7d81c3aafb8fe3fe756c72f20be6465dff
7
- data.tar.gz: 167a601d285f4c4cd30c18de63ce64b0c8c20f12591a6ed2fd39ea7f4f49e10aae13404a247e693d8be72b2671fc6f7466cc1745c720f88eeaa9967342b5f74e
6
+ metadata.gz: ce499b710cfb8d6377f83677c2aa30fee846b78bd91f34c18b2b4352219f817d7178a1a82b5a337c308bc0639c038682dc658233ee74a9d760bcb849924b1c1a
7
+ data.tar.gz: 48bd3bdf6dd9d82c24bbd2801aa2f3f2d8ab11716dcada877383c7def50674c88834a57dfe653fe4d060551b29a3a1c18f7a8e08d9e53433d8d101a39a4e6a9b
@@ -6,6 +6,11 @@ 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
+ ## 0.2.30 - 2017/10/16
10
+
11
+ * [BUGFIX] Test should pass when call Page#videos. Partly revert the change
12
+ of version 0.2.28
13
+
9
14
  ## 0.2.29 - 2017/10/16
10
15
 
11
16
  * [ENHANCEMENT] Use request to get app access token. Do not use
@@ -35,7 +35,7 @@ module Funky
35
35
  json = json_for(uri)
36
36
  if json[:data].empty?
37
37
  @try_count ||= 0
38
- if @previous_timestamp && @try_count < 1 && (Date.parse @previous_timestamp rescue nil)
38
+ if @previous_timestamp && @try_count < 10 && (Date.parse @previous_timestamp rescue nil)
39
39
  timestamp = (Date.parse(@previous_timestamp) - 1).strftime('%F')
40
40
  @try_count += 1
41
41
  @previous_timestamp = timestamp
@@ -31,8 +31,13 @@ module Funky
31
31
  # fetched by Facebook Graph API.
32
32
  def videos(options = {})
33
33
  path_query = "#{id}/videos?fields=id,title,description,created_time,length,comments.limit(0).summary(true),likes.limit(0).summary(true),reactions.limit(0).summary(true)"
34
- path_query << "&since=#{options[:since]}" if options[:since]
35
- videos = Funky::Connection::API.fetch_all(path_query)
34
+ videos = []
35
+ if options[:since]
36
+ path_query << "&since=#{options[:since]}"
37
+ videos = Funky::Connection::API.fetch_all(path_query)
38
+ else
39
+ videos = Funky::Connection::API.fetch(path_query, is_array: true)
40
+ end
36
41
  videos.map {|video| Video.new(video) }
37
42
  end
38
43
 
@@ -1,3 +1,3 @@
1
1
  module Funky
2
- VERSION = "0.2.29"
2
+ VERSION = "0.2.30"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.29
4
+ version: 0.2.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Nguyen