yt-core 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/yt/core/version.rb +1 -1
- data/lib/yt/resource.rb +3 -0
- data/lib/yt/video.rb +1 -1
- 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: 41f3f21221d78ac0ff0345bc8576c6536d8b1afa
|
|
4
|
+
data.tar.gz: d889a7d0f70f476ad1367430e9c390eecf15e261
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 23fac23d6a0712fe9867bd24f177e78925fe2c9c55fe8b66a14973c69b0f72d6d60e4fad9208b98182f1bdf4b1f69ae08136f07aa1293619f0cb70c92bd4320f
|
|
7
|
+
data.tar.gz: 1cfd65c11a2ccbf174a56a12a4ce5a1bbc8d201ed669fab67042412e11cfa0ba237b8c44b89989d47aafdf802f3804274b70f5a403729f1f9a9ebbbb32fd2854
|
data/CHANGELOG.md
CHANGED
|
@@ -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.1.1 - 2017-04-04
|
|
10
|
+
|
|
11
|
+
* [ENHANCEMENT] Add :defaults to `has_attribute`
|
|
12
|
+
* [BUGFIX] Video#tags returns `[]` and not `nil` when a video has no tags
|
|
13
|
+
|
|
9
14
|
## 0.1.0 - 2017-04-03
|
|
10
15
|
|
|
11
16
|
* [FEATURE] Extracted first classes from Yt
|
data/lib/yt/core/version.rb
CHANGED
data/lib/yt/resource.rb
CHANGED
|
@@ -52,6 +52,9 @@ module Yt
|
|
|
52
52
|
part = keys.shift
|
|
53
53
|
value = @data[part] || fetch_part(part)
|
|
54
54
|
keys.each{|key| value = value[camelize key]}
|
|
55
|
+
if value.nil? && options[:default]
|
|
56
|
+
value = options[:default]
|
|
57
|
+
end
|
|
55
58
|
value = type_cast value, options[:type]
|
|
56
59
|
block_given? ? instance_exec(value, &block) : value
|
|
57
60
|
end
|
data/lib/yt/video.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Yt
|
|
|
34
34
|
|
|
35
35
|
# @!attribute [r] tags
|
|
36
36
|
# @return [Array<String>] the list of tags associated with the video.
|
|
37
|
-
has_attribute :tags, in: :snippet
|
|
37
|
+
has_attribute :tags, in: :snippet, default: []
|
|
38
38
|
|
|
39
39
|
# @!attribute [r] category_id
|
|
40
40
|
# @return [Integer] the ID of the associated YouTube video category.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yt-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Claudio Baccigalupo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-04-
|
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: yt-support
|