yt 0.33.2 → 0.33.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '070338f88a83b93cdef2c6dfb529f06c15da00bbd8c6fba10f1f98689bf40c7c'
4
- data.tar.gz: 298b85fb4bef72439425838c594ebf546f65cff2070d379a9b6a756ff01155fb
3
+ metadata.gz: a8fb2f8f84d6a6ce2ec3b7cf3afae4152820f6ef62a1229f4b512bc87a913efd
4
+ data.tar.gz: 46d4c3b5a3a5e01bd1366f4679cb2c4e1db08e667d64a6b003e01f8f91cde5c3
5
5
  SHA512:
6
- metadata.gz: 21fa9971e3d7cb96ecbe373d145c79cd8e665b2ea54acf3869674d0d4745d92e1d0cee7c34fad882670bf229a8833056cfe7bd77da60f1a7cadf4a05281c5af0
7
- data.tar.gz: a26557d3e1b563f840f17f07ea6a61bb5b5820a018a2a8dcacb205cd00665304b82bce67af495177ef2c19b84734c0c8194cf7c4ae0c37d2afffe440e765d9bf
6
+ metadata.gz: 9021e2cd657badc5446c118a82f7e392d75a513c42f5f1f9664d2dd3ce1da5274b9edb8e89fca67189f0011ab447c13edd102ccc1677d2f5ee5e567accc23d54
7
+ data.tar.gz: 59b673686f5c0faf8c21e155110fa3371f5d5cc2b020bf27189c1e2e50b9b05f4a51860186887e8444c6d1da33b057d260ae7f1d696eb97717b362174abe479d
@@ -6,6 +6,11 @@ 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.33.3 - 2020-11-17
10
+
11
+ * [BUGFIX] require the `URL` model when requiring `yt`
12
+ * [BUGFIX] handle passing in a `nil` id
13
+
9
14
  ## 0.33.2 - 2020-11-11
10
15
 
11
16
  * [BUGFIX] No more pages when page token is an empty string, per YouTube change.
data/lib/yt.rb CHANGED
@@ -8,6 +8,7 @@ require 'yt/models/content_owner'
8
8
  require 'yt/models/match_policy'
9
9
  require 'yt/models/playlist'
10
10
  require 'yt/models/playlist_item'
11
+ require 'yt/models/url'
11
12
  require 'yt/models/video'
12
13
  require 'yt/models/video_group'
13
14
  require 'yt/models/comment_thread'
@@ -13,7 +13,11 @@ module Yt
13
13
  # @!attribute [r] id
14
14
  # @return [String] the ID that YouTube uses to identify each resource.
15
15
  def id
16
- @id ||= @match['id'] || fetch_channel_id
16
+ if @id.nil? && @match && @match[:kind] == :channel
17
+ @id ||= fetch_channel_id
18
+ else
19
+ @id
20
+ end
17
21
  end
18
22
 
19
23
  ### STATUS ###
@@ -47,6 +51,7 @@ module Yt
47
51
  if options[:url]
48
52
  @url = options[:url]
49
53
  @match = find_pattern_match
54
+ @id = @match['id']
50
55
  else
51
56
  @id = options[:id]
52
57
  end
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.33.2'
2
+ VERSION = '0.33.3'
3
3
  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.33.2
4
+ version: 0.33.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-12 00:00:00.000000000 Z
11
+ date: 2020-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -279,7 +279,7 @@ homepage: http://github.com/Fullscreen/yt
279
279
  licenses:
280
280
  - MIT
281
281
  metadata: {}
282
- post_install_message:
282
+ post_install_message:
283
283
  rdoc_options: []
284
284
  require_paths:
285
285
  - lib
@@ -294,9 +294,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
294
  - !ruby/object:Gem::Version
295
295
  version: '0'
296
296
  requirements: []
297
- rubyforge_project:
298
- rubygems_version: 2.7.6.2
299
- signing_key:
297
+ rubygems_version: 3.1.4
298
+ signing_key:
300
299
  specification_version: 4
301
300
  summary: Yt makes it easy to interact with Youtube V3 API by providing a modular,
302
301
  intuitive and tested Ruby-style API.