yt 0.7.11 → 0.8.0
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 +5 -0
- data/README.md +1 -1
- data/lib/yt.rb +4 -0
- data/lib/yt/collections/subscriptions.rb +3 -2
- data/lib/yt/version.rb +1 -1
- data/spec/requests/as_account/channel_spec.rb +5 -5
- 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: 61f559b96e49f82854993bc9fa8be3e6afab9aaa
|
4
|
+
data.tar.gz: cd332a6c0162c3c28abadd06c7c50cce24823924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e310ae789d8cb9c390c2b39681faa251ec90b3b0c0189aec22d3e81719c1b13a65ca6ede2e996a108956eb0d5c342c1a99198405bd61a4eed371623f819b990e
|
7
|
+
data.tar.gz: ac16bdf814bcab2fb1f6bb704ed00c890b13fe07824cb8d1dcaa27f2d940dd08c5492ba1623110c188ef0923eca874512f74e40426faf6274dfb7c8698f3510d
|
data/Gemfile.lock
CHANGED
data/HISTORY.md
CHANGED
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.
|
44
|
+
gem 'yt', '~> 0.8.0'
|
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.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'yt/config'
|
2
2
|
require 'yt/models/account'
|
3
|
+
require 'yt/models/channel'
|
3
4
|
require 'yt/models/content_owner'
|
5
|
+
require 'yt/models/playlist'
|
6
|
+
require 'yt/models/playlist_item'
|
7
|
+
require 'yt/models/video'
|
4
8
|
|
5
9
|
# An object-oriented Ruby client for YouTube.
|
6
10
|
# Helps creating applications that need to interact with YouTube objects.
|
@@ -9,8 +9,9 @@ module Yt
|
|
9
9
|
throttle
|
10
10
|
do_insert
|
11
11
|
rescue Yt::Error => error
|
12
|
-
|
13
|
-
|
12
|
+
ignorable_error = error.reasons.include? 'subscriptionDuplicate'
|
13
|
+
ignorable_error ||= (@parent.id == @auth.channel.id) if @auth
|
14
|
+
raise error unless options[:ignore_errors] && ignorable_error
|
14
15
|
end
|
15
16
|
|
16
17
|
def delete_all(params = {}, options = {})
|
data/lib/yt/version.rb
CHANGED
@@ -74,11 +74,11 @@ describe Yt::Channel, :device_app do
|
|
74
74
|
it { expect{channel.delete_playlists params}.to change{channel.playlists.count}.by(-1) }
|
75
75
|
end
|
76
76
|
|
77
|
-
#
|
78
|
-
# raising a 500 error when you try to subscribe to your own channel
|
79
|
-
#
|
80
|
-
|
81
|
-
it { expect
|
77
|
+
# @note: this test is just a reflection of YouTube irrational behavior of
|
78
|
+
# raising a 500 error when you try to subscribe to your own channel.
|
79
|
+
# `subscribe` will ignore the error, but `subscribe!` will raise it.
|
80
|
+
it { expect{channel.subscribe!}.to raise_error Yt::Errors::ServerError }
|
81
|
+
it { expect(channel.subscribe).to be_falsey }
|
82
82
|
|
83
83
|
it 'returns valid reports for channel-related metrics' do
|
84
84
|
# Some reports are only available to Content Owners.
|
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
|
+
version: 0.8.0
|
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-07-
|
11
|
+
date: 2014-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|