yt 0.32.4 → 0.33.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -4
  3. data/CHANGELOG.md +43 -2
  4. data/README.md +22 -33
  5. data/YOUTUBE_IT.md +4 -4
  6. data/bin/yt +2 -9
  7. data/lib/yt.rb +0 -1
  8. data/lib/yt/actions/list.rb +1 -1
  9. data/lib/yt/associations/has_reports.rb +9 -14
  10. data/lib/yt/collections/playlist_items.rb +10 -1
  11. data/lib/yt/collections/reports.rb +5 -7
  12. data/lib/yt/models/account.rb +21 -1
  13. data/lib/yt/models/asset.rb +10 -1
  14. data/lib/yt/models/channel.rb +2 -5
  15. data/lib/yt/models/content_owner.rb +20 -0
  16. data/lib/yt/models/match_policy.rb +4 -6
  17. data/lib/yt/models/playlist.rb +12 -2
  18. data/lib/yt/models/playlist_item.rb +8 -1
  19. data/lib/yt/models/resource.rb +69 -3
  20. data/lib/yt/models/statistics_set.rb +2 -1
  21. data/lib/yt/models/url.rb +2 -60
  22. data/lib/yt/models/video.rb +16 -3
  23. data/lib/yt/request.rb +6 -2
  24. data/lib/yt/version.rb +1 -1
  25. data/yt.gemspec +5 -2
  26. metadata +31 -169
  27. data/spec/collections/claims_spec.rb +0 -62
  28. data/spec/collections/comment_threads_spec.rb +0 -46
  29. data/spec/collections/playlist_items_spec.rb +0 -44
  30. data/spec/collections/playlists_spec.rb +0 -27
  31. data/spec/collections/policies_spec.rb +0 -30
  32. data/spec/collections/references_spec.rb +0 -30
  33. data/spec/collections/reports_spec.rb +0 -30
  34. data/spec/collections/subscriptions_spec.rb +0 -25
  35. data/spec/collections/videos_spec.rb +0 -43
  36. data/spec/constants/geography_spec.rb +0 -16
  37. data/spec/errors/forbidden_spec.rb +0 -10
  38. data/spec/errors/missing_auth_spec.rb +0 -24
  39. data/spec/errors/no_items_spec.rb +0 -10
  40. data/spec/errors/request_error_spec.rb +0 -44
  41. data/spec/errors/server_error_spec.rb +0 -10
  42. data/spec/errors/unauthorized_spec.rb +0 -10
  43. data/spec/models/account_spec.rb +0 -138
  44. data/spec/models/annotation_spec.rb +0 -180
  45. data/spec/models/asset_spec.rb +0 -32
  46. data/spec/models/channel_spec.rb +0 -127
  47. data/spec/models/claim_event_spec.rb +0 -62
  48. data/spec/models/claim_history_spec.rb +0 -27
  49. data/spec/models/claim_spec.rb +0 -223
  50. data/spec/models/comment_spec.rb +0 -40
  51. data/spec/models/comment_thread_spec.rb +0 -93
  52. data/spec/models/configuration_spec.rb +0 -44
  53. data/spec/models/content_detail_spec.rb +0 -52
  54. data/spec/models/content_owner_detail_spec.rb +0 -6
  55. data/spec/models/file_detail_spec.rb +0 -13
  56. data/spec/models/live_streaming_detail_spec.rb +0 -6
  57. data/spec/models/ownership_spec.rb +0 -59
  58. data/spec/models/player_spec.rb +0 -13
  59. data/spec/models/playlist_item_spec.rb +0 -120
  60. data/spec/models/playlist_spec.rb +0 -138
  61. data/spec/models/policy_rule_spec.rb +0 -63
  62. data/spec/models/policy_spec.rb +0 -41
  63. data/spec/models/rating_spec.rb +0 -12
  64. data/spec/models/reference_spec.rb +0 -249
  65. data/spec/models/request_spec.rb +0 -204
  66. data/spec/models/resource_spec.rb +0 -42
  67. data/spec/models/right_owner_spec.rb +0 -71
  68. data/spec/models/snippet_spec.rb +0 -13
  69. data/spec/models/statistics_set_spec.rb +0 -13
  70. data/spec/models/status_spec.rb +0 -13
  71. data/spec/models/subscription_spec.rb +0 -30
  72. data/spec/models/url_spec.rb +0 -78
  73. data/spec/models/video_category_spec.rb +0 -21
  74. data/spec/models/video_spec.rb +0 -669
  75. data/spec/requests/as_account/account_spec.rb +0 -143
  76. data/spec/requests/as_account/authentications_spec.rb +0 -127
  77. data/spec/requests/as_account/channel_spec.rb +0 -246
  78. data/spec/requests/as_account/channels_spec.rb +0 -18
  79. data/spec/requests/as_account/playlist_item_spec.rb +0 -55
  80. data/spec/requests/as_account/playlist_spec.rb +0 -218
  81. data/spec/requests/as_account/thumbnail.jpg +0 -0
  82. data/spec/requests/as_account/video.mp4 +0 -0
  83. data/spec/requests/as_account/video_spec.rb +0 -408
  84. data/spec/requests/as_content_owner/account_spec.rb +0 -29
  85. data/spec/requests/as_content_owner/advertising_options_set_spec.rb +0 -15
  86. data/spec/requests/as_content_owner/asset_spec.rb +0 -31
  87. data/spec/requests/as_content_owner/bulk_report_job_spec.rb +0 -19
  88. data/spec/requests/as_content_owner/channel_spec.rb +0 -1836
  89. data/spec/requests/as_content_owner/claim_history_spec.rb +0 -20
  90. data/spec/requests/as_content_owner/claim_spec.rb +0 -17
  91. data/spec/requests/as_content_owner/content_owner_spec.rb +0 -370
  92. data/spec/requests/as_content_owner/match_policy_spec.rb +0 -17
  93. data/spec/requests/as_content_owner/ownership_spec.rb +0 -25
  94. data/spec/requests/as_content_owner/playlist_spec.rb +0 -767
  95. data/spec/requests/as_content_owner/video_group_spec.rb +0 -112
  96. data/spec/requests/as_content_owner/video_spec.rb +0 -1211
  97. data/spec/requests/as_server_app/channel_spec.rb +0 -54
  98. data/spec/requests/as_server_app/comment_spec.rb +0 -22
  99. data/spec/requests/as_server_app/comment_thread_spec.rb +0 -27
  100. data/spec/requests/as_server_app/comment_threads_spec.rb +0 -41
  101. data/spec/requests/as_server_app/playlist_item_spec.rb +0 -30
  102. data/spec/requests/as_server_app/playlist_spec.rb +0 -33
  103. data/spec/requests/as_server_app/url_spec.rb +0 -94
  104. data/spec/requests/as_server_app/video_spec.rb +0 -60
  105. data/spec/requests/as_server_app/videos_spec.rb +0 -40
  106. data/spec/requests/unauthenticated/video_spec.rb +0 -14
  107. data/spec/spec_helper.rb +0 -20
  108. data/spec/support/fail_matcher.rb +0 -15
  109. data/spec/support/global_hooks.rb +0 -48
@@ -102,6 +102,26 @@ module Yt
102
102
  def video_groups_params
103
103
  {on_behalf_of_content_owner: @owner_name}
104
104
  end
105
+
106
+ def playlist_items_params
107
+ {on_behalf_of_content_owner: @owner_name}
108
+ end
109
+
110
+ def update_video_params
111
+ {on_behalf_of_content_owner: @owner_name}
112
+ end
113
+
114
+ def update_playlist_params
115
+ {on_behalf_of_content_owner: @owner_name}
116
+ end
117
+
118
+ def upload_thumbnail_params
119
+ {on_behalf_of_content_owner: @owner_name}
120
+ end
121
+
122
+ def insert_playlist_item_params
123
+ {on_behalf_of_content_owner: @owner_name}
124
+ end
105
125
  end
106
126
  end
107
127
  end
@@ -13,16 +13,14 @@ module Yt
13
13
 
14
14
  def update(attributes = {})
15
15
  underscore_keys! attributes
16
- do_patch body: attributes.slice(:policy_id)
16
+ do_update body: attributes.slice(:policy_id)
17
17
  true
18
18
  end
19
19
 
20
20
  private
21
21
 
22
- # @return [Hash] the parameters to submit to YouTube to patch an asset
23
- # match policy.
24
- # @see https://developers.google.com/youtube/partner/docs/v1/assetMatchPolicy/patch
25
- def patch_params
22
+ # @see https://developers.google.com/youtube/partner/docs/v1/assetMatchPolicy/update
23
+ def update_params
26
24
  super.tap do |params|
27
25
  params[:path] = "/youtube/partner/v1/assets/#{@asset_id}/matchPolicy"
28
26
  params[:params] = {on_behalf_of_content_owner: @auth.owner_name}
@@ -31,4 +29,4 @@ module Yt
31
29
  end
32
30
  end
33
31
  end
34
- end
32
+ end
@@ -197,7 +197,8 @@ module Yt
197
197
  # @private
198
198
  # Tells `has_reports` to retrieve the reports from YouTube Analytics API
199
199
  # either as a Channel or as a Content Owner.
200
- # @see https://developers.google.com/youtube/analytics/v1/reports
200
+ # @see https://developers.google.com/youtube/analytics/channel_reports
201
+ # @see https://developers.google.com/youtube/analytics/content_owner_reports
201
202
  def reports_params
202
203
  {}.tap do |params|
203
204
  if auth.owner_name
@@ -231,6 +232,15 @@ module Yt
231
232
  params[:resource_id] ||= {kind: 'youtube#video', videoId: video_id}
232
233
  end
233
234
  end
235
+
236
+ # For updating playlist with content owner auth.
237
+ # @see https://developers.google.com/youtube/v3/docs/playlists/update
238
+ def update_params
239
+ params = super
240
+ params[:params] ||= {}
241
+ params[:params].merge! auth.update_playlist_params
242
+ params
243
+ end
234
244
  end
235
245
  end
236
- end
246
+ end
@@ -101,6 +101,13 @@ module Yt
101
101
  {kind: 'youtube#video', videoId: video_id}
102
102
  end
103
103
 
104
+ def delete_params
105
+ super.tap do |params|
106
+ params[:params] ||= {}
107
+ params[:params].merge! @auth.playlist_items_params
108
+ end
109
+ end
110
+
104
111
  # @see https://developers.google.com/youtube/v3/docs/playlistItems/update
105
112
  def update_parts
106
113
  keys = [:position, :playlist_id, :resource_id]
@@ -109,4 +116,4 @@ module Yt
109
116
  end
110
117
  end
111
118
  end
112
- end
119
+ end
@@ -12,7 +12,9 @@ module Yt
12
12
 
13
13
  # @!attribute [r] id
14
14
  # @return [String] the ID that YouTube uses to identify each resource.
15
- attr_reader :id
15
+ def id
16
+ @id ||= @match['id'] || fetch_channel_id
17
+ end
16
18
 
17
19
  ### STATUS ###
18
20
 
@@ -42,7 +44,12 @@ module Yt
42
44
 
43
45
  # @private
44
46
  def initialize(options = {})
45
- @id = options[:id]
47
+ if options[:url]
48
+ @url = options[:url]
49
+ @match = find_pattern_match
50
+ else
51
+ @id = options[:id]
52
+ end
46
53
  @auth = options[:auth]
47
54
  @snippet = Snippet.new(data: options[:snippet]) if options[:snippet]
48
55
  @status = Status.new(data: options[:status]) if options[:status]
@@ -50,7 +57,11 @@ module Yt
50
57
 
51
58
  # @private
52
59
  def kind
53
- self.class.to_s.demodulize.underscore
60
+ if @url
61
+ @match[:kind].to_s
62
+ else
63
+ self.class.to_s.demodulize.underscore
64
+ end
54
65
  end
55
66
 
56
67
  # @private
@@ -66,8 +77,63 @@ module Yt
66
77
  end
67
78
  end
68
79
 
80
+ # @return [Array<Regexp>] patterns matching URLs of YouTube playlists.
81
+ PLAYLIST_PATTERNS = [
82
+ %r{^(?:https?://)?(?:www\.)?youtube\.com/playlist/?\?list=(?<id>[a-zA-Z0-9_-]+)},
83
+ ]
84
+
85
+ # @return [Array<Regexp>] patterns matching URLs of YouTube videos.
86
+ VIDEO_PATTERNS = [
87
+ %r{^(?:https?://)?(?:www\.)?youtube\.com/watch\?v=(?<id>[a-zA-Z0-9_-]{11})},
88
+ %r{^(?:https?://)?(?:www\.)?youtu\.be/(?<id>[a-zA-Z0-9_-]{11})},
89
+ %r{^(?:https?://)?(?:www\.)?youtube\.com/embed/(?<id>[a-zA-Z0-9_-]{11})},
90
+ %r{^(?:https?://)?(?:www\.)?youtube\.com/v/(?<id>[a-zA-Z0-9_-]{11})},
91
+ ]
92
+
93
+ # @return [Array<Regexp>] patterns matching URLs of YouTube channels.
94
+ CHANNEL_PATTERNS = [
95
+ %r{^(?:https?://)?(?:www\.)?youtube\.com/channel/(?<id>UC[a-zA-Z0-9_-]{22})},
96
+ %r{^(?:https?://)?(?:www\.)?youtube\.com/(?<format>c/|user/)?(?<name>[a-zA-Z0-9_-]+)}
97
+ ]
98
+
69
99
  private
70
100
 
101
+ def find_pattern_match
102
+ patterns.find do |kind, regex|
103
+ if data = @url.match(regex)
104
+ # Note: With Ruby 2.4, the following is data.named_captures
105
+ break data.names.zip(data.captures).to_h.merge kind: kind
106
+ end
107
+ end || {kind: :unknown}
108
+ end
109
+
110
+ def patterns
111
+ # @note: :channel *must* be the last since one of its regex eats the
112
+ # remaining patterns. In short, don't change the following order.
113
+ Enumerator.new do |patterns|
114
+ VIDEO_PATTERNS.each {|regex| patterns << [:video, regex]}
115
+ PLAYLIST_PATTERNS.each {|regex| patterns << [:playlist, regex]}
116
+ CHANNEL_PATTERNS.each {|regex| patterns << [:channel, regex]}
117
+ end
118
+ end
119
+
120
+ def fetch_channel_id
121
+ response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
122
+ http.request Net::HTTP::Get.new("/#{@match['format']}#{@match['name']}")
123
+ end
124
+ if response.is_a?(Net::HTTPRedirection)
125
+ response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
126
+ http.request Net::HTTP::Get.new(response['location'])
127
+ end
128
+ end
129
+ regex = %r{<meta itemprop="channelId" content="(?<id>UC[a-zA-Z0-9_-]{22})">}
130
+ if data = response.body.match(regex)
131
+ data[:id]
132
+ else
133
+ raise Yt::Errors::NoItems
134
+ end
135
+ end
136
+
71
137
  # Since YouTube API only returns tags on Videos#list, the memoized
72
138
  # `@snippet` is erased if the video was instantiated through Video#search
73
139
  # (e.g., by calling account.videos or channel.videos), so that the full
@@ -6,6 +6,7 @@ module Yt
6
6
  # Encapsulates statistics about the resource, such as the number of times
7
7
  # the resource has been viewed or liked.
8
8
  # @see https://developers.google.com/youtube/v3/docs/videos#resource
9
+ # @see https://developers.google.com/youtube/v3/docs/channels#resource-representation
9
10
  class StatisticsSet < Base
10
11
  attr_reader :data
11
12
 
@@ -23,4 +24,4 @@ module Yt
23
24
  has_attribute :hidden_subscriber_count
24
25
  end
25
26
  end
26
- end
27
+ end
@@ -14,18 +14,17 @@ module Yt
14
14
  # @param [String] text the name or URL of a YouTube resource (in any form).
15
15
  def initialize(text)
16
16
  @text = text.to_s.strip
17
- @match = find_pattern_match
18
17
  end
19
18
 
20
19
  # @return [Symbol] the kind of YouTube resource matching the URL.
21
20
  # Possible values are: +:playlist+, +:video+, +:channel+, and +:unknown:.
22
21
  def kind
23
- @match[:kind]
22
+ Resource.new(url: @text).kind.to_sym
24
23
  end
25
24
 
26
25
  # @return [<String, nil>] the ID of the YouTube resource matching the URL.
27
26
  def id
28
- @match['id'] ||= fetch_id
27
+ Resource.new(url: @text).id
29
28
  end
30
29
 
31
30
  # @return [<Yt::Channel>] the resource associated with the URL
@@ -37,63 +36,6 @@ module Yt
37
36
  else raise Yt::Errors::NoItems
38
37
  end.new options.merge(id: id)
39
38
  end
40
-
41
- # @return [Array<Regexp>] patterns matching URLs of YouTube playlists.
42
- PLAYLIST_PATTERNS = [
43
- %r{^(?:https?://)?(?:www\.)?youtube\.com/playlist/?\?list=(?<id>[a-zA-Z0-9_-]+)},
44
- ]
45
-
46
- # @return [Array<Regexp>] patterns matching URLs of YouTube videos.
47
- VIDEO_PATTERNS = [
48
- %r{^(?:https?://)?(?:www\.)?youtube\.com/watch\?v=(?<id>[a-zA-Z0-9_-]{11})},
49
- %r{^(?:https?://)?(?:www\.)?youtu\.be/(?<id>[a-zA-Z0-9_-]{11})},
50
- %r{^(?:https?://)?(?:www\.)?youtube\.com/embed/(?<id>[a-zA-Z0-9_-]{11})},
51
- %r{^(?:https?://)?(?:www\.)?youtube\.com/v/(?<id>[a-zA-Z0-9_-]{11})},
52
- ]
53
-
54
- # @return [Array<Regexp>] patterns matching URLs of YouTube channels.
55
- CHANNEL_PATTERNS = [
56
- %r{^(?:https?://)?(?:www\.)?youtube\.com/channel/(?<id>UC[a-zA-Z0-9_-]{22})},
57
- %r{^(?:https?://)?(?:www\.)?youtube\.com/(?<format>c/|user/)?(?<name>[a-zA-Z0-9_-]+)}
58
- ]
59
-
60
- private
61
-
62
- def find_pattern_match
63
- patterns.find(-> {{kind: :unknown}}) do |kind, regex|
64
- if data = @text.match(regex)
65
- # Note: With Ruby 2.4, the following is data.named_captures
66
- break data.names.zip(data.captures).to_h.merge kind: kind
67
- end
68
- end
69
- end
70
-
71
- def patterns
72
- # @note: :channel *must* be the last since one of its regex eats the
73
- # remaining patterns. In short, don't change the following order.
74
- Enumerator.new do |patterns|
75
- VIDEO_PATTERNS.each {|regex| patterns << [:video, regex]}
76
- PLAYLIST_PATTERNS.each {|regex| patterns << [:playlist, regex]}
77
- CHANNEL_PATTERNS.each {|regex| patterns << [:channel, regex]}
78
- end
79
- end
80
-
81
- def fetch_id
82
- response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
83
- http.request Net::HTTP::Get.new("/#{@match['format']}#{@match['name']}")
84
- end
85
- if response.is_a?(Net::HTTPRedirection)
86
- response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
87
- http.request Net::HTTP::Get.new(response['location'])
88
- end
89
- end
90
- regex = %r{<meta itemprop="channelId" content="(?<id>UC[a-zA-Z0-9_-]{22})">}
91
- if data = response.body.match(regex)
92
- data[:id]
93
- else
94
- raise Yt::Errors::NoItems
95
- end
96
- end
97
39
  end
98
40
  end
99
41
  end
@@ -392,7 +392,7 @@ module Yt
392
392
 
393
393
  has_many :resumable_sessions
394
394
 
395
- # @!attribute [r] channel
395
+ # @!attribute [r] claim
396
396
  # @return [Yt::Models::Claim, nil] the first claim on the video by
397
397
  # the content owner of the video, if eagerly loaded.
398
398
  def claim
@@ -621,7 +621,8 @@ module Yt
621
621
  # @private
622
622
  # Tells `has_reports` to retrieve the reports from YouTube Analytics API
623
623
  # either as a Channel or as a Content Owner.
624
- # @see https://developers.google.com/youtube/analytics/v1/reports
624
+ # @see https://developers.google.com/youtube/analytics/channel_reports
625
+ # @see https://developers.google.com/youtube/analytics/content_owner_reports
625
626
  def reports_params
626
627
  {}.tap do |params|
627
628
  if auth.owner_name
@@ -642,8 +643,11 @@ module Yt
642
643
  # @private
643
644
  # Tells `has_many :resumable_sessions` what params are set for the object
644
645
  # associated to the uploaded file.
646
+ # https://developers.google.com/youtube/v3/docs/thumbnails/set
645
647
  def upload_params
646
- {video_id: id}
648
+ params = {video_id: id}
649
+ params.merge! auth.upload_thumbnail_params
650
+ params
647
651
  end
648
652
 
649
653
  # @private
@@ -667,6 +671,15 @@ module Yt
667
671
  {snippet: snippet, status: {keys: status_keys}}
668
672
  end
669
673
 
674
+ # For updating video with content owner auth.
675
+ # @see https://developers.google.com/youtube/v3/docs/videos/update
676
+ def update_params
677
+ params = super
678
+ params[:params] ||= {}
679
+ params[:params].merge! auth.update_video_params
680
+ params
681
+ end
682
+
670
683
  # NOTE: Another irrational behavior of YouTube API. If you are setting a
671
684
  # video to public/unlisted then you should *not* pass publishAt at any
672
685
  # cost, otherwise the API will fail (since setting publishAt means you
@@ -196,7 +196,7 @@ module Yt
196
196
  # - when the user has reached the quota for requests/second, and waiting
197
197
  # for a couple of seconds might solve the connection issues.
198
198
  def run_again?
199
- refresh_token_and_retry? ||
199
+ refresh_token_and_retry? && sleep_and_retry?(1) ||
200
200
  server_error? && sleep_and_retry?(3) ||
201
201
  exceeded_quota? && sleep_and_retry?(3)
202
202
  end
@@ -234,10 +234,14 @@ module Yt
234
234
  @retries_so_far += 1
235
235
  if (@retries_so_far < max_retries)
236
236
  @response = @http_request = @uri = nil
237
- sleep 3 + (10 * @retries_so_far)
237
+ sleep retry_time
238
238
  end
239
239
  end
240
240
 
241
+ def retry_time
242
+ 3 + (10 * @retries_so_far)
243
+ end
244
+
241
245
  # In case an authorized request responds with "Unauthorized", checks
242
246
  # if the original access token can be refreshed. If that's the case,
243
247
  # clears the memoized variables and returns true, so the request can
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.32.4'
2
+ VERSION = '0.33.2'
3
3
  end
data/yt.gemspec CHANGED
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'yt/version'
@@ -16,7 +15,9 @@ Gem::Specification.new do |spec|
16
15
 
17
16
  spec.required_ruby_version = '>= 1.9.3'
18
17
 
19
- spec.files = `git ls-files`.split($/)
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
20
21
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
23
  spec.require_paths = ["lib"]
@@ -30,4 +31,6 @@ Gem::Specification.new do |spec|
30
31
  spec.add_development_dependency 'yard' #, '~> 0.8.0'
31
32
  spec.add_development_dependency 'coveralls' #, '~> 0.7.0'
32
33
  spec.add_development_dependency 'pry'
34
+ spec.add_development_dependency 'vcr'
35
+ spec.add_development_dependency 'webmock'
33
36
  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.32.4
4
+ version: 0.33.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-28 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -108,6 +108,34 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: vcr
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: webmock
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
111
139
  description: Youtube V3 API client.
112
140
  email:
113
141
  - claudio@fullscreen.net
@@ -246,89 +274,6 @@ files:
246
274
  - lib/yt/models/video_group.rb
247
275
  - lib/yt/request.rb
248
276
  - lib/yt/version.rb
249
- - spec/collections/claims_spec.rb
250
- - spec/collections/comment_threads_spec.rb
251
- - spec/collections/playlist_items_spec.rb
252
- - spec/collections/playlists_spec.rb
253
- - spec/collections/policies_spec.rb
254
- - spec/collections/references_spec.rb
255
- - spec/collections/reports_spec.rb
256
- - spec/collections/subscriptions_spec.rb
257
- - spec/collections/videos_spec.rb
258
- - spec/constants/geography_spec.rb
259
- - spec/errors/forbidden_spec.rb
260
- - spec/errors/missing_auth_spec.rb
261
- - spec/errors/no_items_spec.rb
262
- - spec/errors/request_error_spec.rb
263
- - spec/errors/server_error_spec.rb
264
- - spec/errors/unauthorized_spec.rb
265
- - spec/models/account_spec.rb
266
- - spec/models/annotation_spec.rb
267
- - spec/models/asset_spec.rb
268
- - spec/models/channel_spec.rb
269
- - spec/models/claim_event_spec.rb
270
- - spec/models/claim_history_spec.rb
271
- - spec/models/claim_spec.rb
272
- - spec/models/comment_spec.rb
273
- - spec/models/comment_thread_spec.rb
274
- - spec/models/configuration_spec.rb
275
- - spec/models/content_detail_spec.rb
276
- - spec/models/content_owner_detail_spec.rb
277
- - spec/models/file_detail_spec.rb
278
- - spec/models/live_streaming_detail_spec.rb
279
- - spec/models/ownership_spec.rb
280
- - spec/models/player_spec.rb
281
- - spec/models/playlist_item_spec.rb
282
- - spec/models/playlist_spec.rb
283
- - spec/models/policy_rule_spec.rb
284
- - spec/models/policy_spec.rb
285
- - spec/models/rating_spec.rb
286
- - spec/models/reference_spec.rb
287
- - spec/models/request_spec.rb
288
- - spec/models/resource_spec.rb
289
- - spec/models/right_owner_spec.rb
290
- - spec/models/snippet_spec.rb
291
- - spec/models/statistics_set_spec.rb
292
- - spec/models/status_spec.rb
293
- - spec/models/subscription_spec.rb
294
- - spec/models/url_spec.rb
295
- - spec/models/video_category_spec.rb
296
- - spec/models/video_spec.rb
297
- - spec/requests/as_account/account_spec.rb
298
- - spec/requests/as_account/authentications_spec.rb
299
- - spec/requests/as_account/channel_spec.rb
300
- - spec/requests/as_account/channels_spec.rb
301
- - spec/requests/as_account/playlist_item_spec.rb
302
- - spec/requests/as_account/playlist_spec.rb
303
- - spec/requests/as_account/thumbnail.jpg
304
- - spec/requests/as_account/video.mp4
305
- - spec/requests/as_account/video_spec.rb
306
- - spec/requests/as_content_owner/account_spec.rb
307
- - spec/requests/as_content_owner/advertising_options_set_spec.rb
308
- - spec/requests/as_content_owner/asset_spec.rb
309
- - spec/requests/as_content_owner/bulk_report_job_spec.rb
310
- - spec/requests/as_content_owner/channel_spec.rb
311
- - spec/requests/as_content_owner/claim_history_spec.rb
312
- - spec/requests/as_content_owner/claim_spec.rb
313
- - spec/requests/as_content_owner/content_owner_spec.rb
314
- - spec/requests/as_content_owner/match_policy_spec.rb
315
- - spec/requests/as_content_owner/ownership_spec.rb
316
- - spec/requests/as_content_owner/playlist_spec.rb
317
- - spec/requests/as_content_owner/video_group_spec.rb
318
- - spec/requests/as_content_owner/video_spec.rb
319
- - spec/requests/as_server_app/channel_spec.rb
320
- - spec/requests/as_server_app/comment_spec.rb
321
- - spec/requests/as_server_app/comment_thread_spec.rb
322
- - spec/requests/as_server_app/comment_threads_spec.rb
323
- - spec/requests/as_server_app/playlist_item_spec.rb
324
- - spec/requests/as_server_app/playlist_spec.rb
325
- - spec/requests/as_server_app/url_spec.rb
326
- - spec/requests/as_server_app/video_spec.rb
327
- - spec/requests/as_server_app/videos_spec.rb
328
- - spec/requests/unauthenticated/video_spec.rb
329
- - spec/spec_helper.rb
330
- - spec/support/fail_matcher.rb
331
- - spec/support/global_hooks.rb
332
277
  - yt.gemspec
333
278
  homepage: http://github.com/Fullscreen/yt
334
279
  licenses:
@@ -355,87 +300,4 @@ signing_key:
355
300
  specification_version: 4
356
301
  summary: Yt makes it easy to interact with Youtube V3 API by providing a modular,
357
302
  intuitive and tested Ruby-style API.
358
- test_files:
359
- - spec/collections/claims_spec.rb
360
- - spec/collections/comment_threads_spec.rb
361
- - spec/collections/playlist_items_spec.rb
362
- - spec/collections/playlists_spec.rb
363
- - spec/collections/policies_spec.rb
364
- - spec/collections/references_spec.rb
365
- - spec/collections/reports_spec.rb
366
- - spec/collections/subscriptions_spec.rb
367
- - spec/collections/videos_spec.rb
368
- - spec/constants/geography_spec.rb
369
- - spec/errors/forbidden_spec.rb
370
- - spec/errors/missing_auth_spec.rb
371
- - spec/errors/no_items_spec.rb
372
- - spec/errors/request_error_spec.rb
373
- - spec/errors/server_error_spec.rb
374
- - spec/errors/unauthorized_spec.rb
375
- - spec/models/account_spec.rb
376
- - spec/models/annotation_spec.rb
377
- - spec/models/asset_spec.rb
378
- - spec/models/channel_spec.rb
379
- - spec/models/claim_event_spec.rb
380
- - spec/models/claim_history_spec.rb
381
- - spec/models/claim_spec.rb
382
- - spec/models/comment_spec.rb
383
- - spec/models/comment_thread_spec.rb
384
- - spec/models/configuration_spec.rb
385
- - spec/models/content_detail_spec.rb
386
- - spec/models/content_owner_detail_spec.rb
387
- - spec/models/file_detail_spec.rb
388
- - spec/models/live_streaming_detail_spec.rb
389
- - spec/models/ownership_spec.rb
390
- - spec/models/player_spec.rb
391
- - spec/models/playlist_item_spec.rb
392
- - spec/models/playlist_spec.rb
393
- - spec/models/policy_rule_spec.rb
394
- - spec/models/policy_spec.rb
395
- - spec/models/rating_spec.rb
396
- - spec/models/reference_spec.rb
397
- - spec/models/request_spec.rb
398
- - spec/models/resource_spec.rb
399
- - spec/models/right_owner_spec.rb
400
- - spec/models/snippet_spec.rb
401
- - spec/models/statistics_set_spec.rb
402
- - spec/models/status_spec.rb
403
- - spec/models/subscription_spec.rb
404
- - spec/models/url_spec.rb
405
- - spec/models/video_category_spec.rb
406
- - spec/models/video_spec.rb
407
- - spec/requests/as_account/account_spec.rb
408
- - spec/requests/as_account/authentications_spec.rb
409
- - spec/requests/as_account/channel_spec.rb
410
- - spec/requests/as_account/channels_spec.rb
411
- - spec/requests/as_account/playlist_item_spec.rb
412
- - spec/requests/as_account/playlist_spec.rb
413
- - spec/requests/as_account/thumbnail.jpg
414
- - spec/requests/as_account/video.mp4
415
- - spec/requests/as_account/video_spec.rb
416
- - spec/requests/as_content_owner/account_spec.rb
417
- - spec/requests/as_content_owner/advertising_options_set_spec.rb
418
- - spec/requests/as_content_owner/asset_spec.rb
419
- - spec/requests/as_content_owner/bulk_report_job_spec.rb
420
- - spec/requests/as_content_owner/channel_spec.rb
421
- - spec/requests/as_content_owner/claim_history_spec.rb
422
- - spec/requests/as_content_owner/claim_spec.rb
423
- - spec/requests/as_content_owner/content_owner_spec.rb
424
- - spec/requests/as_content_owner/match_policy_spec.rb
425
- - spec/requests/as_content_owner/ownership_spec.rb
426
- - spec/requests/as_content_owner/playlist_spec.rb
427
- - spec/requests/as_content_owner/video_group_spec.rb
428
- - spec/requests/as_content_owner/video_spec.rb
429
- - spec/requests/as_server_app/channel_spec.rb
430
- - spec/requests/as_server_app/comment_spec.rb
431
- - spec/requests/as_server_app/comment_thread_spec.rb
432
- - spec/requests/as_server_app/comment_threads_spec.rb
433
- - spec/requests/as_server_app/playlist_item_spec.rb
434
- - spec/requests/as_server_app/playlist_spec.rb
435
- - spec/requests/as_server_app/url_spec.rb
436
- - spec/requests/as_server_app/video_spec.rb
437
- - spec/requests/as_server_app/videos_spec.rb
438
- - spec/requests/unauthenticated/video_spec.rb
439
- - spec/spec_helper.rb
440
- - spec/support/fail_matcher.rb
441
- - spec/support/global_hooks.rb
303
+ test_files: []