hosted_video 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +4 -0
- data/hosted_video.gemspec +25 -0
- data/lib/hosted_video.rb +36 -0
- data/lib/hosted_video/configuration.rb +17 -0
- data/lib/hosted_video/providers/base.rb +34 -0
- data/lib/hosted_video/providers/rutube.rb +24 -0
- data/lib/hosted_video/providers/vimeo.rb +23 -0
- data/lib/hosted_video/providers/youtube.rb +24 -0
- data/lib/hosted_video/version.rb +3 -0
- data/spec/lib/hosted_video_spec.rb +122 -0
- data/spec/spec_helper.rb +7 -0
- metadata +118 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3a6a7e853650beed5f23d9f8eda9a4846870b722
|
4
|
+
data.tar.gz: aca5db0ccd9aeddf127e92e65b1870a8d859ea4b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 069b1ce6d284e915ab9380eababc2cb0c6710c9809a1fa30b2f807829667c16d93114e0a1e2279f4f5c47e0f4b72d95ce665059e139981476aff2eab82685d51
|
7
|
+
data.tar.gz: 356aa45d53fc31fa6c691fab168f7ec19a439a488da97a42e4540e56346be5434cc915526e8e08cd4deab17ee3d5c2e28acc9e17a638b90cf0342d93edfd3a03
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 pascalevi4
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# HostedVideo
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'hosted_video'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install hosted_video
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hosted_video/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hosted_video"
|
8
|
+
spec.version = HostedVideo::VERSION
|
9
|
+
spec.authors = ["Vadim Alekseev"]
|
10
|
+
spec.email = ["vadim.alekseev777@gmail.com"]
|
11
|
+
spec.description = "Tool for parse video links to determine hosting and build iframe code"
|
12
|
+
spec.summary = "Parsing video links"
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(spec)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "webmock"
|
25
|
+
end
|
data/lib/hosted_video.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require "open-uri"
|
2
|
+
require "json"
|
3
|
+
require "hosted_video/version"
|
4
|
+
require "hosted_video/configuration"
|
5
|
+
require "hosted_video/providers/base"
|
6
|
+
|
7
|
+
module HostedVideo
|
8
|
+
class InvalidUrlError < StandardError; end
|
9
|
+
|
10
|
+
Dir[File.dirname(__FILE__) + '/hosted_video/providers/*.rb'].each { |file| require file }
|
11
|
+
|
12
|
+
class << self
|
13
|
+
attr_accessor :configuration
|
14
|
+
|
15
|
+
def configuration
|
16
|
+
@configuration ||= Configuration.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def configure
|
20
|
+
yield(configuration)
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_url(url)
|
24
|
+
if provider = find_provider(url)
|
25
|
+
provider.new(url)
|
26
|
+
else
|
27
|
+
raise InvalidUrlError
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
def find_provider(url)
|
33
|
+
configuration.providers.detect { |p| p.can_parse?(url) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module HostedVideo
|
2
|
+
class Configuration
|
3
|
+
attr_accessor :additional_providers
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@providers = Providers.constants
|
7
|
+
.reject { |c| c == :Base }
|
8
|
+
.map { |c| Providers.const_get(c) }
|
9
|
+
.select { |c| Class === c }
|
10
|
+
@additional_providers = []
|
11
|
+
end
|
12
|
+
|
13
|
+
def providers
|
14
|
+
@providers + @additional_providers
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module HostedVideo
|
2
|
+
module Providers
|
3
|
+
class Base
|
4
|
+
attr_accessor :url
|
5
|
+
|
6
|
+
def initialize(url)
|
7
|
+
@url = url
|
8
|
+
end
|
9
|
+
|
10
|
+
def kind
|
11
|
+
self.class.name.split('::').last.downcase
|
12
|
+
end
|
13
|
+
|
14
|
+
def vid
|
15
|
+
@vid ||= vid_regex.match(@url)[:id]
|
16
|
+
end
|
17
|
+
|
18
|
+
def iframe_code(attributes = {})
|
19
|
+
attrs = default_iframe_attributes.merge(attributes)
|
20
|
+
"<iframe #{attrs.map{|key, val| "#{key}='#{val}'"}.join(' ')} src='#{url_for_iframe}'></iframe>"
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def default_iframe_attributes
|
26
|
+
{
|
27
|
+
width: 420,
|
28
|
+
height: 315,
|
29
|
+
frameborder: 0
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module HostedVideo
|
2
|
+
module Providers
|
3
|
+
class Rutube < Base
|
4
|
+
def self.can_parse?(url)
|
5
|
+
url =~ /rutube\.ru\/video\/(\w{32}|\w{7}).*/
|
6
|
+
end
|
7
|
+
|
8
|
+
def preview
|
9
|
+
JSON.load(open("http://rutube.ru/api/video/#{vid}/?format=json"))['thumbnail_url']
|
10
|
+
end
|
11
|
+
|
12
|
+
def url_for_iframe
|
13
|
+
"http://rutube.ru/video/embed/#{vid}"
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def vid_regex
|
19
|
+
/(https?:\/\/)?(www\.)?rutube\.ru\/video\/(?<id>\w{32}|\w{7}).*/
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module HostedVideo
|
2
|
+
module Providers
|
3
|
+
class Vimeo < Base
|
4
|
+
def self.can_parse?(url)
|
5
|
+
url =~ /vimeo\.com\/\d{7,8}.*/
|
6
|
+
end
|
7
|
+
|
8
|
+
def preview
|
9
|
+
JSON.load(open("http://vimeo.com/api/v2/video/#{vid}.json")).first['thumbnail_large']
|
10
|
+
end
|
11
|
+
|
12
|
+
def url_for_iframe
|
13
|
+
"http://player.vimeo.com/video/#{vid}?api=0"
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def vid_regex
|
19
|
+
/(https?:\/\/)?(www\.)?vimeo\.com\/(?<id>\d{7,8}).*/
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module HostedVideo
|
2
|
+
module Providers
|
3
|
+
class Youtube < Base
|
4
|
+
|
5
|
+
def self.can_parse?(url)
|
6
|
+
url =~ /(youtube\.com\/)|(youtu\.be)/
|
7
|
+
end
|
8
|
+
|
9
|
+
def preview
|
10
|
+
"http://img.youtube.com/vi/#{vid}/hqdefault.jpg"
|
11
|
+
end
|
12
|
+
|
13
|
+
def url_for_iframe
|
14
|
+
"http://www.youtube.com/embed/#{vid}?wmode=transparent"
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def vid_regex
|
20
|
+
/(https?:\/\/)?(www\.)?((youtube\.com)|(youtu\.be))\/(watch\?v=)?(?<id>[\w,-]{11}).*/
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe HostedVideo do
|
5
|
+
let(:invalid_urls) { ['http://www.youtube.com/watch?v=4wTLj5Xk',
|
6
|
+
'http://www.youtub.com/watch?v=4wTLjEqj5Xk',
|
7
|
+
'http://vimeo.com/42',
|
8
|
+
'http://vmeo.com/63645580'] }
|
9
|
+
|
10
|
+
it 'raises InvalidUrlError if url is invalid' do
|
11
|
+
expect {
|
12
|
+
subject.from_url('http://vmeo.com/63645580')
|
13
|
+
}.to raise_error(HostedVideo::InvalidUrlError)
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'additional providers' do
|
17
|
+
it 'uses additional provider' do
|
18
|
+
class MyProvider < HostedVideo::Providers::Base
|
19
|
+
def self.can_parse?(url)
|
20
|
+
url =~ /myprovider\.com\/\d{3}.*/
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
HostedVideo.configure do |c|
|
25
|
+
c.additional_providers += [MyProvider]
|
26
|
+
end
|
27
|
+
|
28
|
+
subject.from_url('http://myprovider.com/111').kind.should == 'myprovider'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'youtube' do
|
33
|
+
let(:parser) { subject.from_url('http://www.youtube.com/watch?v=4wTLjEqj5Xk&a=GxdCwVVULXctT2lYDEPllDR0LRTutYfW') }
|
34
|
+
|
35
|
+
it 'successfully determines' do
|
36
|
+
parser.kind.should == 'youtube'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'gets right video id' do
|
40
|
+
parser.vid.should == '4wTLjEqj5Xk'
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'gets right preview url' do
|
44
|
+
parser.preview.should == "http://img.youtube.com/vi/4wTLjEqj5Xk/hqdefault.jpg"
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'iframe_code' do
|
48
|
+
it 'gets right iframe html' do
|
49
|
+
parser.iframe_code.should == "<iframe width='420' height='315' frameborder='0' src='http://www.youtube.com/embed/4wTLjEqj5Xk?wmode=transparent'></iframe>"
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'receives attributes and applies them to iframe tag' do
|
53
|
+
parser.iframe_code({ wmode: true }).should == "<iframe width='420' height='315' frameborder='0' wmode='true' src='http://www.youtube.com/embed/4wTLjEqj5Xk?wmode=transparent'></iframe>"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'sucessfully parses youtu.be' do
|
58
|
+
video = subject.from_url("http://youtu.be/SroTP8794aY")
|
59
|
+
video.kind.should == 'youtube'
|
60
|
+
video.vid.should == 'SroTP8794aY'
|
61
|
+
video.preview.should == "http://img.youtube.com/vi/SroTP8794aY/hqdefault.jpg"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context 'vimeo' do
|
66
|
+
let(:parser) { subject.from_url('https://vimeo.com/63645580') }
|
67
|
+
|
68
|
+
it 'successfully determines' do
|
69
|
+
parser.kind.should == 'vimeo'
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'gets right video id' do
|
73
|
+
parser.vid.should == '63645580'
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'get right preview url' do
|
77
|
+
stub_request(:get, "http://vimeo.com/api/v2/video/63645580.json")
|
78
|
+
.to_return(:body => "[{\"id\":63645580,\"title\":\"lalala\",\"description\":\"\",\"url\":\"http:\\/\\/vimeo.com\\/63645580\",\"upload_date\":\"2011-12-11 08:32:29\",\"thumbnail_small\":\"http:\\/\\/i.vimeocdn.com\\/video\\/227287871_100x75.jpg\",\"thumbnail_medium\":\"http:\\/\\/i.vimeocdn.com\\/video\\/227287871_200x150.jpg\",\"thumbnail_large\":\"http:\\/\\/i.vimeocdn.com\\/video\\/63645580_640.jpg\",\"user_id\":7790763,\"user_name\":\"Thomas Schank\",\"user_url\":\"http:\\/\\/vimeo.com\\/drtom\",\"user_portrait_small\":\"http:\\/\\/www.gravatar.com\\/avatar\\/4edb77ba747ee69a9540046a24611981?d=http%3A%2F%2Fi.vimeocdn.com%2Fportrait%2Fdefault-red_30x30.png&s=30\",\"user_portrait_medium\":\"http:\\/\\/www.gravatar.com\\/avatar\\/4edb77ba747ee69a9540046a24611981?d=http%3A%2F%2Fi.vimeocdn.com%2Fportrait%2Fdefault-red_75x75.png&s=75\",\"user_portrait_large\":\"http:\\/\\/www.gravatar.com\\/avatar\\/4edb77ba747ee69a9540046a24611981?d=http%3A%2F%2Fi.vimeocdn.com%2Fportrait%2Fdefault-red_100x100.png&s=100\",\"user_portrait_huge\":\"http:\\/\\/www.gravatar.com\\/avatar\\/4edb77ba747ee69a9540046a24611981?d=http%3A%2F%2Fi.vimeocdn.com%2Fportrait%2Fdefault-red_300x300.png&s=300\",\"stats_number_of_likes\":5,\"stats_number_of_plays\":221,\"stats_number_of_comments\":0,\"duration\":791,\"width\":640,\"height\":360,\"tags\":\"ruby, programming language, eigenclass, object hierarchy\",\"embed_privacy\":\"anywhere\"}]", :status => 200, :headers => { 'Content-Length' => 3 })
|
79
|
+
parser.preview.should == "http://i.vimeocdn.com/video/63645580_640.jpg"
|
80
|
+
end
|
81
|
+
|
82
|
+
describe 'iframe_code' do
|
83
|
+
it 'gets right iframe html' do
|
84
|
+
parser.iframe_code.should == "<iframe width='420' height='315' frameborder='0' src='http://player.vimeo.com/video/63645580?api=0'></iframe>"
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'receives attributes and applies them to iframe tag' do
|
88
|
+
parser.iframe_code({ wmode: true }).should == "<iframe width='420' height='315' frameborder='0' wmode='true' src='http://player.vimeo.com/video/63645580?api=0'></iframe>"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
context 'rutube' do
|
94
|
+
let(:parser) { subject.from_url('http://rutube.ru/video/52b48444f3efcfd2c2346972dfa16d6c/') }
|
95
|
+
|
96
|
+
it 'successfully determines' do
|
97
|
+
parser.kind.should == 'rutube'
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'gets right video id' do
|
101
|
+
parser.vid.should == '52b48444f3efcfd2c2346972dfa16d6c'
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'get right preview url' do
|
105
|
+
stub_request(:get, "http://rutube.ru/api/video/52b48444f3efcfd2c2346972dfa16d6c/?format=json")
|
106
|
+
.to_return(:body => "{\"description\": \"\\u043f\\u043e\\u0434\\u0431\\u043e\\u0440\\u043a\\u0430\", \"title\": \"\\u043f\\u0440\\u043e\\u0432\\u0438\\u043d\\u0438\\u0432\\u0448\\u0438\\u0435\\u0441\\u044f \\u0441\\u043e\\u0431\\u0430\\u043a\\u0438\", \"is_hidden\": false, \"created_ts\": \"2014-04-08T10:12:50\", \"html\": \"<iframe width=\\\"720\\\" height=\\\"405\\\" src=\\\"//rutube.ru/video/embed/6910411\\\" frameborder=\\\"0\\\" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe>\", \"id\": \"52b48444f3efcfd2c2346972dfa16d6c\", \"thumbnail_url\": \"http://pic.rutube.ru/video/1d/c8/1dc8a4d7ff8accdf22d32a4e89e9fd37.jpg\", \"for_registered\": false, \"for_linked\": false, \"video_url\": \"http://rutube.ru/video/52b48444f3efcfd2c2346972dfa16d6c/\", \"duration\": 287, \"has_high_quality\": true, \"hits\": 3302, \"is_adult\": false, \"is_deleted\": false, \"last_update_ts\": \"2014-04-08T15:51:41\", \"embed_url\": \"http://rutube.ru/video/embed/6910411\", \"source_url\": \"http://rutube.ru/tracks/6910411.html\", \"is_external\": false, \"author\": {\"id\": 216135, \"name\": \"NADEZHDA\", \"avatar_url\": \"http://pic.rutube.ru/user/f8/5f/f85ff0c9f3e57858502ff5fff0058af7.jpeg\", \"site_url\": \"http://rutube.ru/video/person/216135/\"}, \"category\": {\"id\": 10, \"category_url\": \"http://rutube.ru/video/category/10/\", \"name\": \"\\u0416\\u0438\\u0432\\u043e\\u0442\\u043d\\u044b\\u0435\"}, \"picture_url\": \"\", \"rutube_poster\": null, \"is_official\": false, \"restrictions\": null, \"action_reason\": 0, \"show\": null, \"persons\": \"http://rutube.ru/api/metainfo/video/52b48444f3efcfd2c2346972dfa16d6c/videoperson\", \"genres\": \"http://rutube.ru/api/metainfo/video/52b48444f3efcfd2c2346972dfa16d6c/videogenre\", \"music\": null, \"track_id\": 6910411}", :status => 200, :headers => { 'Content-Length' => 3 })
|
107
|
+
parser.preview.should == "http://pic.rutube.ru/video/1d/c8/1dc8a4d7ff8accdf22d32a4e89e9fd37.jpg"
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
describe 'iframe_code' do
|
112
|
+
it 'gets right iframe html' do
|
113
|
+
parser.iframe_code.should == "<iframe width='420' height='315' frameborder='0' src='http://rutube.ru/video/embed/52b48444f3efcfd2c2346972dfa16d6c'></iframe>"
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'receives attributes and applies them to iframe tag' do
|
117
|
+
parser.iframe_code({ wmode: true }).should == "<iframe width='420' height='315' frameborder='0' wmode='true' src='http://rutube.ru/video/embed/52b48444f3efcfd2c2346972dfa16d6c'></iframe>"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hosted_video
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vadim Alekseev
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Tool for parse video links to determine hosting and build iframe code
|
70
|
+
email:
|
71
|
+
- vadim.alekseev777@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- .travis.yml
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- hosted_video.gemspec
|
83
|
+
- lib/hosted_video.rb
|
84
|
+
- lib/hosted_video/configuration.rb
|
85
|
+
- lib/hosted_video/providers/base.rb
|
86
|
+
- lib/hosted_video/providers/rutube.rb
|
87
|
+
- lib/hosted_video/providers/vimeo.rb
|
88
|
+
- lib/hosted_video/providers/youtube.rb
|
89
|
+
- lib/hosted_video/version.rb
|
90
|
+
- spec/lib/hosted_video_spec.rb
|
91
|
+
- spec/spec_helper.rb
|
92
|
+
homepage: ''
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.2.2
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Parsing video links
|
116
|
+
test_files:
|
117
|
+
- spec/lib/hosted_video_spec.rb
|
118
|
+
- spec/spec_helper.rb
|