yt 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/HISTORY.md +1 -1
- data/README.md +1 -1
- data/lib/yt/associations/playlist_items.rb +1 -1
- data/lib/yt/collections/playlist_items.rb +1 -1
- data/lib/yt/version.rb +1 -1
- data/spec/associations/device_auth/playlist_items_spec.rb +11 -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: f25c54b1f1004f4f077834c4363e122ddc0fe605
|
4
|
+
data.tar.gz: dac600c6f7846186cd83993a857de02c750946ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d6a9d99f716a34d3ec647ccb1ef117fa7cfdabbea3aa4fe28c379c72a1f607bbf12f230ebd07ea85abec14a54554ad0ef13b80b49572a66b262f53a6748de6
|
7
|
+
data.tar.gz: c9cdf87a2f003dca6d3b99e66d57bff636ce64aec589a27263ddd7d8838118462083b0e45af8291bf2601c9b504d82877c9e367e333034b032cc20097f70ac50
|
data/Gemfile.lock
CHANGED
data/HISTORY.md
CHANGED
@@ -6,7 +6,7 @@ v0.4 - 2014/05/09
|
|
6
6
|
* Supports also ActiveSupport 3 and Ruby 1.9.3 (not just AS4 + Ruby 2)
|
7
7
|
* Fix parsing annotation and timestamps longer than 1 hour
|
8
8
|
* Fix delegating tags from resources to snippets
|
9
|
-
* Two options to add videos to a playlist: fail or not if a video is missing
|
9
|
+
* Two options to add videos to a playlist: fail or not if a video is missing or its account terminated
|
10
10
|
* Allow to configure Yt credentials through environment variables
|
11
11
|
|
12
12
|
v0.3.0 - 2014/04/16
|
data/README.md
CHANGED
@@ -302,7 +302,7 @@ To install on your system, run
|
|
302
302
|
|
303
303
|
To use inside a bundled Ruby project, add this line to the Gemfile:
|
304
304
|
|
305
|
-
gem 'yt', '~> 0.4.
|
305
|
+
gem 'yt', '~> 0.4.9'
|
306
306
|
|
307
307
|
Since the gem follows [Semantic Versioning](http://semver.org),
|
308
308
|
indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
|
@@ -12,7 +12,7 @@ module Yt
|
|
12
12
|
snippet = {playlistId: @parent.id, resourceId: resource}
|
13
13
|
do_insert body: {snippet: snippet}, params: {part: 'snippet,status'}
|
14
14
|
rescue Yt::RequestError => error
|
15
|
-
raise error unless options[:
|
15
|
+
raise error unless options[:ignore_errors] && (error.reasons.include?('videoNotFound') || error.reasons.include?('forbidden'))
|
16
16
|
end
|
17
17
|
|
18
18
|
def delete_all(params = {})
|
data/lib/yt/version.rb
CHANGED
@@ -30,6 +30,12 @@ describe Yt::Associations::PlaylistItems, scenario: :device_app do
|
|
30
30
|
it { expect(@playlist.add_video video_id).to be_nil }
|
31
31
|
it { expect{@playlist.add_video video_id}.not_to change{@playlist.playlist_items.count} }
|
32
32
|
end
|
33
|
+
|
34
|
+
context 'given a video of a terminated account' do
|
35
|
+
let(:video_id) { 'kDCpdKeTe5g' }
|
36
|
+
it { expect(@playlist.add_video video_id).to be_nil }
|
37
|
+
it { expect{@playlist.add_video video_id}.not_to change{@playlist.playlist_items.count} }
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
describe '#add_video!' do
|
@@ -42,6 +48,11 @@ describe Yt::Associations::PlaylistItems, scenario: :device_app do
|
|
42
48
|
let(:video_id) { 'not-a-video' }
|
43
49
|
it { expect{@playlist.add_video! video_id}.to raise_error Yt::RequestError }
|
44
50
|
end
|
51
|
+
|
52
|
+
context 'given a video of a terminated account' do
|
53
|
+
let(:video_id) { 'kDCpdKeTe5g' }
|
54
|
+
it { expect{@playlist.add_video! video_id}.to raise_error Yt::RequestError }
|
55
|
+
end
|
45
56
|
end
|
46
57
|
|
47
58
|
describe '#add_videos' do
|
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.4.
|
4
|
+
version: 0.4.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: 2014-05-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|