yt-annotations 1.2.1 → 1.2.2

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: 3d6e219509d1710624f81f0d6c7065e8239156bb
4
- data.tar.gz: bbcd3afacd35add0e39d4b8323525e9e18f15bd8
3
+ metadata.gz: 37ba3cf90c0e0f4e1a0ec24a8b9f394b45105521
4
+ data.tar.gz: 03bcc3dc7a37ca76b99756a8b9373bd4f3d2f7d4
5
5
  SHA512:
6
- metadata.gz: d61e77abba1c3d97381ac8f172e05506832cd88d43d89128abd562055045d887e75d319760101554cd7d96c259d2096366cac92cb07119cf1eff5871f72be554
7
- data.tar.gz: f92d96fafcd07feaac6b22ea11bed61ce6fe36a86adead8e99b66b65900a1b2d44f50238dc26d5d2ec0d3904cb2010b411e168e8bc0f8426835cf47e792257d6
6
+ metadata.gz: aeeca0a38215951bd3838e48ce9a8ca0b7f97aa8970c786bac8868d73d0f09bd6906de5af4dc1cad76af07578e56e96403b1044c4c34122d23032bdae24f9f42
7
+ data.tar.gz: 532e34c8ca14c89e6697020b973feefeacd4d5f06db3f71be5d4b001a0f2e89e11df5ccb5c43414b4f13db695f844962fc0c62bfc7a6ed7a542947b0b110873f
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ 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
+ ## 1.2.2 - 2016.05.16
10
+
11
+ * [BUGFIX] Do not raise errors from videos with info cards.
12
+
9
13
  ## 1.2.1 - 2016.02.05
10
14
 
11
15
  * [ENHANCEMENT] Update homepage on rubygems.org
@@ -23,6 +23,7 @@ module Yt
23
23
  annotations = xml['document']['annotations']
24
24
  annotations = Array.wrap (annotations || {})['annotation']
25
25
  annotations = merge_highlights annotations
26
+ annotations = exclude_drawers annotations
26
27
  annotations.map{|data| annotation_class(data).new data}
27
28
  end
28
29
 
@@ -42,6 +43,10 @@ module Yt
42
43
  end
43
44
  end
44
45
 
46
+ def exclude_drawers(annotations)
47
+ annotations.reject{|a| a['type'] == 'drawer'}
48
+ end
49
+
45
50
  def merge_highlights(annotations)
46
51
  highlights, others = annotations.partition{|a| a['type'] == 'highlight'}
47
52
  highlights.each do |highlight|
@@ -1,5 +1,5 @@
1
1
  module Yt
2
2
  module Annotations
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt-annotations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-05 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  requirements: []
153
153
  rubyforge_project:
154
- rubygems_version: 2.5.1
154
+ rubygems_version: 2.6.4
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Fetch annotations and cards from YouTube videos.