video_info 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -20,7 +20,7 @@ private
20
20
  @title = doc.search("media:title").inner_text
21
21
  @description = doc.search("media:description").inner_text
22
22
  @keywords = doc.search("media:keywords").inner_text
23
- @duration = doc.search("media:content").first[:duration].to_i # seconds
23
+ @duration = doc.search("yt:duration").first[:seconds].to_i
24
24
  @date = Time.parse(doc.search("published").inner_text, Time.now.utc)
25
25
  @thumbnail_small = doc.search("media:thumbnail").first[:url]
26
26
  @thumbnail_large = doc.search("media:thumbnail").last[:url]
@@ -20,6 +20,14 @@ describe "VideoInfo" do
20
20
  it { should be_valid }
21
21
  end
22
22
 
23
+ describe "from Youtube" do
24
+ subject { VideoInfo.new('http://www.youtube.com/watch?v=JM9NgvjjVng') }
25
+
26
+ its(:provider) { should == 'YouTube' }
27
+ its(:duration) { should == 217 }
28
+ it { should be_valid }
29
+ end
30
+
23
31
  describe "from Vimeo" do
24
32
  subject { VideoInfo.new('http://www.vimeo.com/898029') }
25
33
 
data/video_info.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{video_info}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thibaud Guillaume-Gentil"]
12
- s.date = %q{2009-11-27}
12
+ s.date = %q{2009-12-04}
13
13
  s.description = %q{Get video info from youtube and vimeo url.}
14
14
  s.email = %q{thibaud@thibaud.me}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-27 00:00:00 +01:00
12
+ date: 2009-12-04 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency