Rakefile in youtube_search-0.1.5 vs Rakefile in youtube_search-0.1.6
- old
+ new
@@ -16,5 +16,20 @@
new_version = version_parts * '.'
File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
end
+
+desc "Update fixtures by downloading them"
+task :update_fixtures do
+ require 'youtube_search'
+
+ # search
+ query = "boat"
+ xml = open("http://gdata.youtube.com/feeds/api/videos?#{query}").read
+ File.open("spec/fixtures/search_#{query}.xml","w"){|f| f.write xml }
+
+ # playlist
+ id = "5F23DAF4BFE3D14C"
+ xml = open("http://gdata.youtube.com/feeds/api/playlists/#{id}?v=2").read
+ File.open("spec/fixtures/playlist_#{id}.xml","w"){|f| f.write xml }
+end
\ No newline at end of file