yt-audit 0.3.0 → 0.3.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: f7bc9f29587e691fd0f693a570cdcbc39deca4ec
4
- data.tar.gz: 022b95848d5c6d63ad818e803623ad430cabbe59
3
+ metadata.gz: 7fd6f56500e6da3097251d03e5d8ff87e5969f08
4
+ data.tar.gz: 8b915a77dfd67bc46d640b4f8cb91e9184e77b32
5
5
  SHA512:
6
- metadata.gz: c1106b3b5308e86c1da812c2534c899ed75118d0db8157a262b317f2a5691a6cbfa3a97274e9bdff6839afdb4c0fb45ffa97adb19e98fd8da0f4664d57941760
7
- data.tar.gz: dcae062f93467af330f789d0335e166f5bb89d6600def3952d590f775cc415aeabe9742e378c668b653987c319325b8bff64315afc5541f00f3f647cec1eb0e9
6
+ metadata.gz: 6e0dcc1728867d1c685877d0b77911b4f9ab083b698968a18bcee7925dc45b71bd65c88fadfa128c4f5039fad07ee3280269c3003ee4d6dc6044b354577f9f53
7
+ data.tar.gz: e1c2cc71d61574f1b1968d05258e07136792ba285828eee92ac7134fcf2f0d17653d31f3024fa8d4854a591d2d4509cbb15d6ad1b2361e60f0a19a1d9faa2d63
@@ -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
+ ## 0.3.1 - 2016.04.04
10
+
11
+ * [BUGFIX] Fix condition of Youtube Association for invalid channel urls on the description.
12
+
9
13
  ## 0.3.0 - 2016.03.01
10
14
 
11
15
  **How to upgrade**
@@ -3,6 +3,10 @@
3
3
  require "bundler/setup"
4
4
  require "yt/audit"
5
5
 
6
+ Yt.configure do |config|
7
+ config.log_level = :devel
8
+ end
9
+
6
10
  # You can add fixtures and/or initialization code here to make experimenting
7
11
  # with your gem easier. You can also use a different console, if you like.
8
12
 
@@ -1,5 +1,5 @@
1
1
  module Yt
2
2
  class Audit
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -18,7 +18,12 @@ module Yt
18
18
  def valid?(video)
19
19
  video.description.split(' ')
20
20
  .select {|word| Yt::URL.new(word).kind == :channel }
21
- .any? {|link| Yt::Channel.new(url: link).id == video.channel_id }
21
+ .any? {|link| channel_id(link) == video.channel_id }
22
+ end
23
+
24
+ def channel_id(url)
25
+ Yt::Channel.new(url: url).id
26
+ rescue Yt::Errors::NoItems
22
27
  end
23
28
  end
24
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt-audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kang-Kyu Lee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yt