yt 0.4.10 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/HISTORY.md +10 -0
  4. data/README.md +7 -3
  5. data/TODO.md +6 -2
  6. data/lib/yt/actions/delete.rb +1 -1
  7. data/lib/yt/actions/delete_all.rb +1 -1
  8. data/lib/yt/actions/insert.rb +1 -1
  9. data/lib/yt/actions/list.rb +8 -2
  10. data/lib/yt/actions/update.rb +1 -1
  11. data/lib/yt/associations.rb +1 -0
  12. data/lib/yt/associations/details_sets.rb +1 -1
  13. data/lib/yt/associations/ids.rb +20 -0
  14. data/lib/yt/associations/snippets.rb +1 -1
  15. data/lib/yt/associations/subscriptions.rb +2 -2
  16. data/lib/yt/associations/user_infos.rb +1 -1
  17. data/lib/yt/collections/base.rb +1 -0
  18. data/lib/yt/collections/details_sets.rb +0 -1
  19. data/lib/yt/collections/ids.rb +22 -0
  20. data/lib/yt/collections/playlist_items.rb +3 -3
  21. data/lib/yt/collections/playlists.rb +0 -1
  22. data/lib/yt/collections/snippets.rb +0 -1
  23. data/lib/yt/collections/subscriptions.rb +4 -3
  24. data/lib/yt/collections/user_infos.rb +0 -2
  25. data/lib/yt/collections/videos.rb +0 -1
  26. data/lib/yt/errors/base.rb +43 -0
  27. data/lib/yt/errors/error.rb +8 -0
  28. data/lib/yt/errors/failed.rb +17 -0
  29. data/lib/yt/errors/no_items.rb +17 -0
  30. data/lib/yt/errors/unauthenticated.rb +34 -0
  31. data/lib/yt/models/account.rb +1 -17
  32. data/lib/yt/models/base.rb +1 -0
  33. data/lib/yt/models/description.rb +11 -35
  34. data/lib/yt/models/id.rb +4 -0
  35. data/lib/yt/models/request.rb +102 -0
  36. data/lib/yt/models/resource.rb +13 -2
  37. data/lib/yt/models/subscription.rb +3 -2
  38. data/lib/yt/models/url.rb +88 -0
  39. data/lib/yt/version.rb +1 -1
  40. data/spec/associations/device_auth/details_sets_spec.rb +1 -1
  41. data/spec/associations/device_auth/ids_spec.rb +19 -0
  42. data/spec/associations/device_auth/playlist_items_spec.rb +3 -3
  43. data/spec/associations/device_auth/snippets_spec.rb +2 -2
  44. data/spec/associations/device_auth/user_infos_spec.rb +7 -2
  45. data/spec/associations/server_auth/details_sets_spec.rb +4 -4
  46. data/spec/associations/server_auth/ids_spec.rb +18 -0
  47. data/spec/associations/server_auth/snippets_spec.rb +2 -2
  48. data/spec/collections/playlist_items_spec.rb +25 -5
  49. data/spec/collections/subscriptions_spec.rb +6 -4
  50. data/spec/errors/failed_spec.rb +9 -0
  51. data/spec/errors/no_items_spec.rb +9 -0
  52. data/spec/errors/unauthenticated_spec.rb +9 -0
  53. data/spec/models/account_spec.rb +0 -0
  54. data/spec/models/description_spec.rb +2 -2
  55. data/spec/models/request_spec.rb +29 -0
  56. data/spec/models/resource_spec.rb +21 -0
  57. data/spec/models/subscription_spec.rb +6 -4
  58. data/spec/models/url_spec.rb +72 -0
  59. data/spec/support/fail_matcher.rb +14 -0
  60. metadata +32 -4
  61. data/lib/yt/actions/request.rb +0 -112
  62. data/lib/yt/actions/request_error.rb +0 -11
@@ -2,9 +2,14 @@ require 'spec_helper'
2
2
  require 'yt/associations/user_infos'
3
3
 
4
4
  describe Yt::Associations::UserInfos, scenario: :device_app do
5
- let(:account) { Yt.configuration.account }
5
+ subject(:account) { Yt::Account.new attrs }
6
6
 
7
7
  describe '#user_info' do
8
- it { expect(account.user_info).to be_a Yt::UserInfo }
8
+ context 'given an existing account' do
9
+ let(:account) { Yt.configuration.account }
10
+ it { expect(account.user_info).to be_a Yt::UserInfo }
11
+ end
12
+
13
+ # Note: testing with an unknown account would fail before getting user info
9
14
  end
10
15
  end
@@ -2,17 +2,17 @@ require 'spec_helper'
2
2
  require 'yt/associations/details_sets'
3
3
 
4
4
  describe Yt::Associations::DetailsSets, scenario: :server_app do
5
- let(:video) { Yt::Video.new id: 'fsdfsfsdMESycYJytkU' }
5
+ subject(:video) { Yt::Video.new id: video_id }
6
6
 
7
7
  describe '#details_set' do
8
8
  context 'given an existing video' do
9
- let(:video) { Yt::Video.new id: 'MESycYJytkU' }
9
+ let(:video_id) { 'MESycYJytkU' }
10
10
  it { expect(video.details_set).to be_a Yt::DetailsSet }
11
11
  end
12
12
 
13
13
  context 'given an unknown video' do
14
- let(:video) { Yt::Video.new id: 'not-a-video-id' }
15
- it { expect(video.details_set).to be_nil }
14
+ let(:video_id) { 'not-a-video-id' }
15
+ it { expect{video.details_set}.to raise_error Yt::Errors::NoItems }
16
16
  end
17
17
  end
18
18
  end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'yt/associations/ids'
3
+
4
+ describe Yt::Associations::Ids, scenario: :server_app do
5
+ subject(:resource) { Yt::Resource.new url: url }
6
+
7
+ describe '#id' do
8
+ context 'given a URL containing an existing username' do
9
+ let(:url) { 'youtube.com/fullscreen' }
10
+ it { expect(resource.id).to eq 'UCxO1tY8h1AhOz0T4ENwmpow' }
11
+ end
12
+
13
+ context 'given a URL containing an unknown username' do
14
+ let(:url) { 'youtube.com/--not--a--valid--username' }
15
+ it { expect{resource.id}.to raise_error Yt::Errors::NoItems }
16
+ end
17
+ end
18
+ end
@@ -12,7 +12,7 @@ describe Yt::Associations::Snippets, scenario: :server_app do
12
12
 
13
13
  context 'given an unknown video resource' do
14
14
  let(:video) { Yt::Video.new id: 'not-a-video-id' }
15
- it { expect(video.snippet).to be_nil }
15
+ it { expect{video.snippet}.to raise_error Yt::Errors::NoItems }
16
16
  end
17
17
 
18
18
  context 'given an existing channel resource' do
@@ -22,7 +22,7 @@ describe Yt::Associations::Snippets, scenario: :server_app do
22
22
 
23
23
  context 'given an unknown channel resource' do
24
24
  let(:channel) { Yt::Channel.new id: 'not-a-channel-id' }
25
- it { expect(channel.snippet).to be_nil }
25
+ it { expect{channel.snippet}.to raise_error Yt::Errors::NoItems }
26
26
  end
27
27
  end
28
28
  end
@@ -4,16 +4,36 @@ require 'yt/collections/playlist_items'
4
4
 
5
5
  describe Yt::Collections::PlaylistItems do
6
6
  subject(:collection) { Yt::Collections::PlaylistItems.new parent: playlist }
7
- let(:playlist) { Yt::Playlist.new }
7
+ let(:playlist) { Yt::Playlist.new id: 'LLxO1tY8h1AhOz0T4ENwmpow' }
8
+ let(:attrs) { {id: 'MESycYJytkU', kind: :video} }
9
+ let(:response_body) { %Q{{"error":{"errors":[{"reason":"#{reason}"}]}}} }
10
+ let(:msg) { {response: {body: response_body}}.to_json }
8
11
 
9
12
  describe '#insert' do
10
13
  let(:playlist_item) { Yt::PlaylistItem.new }
11
- # TODO: separate stubs to show options translate into do_insert params
12
- before { collection.stub(:do_insert).and_return playlist_item }
13
14
 
14
- it { expect(collection.insert).to eq playlist_item }
15
- end
15
+ context 'given an existing video' do
16
+ before { collection.stub(:do_insert).and_return playlist_item }
17
+
18
+ it { expect(collection.insert attrs).to eq playlist_item }
19
+ end
20
+
21
+ context 'given an unknown video' do
22
+ let(:reason) { 'videoNotFound' }
23
+ before { collection.stub(:do_insert).and_raise Yt::Errors::Failed, msg }
16
24
 
25
+ it { expect{collection.insert attrs}.to fail.with 'videoNotFound' }
26
+ it { expect{collection.insert attrs, ignore_errors: true}.not_to fail }
27
+ end
28
+
29
+ context 'given a forbidden video' do
30
+ let(:reason) { 'forbidden' }
31
+ before { collection.stub(:do_insert).and_raise Yt::Errors::Failed, msg }
32
+
33
+ it { expect{collection.insert attrs}.to fail.with 'forbidden' }
34
+ it { expect{collection.insert attrs, ignore_errors: true}.not_to fail }
35
+ end
36
+ end
17
37
 
18
38
  describe '#delete_all' do
19
39
  before { collection.stub(:do_delete_all).and_return [true] }
@@ -4,6 +4,8 @@ require 'yt/collections/subscriptions'
4
4
  describe Yt::Collections::Subscriptions do
5
5
  subject(:collection) { Yt::Collections::Subscriptions.new }
6
6
  before { collection.stub :throttle }
7
+ let(:response_body) { %Q{{"error":{"errors":[{"reason":"#{reason}"}]}}} }
8
+ let(:msg) { {response: {body: response_body}}.to_json }
7
9
 
8
10
  describe '#insert' do
9
11
  context 'given a new subscription' do
@@ -14,11 +16,11 @@ describe Yt::Collections::Subscriptions do
14
16
  end
15
17
 
16
18
  context 'given a duplicate subscription' do
17
- let(:msg) { '{"error"=>{"errors"=>[{"reason"=>"subscriptionDuplicate"}]}}' }
18
- before { collection.stub(:do_insert).and_raise Yt::RequestError, msg }
19
+ let(:reason) { 'subscriptionDuplicate' }
20
+ before { collection.stub(:do_insert).and_raise Yt::Errors::Failed, msg }
19
21
 
20
- it { expect{collection.insert}.to raise_error Yt::RequestError, msg }
21
- it { expect{collection.insert ignore_duplicates: true}.not_to raise_error }
22
+ it { expect{collection.insert}.to fail.with 'subscriptionDuplicate' }
23
+ it { expect{collection.insert ignore_errors: true}.not_to fail }
22
24
  end
23
25
  end
24
26
 
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+ require 'yt/errors/failed'
3
+
4
+ describe Yt::Errors::Failed do
5
+ let(:msg) { %r{request.+?failed} }
6
+ describe '#exception' do
7
+ it { expect{raise Yt::Errors::Failed}.to raise_error msg }
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+ require 'yt/errors/no_items'
3
+
4
+ describe Yt::Errors::NoItems do
5
+ let(:msg) { %r{request.+?returned no items} }
6
+ describe '#exception' do
7
+ it { expect{raise Yt::Errors::NoItems}.to raise_error msg }
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+ require 'yt/errors/unauthenticated'
3
+
4
+ describe Yt::Errors::Unauthenticated do
5
+ let(:msg) { %r{request.+?without the required authentication} }
6
+ describe '#exception' do
7
+ it { expect{raise Yt::Errors::Unauthenticated}.to raise_error msg }
8
+ end
9
+ end
File without changes
@@ -21,7 +21,7 @@ describe Yt::Description do
21
21
  end
22
22
 
23
23
  context 'with a video long URL' do
24
- let(:text) { 'Link to video: youtube.com/watch?v=MESycYJytkU' }
24
+ let(:text) { 'example.com and Link to video: youtube.com/watch?v=MESycYJytkU' }
25
25
  it { expect(description).to have_link_to_video }
26
26
  end
27
27
 
@@ -33,7 +33,7 @@ describe Yt::Description do
33
33
 
34
34
  describe '#has_link_to_channel?' do
35
35
  context 'without a channel URL' do
36
- let(:text) { 'Link to video: youtu.be/MESycYJytkU' }
36
+ let(:text) { 'youtu.be/MESycYJytkU is a video link' }
37
37
  it { expect(description).not_to have_link_to_channel }
38
38
  end
39
39
 
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ require 'yt/models/request'
3
+
4
+ describe Yt::Request do
5
+ subject(:request) { Yt::Request.new attrs }
6
+ let(:attrs) { {} }
7
+
8
+ describe '#run' do
9
+ context 'given a request to YouTube V3 API without authentication' do
10
+ let(:attrs) { {host: 'www.googleapis.com'} }
11
+ before{ Yt.configuration.api_key = nil }
12
+ it { expect{request.run}.to raise_error Yt::Errors::Unauthenticated }
13
+ end
14
+
15
+ context 'given a request that returns a non-2XX code' do
16
+ let(:not_found) { Net::HTTPNotFound.new nil, nil, nil }
17
+ before { Net::HTTP.stub(:start).and_return not_found }
18
+ before { not_found.stub(:body) }
19
+ it { expect{request.run}.to fail }
20
+ end
21
+
22
+ context 'given a request that returns a 2XX code' do
23
+ let(:ok) { Net::HTTPOK.new nil, nil, nil }
24
+ before { Net::HTTP.stub(:start).and_return ok }
25
+ before { ok.stub(:body) }
26
+ it { expect{request.run}.not_to fail }
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+ require 'yt/models/resource'
3
+
4
+ describe Yt::Resource do
5
+ subject(:resource) { Yt::Resource.new attrs }
6
+
7
+ context 'given a resource initialized with a URL (containing an ID)' do
8
+ let(:attrs) { {url: 'youtu.be/MESycYJytkU'} }
9
+
10
+ it { expect(resource.id).to eq 'MESycYJytkU' }
11
+ it { expect(resource.kind).to eq 'video' }
12
+ it { expect(resource.username).to be_nil }
13
+ end
14
+
15
+ context 'given a resource initialized with a URL (containing a username)' do
16
+ let(:attrs) { {url: 'youtube.com/fullscreen'} }
17
+
18
+ it { expect(resource.kind).to eq 'channel' }
19
+ it { expect(resource.username).to eq 'fullscreen' }
20
+ end
21
+ end
@@ -3,6 +3,8 @@ require 'yt/models/subscription'
3
3
 
4
4
  describe Yt::Subscription do
5
5
  subject(:subscription) { Yt::Subscription.new id: id }
6
+ let(:response_body) { %Q{{"error":{"errors":[{"reason":"#{reason}"}]}}} }
7
+ let(:msg) { {response: {body: response_body}}.to_json }
6
8
 
7
9
  describe '#exists?' do
8
10
  context 'given a subscription with an id' do
@@ -27,11 +29,11 @@ describe Yt::Subscription do
27
29
  end
28
30
 
29
31
  context 'given an unknown subscription' do
30
- let(:msg) { '{"error"=>{"errors"=>[{"reason"=>"subscriptionNotFound"}]}}' }
31
- before { subscription.stub(:do_delete).and_raise Yt::RequestError, msg }
32
+ let(:reason) { 'subscriptionNotFound' }
33
+ before { subscription.stub(:do_delete).and_raise Yt::Errors::Failed, msg }
32
34
 
33
- it { expect{subscription.delete}.to raise_error Yt::RequestError, msg }
34
- it { expect{subscription.delete ignore_not_found: true}.not_to raise_error }
35
+ it { expect{subscription.delete}.to fail.with 'subscriptionNotFound' }
36
+ it { expect{subscription.delete ignore_errors: true}.not_to fail }
35
37
  end
36
38
  end
37
39
  end
@@ -0,0 +1,72 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'spec_helper'
4
+ require 'yt/models/url'
5
+
6
+ describe Yt::URL do
7
+ subject(:url) { Yt::URL.new text }
8
+
9
+ context 'given a long video URL' do
10
+ let(:text) { 'youtube.com/watch?v=MESycYJytkU' }
11
+ it {expect(url.kind).to eq :video }
12
+ it {expect(url.id).to eq 'MESycYJytkU' }
13
+ it {expect(url.username).to be_nil }
14
+ end
15
+
16
+ context 'given a short video URL' do
17
+ let(:text) { 'https://youtu.be/MESycYJytkU' }
18
+ it {expect(url.kind).to eq :video }
19
+ it {expect(url.id).to eq 'MESycYJytkU' }
20
+ end
21
+
22
+ context 'given a long channel URL' do
23
+ let(:text) { 'http://youtube.com/channel/UCxO1tY8h1AhOz0T4ENwmpow' }
24
+ it {expect(url.kind).to eq :channel }
25
+ it {expect(url.id).to eq 'UCxO1tY8h1AhOz0T4ENwmpow' }
26
+ end
27
+
28
+ context 'given a short channel URL' do
29
+ let(:text) { 'https://www.youtube.com/Fullscreen' }
30
+ it {expect(url.kind).to eq :channel }
31
+ it {expect(url.username).to eq 'Fullscreen' }
32
+ it {expect(url.id).to be_nil }
33
+ end
34
+
35
+ context 'given a user’s channel URL' do
36
+ let(:text) { 'https://www.youtube.com/user/Fullscreen' }
37
+ it {expect(url.kind).to eq :channel }
38
+ it {expect(url.username).to eq 'Fullscreen' }
39
+ end
40
+
41
+ context 'given a subscription center URL' do
42
+ let(:text) { 'youtube.com/subscription_center?add_user=Fullscreen' }
43
+ it {expect(url.kind).to eq :subscription }
44
+ end
45
+
46
+ context 'given a subscription widget URL' do
47
+ let(:text) { 'youtube.com/subscribe_widget?p=Fullscreen' }
48
+ it {expect(url.kind).to eq :subscription }
49
+ end
50
+
51
+ context 'given a subscription confirmation URL' do
52
+ let(:text) { 'youtube.com/channel/UCxO1tY8h1AhOz0T4ENwmpow?sub_confirmation=1' }
53
+ it {expect(url.kind).to eq :subscription }
54
+ end
55
+
56
+ context 'given a long playlist URL' do
57
+ let(:text) { 'youtube.com/playlist?list=LLxO1tY8h1AhOz0T4ENwmpow' }
58
+ it {expect(url.kind).to eq :playlist }
59
+ it {expect(url.id).to eq 'LLxO1tY8h1AhOz0T4ENwmpow' }
60
+ end
61
+
62
+ context 'given a video-embed playlist URL' do
63
+ let(:text) { 'youtube.com/watch?v=MESycYJytkU&list=LLxO1tY8h1AhOz0T4ENwmpow' }
64
+ it {expect(url.kind).to eq :playlist }
65
+ it {expect(url.id).to eq 'LLxO1tY8h1AhOz0T4ENwmpow' }
66
+ end
67
+
68
+ context 'given a valid URL with a trailing slash' do
69
+ let(:text) { 'https://www.youtube.com/user/Fullscreen/' }
70
+ it {expect(url.kind).to eq :channel }
71
+ end
72
+ end
@@ -0,0 +1,14 @@
1
+ RSpec::Matchers.define :fail do
2
+ match do |block|
3
+ begin
4
+ block.call
5
+ false
6
+ rescue Yt::Errors::Base => error
7
+ @reason ? error.reasons.include?(@reason) : true
8
+ end
9
+ end
10
+
11
+ chain :with do |reason|
12
+ @reason = reason
13
+ end
14
+ 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.4.10
4
+ version: 0.5.3
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-15 00:00:00.000000000 Z
11
+ date: 2014-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -121,13 +121,12 @@ files:
121
121
  - lib/yt/actions/delete_all.rb
122
122
  - lib/yt/actions/insert.rb
123
123
  - lib/yt/actions/list.rb
124
- - lib/yt/actions/request.rb
125
- - lib/yt/actions/request_error.rb
126
124
  - lib/yt/actions/update.rb
127
125
  - lib/yt/associations.rb
128
126
  - lib/yt/associations/annotations.rb
129
127
  - lib/yt/associations/channels.rb
130
128
  - lib/yt/associations/details_sets.rb
129
+ - lib/yt/associations/ids.rb
131
130
  - lib/yt/associations/playlist_items.rb
132
131
  - lib/yt/associations/playlists.rb
133
132
  - lib/yt/associations/ratings.rb
@@ -140,6 +139,7 @@ files:
140
139
  - lib/yt/collections/base.rb
141
140
  - lib/yt/collections/channels.rb
142
141
  - lib/yt/collections/details_sets.rb
142
+ - lib/yt/collections/ids.rb
143
143
  - lib/yt/collections/playlist_items.rb
144
144
  - lib/yt/collections/playlists.rb
145
145
  - lib/yt/collections/ratings.rb
@@ -148,6 +148,11 @@ files:
148
148
  - lib/yt/collections/user_infos.rb
149
149
  - lib/yt/collections/videos.rb
150
150
  - lib/yt/config.rb
151
+ - lib/yt/errors/base.rb
152
+ - lib/yt/errors/error.rb
153
+ - lib/yt/errors/failed.rb
154
+ - lib/yt/errors/no_items.rb
155
+ - lib/yt/errors/unauthenticated.rb
151
156
  - lib/yt/models/account.rb
152
157
  - lib/yt/models/annotation.rb
153
158
  - lib/yt/models/base.rb
@@ -155,18 +160,22 @@ files:
155
160
  - lib/yt/models/configuration.rb
156
161
  - lib/yt/models/description.rb
157
162
  - lib/yt/models/details_set.rb
163
+ - lib/yt/models/id.rb
158
164
  - lib/yt/models/playlist.rb
159
165
  - lib/yt/models/playlist_item.rb
160
166
  - lib/yt/models/rating.rb
167
+ - lib/yt/models/request.rb
161
168
  - lib/yt/models/resource.rb
162
169
  - lib/yt/models/snippet.rb
163
170
  - lib/yt/models/status.rb
164
171
  - lib/yt/models/subscription.rb
172
+ - lib/yt/models/url.rb
165
173
  - lib/yt/models/user_info.rb
166
174
  - lib/yt/models/video.rb
167
175
  - lib/yt/version.rb
168
176
  - spec/associations/device_auth/channels_spec.rb
169
177
  - spec/associations/device_auth/details_sets_spec.rb
178
+ - spec/associations/device_auth/ids_spec.rb
170
179
  - spec/associations/device_auth/playlist_items_spec.rb
171
180
  - spec/associations/device_auth/playlists_spec.rb
172
181
  - spec/associations/device_auth/ratings_spec.rb
@@ -177,6 +186,7 @@ files:
177
186
  - spec/associations/no_auth/annotations_spec.rb
178
187
  - spec/associations/server_auth/channels_spec.rb
179
188
  - spec/associations/server_auth/details_sets_spec.rb
189
+ - spec/associations/server_auth/ids_spec.rb
180
190
  - spec/associations/server_auth/playlist_items_spec.rb
181
191
  - spec/associations/server_auth/playlists_spec.rb
182
192
  - spec/associations/server_auth/ratings_spec.rb
@@ -194,6 +204,10 @@ files:
194
204
  - spec/collections/subscriptions_spec.rb
195
205
  - spec/collections/user_infos_spec.rb
196
206
  - spec/collections/videos_spec.rb
207
+ - spec/errors/failed_spec.rb
208
+ - spec/errors/no_items_spec.rb
209
+ - spec/errors/unauthenticated_spec.rb
210
+ - spec/models/account_spec.rb
197
211
  - spec/models/annotation_spec.rb
198
212
  - spec/models/channel_spec.rb
199
213
  - spec/models/configuration_spec.rb
@@ -202,13 +216,17 @@ files:
202
216
  - spec/models/playlist_item_spec.rb
203
217
  - spec/models/playlist_spec.rb
204
218
  - spec/models/rating_spec.rb
219
+ - spec/models/request_spec.rb
220
+ - spec/models/resource_spec.rb
205
221
  - spec/models/snippet_spec.rb
206
222
  - spec/models/status_spec.rb
207
223
  - spec/models/subscription_spec.rb
224
+ - spec/models/url_spec.rb
208
225
  - spec/models/user_info_spec.rb
209
226
  - spec/models/video_spec.rb
210
227
  - spec/spec_helper.rb
211
228
  - spec/support/device_app.rb
229
+ - spec/support/fail_matcher.rb
212
230
  - spec/support/server_app.rb
213
231
  - yt.gemspec
214
232
  homepage: http://github.com/Fullscreen/yt
@@ -239,6 +257,7 @@ summary: Yt makes it easy to interact with Youtube V3 API by providing a modular
239
257
  test_files:
240
258
  - spec/associations/device_auth/channels_spec.rb
241
259
  - spec/associations/device_auth/details_sets_spec.rb
260
+ - spec/associations/device_auth/ids_spec.rb
242
261
  - spec/associations/device_auth/playlist_items_spec.rb
243
262
  - spec/associations/device_auth/playlists_spec.rb
244
263
  - spec/associations/device_auth/ratings_spec.rb
@@ -249,6 +268,7 @@ test_files:
249
268
  - spec/associations/no_auth/annotations_spec.rb
250
269
  - spec/associations/server_auth/channels_spec.rb
251
270
  - spec/associations/server_auth/details_sets_spec.rb
271
+ - spec/associations/server_auth/ids_spec.rb
252
272
  - spec/associations/server_auth/playlist_items_spec.rb
253
273
  - spec/associations/server_auth/playlists_spec.rb
254
274
  - spec/associations/server_auth/ratings_spec.rb
@@ -266,6 +286,10 @@ test_files:
266
286
  - spec/collections/subscriptions_spec.rb
267
287
  - spec/collections/user_infos_spec.rb
268
288
  - spec/collections/videos_spec.rb
289
+ - spec/errors/failed_spec.rb
290
+ - spec/errors/no_items_spec.rb
291
+ - spec/errors/unauthenticated_spec.rb
292
+ - spec/models/account_spec.rb
269
293
  - spec/models/annotation_spec.rb
270
294
  - spec/models/channel_spec.rb
271
295
  - spec/models/configuration_spec.rb
@@ -274,12 +298,16 @@ test_files:
274
298
  - spec/models/playlist_item_spec.rb
275
299
  - spec/models/playlist_spec.rb
276
300
  - spec/models/rating_spec.rb
301
+ - spec/models/request_spec.rb
302
+ - spec/models/resource_spec.rb
277
303
  - spec/models/snippet_spec.rb
278
304
  - spec/models/status_spec.rb
279
305
  - spec/models/subscription_spec.rb
306
+ - spec/models/url_spec.rb
280
307
  - spec/models/user_info_spec.rb
281
308
  - spec/models/video_spec.rb
282
309
  - spec/spec_helper.rb
283
310
  - spec/support/device_app.rb
311
+ - spec/support/fail_matcher.rb
284
312
  - spec/support/server_app.rb
285
313
  has_rdoc: