video_info 3.0.2 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,5 @@
1
- require 'oga'
2
- require 'open-uri'
3
- require 'net_http_timeout_errors'
1
+ require "oga"
2
+ require "net_http_timeout_errors"
4
3
 
5
4
  class VideoInfo
6
5
  module Providers
@@ -14,23 +13,27 @@ class VideoInfo
14
13
  end
15
14
 
16
15
  def date
17
- date = itemprop_node_value('datePublished')
16
+ date = itemprop_node_value("datePublished")
18
17
 
19
18
  Time.parse(date) if date
20
19
  end
21
20
 
22
21
  def author
23
- meta_node_value(channel_meta_nodes, 'og:title')
22
+ meta_node_value(channel_meta_nodes, "og:title")
24
23
  end
25
24
 
26
25
  def author_thumbnail
27
- image_hq_url = meta_node_value(channel_meta_nodes, 'og:image')
26
+ image_hq_url = meta_node_value(channel_meta_nodes, "og:image")
28
27
 
29
28
  resize_thumb(image_hq_url, THUMB_DEFAULT_SIZE)
30
29
  end
31
30
 
32
31
  def channel_id
33
- itemprop_node_value('channelId')
32
+ # NOTE the previous implementation, based on itemprop_node_value("channelId"),
33
+ # does not work well, probably due to some YouTube change
34
+ page_content = data.to_s
35
+ matches = page_content.match(/"channelId":"([a-zA-Z0-9_-]+)"/)
36
+ matches[1] if matches
34
37
  end
35
38
 
36
39
  def author_url
@@ -38,11 +41,11 @@ class VideoInfo
38
41
  end
39
42
 
40
43
  def description
41
- meta_node_value(video_meta_nodes, 'og:description')
44
+ meta_node_value(video_meta_nodes, "og:description")
42
45
  end
43
46
 
44
47
  def duration
45
- duration = itemprop_node_value('duration')
48
+ duration = itemprop_node_value("duration")
46
49
 
47
50
  if duration
48
51
  ISO8601::Duration.new(duration).to_seconds.to_i
@@ -54,62 +57,68 @@ class VideoInfo
54
57
  def keywords
55
58
  return unless available?
56
59
 
57
- value = meta_node_value(video_meta_nodes, 'keywords')
60
+ value = meta_node_value(video_meta_nodes, "keywords")
58
61
 
59
- value.split(', ') if value
62
+ value&.split(", ")
60
63
  end
61
64
 
62
65
  def title
63
- return if meta_node_value('title').empty?
64
- meta_node_value('title')
66
+ return if meta_node_value(video_meta_nodes, "title").empty?
67
+ meta_node_value(video_meta_nodes, "title")
65
68
  end
66
69
 
67
70
  def view_count
68
- itemprop_node_value('interactionCount').to_i
71
+ itemprop_node_value("interactionCount").to_i
72
+ end
73
+
74
+ def stats
75
+ {
76
+ "viewCount" => view_count
77
+ }
69
78
  end
70
79
 
71
80
  private
72
81
 
73
82
  def video_meta_nodes
74
- @video_meta_nodes ||= data.css('meta')
83
+ @video_meta_nodes ||= data.css("meta")
75
84
  end
76
85
 
77
86
  def channel_meta_nodes
78
- @channel_meta_nodes ||= channel_data.css('meta')
87
+ @channel_meta_nodes ||= channel_data.css("meta")
79
88
  end
80
89
 
81
90
  def channel_data
82
- @channel_data ||= Oga.parse_html(URI.open(author_url).read)
91
+ @channel_data ||= Oga.parse_html(URI.parse(author_url).read)
83
92
  end
84
93
 
85
- def meta_node_value(meta_nodes=video_meta_nodes, name)
94
+ def meta_node_value(meta_nodes, name)
86
95
  node = meta_nodes.detect do |n|
87
- n.attr('name')&.value == name || n.attr('property')&.value == name
96
+ n.attr("name")&.value == name || n.attr("property")&.value == name
88
97
  end
89
98
 
90
99
  return unless node
91
- node && node.attr('content') && node.attr('content').value
100
+ node&.attr("content") && node.attr("content").value
92
101
  end
93
102
 
94
103
  def itemprop_node_value(name)
95
104
  node = video_meta_nodes.detect do |m|
96
- itemprop_attr = m.attr('itemprop')
105
+ itemprop_attr = m.attr("itemprop")
97
106
 
98
107
  itemprop_attr.value == name if itemprop_attr
99
108
  end
100
109
 
101
110
  return unless node
102
- node.attr('content').value
111
+ node.attr("content").value
103
112
  end
104
113
 
105
114
  def _set_data_from_api_impl(api_url)
106
115
  # handle fullscreen video URLs
107
- if url.include?('.com/v/')
108
- video_id = url.split('/v/')[1].split('?')[0]
109
- new_url = 'https://www.youtube.com/watch?v=' + video_id
110
- Oga.parse_html(URI.open(new_url).read)
116
+ if url.include?(".com/v/")
117
+ video_id = url.split("/v/")[1].split("?")[0]
118
+ new_url = "https://www.youtube.com/watch?v=" + video_id
119
+ Oga.parse_html(URI.parse(new_url).read)
111
120
  else
112
- Oga.parse_html(URI.open(api_url).read)
121
+ Oga.parse_html(URI.parse(api_url).read)
113
122
  end
114
123
  end
115
124
 
@@ -117,10 +126,10 @@ class VideoInfo
117
126
  uri = URI.parse(@url)
118
127
 
119
128
  unless uri.scheme
120
- uri.path = uri.path.prepend('//')
129
+ uri.path = uri.path.prepend("//")
121
130
  end
122
131
 
123
- uri.scheme = 'https'
132
+ uri.scheme = "https"
124
133
 
125
134
  uri.to_s
126
135
  end
@@ -1,5 +1,5 @@
1
- require_relative 'youtubeplaylist_api'
2
- require_relative 'youtubeplaylist_scraper'
1
+ require_relative "youtubeplaylist_api"
2
+ require_relative "youtubeplaylist_scraper"
3
3
 
4
4
  class VideoInfo
5
5
  module Providers
@@ -18,8 +18,7 @@ class VideoInfo
18
18
  end
19
19
 
20
20
  def self.usable?(url)
21
- url =~ %r{((youtube\.com)\/playlist)|
22
- ((youtube\.com)\/embed\/videoseries)}x
21
+ url.match?(/((youtube\.com)\/playlist)|((youtube\.com)\/embed\/videoseries)/)
23
22
  end
24
23
 
25
24
  def date
@@ -49,9 +48,9 @@ class VideoInfo
49
48
  private
50
49
 
51
50
  def _url_regex
52
- %r{youtube.com\/playlist\?p=(\S*)|
53
- youtube.com\/playlist\?list=(\S*)|
54
- youtube.com\/embed\/videoseries\?list=([a-zA-Z0-9-]*)}x
51
+ %r{youtube.com/playlist\?p=(\S*)|
52
+ youtube.com/playlist\?list=(\S*)|
53
+ youtube.com/embed/videoseries\?list=([a-zA-Z0-9-]*)}x
55
54
  end
56
55
  end
57
56
  end
@@ -3,13 +3,13 @@ class VideoInfo
3
3
  ITEMS_MAX_RESULTS = 50
4
4
 
5
5
  def available?
6
- !data['items'].empty?
6
+ !data["items"].empty?
7
7
  rescue VideoInfo::HttpError
8
8
  false
9
9
  end
10
10
 
11
11
  def description
12
- data['items'][0]['snippet']['description']
12
+ data["items"][0]["snippet"]["description"]
13
13
  end
14
14
 
15
15
  def date
@@ -35,33 +35,33 @@ class VideoInfo
35
35
  end
36
36
 
37
37
  def thumbnail_small
38
- _video_snippet['thumbnails']['default']['url']
38
+ _video_snippet["thumbnails"]["default"]["url"]
39
39
  end
40
40
 
41
41
  def thumbnail_medium
42
- _video_snippet['thumbnails']['medium']['url']
42
+ _video_snippet["thumbnails"]["medium"]["url"]
43
43
  end
44
44
 
45
45
  def thumbnail_large
46
- _video_snippet['thumbnails']['high']['url']
46
+ _video_snippet["thumbnails"]["high"]["url"]
47
47
  end
48
48
 
49
49
  def thumbnail_large_2x
50
- _video_snippet['thumbnails']['standard']['url']
50
+ _video_snippet["thumbnails"]["standard"]["url"]
51
51
  end
52
52
 
53
53
  def thumbnail_maxres
54
- _video_snippet['thumbnails']['maxres']['url']
54
+ _video_snippet["thumbnails"]["maxres"]["url"]
55
55
  end
56
56
 
57
57
  private
58
58
 
59
59
  def _playlist_entry
60
- data['items']
60
+ data["items"]
61
61
  end
62
62
 
63
63
  def _playlist_items
64
- data['items']
64
+ data["items"]
65
65
  end
66
66
 
67
67
  def _api_path
@@ -69,7 +69,7 @@ class VideoInfo
69
69
  end
70
70
 
71
71
  def _playlist_items_api_path
72
- '/youtube/v3/playlistItems?part=snippet&' \
72
+ "/youtube/v3/playlistItems?part=snippet&" \
73
73
  "playlistId=#{playlist_id}&fields=items&maxResults=#{ITEMS_MAX_RESULTS}&key=#{api_key}"
74
74
  end
75
75
 
@@ -82,8 +82,8 @@ class VideoInfo
82
82
  end
83
83
 
84
84
  def _playlist_video_ids
85
- _playlist_items_data['items'].map do |item|
86
- item['snippet']['resourceId']['videoId']
85
+ _playlist_items_data["items"].map do |item|
86
+ item["snippet"]["resourceId"]["videoId"]
87
87
  end
88
88
  end
89
89
  end
@@ -1,5 +1,3 @@
1
- require 'oga'
2
-
3
1
  class VideoInfo
4
2
  module Providers
5
3
  module YoutubePlaylistScraper
@@ -16,22 +14,22 @@ class VideoInfo
16
14
  end
17
15
 
18
16
  def author
19
- data.css('.channel-header-profile-image').attr('title')[0].value
17
+ data.css(".channel-header-profile-image").attr("title")[0].value
20
18
  end
21
19
 
22
20
  def author_thumbnail
23
- data.css('.channel-header-profile-image').attr('src')[0].value
21
+ data.css(".channel-header-profile-image").attr("src")[0].value
24
22
  end
25
23
 
26
24
  def author_url
27
- element = data.css('.channel-header-profile-image-container')
28
- 'https://www.youtube.com' + element.attr('href')[0].value
25
+ element = data.css(".channel-header-profile-image-container")
26
+ "https://www.youtube.com" + element.attr("href")[0].value
29
27
  end
30
28
 
31
29
  def videos
32
30
  raise(NotImplementedError,
33
- 'To access videos, you must provide an API key ' \
34
- 'to VideoInfo.provider_api_keys')
31
+ "To access videos, you must provide an API key " \
32
+ "to VideoInfo.provider_api_keys")
35
33
  end
36
34
 
37
35
  def view_count
@@ -39,21 +37,21 @@ class VideoInfo
39
37
  end
40
38
 
41
39
  def thumbnail_small
42
- thumbnail_medium.sub('mqdefault.jpg', 'default.jpg')
40
+ thumbnail_medium.sub("mqdefault.jpg", "default.jpg")
43
41
  end
44
42
 
45
43
  def thumbnail_medium
46
- 'https:' + data.css('div.pl-header-thumb img').attr('src')[0].value
44
+ "https:" + data.css("div.pl-header-thumb img").attr("src")[0].value
47
45
  end
48
46
 
49
47
  def thumbnail_large
50
- thumbnail_medium.sub('mqdefault.jpg', 'hqdefault.jpg')
48
+ thumbnail_medium.sub("mqdefault.jpg", "hqdefault.jpg")
51
49
  end
52
50
 
53
51
  private
54
52
 
55
53
  def available?
56
- !data.css('div#page').attr('class')[0].value.include?('oops-content')
54
+ !data.css("div#page").attr("class")[0].value.include?("oops-content")
57
55
  end
58
56
  end
59
57
  end
@@ -1,3 +1,3 @@
1
1
  class VideoInfo
2
- VERSION = '3.0.2'.freeze
2
+ VERSION = "4.2.0".freeze
3
3
  end
data/lib/video_info.rb CHANGED
@@ -1,12 +1,13 @@
1
- require 'video_info/version'
2
- require 'video_info/provider'
3
- require 'forwardable'
4
- require 'net/http'
5
- require 'logger'
1
+ require "video_info/version"
2
+ require "video_info/provider"
3
+ require "forwardable"
4
+ require "logger"
6
5
 
7
6
  class VideoInfo
8
7
  class Error < StandardError; end
8
+
9
9
  class UrlError < Error; end
10
+
10
11
  class HttpError < Error; end
11
12
 
12
13
  class << self
@@ -22,7 +23,7 @@ class VideoInfo
22
23
 
23
24
  def provider_api_keys=(api_keys)
24
25
  api_keys.keys.each do |key|
25
- raise ArgumentError, 'Key must be a symbol!' unless key.is_a?(Symbol)
26
+ raise ArgumentError, "Key must be a symbol!" unless key.is_a?(Symbol)
26
27
  end
27
28
  @provider_api_keys = api_keys
28
29
  end
@@ -37,26 +38,19 @@ class VideoInfo
37
38
  extend Forwardable
38
39
 
39
40
  PROVIDERS = %w[
40
- Dailymotion Wistia
41
- Vimeo Youtube YoutubePlaylist
41
+ Dailymotion
42
+ Wistia
43
+ Vimeo
44
+ Youtube
45
+ YoutubePlaylist
42
46
  ].freeze
43
47
  PROVIDERS.each { |p| require "video_info/providers/#{p.downcase}" }
44
48
 
45
- def_delegators :@provider, :provider, :video_id, :video_owner, :url, :data
46
- def_delegators :@provider, :title, :description, :keywords, :view_count
47
- def_delegators :@provider, :date, :duration, :width, :height
48
- def_delegators :@provider, :thumbnail
49
49
  def_delegators :@provider,
50
- :thumbnail_small,
51
- :thumbnail_medium,
52
- :thumbnail_large,
53
- :thumbnail_large_2x,
54
- :thumbnail_maxres
55
- def_delegators :@provider, :embed_code, :embed_url
56
- def_delegators :@provider, :available?
57
- def_delegators :@provider, :playlist_id, :videos
58
- def_delegators :@provider, :author, :author_thumbnail, :author_url
59
- def_delegators :@provider, :data=
50
+ :available?, :provider, :video_id, :video_owner, :url, :data, :data=,
51
+ :title, :description, :keywords, :view_count, :date, :duration, :width, :height,
52
+ :thumbnail, :thumbnail_small, :thumbnail_medium, :thumbnail_large, :thumbnail_large_2x, :thumbnail_maxres,
53
+ :embed_code, :embed_url, :author, :author_thumbnail, :author_url, :playlist_id, :videos, :stats
60
54
 
61
55
  def initialize(url, options = {})
62
56
  @provider = _select_provider(url, options)
@@ -81,10 +75,20 @@ class VideoInfo
81
75
  disable_providers.map(&:downcase).include?(provider.downcase)
82
76
  end
83
77
 
78
+ def self.enabled_providers
79
+ PROVIDERS
80
+ .reject { |p| disabled_provider?(p) }
81
+ .map { |p| Providers.const_get(p) }
82
+ end
83
+
84
+ def self.valid_url?(url)
85
+ enabled_providers.any? { |p| p.usable?(url) }
86
+ end
87
+
84
88
  private
85
89
 
86
90
  def _select_provider(url, options)
87
- if provider_const = _providers_const.detect { |p| p.usable?(url) }
91
+ if (provider_const = _providers_const.detect { |p| p.usable?(url) })
88
92
  const_provider = provider_const.new(url, options)
89
93
 
90
94
  if defined?(const_provider.provider) && const_provider.provider
data/video_info.gemspec CHANGED
@@ -1,33 +1,31 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'video_info/version'
1
+ require "./lib/video_info/version"
5
2
 
6
3
  Gem::Specification.new do |s|
7
- s.name = 'video_info'
8
- s.version = VideoInfo::VERSION
9
- s.license = 'MIT'
4
+ s.name = "video_info"
5
+ s.version = VideoInfo::VERSION
6
+ s.license = "MIT"
10
7
 
11
- s.author = 'Thibaud Guillaume-Gentil'
12
- s.email = 'thibaud@thibaud.gg'
13
- s.homepage = 'https://rubygems.org/gems/video_info'
14
- s.summary = 'Dailymotion, Vimeo and YouTube info parser.'
15
- s.description = 'Get video info from Dailymotion, Vimeo and YouTube url.'
8
+ s.author = "Thibaud Guillaume-Gentil"
9
+ s.email = "thibaud@thibaud.gg"
10
+ s.homepage = "https://rubygems.org/gems/video_info"
11
+ s.summary = "Dailymotion, Vimeo and YouTube info parser."
12
+ s.description = "Get video info from Dailymotion, Vimeo and YouTube url."
16
13
 
17
- s.files = `git ls-files`.split($/).reject { |x| x.match?(%r{^spec/}) }
18
- s.require_path = 'lib'
14
+ s.files = `git ls-files`.split($/).reject { |x| x.match?(%r{^spec/}) }
15
+ s.require_path = "lib"
19
16
 
20
- s.required_ruby_version = '>= 2.5.0'
17
+ s.required_ruby_version = ">= 2.7.0"
21
18
 
22
- s.add_dependency 'iso8601', '~> 0.9.1'
23
- s.add_dependency 'oga', '~> 3.0'
24
- s.add_dependency 'net_http_timeout_errors', '~> 0.3.0'
19
+ s.add_dependency "iso8601", "~> 0.13.0"
20
+ s.add_dependency "oga", "~> 3.4"
21
+ s.add_dependency "net_http_timeout_errors", "~> 1.0.0"
25
22
 
26
- s.add_development_dependency 'bundler', '>= 1.3.5'
27
- s.add_development_dependency 'rake', '>= 12.3.3'
28
- s.add_development_dependency 'rspec', '~> 3.4'
29
- s.add_development_dependency 'rspec-its', '~> 1.2'
30
- s.add_development_dependency 'rubocop', '~> 0.37'
31
- s.add_development_dependency 'vcr', '~> 3.0.3'
32
- s.add_development_dependency 'webmock', '~> 3.7'
23
+ s.add_development_dependency "bundler", ">= 1.3.5"
24
+ s.add_development_dependency "rake", ">= 12.3.3"
25
+ s.add_development_dependency "rspec", "~> 3.4"
26
+ s.add_development_dependency "rspec-its", "~> 1.2"
27
+ s.add_development_dependency "simplecov", "~> 0.22"
28
+ s.add_development_dependency "standard", "~> 1.23"
29
+ s.add_development_dependency "vcr", "~> 6.1"
30
+ s.add_development_dependency "webmock", "~> 3.7"
33
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-15 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso8601
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.1
19
+ version: 0.13.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.1
26
+ version: 0.13.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: oga
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '3.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net_http_timeout_errors
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.0
47
+ version: 1.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.0
54
+ version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -109,33 +109,47 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.2'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rubocop
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.22'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.22'
125
+ - !ruby/object:Gem::Dependency
126
+ name: standard
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '0.37'
131
+ version: '1.23'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '0.37'
138
+ version: '1.23'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: vcr
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: 3.0.3
145
+ version: '6.1'
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: 3.0.3
152
+ version: '6.1'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: webmock
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -156,13 +170,11 @@ executables: []
156
170
  extensions: []
157
171
  extra_rdoc_files: []
158
172
  files:
159
- - ".github/workflows/unit_test.yml"
173
+ - ".github/workflows/ci.yml"
160
174
  - ".gitignore"
161
- - ".hound.yml"
162
- - ".rubocop.yml"
175
+ - ".rspec"
163
176
  - CONTRIBUTING.md
164
177
  - Gemfile
165
- - Guardfile
166
178
  - LICENSE.txt
167
179
  - README.md
168
180
  - Rakefile
@@ -180,7 +192,6 @@ files:
180
192
  - lib/video_info/providers/youtubeplaylist_api.rb
181
193
  - lib/video_info/providers/youtubeplaylist_scraper.rb
182
194
  - lib/video_info/version.rb
183
- - tmp/rspec_guard_result
184
195
  - video_info.gemspec
185
196
  homepage: https://rubygems.org/gems/video_info
186
197
  licenses:
@@ -194,14 +205,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
205
  requirements:
195
206
  - - ">="
196
207
  - !ruby/object:Gem::Version
197
- version: 2.5.0
208
+ version: 2.7.0
198
209
  required_rubygems_version: !ruby/object:Gem::Requirement
199
210
  requirements:
200
211
  - - ">="
201
212
  - !ruby/object:Gem::Version
202
213
  version: '0'
203
214
  requirements: []
204
- rubygems_version: 3.2.22
215
+ rubygems_version: 3.4.10
205
216
  signing_key:
206
217
  specification_version: 4
207
218
  summary: Dailymotion, Vimeo and YouTube info parser.
@@ -1,42 +0,0 @@
1
- name: Ruby Unit Tests
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- pull_request:
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- ruby: [ '2.5', '2.6', '2.7' ]
15
-
16
- name: Ruby ${{ matrix.ruby }}
17
- steps:
18
- - uses: actions/checkout@v2
19
- - uses: actions/setup-ruby@v1
20
- with:
21
- ruby-version: ${{ matrix.ruby }}
22
- - name: Cache gems
23
- uses: actions/cache@v2
24
- env:
25
- cache-name: cache-gems
26
- with:
27
- path: vendor/bundle
28
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
29
- restore-keys: |
30
- ${{ runner.os }}-gems-
31
- - name: Install bundler
32
- run: |
33
- gem install bundler
34
- - name: Set bundle config path
35
- run: |
36
- bundle config path vendor/bundle
37
- - name: Install dependencies
38
- run: |
39
- bundle install
40
- - name: Ruby Unit tests
41
- run: |
42
- bundle exec rspec