yt 0.24.8 → 0.24.9

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: 393804430300ba24dfed2e8d04a72005eec8bd74
4
- data.tar.gz: 36a59293e808300580f0f0500e7aac5891204572
3
+ metadata.gz: d732c7d309d0ed189c9e02431047445a153a1af9
4
+ data.tar.gz: a20827bffb0c9166ee4bd3aea62cbdb5f3769806
5
5
  SHA512:
6
- metadata.gz: ab215a61d381055c52fafbe91b0a38acb05b8f262164375713724557d7148774d281539e74b3eca471f3ac5bd17491bc4ecbb90b25f071ba56bdf0dd1fc7879a
7
- data.tar.gz: 5af865f608ffae8c1526ed46283932e13f2be206f759382b1f877bdd001693fdcbc1f820f7924667f3c538666a6673af05270fa68b757f93ec2a6aefb704e127
6
+ metadata.gz: 758d229b9944dfe9486c466903d99ae44e50eb0903b5506c1c15b9ebcb15e37ff925f887f0d93617c7a2918398d6f3b16dd3991d09deeb1f7d80ae0dd9e7456b
7
+ data.tar.gz: c78a0786fe0d6ec07ee561f5dbdc5156a084ed06a17a9588fda674962ee5415e67272cd1f79aa462b2606ad70c485b8040905475ec3bf256b51b4c52c1cf963d
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ 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.24.9 - 2015-06-19
10
+
11
+ * [BUGFIX] Let more than `max_results` videos be retrieved even when a `published_before` where condition is specified.
12
+
9
13
  ## 0.24.8 - 2015-06-18
10
14
 
11
15
  * [FEATURE] New `by: :week` option for reports.
data/README.md CHANGED
@@ -41,7 +41,7 @@ To install on your system, run
41
41
 
42
42
  To use inside a bundled Ruby project, add this line to the Gemfile:
43
43
 
44
- gem 'yt', '~> 0.24.8'
44
+ gem 'yt', '~> 0.24.9'
45
45
 
46
46
  Since the gem follows [Semantic Versioning](http://semver.org),
47
47
  indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
@@ -97,9 +97,10 @@ module Yt
97
97
  params[:max_results] = 50
98
98
  params[:part] = 'snippet'
99
99
  params[:order] = 'date'
100
- params[:published_before] = @published_before if @published_before
101
100
  params.merge! @parent.videos_params if @parent
102
101
  apply_where_params! params
102
+ params[:published_before] = @published_before if @published_before
103
+ params
103
104
  end
104
105
  end
105
106
 
data/lib/yt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.24.8'
2
+ VERSION = '0.24.9'
3
3
  end
@@ -88,6 +88,14 @@ describe Yt::Channel, :device_app do
88
88
  expect(channel.videos.count).to be > 500
89
89
  expect(channel.videos.where(order: 'viewCount').count).to be 500
90
90
  end
91
+
92
+ specify 'over 500 videos can be retrieved even with a publishedBefore condition' do
93
+ # @note: these tests are slow because they go through multiple pages
94
+ # of results to test that we can overcome YouTube’s limitation of only
95
+ # returning the first 500 results when ordered by date.
96
+ today = Date.today.beginning_of_day.iso8601(0)
97
+ expect(channel.videos.where(published_before: today).count).to be > 500
98
+ end
91
99
  end
92
100
  end
93
101
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.8
4
+ version: 0.24.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport