yt-core 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 28bc8c7b5dc7f93aba21e4190057758cd3bc63a9
4
- data.tar.gz: 0fb9a20cba7679958c00e73bbb96d8dd9b4ba613
3
+ metadata.gz: 41f3f21221d78ac0ff0345bc8576c6536d8b1afa
4
+ data.tar.gz: d889a7d0f70f476ad1367430e9c390eecf15e261
5
5
  SHA512:
6
- metadata.gz: 7e38e38ea200bda2994b4cb4b2a57d4d6b8dde5c1e8150c275ca8ad4a8410451d06380f47de81583ba3d7a87e7f5ed076dcf94447069ec8a0d0b6bf1717a9429
7
- data.tar.gz: f894f69ac4dca2029574d16d8b5fe3fd708cf18a864218bafe08fa7553338ebfc521584664ae3a88d4c363fcc82bf91b4fe6d78bfad054ff02637f73512ff881
6
+ metadata.gz: 23fac23d6a0712fe9867bd24f177e78925fe2c9c55fe8b66a14973c69b0f72d6d60e4fad9208b98182f1bdf4b1f69ae08136f07aa1293619f0cb70c92bd4320f
7
+ data.tar.gz: 1cfd65c11a2ccbf174a56a12a4ce5a1bbc8d201ed669fab67042412e11cfa0ba237b8c44b89989d47aafdf802f3804274b70f5a403729f1f9a9ebbbb32fd2854
@@ -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
@@ -3,6 +3,6 @@ module Yt
3
3
  module Core
4
4
  # @return [String] the SemVer-compatible gem version.
5
5
  # @see http://semver.org
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.1'
7
7
  end
8
8
  end
@@ -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
@@ -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.0
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-03 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yt-support