yt 0.14.5 → 0.14.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/yt/request.rb +12 -1
- data/lib/yt/version.rb +1 -1
- data/spec/models/request_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7478bc266207deb9b62eceee6facd2759140bb7
|
4
|
+
data.tar.gz: f6a7b9d716a9af97840ca80f9f8d7b8dd8f8e3ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c8f6da13b7eb077dfc53a4e79c2edc4221c790b634d4b86eb9458f53b0baa16b7d4617beba4f66887e5ed7a11f1ff4259301438ad4e039c8e56a724ac2aa38
|
7
|
+
data.tar.gz: dc781c9d0e8ead0f7f117ce6e6e2a4596dbf0e1253489db187e5690f68cdd59d7dd22ad9396e991af9b6444779d851e26f04c821c95985c5a623cfb7ffc0cccd
|
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.14.6 - 2015-04-17
|
10
|
+
|
11
|
+
* [BUGFIX] Rescue OpenSSL::SSL::SSLErrorWaitReadable only on version of Ruby that define it.
|
12
|
+
|
9
13
|
## 0.14.5 - 2015-04-15
|
10
14
|
|
11
15
|
* [BUGFIX] Raise `Yt::Errors::RequestError` when passing an invalid path or URL to `upload_thumbnail`
|
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.14.
|
44
|
+
gem 'yt', '~> 0.14.6'
|
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*)
|
data/lib/yt/request.rb
CHANGED
@@ -206,7 +206,18 @@ module Yt
|
|
206
206
|
Errno::ENETUNREACH,
|
207
207
|
Errno::ECONNRESET,
|
208
208
|
Net::HTTPServerError
|
209
|
-
] +
|
209
|
+
] + extra_server_errors
|
210
|
+
end
|
211
|
+
|
212
|
+
# Returns the list of server errors that are only raised (and therefore
|
213
|
+
# can only be rescued) by specific versions of Ruby.
|
214
|
+
# @see: https://github.com/Fullscreen/yt/pull/110
|
215
|
+
def extra_server_errors
|
216
|
+
if defined? OpenSSL::SSL::SSLErrorWaitReadable
|
217
|
+
[OpenSSL::SSL::SSLErrorWaitReadable]
|
218
|
+
else
|
219
|
+
[]
|
220
|
+
end
|
210
221
|
end
|
211
222
|
|
212
223
|
# Sleeps for a while and returns true for the first +max_retries+ times,
|
data/lib/yt/version.rb
CHANGED
data/spec/models/request_spec.rb
CHANGED
@@ -120,7 +120,7 @@ describe Yt::Request do
|
|
120
120
|
# NOTE: This test is just a reflection of YouTube irrational behavior of
|
121
121
|
# being unavailable once in a while, and therefore causing Net::HTTP to
|
122
122
|
# fail, although retrying after some seconds works.
|
123
|
-
context 'an OpenSSL::SSL::SSLErrorWaitReadable',
|
123
|
+
context 'an OpenSSL::SSL::SSLErrorWaitReadable', ruby21: true do
|
124
124
|
let(:http_error) { OpenSSL::SSL::SSLErrorWaitReadable.new }
|
125
125
|
|
126
126
|
context 'every time' do
|
data/spec/spec_helper.rb
CHANGED
@@ -15,4 +15,6 @@ RSpec.configure do |config|
|
|
15
15
|
# @note: Some tests might take too long to run on Ruby 1.9.3 which does not
|
16
16
|
# support "size" for Enumerator, so we are better off skipping them.
|
17
17
|
config.filter_run_excluding ruby2: true if RUBY_VERSION < '2'
|
18
|
+
# @note: See https://github.com/Fullscreen/yt/issues/103
|
19
|
+
config.filter_run_excluding ruby21: true if RUBY_VERSION < '2.1'
|
18
20
|
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.14.
|
4
|
+
version: 0.14.6
|
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-04-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|