yt 0.14.4 → 0.14.5
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/models/video.rb +3 -1
- data/lib/yt/version.rb +1 -1
- data/spec/requests/as_account/video_spec.rb +6 -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: 3c0fb3dd9be2c795af5118f9ce95351813ab224b
|
4
|
+
data.tar.gz: 2d0c74c00e5e0445f85def8f971d16786eec5b0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a0ed9ab75851b4f3bdb47170b5016c9717cca959974c9c8236f226054ad57bbc8fc17f9bbdda0ca86e7ba3dcf137f9959f5f630408858ab0f85b197c4fc1155
|
7
|
+
data.tar.gz: 1e482b5dce6aded77512115ca9aaf1979d524c475439e9944db3376daabdbdfba628eadeac53d6bf122e29ffd7e71bc9c610add79d9dc7d8eebf920325849a15
|
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.5 - 2015-04-15
|
10
|
+
|
11
|
+
* [BUGFIX] Raise `Yt::Errors::RequestError` when passing an invalid path or URL to `upload_thumbnail`
|
12
|
+
|
9
13
|
## 0.14.4 - 2015-04-14
|
10
14
|
|
11
15
|
* [FEATURE] New `by: :embedded_player_location` option for reports, to return views and estimated watched minutes (channels) by URL where the player was embedded
|
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.5'
|
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/models/video.rb
CHANGED
@@ -197,9 +197,11 @@ module Yt
|
|
197
197
|
# @param [String] path_or_url the image to upload. Can either be the
|
198
198
|
# path of a local file or the URL of a remote file.
|
199
199
|
# @return the new thumbnail resource for the given image.
|
200
|
+
# @raise [Yt::Errors::RequestError] if path_or_url is not a valid path
|
201
|
+
# or URL.
|
200
202
|
# @see https://developers.google.com/youtube/v3/docs/thumbnails#resource
|
201
203
|
def upload_thumbnail(path_or_url)
|
202
|
-
file = open
|
204
|
+
file = open(path_or_url, 'rb') rescue StringIO.new
|
203
205
|
session = resumable_sessions.insert file.size
|
204
206
|
|
205
207
|
session.update(body: file) do |data|
|
data/lib/yt/version.rb
CHANGED
@@ -377,5 +377,11 @@ describe Yt::Video, :device_app do
|
|
377
377
|
|
378
378
|
it { expect{update}.not_to raise_error }
|
379
379
|
end
|
380
|
+
|
381
|
+
context 'given an invalid URL' do
|
382
|
+
let(:path_or_url) { 'this-is-not-a-url' }
|
383
|
+
|
384
|
+
it { expect{update}.to raise_error Yt::Errors::RequestError }
|
385
|
+
end
|
380
386
|
end
|
381
387
|
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.5
|
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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|