youtube_search 0.1.2 → 0.1.3

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- youtube_search (0.1.2)
4
+ youtube_search (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -11,6 +11,7 @@ module YoutubeSearch
11
11
  end
12
12
 
13
13
  def self.playlist_videos(playlist_id)
14
+ playlist_id = playlist_id.sub(/^PL/, "")
14
15
  xml = open("https://gdata.youtube.com/feeds/api/playlists/#{playlist_id}?v=2").read
15
16
  parse(xml, :type => :playlist)
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module YoutubeSearch
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -68,6 +68,12 @@ describe YoutubeSearch do
68
68
  it "can retrieve videos from a playlist" do
69
69
  YoutubeSearch.playlist_videos('5F23DAF4BFE3D14C').size.should == 6
70
70
  end
71
+
72
+ it "can retrieve videos from a playlist with new-style ids" do
73
+ id = 'PL5F23DAF4BFE3D14C'
74
+ YoutubeSearch.playlist_videos(id).size.should == 6
75
+ id.should == 'PL5F23DAF4BFE3D14C'
76
+ end
71
77
  end
72
78
 
73
79
  describe 'options_with_per_page_and_page' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youtube_search
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-07 00:00:00 -08:00
18
+ date: 2011-12-12 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21