yt-audit 0.4.0 → 0.5.0

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: 1e7599b4da04a7dac5ac73d3873831f95f21ce60
4
- data.tar.gz: 1a361e1a3c6a144566edf532177d73d424c5195c
3
+ metadata.gz: 0216e2a6df4ed9bfa72fb129312ae525bf9667c0
4
+ data.tar.gz: dcf7d49f8622f0a528e8b1c406d8f64d1d26d91f
5
5
  SHA512:
6
- metadata.gz: 4e29730efc95d40b1826888fcd5d4c945cbc52bd10ac8cd93b5dae640a7c6671e249d890293146c6de14fd6ae62b95a5ef2e712764219508220261444eaa40de
7
- data.tar.gz: 4599842e7338ade3fde68359af8b49932896de7c04c646b53d0ad3dee90ab7b764c2aa104144a59949941472039a7f0dd4c0313e178f25315370179abc05a7f6
6
+ metadata.gz: e86ff64c3acd948024dd32e0f9f83324f9eb405505e9c0302a30e59a84fe0cc4f8f1bcc9304e460466b84d2ecd490358f6f9a3e33d341f9a850ff99f21684e3c
7
+ data.tar.gz: 37bfcefe676f2d0040396894ce803ea76629eb2f8bdfe1c719d744dd87f084a99c3fd8a07d6e86b42560cfcd56537cc5c91205216dd4d16b990d9c4ee7679b8a
data/.travis.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
+ cache: bundler
3
+ notifications:
4
+ email: false
2
5
  rvm:
3
- - 2.3.0
4
- before_install: gem install bundler -v 1.11.2
5
- env:
6
- global:
7
- - secure: JL/J6Dpj/c/ijmTV8q0VdkO1n2njongTw5KnSEcSMirJJK+s77jfFBrbk7Sgnysgf6FW2FbQLhna12jD+LMWw8ngUn8Jl5HBTL/uV/uuZD0Oam3K3zAFd88WoLZ1MUC9d8n8eVpmA2fgV+JMNKsOZDb8Kuwdas46FGlfsLC2pfenm6ILRZClAvxrq6CD8GcaZHDavxA1D2SdCvbVuZf3EA5cNZUeMt2V4jnnuw+3RrBff9Di87rfPvonZtWauBIpUzCtFvBbwEbUUnENRmbHRv/iEq88zSqk6YhMrCbcF1rLQgiCevVFaeCC/mUhV0U948eYK4R5hXBX9uhObT64uV0eFitOPewqUSwm4adEm55LFRUR0Xh+JFOgSnWuPCuAMB3jPln87WhOaEAd6Jw8cFAYWxdWjvlwqz3cf2VNLTzja49OEGyriRj1xYz67NtnVoMhp+PILt5j9ZDenklHGmHw/hRL2CMbzB36iqP1AXngcsD+62fKsdEB6ku/UbdZ4xGOD36o2oy6DuDwfbwiNC7v0TmXuHUFf/Ne6oLYTYyxpjhloX4S6K3DYE1YCj8uIjqGchiA8sV5ko3KxiKbTZDdEnHEnECOoVZ9Ucpyqp8FBwFJXy1sVm62fK9ZJp5tYLhD3s0q2AfmiPsK+RUEiyreV0c04Ric0NDQFB+dLRo=
6
+ - 2.2.2
7
+ script:
8
+ - bundle exec rake
data/CHANGELOG.md CHANGED
@@ -6,7 +6,15 @@ 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.4.0 - 2017.02.27
9
+ ## 0.5.0 - 2017-04-03
10
+
11
+ **How to upgrade**
12
+
13
+ If your code depends on the `yt` gem, ensure you switch to the `yt-core` gem.
14
+
15
+ * [ENHANCEMENT] Change dependency from 'yt' to the smaller 'yt-core'
16
+
17
+ ## 0.4.0 - 2017-02-27
10
18
 
11
19
  **How to upgrade**
12
20
 
@@ -14,15 +22,15 @@ If your code depends on the `yt` gem, ensure you use version 0.29.0 or higher.
14
22
 
15
23
  * [ENHANCEMENT] Use new `yt-url` gem, extracted from `yt`
16
24
 
17
- ## 0.3.2 - 2017.02.26
25
+ ## 0.3.2 - 2017-02-26
18
26
 
19
27
  * [ENHANCEMENT] Don't limit Yt dependency to 0.25.x
20
28
 
21
- ## 0.3.1 - 2016.04.04
29
+ ## 0.3.1 - 2016-04-04
22
30
 
23
31
  * [BUGFIX] Fix condition of Youtube Association for invalid channel urls on the description.
24
32
 
25
- ## 0.3.0 - 2016.03.01
33
+ ## 0.3.0 - 2016-03-01
26
34
 
27
35
  **How to upgrade**
28
36
 
@@ -32,15 +40,15 @@ When your code defines an `Yt::Audit` object, it should be initialized with a `Y
32
40
  * [ENHANCEMENT] Send in brand name as an optional argument.
33
41
  * [BUGFIX] Fix videos input with longer description, for Youtube Association.
34
42
 
35
- ## 0.2.2 - 2016.02.24
43
+ ## 0.2.2 - 2016-02-24
36
44
 
37
45
  * [BUGFIX] Fix condition of Info Card
38
46
 
39
- ## 0.2.1 - 2016.02.19
47
+ ## 0.2.1 - 2016-02-19
40
48
 
41
49
  * [FEATURE] Add `PlaylistAudit::Descripton` for `run` to also count playlists with a description.
42
50
 
43
- ## 0.2.0 - 2016.02.18
51
+ ## 0.2.0 - 2016-02-18
44
52
 
45
53
  **How to upgrade**
46
54
 
@@ -53,20 +61,20 @@ If your code calls any of `has_end_cards?`, `has_link_to_own_channel?`, `has_sub
53
61
  * [REMOVAL] Remove `has_brand_anchoring?`
54
62
  * [REMOVAL] Remove `has_info_cards?`
55
63
 
56
- ## 0.1.5 - 2016.02.17
64
+ ## 0.1.5 - 2016-02-17
57
65
 
58
66
  * [BUGFIX] Fix `has_end_cards?` for cases when Float `ends_at` is
59
67
  greater than Fixnum `duration`
60
68
 
61
- ## 0.1.4 - 2016.02.17
69
+ ## 0.1.4 - 2016-02-17
62
70
 
63
71
  * [FEATURE] Add `has_end_cards?`
64
72
 
65
- ## 0.1.3 - 2016.02.16
73
+ ## 0.1.3 - 2016-02-16
66
74
 
67
75
  * [FEATURE] Add `has_link_to_own_channel?`
68
76
 
69
- ## 0.1.2 - 2016.02.11
77
+ ## 0.1.2 - 2016-02-11
70
78
 
71
79
  * [FEATURE] Add `has_subscribe_annotations?`
72
80
 
data/README.md CHANGED
@@ -16,7 +16,7 @@ The **source code** is available on [GitHub](https://github.com/Fullscreen/yt-au
16
16
 
17
17
  $ bin/setup
18
18
 
19
- $ YT_API_KEY="123456789012345678901234567890123456789" rake
19
+ $ YT_SERVER_API_KEY="123456789012345678901234567890123456789" rake
20
20
  $ open coverage/index.html
21
21
 
22
22
  $ yardoc
@@ -1,5 +1,5 @@
1
1
  module Yt
2
2
  class Audit
3
- VERSION = '0.4.0'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
data/lib/yt/audit.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'yt'
1
+ require 'yt/core'
2
2
  require 'yt/annotations'
3
3
  require 'yt/url'
4
4
  require 'yt/video_audit/info_card'
@@ -12,7 +12,7 @@ module Yt
12
12
  class Audit
13
13
  def initialize(channel:, videos: nil, playlists: nil, brand: nil)
14
14
  @channel = channel
15
- @videos = videos || channel.videos.includes(:snippet).first(10)
15
+ @videos = videos || channel.videos.select(:snippet).first(10)
16
16
  @playlists = playlists || channel.playlists.first(10)
17
17
  @brand = brand || channel.title
18
18
  end
@@ -20,8 +20,8 @@ module Yt
20
20
  def valid?(video)
21
21
  Yt::Annotations.for(video.id).any? do |annotation|
22
22
  !annotation.is_a?(Yt::Annotations::Card) && annotation.link &&
23
- (annotation.ends_at.floor..annotation.ends_at.ceil).include?(video.duration) &&
24
- video.duration - annotation.starts_at > 5
23
+ (annotation.ends_at.floor..annotation.ends_at.ceil).include?(video.seconds) &&
24
+ video.seconds - annotation.starts_at > 5
25
25
  end
26
26
  end
27
27
  end
@@ -26,7 +26,7 @@ module Yt
26
26
 
27
27
  def channel_id(url)
28
28
  url.id
29
- rescue Yt::Errors::NoItems
29
+ rescue Yt::NoItemsError
30
30
  end
31
31
  end
32
32
  end
data/yt-audit.gemspec CHANGED
@@ -4,29 +4,35 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'yt/audit/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "yt-audit"
7
+ spec.name = 'yt-audit'
8
8
  spec.version = Yt::Audit::VERSION
9
- spec.authors = ["Kang-Kyu Lee"]
10
- spec.email = ["kang-kyu.lee@fullscreen.com"]
9
+ spec.authors = ['Claudio Baccigalupo', 'Kang-Kyu Lee']
10
+ spec.email = ['claudio@fullscreen.net', 'kang-kyu.lee@fullscreen.net']
11
11
 
12
12
  spec.summary = %q{Audit a YouTube video.}
13
13
  spec.description = %q{A Ruby library you can audit titles or annotations
14
14
  of a Youtube video}
15
- spec.homepage = "https://github.com/fullscreen/yt-audit"
16
- spec.license = "MIT"
15
+ spec.homepage = 'https://github.com/fullscreen/yt-audit'
16
+ spec.license = 'MIT'
17
17
 
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = "exe"
18
+ spec.required_ruby_version = '>= 2.2.2'
19
+
20
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
+ f.match(%r{^(test|spec|features)/})
22
+ end
23
+
24
+ spec.bindir = 'exe'
20
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
26
+ spec.require_paths = ['lib']
22
27
 
23
- spec.add_dependency 'yt', '>= 0.29.1'
24
- spec.add_dependency 'yt-url', '>= 1.0.0.beta1'
25
- spec.add_dependency "yt-annotations", '~> 1.2'
28
+ spec.add_dependency 'yt-core', '>= 0.1.0'
29
+ spec.add_dependency 'yt-url', '>= 1.0.0.beta2'
30
+ spec.add_dependency 'yt-annotations', '~> 1.2'
26
31
 
27
- spec.add_development_dependency "bundler", "~> 1.11"
28
- spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "minitest", "~> 5.0"
30
- spec.add_development_dependency 'coveralls', '~> 0.8.10'
31
- spec.add_development_dependency 'yard', '~> 0.8.7'
32
+ spec.add_development_dependency 'bundler', '~> 1.7'
33
+ spec.add_development_dependency 'minitest', "~> 5.0"
34
+ spec.add_development_dependency 'rake', '~> 12.0'
35
+ spec.add_development_dependency 'coveralls', '~> 0.8.20'
36
+ spec.add_development_dependency 'pry-nav', '~> 0.2.4'
37
+ spec.add_development_dependency 'yard', '~> 0.9.8'
32
38
  end
metadata CHANGED
@@ -1,43 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt-audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Claudio Baccigalupo
7
8
  - Kang-Kyu Lee
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2017-02-28 00:00:00.000000000 Z
12
+ date: 2017-04-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: yt
15
+ name: yt-core
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 0.29.1
20
+ version: 0.1.0
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 0.29.1
27
+ version: 0.1.0
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: yt-url
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
32
  - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: 1.0.0.beta1
34
+ version: 1.0.0.beta2
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - ">="
39
40
  - !ruby/object:Gem::Version
40
- version: 1.0.0.beta1
41
+ version: 1.0.0.beta2
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: yt-annotations
43
44
  requirement: !ruby/object:Gem::Requirement
@@ -58,75 +59,90 @@ dependencies:
58
59
  requirements:
59
60
  - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: '1.11'
62
+ version: '1.7'
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: '1.11'
69
+ version: '1.7'
69
70
  - !ruby/object:Gem::Dependency
70
- name: rake
71
+ name: minitest
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - "~>"
74
75
  - !ruby/object:Gem::Version
75
- version: '10.0'
76
+ version: '5.0'
76
77
  type: :development
77
78
  prerelease: false
78
79
  version_requirements: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - "~>"
81
82
  - !ruby/object:Gem::Version
82
- version: '10.0'
83
+ version: '5.0'
83
84
  - !ruby/object:Gem::Dependency
84
- name: minitest
85
+ name: rake
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - "~>"
88
89
  - !ruby/object:Gem::Version
89
- version: '5.0'
90
+ version: '12.0'
90
91
  type: :development
91
92
  prerelease: false
92
93
  version_requirements: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - "~>"
95
96
  - !ruby/object:Gem::Version
96
- version: '5.0'
97
+ version: '12.0'
97
98
  - !ruby/object:Gem::Dependency
98
99
  name: coveralls
99
100
  requirement: !ruby/object:Gem::Requirement
100
101
  requirements:
101
102
  - - "~>"
102
103
  - !ruby/object:Gem::Version
103
- version: 0.8.10
104
+ version: 0.8.20
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: 0.8.20
112
+ - !ruby/object:Gem::Dependency
113
+ name: pry-nav
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: 0.2.4
104
119
  type: :development
105
120
  prerelease: false
106
121
  version_requirements: !ruby/object:Gem::Requirement
107
122
  requirements:
108
123
  - - "~>"
109
124
  - !ruby/object:Gem::Version
110
- version: 0.8.10
125
+ version: 0.2.4
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: yard
113
128
  requirement: !ruby/object:Gem::Requirement
114
129
  requirements:
115
130
  - - "~>"
116
131
  - !ruby/object:Gem::Version
117
- version: 0.8.7
132
+ version: 0.9.8
118
133
  type: :development
119
134
  prerelease: false
120
135
  version_requirements: !ruby/object:Gem::Requirement
121
136
  requirements:
122
137
  - - "~>"
123
138
  - !ruby/object:Gem::Version
124
- version: 0.8.7
139
+ version: 0.9.8
125
140
  description: |-
126
141
  A Ruby library you can audit titles or annotations
127
142
  of a Youtube video
128
143
  email:
129
- - kang-kyu.lee@fullscreen.com
144
+ - claudio@fullscreen.net
145
+ - kang-kyu.lee@fullscreen.net
130
146
  executables: []
131
147
  extensions: []
132
148
  extra_rdoc_files: []
@@ -163,7 +179,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
179
  requirements:
164
180
  - - ">="
165
181
  - !ruby/object:Gem::Version
166
- version: '0'
182
+ version: 2.2.2
167
183
  required_rubygems_version: !ruby/object:Gem::Requirement
168
184
  requirements:
169
185
  - - ">="
@@ -171,9 +187,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
187
  version: '0'
172
188
  requirements: []
173
189
  rubyforge_project:
174
- rubygems_version: 2.6.10
190
+ rubygems_version: 2.6.11
175
191
  signing_key:
176
192
  specification_version: 4
177
193
  summary: Audit a YouTube video.
178
194
  test_files: []
179
- has_rdoc: