video_info 1.4.0 → 1.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: d7056b4b9244e1aa2f8978a96b5887ef218f0383
4
- data.tar.gz: ed2c2485d1f4ebb86384f174dc25fd939a672db2
3
+ metadata.gz: 2ed3d8969372248a0472f8987ee8b487af924e10
4
+ data.tar.gz: 1e92e42ca47410bdcdeff660fd5df4f6f2fd295a
5
5
  SHA512:
6
- metadata.gz: f08606831ea05ba23c64e01d82a6baf73c2bf214d7c684dd132a28bfdb31ff10848bfed8b76806a3a4aa36f86c99f84d58d6749bf09cc79e6b39fcce6388bfdf
7
- data.tar.gz: 7ad2a13d1f48702155894e9ef1c9e21991ccbb730a74f3096ba4788c40f7cc37120d7a881ed0298b98c4b26518d56b4174477467e5634ee6c8e7718148dba56e
6
+ metadata.gz: 790020a37c437e7c8868d7afeae0e9bfdb393dfe4f6c1057bde41396393cab86956476be53fb022aef3d5dc34459bac81fb52cfeaf7ca3dd7676270b6c200e3c
7
+ data.tar.gz: d6635217f67d020d376fb30c8cacbc57789a2df31a79cc4cbc4c19f5c66e3629ffa0e9de0f90656c838c528f746b0d017152c9f3735f466b2cba37be614d39cf
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # VideoInfo [![Gem Version](https://badge.fury.io/rb/video_info.png)](http://badge.fury.io/rb/video_info) [![Build Status](https://secure.travis-ci.org/thibaudgg/video_info.png?branch=master)](http://travis-ci.org/thibaudgg/video_info) [![Dependency Status](https://gemnasium.com/thibaudgg/video_info.png)](https://gemnasium.com/thibaudgg/video_info) [![Code Climate](https://codeclimate.com/github/thibaudgg/video_info.png)](https://codeclimate.com/github/thibaudgg/video_info) [![Coverage Status](https://coveralls.io/repos/thibaudgg/video_info/badge.png?branch=master)](https://coveralls.io/r/thibaudgg/video_info)
2
2
 
3
3
  Simple Ruby Gem to get video info from youtube and vimeo url.
4
- Tested against Ruby 1.8.7, 1.9.2, REE and the latest versions of JRuby & Rubinius.
4
+ Tested against Ruby 1.8.7, 1.9.3, 2.0.0 and the latest versions of JRuby & Rubinius.
5
5
 
6
6
  Install
7
7
  --------
data/lib/video_info.rb CHANGED
@@ -11,6 +11,10 @@ module VideoInfo
11
11
  end
12
12
  end
13
13
 
14
+ def self.usable?(url)
15
+ !!_providers_const.detect { |p| p.usable?(url) }
16
+ end
17
+
14
18
  private
15
19
 
16
20
  def self._providers_const
@@ -20,7 +20,7 @@ module VideoInfo
20
20
  private
21
21
 
22
22
  def _url_regex
23
- /youtube\.com\/.*v=([A-Za-z0-9._%-]*)?|youtu\.be\/([A-Za-z0-9._%-]*)?|youtube\.com\/embed\/([A-Za-z0-9._%-]*)?/
23
+ /(?:youtube(?:-nocookie)?\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i
24
24
  end
25
25
 
26
26
  def _set_info_from_api
@@ -1,3 +1,3 @@
1
1
  module VideoInfo
2
- VERSION = "1.4.0"
2
+ VERSION = '1.5.0'
3
3
  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: 1.4.0
4
+ version: 1.5.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: 2013-05-02 00:00:00.000000000 Z
11
+ date: 2013-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project: video_info
136
- rubygems_version: 2.0.3
136
+ rubygems_version: 2.0.7
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Vimeo & Youtube parser