youtube_search 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- youtube_search (0.1.3)
4
+ youtube_search (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module YoutubeSearch
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -12,7 +12,7 @@ module YoutubeSearch
12
12
 
13
13
  def self.playlist_videos(playlist_id)
14
14
  playlist_id = playlist_id.sub(/^PL/, "")
15
- xml = open("https://gdata.youtube.com/feeds/api/playlists/#{playlist_id}?v=2").read
15
+ xml = open("http://gdata.youtube.com/feeds/api/playlists/#{playlist_id}?v=2").read
16
16
  parse(xml, :type => :playlist)
17
17
  end
18
18
 
@@ -25,6 +25,8 @@ module YoutubeSearch
25
25
  entry['id'].split('/').last
26
26
  end
27
27
 
28
+ entry['duration'] = element.elements['*/yt:duration'].attributes['seconds'] unless element.elements['*/yt:duration'].nil?
29
+
28
30
  entry
29
31
  end
30
32
  end
@@ -13,6 +13,7 @@ describe YoutubeSearch do
13
13
  ["category", nil],
14
14
  ["comments",nil],
15
15
  ["content","Top YouTube Videos on tubecrunch.blogspot.com A killer whale swims right up to a boat and shows off his best sounding motor impression."],
16
+ ["duration", "75"],
16
17
  ["group", nil],
17
18
  ["id","http://gdata.youtube.com/feeds/api/videos/0b2U5r7Jwkc"],
18
19
  ["link",nil],
@@ -31,6 +32,7 @@ describe YoutubeSearch do
31
32
  ["author",nil],
32
33
  ["category", nil],
33
34
  ["comments",nil],
35
+ ["duration", "192"],
34
36
  ["group", nil],
35
37
  ["id","tag:youtube.com,2008:playlist:5F23DAF4BFE3D14C:kRk0fUfl9UJvHjGFHgPSakUFmztBgGKG"],
36
38
  ["link",nil],
metadata CHANGED
@@ -1,33 +1,22 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: youtube_search
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Michael Grosser
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-12-12 00:00:00 -08:00
19
- default_executable:
12
+ date: 2011-12-19 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
14
  description:
23
15
  email: michael@grosser.it
24
16
  executables: []
25
-
26
17
  extensions: []
27
-
28
18
  extra_rdoc_files: []
29
-
30
- files:
19
+ files:
31
20
  - .travis.yml
32
21
  - Gemfile
33
22
  - Gemfile.lock
@@ -40,39 +29,34 @@ files:
40
29
  - spec/spec_helper.rb
41
30
  - spec/youtube_search_spec.rb
42
31
  - youtube_search.gemspec
43
- has_rdoc: true
44
32
  homepage: http://github.com/grosser/youtube_search
45
33
  licenses: []
46
-
47
34
  post_install_message:
48
35
  rdoc_options: []
49
-
50
- require_paths:
36
+ require_paths:
51
37
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
38
+ required_ruby_version: !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ segments:
59
45
  - 0
60
- version: "0"
61
- required_rubygems_version: !ruby/object:Gem::Requirement
46
+ hash: 241123375
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
48
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ segments:
68
54
  - 0
69
- version: "0"
55
+ hash: 241123375
70
56
  requirements: []
71
-
72
57
  rubyforge_project:
73
- rubygems_version: 1.6.2
58
+ rubygems_version: 1.8.10
74
59
  signing_key:
75
60
  specification_version: 3
76
61
  summary: Search youtube via this simple ruby api
77
62
  test_files: []
78
-