yt 0.30.0 → 0.30.1

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: 22890be6fcf88d70b14168f20b39530ff6da0ea5
4
- data.tar.gz: 4c0304956d2d35b4724e4a9e4f4d01336fbd9fbe
3
+ metadata.gz: 85dc2f5c2b7be22fbac90192e295572b04c55a42
4
+ data.tar.gz: 4936ddb4ad8fecf00ea6da4a50816543ffae0e13
5
5
  SHA512:
6
- metadata.gz: 3f471cb92a4cb30eb0d38869d6eb1e520f007887c067e36c19bd95fa4f93ea61430e5457fbc0ef38de91130bcf28c35bc1d13260b5a6bd80a7faf4058e9f26ee
7
- data.tar.gz: 36560c948ba3b1f57383170f47dd889f64d10ec1cf8313851466233ebf0f2b37dba8b40706205552d76b4a245bbe760d1d9e74747a310d7fb40d521c1524ad95
6
+ metadata.gz: 0b13072d264a684c8985a4c992546b6f6656ad63658378a735b640384838b51cd33230f1480a49af385a94ead440d9f9fd4a70817eae2faa8f40dd8d3a13484b
7
+ data.tar.gz: 863c77c4356e5da31f0ab40dbd3ce6bf1d56ac7225a359a1cccf05733b2dfb1b5176b5087de7fecbdf22ef3c2766b5dcc918a308ceae9d856930e4fd4bbe074a
@@ -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.30.1 - 2017-04-14
10
+
11
+ * [IMPROVEMENT] Retry 3 times if YouTube responds with 503 Backend Error
12
+
9
13
  ## 0.30.0 - 2017-03-17
10
14
 
11
15
  **How to upgrade**
@@ -105,7 +105,7 @@ module Yt
105
105
 
106
106
  attr_writer :metrics
107
107
 
108
- def within(days_range, country, state, dimension, videos, try_again = true)
108
+ def within(days_range, country, state, dimension, videos, max_retries = 3)
109
109
  @days_range = days_range
110
110
  @dimension = dimension
111
111
  @country = country
@@ -145,7 +145,7 @@ module Yt
145
145
  # same query is a workaround that works and can hardly cause any damage.
146
146
  # Similarly, once in while YouTube responds with a random 503 error.
147
147
  rescue Yt::Error => e
148
- try_again && rescue?(e) ? sleep(3) && within(days_range, country, state, dimension, videos, false) : raise
148
+ (max_retries > 0) && rescue?(e) ? sleep(3) && within(days_range, country, state, dimension, videos, max_retries - 1) : raise
149
149
  end
150
150
 
151
151
  private
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.30.0'
2
+ VERSION = '0.30.1'
3
3
  end
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.30.0
4
+ version: 0.30.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-31 00:00:00.000000000 Z
11
+ date: 2017-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport