Permalink
Browse files

VCR

  • Loading branch information...
1 parent 50bb693 commit 303bdfe68b2ee7a2146c7c6efcc23fefdcc8ab4d @jarthod jarthod committed May 16, 2012
Showing with 91,877 additions and 135 deletions.
  1. +2 −1 Gemfile
  2. +6 −4 Gemfile.lock
  3. +269 −0 test/cassettes/add_and_delete_new_playlist.yml
  4. +322 −0 test/cassettes/add_and_delete_video_from_playlist.yml
  5. +428 −0 test/cassettes/add_and_delete_video_from_watchlater.yml
  6. +155 −0 test/cassettes/add_and_delete_video_to_favorite.yml
  7. +10,669 −0 test/cassettes/add_comment_and_reply.yml
  8. +10,669 −0 test/cassettes/add_comments_and_reply.yml
  9. +163 −0 test/cassettes/add_like_to_video.yml
  10. +11,619 −0 test/cassettes/denied_comments.yml
  11. +10,336 −0 test/cassettes/denied_embed.yml
  12. +11,677 −0 test/cassettes/denied_rate.yml
  13. +48 −0 test/cassettes/determine_if_embeddable_video_is_embeddable.yml
  14. +48 −0 test/cassettes/determine_if_widescreen_video_is_widescreen.yml
  15. +163 −0 test/cassettes/dislike_to_video.yml
  16. +102 −0 test/cassettes/get_another_profile.yml
  17. +102 −0 test/cassettes/get_current_user.yml
  18. +48 −0 test/cassettes/get_embed_video_for_html5.yml
  19. +72 −0 test/cassettes/get_favorite_videos_by_user.yml
  20. +106 −0 test/cassettes/get_most_viewed_videos.yml
  21. +124 −0 test/cassettes/get_multi_profiles.yml
  22. +10,449 −0 test/cassettes/get_my_videos.yml
  23. +102 −0 test/cassettes/get_profile.yml
  24. +332 −0 test/cassettes/get_top_rated_videos_for_today.yml
  25. +48 −0 test/cassettes/get_video_from_user.yml
  26. +48 −0 test/cassettes/get_videos_by_user.yml
  27. +48 −0 test/cassettes/get_videos_by_user_with_pagination_and_ordering.yml
  28. +48 −0 test/cassettes/get_videos_for_categories_and_tags.yml
  29. +48 −0 test/cassettes/get_videos_for_categories_and_tags_with_category_boolean_operators.yml
  30. +48 −0 test/cassettes/get_videos_for_categories_and_tags_with_tag_boolean_operators.yml
  31. +48 −0 test/cassettes/get_videos_for_multiple_categories.yml
  32. +48 −0 test/cassettes/get_videos_for_multiple_tags.yml
  33. +48 −0 test/cassettes/get_videos_for_multiword_metasearch_query.yml
  34. +48 −0 test/cassettes/get_videos_for_one_category.yml
  35. +48 −0 test/cassettes/get_videos_for_one_tag.yml
  36. +48 −0 test/cassettes/get_videos_for_query_search_with_categories_excluded.yml
  37. +48 −0 test/cassettes/handle_video_not_yet_viewed.yml
  38. +48 −0 test/cassettes/have_related_videos.yml
  39. +48 −0 test/cassettes/have_response_videos.yml
  40. +102 −0 test/cassettes/list_playlist_for_user.yml
  41. +489 −0 test/cassettes/playlists_order.yml
  42. +40 −0 test/cassettes/raise_bad_request_exception_when_id_not_found.yml
  43. +48 −0 test/cassettes/respond_to_a_basic_query.yml
  44. +48 −0 test/cassettes/respond_to_a_basic_query_with_offset_and_max_results.yml
  45. +138 −0 test/cassettes/respond_to_a_basic_query_with_paging.yml
  46. +93 −0 test/cassettes/retrieve_video_by_id.yml
  47. +430 −0 test/cassettes/return_unique_id_from_playlist.yml
  48. +94 −0 test/cassettes/return_upload_info_for_upload_from_browser.yml
  49. +48 −0 test/cassettes/return_video_by_url.yml
  50. +93 −0 test/cassettes/safe_search_params.yml
  51. +269 −0 test/cassettes/subscribe_list_and_unsubscribe_to_channel.yml
  52. +48 −0 test/cassettes/unicode_query.yml
  53. +322 −0 test/cassettes/update_playlist.yml
  54. +10,388 −0 test/cassettes/upload_and_update_a_video.yml
  55. +10,335 −0 test/cassettes/upload_private_video.yml
  56. +30 −0 test/helper.rb
  57. +107 −121 test/test_client.rb
  58. +9 −1 test/test_video.rb
  59. +15 −8 test/test_video_feed_parser.rb
View
@@ -3,6 +3,7 @@ source 'http://rubygems.org'
gemspec
group :test do
- gem 'webmock', '~> 1.7.10'
+ gem 'vcr', '~> 2.1.1'
+ gem 'webmock'
gem 'rake'
end
View
@@ -11,7 +11,7 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- addressable (2.2.7)
+ addressable (2.2.8)
builder (3.0.0)
crack (0.3.1)
faraday (0.8.0)
@@ -28,14 +28,16 @@ GEM
rack (1.4.1)
rake (0.9.2.2)
simple_oauth (0.1.7)
- webmock (1.7.10)
- addressable (~> 2.2, > 2.2.5)
+ vcr (2.1.1)
+ webmock (1.8.7)
+ addressable (>= 2.2.7)
crack (>= 0.1.7)
PLATFORMS
ruby
DEPENDENCIES
rake
- webmock (~> 1.7.10)
+ vcr (~> 2.1.1)
+ webmock
youtube_it!
@@ -0,0 +1,269 @@
+---
+recorded_with: VCR 2.1.1
+http_interactions:
+- request:
+ method: post
+ uri: https://www.google.com/youtube/accounts/ClientLogin
+ body:
+ string: Email=tubeit20101&Passwd=youtube_it&service=youtube&source=youtube_it
+ headers:
+ Content-Type:
+ - application/x-www-form-urlencoded
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ X-Frame-Options:
+ - SAMEORIGIN
+ Content-Type:
+ - text/plain
+ Date:
+ - Wed, 16 May 2012 13:07:22 GMT
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Gdata-User-Country:
+ - FR
+ Content-Length:
+ - "297"
+ Server:
+ - GSE
+ X-Content-Type-Options:
+ - nosniff
+ Expires:
+ - Wed, 16 May 2012 13:07:22 GMT
+ Cache-Control:
+ - private, max-age=0
+ body:
+ string: |
+ Auth=DQAAALgAAADtTSuy9k_FQoG0ysgLcjp493M096o2cxrRSuGtKRVxNVrHtFVfcVhk2G0Vizz8ZOabdGnrOOkqGv_nW_wmlU3uJQQ0OCWB5u17dU5eJ2W9SBzlDPNbgtahZ9TAxrRgg-FX17EQFx8V8bwvEr-CNNPfvDTuesnv-NEnw3Ohnm3HFxlEsZzcUxrxpNY3J-ZRxG3HPGDIlBgrs78pP-k-PbXxoTRu4jBUFgkA85pL1Sd4pMhjAphjN5gJBai00Bhtdc0
+ YouTubeUser=tubeit20101
+
+ http_version:
+ recorded_at: Wed, 16 May 2012 13:07:22 GMT
+- request:
+ method: get
+ uri: http://gdata.youtube.com/feeds/api/users/default/playlists?v=2
+ body:
+ string: ""
+ headers:
+ Authorization:
+ - GoogleLogin auth=DQAAALgAAADtTSuy9k_FQoG0ysgLcjp493M096o2cxrRSuGtKRVxNVrHtFVfcVhk2G0Vizz8ZOabdGnrOOkqGv_nW_wmlU3uJQQ0OCWB5u17dU5eJ2W9SBzlDPNbgtahZ9TAxrRgg-FX17EQFx8V8bwvEr-CNNPfvDTuesnv-NEnw3Ohnm3HFxlEsZzcUxrxpNY3J-ZRxG3HPGDIlBgrs78pP-k-PbXxoTRu4jBUFgkA85pL1Sd4pMhjAphjN5gJBai00Bhtdc0
+ Content-Type:
+ - application/atom+xml; charset=UTF-8
+ Content-Length:
+ - "0"
+ X-Gdata-Client:
+ - youtube_it
+ X-Gdata-Key:
+ - key=AI39si411VBmO4Im9l0rfRsORXDI6F5AX5NlTIA4uHSWqa-Cgf-jUQG-6osUBB3PTLawLHlkKXPLr3B0pNcGU9wkNd11gIgdPg
+ Accept:
+ - "*/*"
+ Gdata-Version:
+ - "2"
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Vary:
+ - Accept, X-GData-Authorization, GData-Version
+ X-Frame-Options:
+ - SAMEORIGIN
+ Last-Modified:
+ - Wed, 16 May 2012 13:07:22 GMT
+ Etag:
+ - W/"CUEAQ3c9eCp7I2A9WhVUEUo."
+ Transfer-Encoding:
+ - chunked
+ Content-Type:
+ - application/atom+xml; charset=UTF-8; type=feed
+ Date:
+ - Wed, 16 May 2012 13:07:22 GMT
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Gdata-User-Country:
+ - FR
+ Server:
+ - GSE
+ X-Content-Type-Options:
+ - nosniff
+ Expires:
+ - Wed, 16 May 2012 13:07:22 GMT
+ Cache-Control:
+ - private, max-age=0, must-revalidate, no-transform
+ Gdata-Version:
+ - "2.1"
+ body:
+ string: <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;CUEAQ3c9eCp7I2A9WhVUEUo.&quot;'><id>tag:youtube.com,2008:user:tubeit20101:playlists</id><updated>2012-05-16T13:07:22.960Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlistLink'/><title>Playlists of tubeit20101</title><logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo><link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101?client=youtube_it'/><link rel='alternate' type='text/html' href='http://www.youtube.com'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists?client=youtube_it'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists?client=youtube_it'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists/batch?client=youtube_it'/><link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists?start-index=1&amp;max-results=25&amp;client=youtube_it'/><link rel='service' type='application/atomsvc+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists?alt=atom-service'/><author><name>tubeit20101</name><uri>http://gdata.youtube.com/feeds/api/users/tubeit20101</uri><yt:userId>WWmLvppy3j64IGmA2dpCyw</yt:userId></author><generator version='2.1' uri='http://gdata.youtube.com'>YouTube data API</generator><openSearch:totalResults>0</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage></feed>
+ http_version:
+ recorded_at: Wed, 16 May 2012 13:07:23 GMT
+- request:
+ method: post
+ uri: http://gdata.youtube.com/feeds/api/users/default/playlists
+ body:
+ string: <?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:yt="http://gdata.youtube.com/schemas/2007"><title>youtube_it test1!</title><summary>test playlist</summary></entry>
+ headers:
+ Authorization:
+ - GoogleLogin auth=DQAAALgAAADtTSuy9k_FQoG0ysgLcjp493M096o2cxrRSuGtKRVxNVrHtFVfcVhk2G0Vizz8ZOabdGnrOOkqGv_nW_wmlU3uJQQ0OCWB5u17dU5eJ2W9SBzlDPNbgtahZ9TAxrRgg-FX17EQFx8V8bwvEr-CNNPfvDTuesnv-NEnw3Ohnm3HFxlEsZzcUxrxpNY3J-ZRxG3HPGDIlBgrs78pP-k-PbXxoTRu4jBUFgkA85pL1Sd4pMhjAphjN5gJBai00Bhtdc0
+ Content-Type:
+ - application/atom+xml; charset=UTF-8
+ Content-Length:
+ - "202"
+ X-Gdata-Client:
+ - youtube_it
+ X-Gdata-Key:
+ - key=AI39si411VBmO4Im9l0rfRsORXDI6F5AX5NlTIA4uHSWqa-Cgf-jUQG-6osUBB3PTLawLHlkKXPLr3B0pNcGU9wkNd11gIgdPg
+ Accept:
+ - "*/*"
+ Gdata-Version:
+ - "2"
+ response:
+ status:
+ code: 201
+ message: Created
+ headers:
+ Content-Location:
+ - http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists/BD1D2D1C493490BC?client=youtube_it
+ Vary:
+ - Accept, X-GData-Authorization, GData-Version
+ X-Frame-Options:
+ - SAMEORIGIN
+ Etag:
+ - W/"CUEAQn47eCp7I2A9WhVUEUo."
+ Location:
+ - http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists/BD1D2D1C493490BC?client=youtube_it
+ Transfer-Encoding:
+ - chunked
+ Content-Type:
+ - application/atom+xml; charset=UTF-8; type=entry
+ Date:
+ - Wed, 16 May 2012 13:07:23 GMT
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Gdata-User-Country:
+ - FR
+ Server:
+ - GSE
+ X-Content-Type-Options:
+ - nosniff
+ Expires:
+ - Wed, 16 May 2012 13:07:23 GMT
+ Cache-Control:
+ - private, max-age=0, must-revalidate, no-transform
+ Gdata-Version:
+ - "2.1"
+ body:
+ string: <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;CUEAQn47eCp7I2A9WhVUEUo.&quot;'><id>tag:youtube.com,2008:user:tubeit20101:playlist:BD1D2D1C493490BC</id><published>2012-05-16T13:07:23.000Z</published><updated>2012-05-16T13:07:23.000Z</updated><app:edited>2012-05-16T13:07:23.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlistLink'/><title>youtube_it test1!</title><summary>test playlist</summary><content type='application/atom+xml;type=feed' src='http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC'/><link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101?client=youtube_it'/><link rel='alternate' type='text/html' href='http://www.youtube.com/view_play_list?p=BD1D2D1C493490BC'/><link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists/BD1D2D1C493490BC?client=youtube_it'/><link rel='edit' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/tubeit20101/playlists/BD1D2D1C493490BC?client=youtube_it'/><author><name>tubeit20101</name><uri>http://gdata.youtube.com/feeds/api/users/tubeit20101</uri><yt:userId>WWmLvppy3j64IGmA2dpCyw</yt:userId></author><yt:countHint>0</yt:countHint><media:group><yt:duration seconds='0'/></media:group><yt:playlistId>BD1D2D1C493490BC</yt:playlistId></entry>
+ http_version:
+ recorded_at: Wed, 16 May 2012 13:07:23 GMT
+- request:
+ method: get
+ uri: http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC?orderby=position&v=2
+ body:
+ string: ""
+ headers:
+ Authorization:
+ - GoogleLogin auth=DQAAALgAAADtTSuy9k_FQoG0ysgLcjp493M096o2cxrRSuGtKRVxNVrHtFVfcVhk2G0Vizz8ZOabdGnrOOkqGv_nW_wmlU3uJQQ0OCWB5u17dU5eJ2W9SBzlDPNbgtahZ9TAxrRgg-FX17EQFx8V8bwvEr-CNNPfvDTuesnv-NEnw3Ohnm3HFxlEsZzcUxrxpNY3J-ZRxG3HPGDIlBgrs78pP-k-PbXxoTRu4jBUFgkA85pL1Sd4pMhjAphjN5gJBai00Bhtdc0
+ Content-Type:
+ - application/atom+xml; charset=UTF-8
+ Content-Length:
+ - "0"
+ X-Gdata-Client:
+ - youtube_it
+ X-Gdata-Key:
+ - key=AI39si411VBmO4Im9l0rfRsORXDI6F5AX5NlTIA4uHSWqa-Cgf-jUQG-6osUBB3PTLawLHlkKXPLr3B0pNcGU9wkNd11gIgdPg
+ Accept:
+ - "*/*"
+ Gdata-Version:
+ - "2"
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Vary:
+ - Accept, X-GData-Authorization, GData-Version
+ X-Frame-Options:
+ - SAMEORIGIN
+ Last-Modified:
+ - Wed, 16 May 2012 13:07:23 GMT
+ Etag:
+ - W/"CUEAQn47eCp7I2A9WhVUEUo."
+ Transfer-Encoding:
+ - chunked
+ Content-Type:
+ - application/atom+xml; charset=UTF-8; type=feed
+ Date:
+ - Wed, 16 May 2012 13:07:28 GMT
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Gdata-User-Country:
+ - FR
+ Server:
+ - GSE
+ X-Content-Type-Options:
+ - nosniff
+ Expires:
+ - Wed, 16 May 2012 13:07:28 GMT
+ Cache-Control:
+ - private, max-age=0, must-revalidate, no-transform
+ Gdata-Version:
+ - "2.1"
+ body:
+ string: <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;CUEAQn47eCp7I2A9WhVUEUo.&quot;'><id>tag:youtube.com,2008:playlist:BD1D2D1C493490BC</id><updated>2012-05-16T13:07:23.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlist'/><title>youtube_it test1!</title><subtitle>test playlist</subtitle><logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo><link rel='alternate' type='text/html' href='http://www.youtube.com/view_play_list?p=BD1D2D1C493490BC'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC?client=youtube_it'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC?client=youtube_it'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC/batch?client=youtube_it'/><link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC?start-index=1&amp;max-results=25&amp;orderby=position&amp;client=youtube_it'/><link rel='service' type='application/atomsvc+xml' href='http://gdata.youtube.com/feeds/api/playlists/BD1D2D1C493490BC?alt=atom-service'/><author><name>tubeit20101</name><uri>http://gdata.youtube.com/feeds/api/users/tubeit20101</uri><yt:userId>WWmLvppy3j64IGmA2dpCyw</yt:userId></author><generator version='2.1' uri='http://gdata.youtube.com'>YouTube data API</generator><openSearch:totalResults>0</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><media:group><media:description type='plain'>test playlist</media:description><media:title type='plain'>youtube_it test1!</media:title><yt:duration seconds='0'/></media:group><yt:playlistId>BD1D2D1C493490BC</yt:playlistId></feed>
+ http_version:
+ recorded_at: Wed, 16 May 2012 13:07:28 GMT
+- request:
+ method: delete
+ uri: http://gdata.youtube.com/feeds/api/users/default/playlists/BD1D2D1C493490BC
+ body:
+ string: ""
+ headers:
+ Authorization:
+ - GoogleLogin auth=DQAAALgAAADtTSuy9k_FQoG0ysgLcjp493M096o2cxrRSuGtKRVxNVrHtFVfcVhk2G0Vizz8ZOabdGnrOOkqGv_nW_wmlU3uJQQ0OCWB5u17dU5eJ2W9SBzlDPNbgtahZ9TAxrRgg-FX17EQFx8V8bwvEr-CNNPfvDTuesnv-NEnw3Ohnm3HFxlEsZzcUxrxpNY3J-ZRxG3HPGDIlBgrs78pP-k-PbXxoTRu4jBUFgkA85pL1Sd4pMhjAphjN5gJBai00Bhtdc0
+ Content-Type:
+ - application/atom+xml; charset=UTF-8
+ Content-Length:
+ - "0"
+ X-Gdata-Client:
+ - youtube_it
+ X-Gdata-Key:
+ - key=AI39si411VBmO4Im9l0rfRsORXDI6F5AX5NlTIA4uHSWqa-Cgf-jUQG-6osUBB3PTLawLHlkKXPLr3B0pNcGU9wkNd11gIgdPg
+ Accept:
+ - "*/*"
+ Gdata-Version:
+ - "2"
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ X-Frame-Options:
+ - SAMEORIGIN
+ Content-Type:
+ - text/html
+ Date:
+ - Wed, 16 May 2012 13:07:28 GMT
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Gdata-User-Country:
+ - FR
+ Content-Length:
+ - "0"
+ Server:
+ - GSE
+ X-Content-Type-Options:
+ - nosniff
+ Expires:
+ - Wed, 16 May 2012 13:07:28 GMT
+ Cache-Control:
+ - private, max-age=0
+ Gdata-Version:
+ - "2.1"
+ body:
+ string: ""
+ http_version:
+ recorded_at: Wed, 16 May 2012 13:07:28 GMT
Oops, something went wrong.

0 comments on commit 303bdfe

Please sign in to comment.