ruby-oembed-0.8.14/0000755000004100000410000000000012546055651014057 5ustar www-datawww-dataruby-oembed-0.8.14/Rakefile0000644000004100000410000000032712546055651015526 0ustar www-datawww-databegin require "bundler/gem_tasks" rescue LoadError puts "Bundler not available. Install it with: gem install bundler" end Dir[File.join(File.dirname(__FILE__), "lib/tasks/*.rake")].sort.each { |ext| load ext } ruby-oembed-0.8.14/Gemfile0000644000004100000410000000004712546055651015353 0ustar www-datawww-datasource "https://rubygems.org" gemspec ruby-oembed-0.8.14/CHANGELOG.rdoc0000644000004100000410000001436312546055651016226 0ustar www-datawww-data= CHANGELOG == 0.8.14 - 25 April 2015 * Change built-in Vimeo provider to use https oembed endpoint; Pull #44 (Jonne Haß) * Change built-in Flickr provider to use https oembed endpoint; Pull #46 (Javan Makhmali) * Change built-in Flickr provider to recognize https URLs and short flic.kr URLs (Javan Makhmali & Marcos Wright-Kuhns) == 0.8.13 - 23 April 2015 * Change built-in Instagram provider to recognize https URLs; Pull #35 (Philipp Bosch) * Change built-in Instagram provider to use https oembed/API endpoint. (Marcos Wright-Kuhns) * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns) == 0.8.12 - 7 January 2015 * Fix URI error in Ruby 2.2; Pull #41, Issue #43 (Maxim Bublis) * Change built-in YouTube provider to return https embeds; Pull #34, Issue #33 (Fla) * Add built-in providers for Twitter, Vine, & Imgur; Pull #42 (Eliot Shepard) * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns) == 0.8.11 - 7 November 2014 * Add built-in provider for Spotify; Pull #36 (Sami Kukkonen) * Update Travis CI configuration to test with modern Rails; Pull #37 (Sami Kukkonen) == 0.8.10 - 6 August 2014 * Add support for specifying a Provider#get `:timeout`; Pull #35 (Blake Thomson) * Upgrade to RSpec 3.x == 0.8.9 - 15 September 2013 * SoundCloud provider supports https URLs; Pull #30 (Greg Tangey) * Address rspec DEPRECATION warnings; Pull metavida#3 (Marcos Wright Kuhns) == 0.8.8 - 18 November 2012 * OEmbed::Response::Photo#html now includes alt attribute; Pull #23 & #25 (François de Metz) * Always escape the url query param when requesting a resource from a provider; Pull #26 (Michael Cohen) * Allow query params in a provider endpoint URL; Pull #27 (Michael Andrews) * Added built-in provider for Skitch; Pull #24 (François de Metz) * Updated built-in Vimeo provider (Marcos Wright Kuhns) * For developers who work on this gem, removed the dependency on jeweler (Marcos Wright Kuhns) == 0.8.7 - 11 March 2012 * Support for https provider endpoints; Issue #16 (Marcos Wright Kuhns) * OEmbed::Providers.register_all now actually registers all bundled providers; Issue #18 (Marcos Wright Kuhns) * Added built-in provider for SoundCloud (Hendrik Mans) * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright Kuhns) * For developers who work on this gem, the rvmrc now automatically creates an oembed gemset; Issue #20 (Florian Staudacher) == 0.8.5 - 14 November 2011 * Fixed problems ProviderDiscovery and some xml endpoints. Also added much better test coverage. (Marcos Wright Kuhns) * Added support for XML parsing using {Nokogiri}[http://nokogiri.org/] (Marcos Wright Kuhns) * Added built-in provider for MLG.TV (Matt Wilson) * Added https support to the built-in YouTube provider (Marcos Wright Kuhns) * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright Kuhns) == 0.8.3 - 26 June 2011 * Fixing a circular dependency introduced during my recent Jeweler upgrade. (Marcos Wright Kuhns) == 0.8.2 - 25 June 2011 * Added built-in providers for Instagram, Slideshare and Yfrog (Florian Günther) * Improved support (and error detection) for custom OEmbed::Formatter backends. (Marcos Wright Kuhns) * DRYed up OEmbed::Formatter::JSON and XML methods into OEmbed::Formatter::Base (Marcos Wright Kuhns) * More consistently raise an OEmbed::Parse error if there is any sort of problem parsing the server response, whether it's an expected error type or not. (Marcos Wright Kuhns) * Added in-code comments about the {OohEmbed}[http://oohembed.com] service becoming part of {Embedly}[http://embed.ly] (Marcos Wright Kuhns) * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright Kuhns) == 0.8.1 - 27 February 2011 * Removed all dependencies on external gems. XML is parsed using REXML and JSON can be parsed using YAML thanks to the convert_json_to_yaml method borrowed from Rails! (Marcos Wright Kuhns) * Fixed several errors that cropped up when the json gem wasn't installed. (Marcos Wright Kuhns) * OEmbed::Response#field now always return Strings. Previously, some JSON values were parsed into other Object types, like Integer and Float instances. * OEmbed::Response#url has been renamed OEmbed::Response#request_url because OEmbed::Response::Photo#url should be the URL of the static photo to be used by the oEmbed consumer. * OEmbed::Response.create_for now requires the format parameter. * OEmbed::Formatter backends won't try to load gems that haven't already been loaded. (Marcos Wright Kuhns) * Better code documentation, all around. (Marcos Wright Kuhns) === Deprecations & Removals * Removed the OEmbed::Response::METHODS constant. * OEmbed::Provders::Pownce has been removed since pownce.com is no longer active. * Provider#url and Provider#name will be removed at some point in the future. * All direct raw calls will be made private at some point in the future (i.e. Provider#raw, Providers#raw, and ProviderDiscovery#raw) == 0.8.0 - Not Publicly Released * Added OEmbed::Formatter Backends, to remove the dependency on the json gem and make adding support for other parsing libraries easier. This also fixes GitHub Issue =1. (Marcos Wright Kuhns) * Catch invalid endpoint URLs on OEmbed::Provider instantiation. (Marcos Wright Kuhns) * Jeweler uses the new OEmbed::Version Class. (Marcos Wright Kuhns) * Corrected syntax for Youtube provider in the README (Ryan Richards) * Removed the deprecated rails/init.rb file. (Marcos Wright Kuhns) == 0.7.6 - 11 October 2010 * Released all recent changes to judofyr/master on GitHub. (Marcos Wright Kuhns) * Added CHANGELOG & LICENSE information. (Marcos Wright Kuhns) == 0.7.5 - 29 September 2010 * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Aris Bartee) * {rvmrc file}[http://rvm.beginrescueend.com/workflow/rvmrc/] added. (Aris Bartee) == 0.7.0 - 23 August 2010 * Gemified. (Aris Bartee) * Added the {Embedly}[http://embed.ly] Provider. (Alex Kessinger) * OEmbed::Response now includes the original request url. (Colin Shea) * Unregistering providers with duplicate URL patterns works. (Marcos Wright Kuhns) == 0.0.0 - May 2008 - July 2010 * Initial work & release as a library (Magnus Holm, et al.) * Many Providers supported, including {OohEmbed}[http://oohembed.com]. * Support for JSON (via the json gem) and XML (via the xml-simple gem). ruby-oembed-0.8.14/integration_test/0000755000004100000410000000000012546055651017441 5ustar www-datawww-dataruby-oembed-0.8.14/integration_test/test.rb0000644000004100000410000000170512546055651020750 0ustar www-datawww-datarequire 'rubygems' require File.dirname(__FILE__) + '/../lib/oembed' OEmbed::Providers.register_all() OEmbed::Providers.register_fallback(OEmbed::ProviderDiscovery, OEmbed::Providers::Embedly, OEmbed::Providers::OohEmbed) passed = "passed" passed = "failed" File.open("test_urls.csv", "r") do |infile| while (line = infile.gets) begin res = OEmbed::Providers.raw(line, :format => :json) passed = "passed" rescue OEmbed::NotFound => e if e.message == "OEmbed::NotFound" puts "not a supported url: " + line else puts e.message end passed = "failed" rescue OEmbed::UnknownResponse => e puts "got a bad network response" + e.message passed = "failed" rescue Timeout::Error puts "timeout error" passed = "failed" end puts passed + ": " + line end end ruby-oembed-0.8.14/integration_test/test_urls.csv0000644000004100000410000006346412546055651022217 0ustar www-datawww-datahttp://www.clearspring.com/widgets/4974d21ab04fa9e2 http://www.clearspring.com/widgets/4713b18f59796b09 http://www.clearspring.com/widgets/48613409efac8054 http://www.clearspring.com/widgets/49ad8cd4c63272f6/49b065bd0f0d6f05 http://www.clearspring.com/widgets/4702b4df5a93e1de http://www.clearspring.com/widgets/48fe1eaf11d0f95c http://www.clearspring.com/widgets/4727a250e66f9723?p=4a2d4ef4dcb2c3cf&flv=configxmlPath%3Dhttp%253A%252F%252Fvideo.nbcuni.com%252Fwidgetxml%252FsingleClip1%252Fsingleclip_omniConfig.xml%26logoLink%3Dhttp%253A%252F%252Fwww.nbc.com%253Fvty%2520%253D%2520f http://www.clearspring.com/widgets/48f203eebb67a86f http://www.clearspring.com/widgets/46dddf2c2ca0d939 http://tweetphoto.com/13677776 http://tweetphoto.com/13332027 http://tweetphoto.com/12887091 http://tweetphoto.com/15513196 http://tweetphoto.com/6554447 http://tweetphoto.com/13429958 http://tweetphoto.com/13897531 http://tweetphoto.com/7446386 http://tweetphoto.com/15112092 http://tweetphoto.com/6169634 http://www.flickr.com/photos/barackobamadotcom/2891789396/in/set-72157607533135519/ http://www.flickr.com/photos/barackobamadotcom http://www.flickr.com/photos/joshuatree/2994352588/ http://www.flickr.com/photos/jurvetson/2816735522/ http://www.flickr.com/photos/jurvetson/2175936409/ http://www.flickr.com/photos/53074154@N00/4398838944/ http://www.flickr.com/photos/benheine/2384869433/ http://www.flickr.com/photos/mattwright/400394507/ http://www.flickr.com/photos/stijnvogels/365950522/ http://www.twitpic.com/jwnc http://twitpic.com/afod4 http://twitpic.com/hcfc http://twitpic.com/k1nf http://twitpic.com/k3xp http://twitpic.com/jsc1 http://www.twitpic.com/6eowb http://twitpic.com/k3y7 http://twitpic.com/115112 http://twitpic.com/jj8p http://imgur.com/O7rgP http://imgur.com/gallery/QV50C http://twitgoo.com/ab3ur http://twitgoo.com/h0p http://twitgoo.com/5upeb http://twitgoo.com/4f9mp http://twitgoo.com/mmg http://twitgoo.com/lhavr/?format=rss http://twitgoo.com/2s9dw http://twitgoo.com/4p0y0 http://twitgoo.com/cqs2 http://twitgoo.com/4p0y0/?format=rss http://www.qwantz.com/index.php?comic=1585 http://www.23hq.com/robertworstell/photo/5463838?globaltag=washington http://www.23hq.com/astreim/photo/3564200?globaltag=geo%3Alat%3D39.966839 http://www.23hq.com/robertworstell/photo/5339188 http://www.23hq.com/robertworstell/photo/5495540?globaltag=car http://www.23hq.com/robertworstell/photo/5495667?globaltag=politics http://www.23hq.com/justindula/photo/3308705?globaltag=exterior http://www.23hq.com/justindula/photo/3308706 http://www.23hq.com/steffen/photo/1796911 http://www.23hq.com/robertworstell/photo/5495630?globaltag=politics http://www.amazon.com/Obama-Nation-Leftist-Politics-Personality/dp/B001RTS90Q http://www.amazon.com/Obama-Postmodern-Webster-Griffin-Tarpley/dp/0930852893 http://www.amazon.com/Audacity-Win-Lessons-Historic-Victory/dp/0670021334 http://www.amazon.com/Barack-Obama-Larry-Sinclair-Cocaine/dp/0578013878 http://www.amazon.com/Obama-Movement-Barack-Speaks-Americas/dp/0595467032 http://www.youtube.com/watch?v=hKe1gUgX5do http://www.youtube.com/watch?v=wKsoXHYICqU http://www.youtube.com/watch?v=acc6Wn_BWlk&feature=player_embedded http://www.youtube.com/watch?v=_3nLaaPLimM http://www.youtube.com/watch?v=11gmqODMX44 http://www.youtube.com/watch?v=CJu0DgpiK8c http://youtube.com/watch?v=21YF7ggCG6g&feature=related http://www.youtube.com/watch?v=-EnXxXEhEbk http://www.veoh.com/collection/citizenkate/watch/v15862192bZWP635t http://www.veoh.com/browse/videos/category/news_politics/watch/v15828113MBPcHeCG http://www.justin.tv/barack_obama_official/profile http://www.justin.tv/clip/2dce45e25932a3f8 http://www.justin.tv/clip/f58ddc3c986 http://www.justin.tv/obama_tv http://www.justin.tv/clip/4b4dde17174 http://www.justin.tv/lathedj/all http://www.justin.tv/ikeoo/schedule http://www.justin.tv/obama2008 http://www.justin.tv/barackobama09 http://en.justin.tv/clip/d501c15594c55d54 http://qik.com/obama http://qik.com/video/239291 http://qik.com/video/1756223 http://qik.com/video/524330 http://qik.com/video/885844 http://qik.com/video/891638 http://qik.com/video/891609 http://qik.com/video/891442 http://qik.com/video/1805702 http://qik.com/video/359372 http://revision3.com/diggreel/vier http://revision3.com/bestof/diggreel-0092 http://www.twitvid.com/6A55E http://www.twitvid.com/CDEF5 http://www.twitvid.com/23590 http://www.twitvid.com/F8EFF http://www.twitvid.com/F9608 http://www.twitvid.com/759BB http://www.twitvid.com/35A93 http://www.twitvid.com/FA6E8 http://www.twitvid.com/TL86A http://www.twitvid.com/ACAEF http://www.break.com/usercontent/2009/5/afl-cios-richard-trumka-on-racism-and-obama-741633.html http://www.break.com/usercontent/2008/5/Fox-News-Jokes-About-Killing-Obama-508522.html http://www.break.com/usercontent/2010/2/17/cia-columbia-obama-cover-up-1735281 http://www.break.com/usercontent/2009/9/eric-cantor-taken-aback-by-obama-s-address-to-congress-1292023.html http://www.break.com/usercontent/2010/1/barack-obama-is-chicago-cfr-elite-a-skull-bones-approved-pa-1611302 http://www.break.com/usercontent/2008/2/california-democratic-2008-debate-with-obama-and-h-446240.html http://www.break.com/usercontent/2009/8/obama-gives-up-on-healthcare-public-option-1161443.html http://www.break.com/usercontent/2009/8/michelle-obama-and-cindy-mccain-vying-for-jackie-o-kennedy-st-1174603.html http://www.break.com/index/obamas-jokes-at-correspondents-dinner.html http://www.break.com/index/bush-girl-meets-obama-girl.html http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=28160463 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=23954389 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=24299724 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=26828353 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=45478652 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=27620201 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=28296055 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=21117623 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=45892506 http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=26175985 http://www.metacafe.com/watch/1967425/obama_wins_election/ http://www.metacafe.com/watch/yt-2A8AYa5JqmU/obama_speech_to_congress_part_1_6/ http://www.metacafe.com/watch/1910004/obama/ http://www.metacafe.com/watch/yt-8FBQ4D74Kt4/colin_powell_destroys_both_joe_the_plumber_and_mccains_campaign_while_endorsing_obama/ http://www.metacafe.com/watch/1305819/john_f_kennedy_barack_obama/ http://www.metacafe.com/watch/yt-491_5WxfcgI/obamas_tax_plan_penn_teller_and_gang_return_to_comment_on_b/ http://www.metacafe.com/watch/3094209/obama_calls_police_stupid/ http://www.metacafe.com/watch/yt-ato7BtisXzE/sen_barack_obamas_full_speech_to_the_dnc/ http://www.metacafe.com/watch/1970735/2008_obama_election_victory_world_reaction_more/ http://www.metacafe.com/watch/2108990/time_has_come_obama_or_mccain_you_choose_your_vote_is_important_to_the_usa/ http://www.blip.tv/file/3259184 http://blip.tv/file/644911 http://blip.tv/file/663377 http://blip.tv/file/657385 http://blip.tv/file/694554 http://www.blip.tv/file/633250/ http://blip.tv/file/627723 http://www.blip.tv/file/1462979/ http://blip.tv/file/582933 http://blip.tv/file/615671 http://video.google.com/videoplay?docid=7886780711843120756 http://video.google.com/videoplay?docid=5456752353400414374&q=obama&total=60521&start=0&num=50&so=0&type=search&plindex=5 http://video.google.com/videoplay?docid=6168784043164674382&hl=en http://video.google.com/videoplay?docid=-3278279264905207761&q=obama's+religion http://video.google.com/videoplay?docid=-1523532521779770523 http://video.google.com/videoplay?docid=-1241196528638897986 http://revver.com/video/1384702/cute-little-girl-runs-for-senate/ http://www.revver.com/video/929362/clinton-wants-obamas-superdelegates/ http://revver.com/video/783343/cedric-the-entertainer-slams-hillary-clinton/ http://revver.com/video/949461/barack-obama-as-jimmy-carter/ http://revver.com/video/1906726/obama-school-speech-video/ http://revver.com/video/1309658/election-news-obama-is-president-elect/ http://revver.com/video/348850/goodnight-burbank-breaking-news-obama-girl/ http://revver.com/video/1130010/cnns-obamamccain-coverage-and-the-psychological-influence/ http://video.yahoo.com/watch/1837362/6042753 http://video.yahoo.com/watch/2001251/6403820 http://video.yahoo.com/watch/3018138/8615647 http://video.yahoo.com/watch/3898026/10614284 http://video.yahoo.com/watch/1814640/5986532 http://video.yahoo.com/watch/1842402/6050969 http://video.yahoo.com/watch/3695324/10167879 http://video.yahoo.com/watch/3695192/10167611 http://video.yahoo.com/watch/3847185/10500944 http://video.yahoo.com/watch/4328841/11625131 http://www.viddler.com/explore/livingonplanet/videos/28/ http://www.viddler.com/explore/livingonplanet/videos/22/ http://www.viddler.com/explore/uptakevideo/videos/185/ http://www.viddler.com/explore/livingonplanet/videos/10/ http://www.viddler.com/explore/livingonplanet/videos/27/ http://www.viddler.com/explore/livingonplanet/videos/23/ http://www.viddler.com/explore/afteramerica/videos/2/ http://www.viddler.com/explore/livingonplanet/videos/25/ http://www.viddler.com/explore/PSUonDemand/videos/23/ http://www.viddler.com/explore/uptakevideo/videos/485/ http://www.liveleak.com/view?i=93e_1240769844&to_friend=1 http://www.liveleak.com/view?i=d99_1218407868&c=1 http://www.liveleak.com/view?i=b5c_1234883033&to_friend=1 http://www.liveleak.com/view?i=6ec_1233450381&to_friend=1 http://www.liveleak.com/view?i=aa4_1221263725&c=1 http://www.liveleak.com/view?i=fe9_1258556519&comment_order=newest_first http://www.liveleak.com/view?i=4b1_1266254730&c=1 http://www.liveleak.com/view?i=7da_1252608881&c=1 http://animoto.com/play/5S3XFwUykFaObgyBdJIiAg http://animoto.com/play/zmRlSGSSTAbO6WydGkpEvA http://animoto.com/play/Dfh2eunX70woCziIfgbbQg http://animoto.com/play/wNgouOCIt0cPOq7VupV0gg http://animoto.com/play/1rCfLNUyBnUhlkV69PPbBQ http://animoto.com/play/9a6ESTlt92FUZD0bJCi7bg?autostart=true http://animoto.com/play/bRpUQU99aHlIUQBZ07Fy4Q http://animoto.com/play/F50OCH5JDHB4UdUCywVL5Q http://animoto.com/play/OSOKHw9iswLR3WQltQC1Cw?autostart=true http://dotsub.com/view/bc80191a-bc10-4f77-bc8b-38109cf6b03b http://dotsub.com/view/search/?q=Obama&page=5 http://dotsub.com/view/bc80191a-bc10-4f77-bc8b-38109cf6b03b/viewTranscript/eng http://dotsub.com/view/eb67c6fa-502e-41c7-841a-ea299389b320 http://dotsub.com/view/cfad3ce8-8b80-4981-ba6b-f48f184d6712/viewTranscript/eng http://dotsub.com/view/cd39ee4d-9a74-4f7b-aa15-dc0465e03242 http://dotsub.com/view/cfad3ce8-8b80-4981-ba6b-f48f184d6712 http://dotsub.com/view/472e8cf0-9605-4490-a6b8-142309bb9598 http://dotsub.com/view/e7d724d9-cafb-4052-b1cc-e9df8955f212 http://dotsub.com/view/search/rss/Obama http://soundcloud.com/the-erratic-ninja/housin-obama http://soundcloud.com/dj-paul-v/dj-paul-v-obama-megamix http://soundcloud.com/shawn-mitchell-show/perverted-priorities-obama-one-year-later http://soundcloud.com/shawn-mitchell-show http://soundcloud.com/w-i-e/obama-w-i-e-remix http://soundcloud.com/dmackdaddy/cancion-obama http://soundcloud.com/adamsieff/04-obama http://soundcloud.com/elvisofdallas/obama-calls-kanye-a-jackass-1/comment-465945 http://soundcloud.com/soulofsydney/change-makes-you-want-to-hustle-a-funk-soul-disco-tribute-to-barack-obama/comment-766963 http://soundcloud.com/dufrain/bariq-obama http://www.hulu.com/watch?content_id=19700036 http://www.hulu.com/watch?content_id=17852057 http://www.hulu.com/watch?content_id=20266154 http://www.hulu.com/watch?content_id=18297909 http://www.hulu.com/watch?content_id=19885599 http://www.hulu.com/watch/135729/the-obama-administration-barack-obama-closer-in-chief http://www.hulu.com/watch?content_id=50004522 http://www.hulu.com/watch/130479/the-obama-administration-does-the-white-house-have-a-communication-problem http://www.hulu.com/watch/127750/the-obama-administration-white-house-duped-by-reid http://www.hulu.com/watch/126377/the-obama-administration-schultz-to-dems-toughen-up?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+HuluRecentlyAddedVideos+(Hulu+-+Recently+added+videos)#http:%2F%2Fwww.hulu.com%2Ffeed%2Frecent%2Fvideos?rd=0 http://crackle.com/c/Funny/Obama_s_Vlog/2404799 http://crackle.com/c/Short_Films/The_Predicted_Obama/2392868 http://crackle.com/c/Funny/Hillary_or_Obama_/2041070 http://crackle.com/c/Animation/Obama_and_Iran/2410717 http://crackle.com/c/Political/Obama_Delegate/2251733 http://crackle.com/c/Standup/Funny_Obama/2228489 http://crackle.com/c/Wet_Paint/Funny_Obama/2228505 http://crackle.com/c/Animation/Obama_and_al_Qaeda/2409232 http://www.fancast.com/tv/Barack-Obama/101845/1144484662/Lessons-Of-D-Day/videos http://www.fancast.com/tv/Barack-Obama/101845/1204270572/GOP-Mobs-Disrupt-Town-Halls/videos http://www.fancast.com/tv/Barack-Obama/101845/1000190481/Congress-Backs-Obama-with-$825-Billion-Stimulus-Bill/videos http://www.fancast.com/tv/Barack-Obama/101845/1212179023/Obama-Sells-Health-Care/videos http://www.fancast.com/tv/Barack-Obama/101845/1340965634/Obama-Welcomes-India-P.M./videos http://www.fancast.com/tv/Barack-Obama/101845/1349406421/Defending-Obama%E2%80%99s-War-Strategy/videos http://www.fancast.com/tv/Barack-Obama/101845/1246238428/Greer-on-Obama%E2%80%99s-Education-Speech/videos http://www.fancast.com/tv/Barack-Obama/101845/1306602366/Jarrett:-U.S.--Ready--for-Health-Reform/videos http://www.fancast.com/tv/Barack-Obama/101845/1250047340/Boehner-reacts-to-Obama%E2%80%99s-speech/videos http://www.fancast.com/tv/Barack-Obama/101845/1451681618/Obama-Continues-to-Sell-Reform/videos http://www.funnyordie.com/videos/18da506b8a/obama-reacts-to-healthcare-vote http://www.funnyordie.com/videos/3455b6fc40/the-prank-that-helped-presidentelect-obama-win-from-joshsomething http://www.funnyordie.com/videos/f40ef6d351/obama-reads-bush-s-letter http://www.funnyordie.com/videos/4f6b704c0e/obama-brings-sexy-back-from-chupacabra-the-series http://www.funnyordie.com/videos/c43c5532bc/kkk-endorses-obama-from-paulbryant6 http://vimeo.com/7474626 http://www.vimeo.com/5003244 http://vimeo.com/2129435 http://vimeo.com/2129731 http://www.vimeo.com/7436890 http://www.vimeo.com/2101701 http://www.vimeo.com/1918487 http://vimeo.com/6072100 http://vimeo.com/6787024 http://www.vimeo.com/5342151 http://www.ted.com/talks/nate_silver_on_race_and_politics.html http://www.ted.com/talks/clay_shirky_how_cellphones_twitter_facebook_can_make_history.html http://www.ted.com/talks/michelle_obama.html http://www.ted.com/talks/barry_schwartz_on_our_loss_of_wisdom.html http://www.ted.com/talks/lang/spa/michelle_obama.html http://www.omnisio.com/v/7H6BHShdjhG/clinton-and-obama-policy-debates http://www.omnisio.com/v/AIEVH81djhG/obama-and-rev-wright http://omnisio.com/v/LI2LfTUdjhG/better http://omnisio.com/v/MfvjDVNdjhG/obama-introduction http://omnisio.com/v/bWNTzVidjhG/exclusive-michael-j-fox-talks-to-katie-couric-re-rush-l http://www.omnisio.com/v/vH7qrTLdjhG/michelle-obama-speaks-at-nc-state http://www.thedailyshow.com/watch/tue-august-26-2008/indecision-2008---michelle-obama-s-patriotism http://www.thedailyshow.com/watch/wed-october-29-2008/barack-obama http://www.thedailyshow.com/watch/tue-january-20-2009/changefest--09---obama-s-inaugural-speech http://www.thedailyshow.com/watch/tue-july-22-2008/obama-quest---bethlehem?videoId=177349 http://www.thedailyshow.com/watch/wed-june-11-2008/obama-s-car-commercial http://www.thedailyshow.com/watch/wed-october-8-2008/michelle-obama-pt--2 http://www.thedailyshow.com/watch/wed-october-8-2008/michelle-obama-pt--1 http://www.thedailyshow.com/watch/thu-july-24-2008/obama-quest---berlin-speech http://www.thedailyshow.com/watch/mon-april-21-2008/barack-obama-pt--2 http://www.colbertnation.com/the-colbert-report-videos/173313/june-11-2008/un-american-news---u-s--election-edition http://www.colbertnation.com/the-colbert-report-videos/216606/january-22-2009/un-american-news---president-obama-edition http://www.colbertnation.com/the-colbert-report-videos/166776/april-22-2008/obama-copycattery http://www.colbertnation.com/the-colbert-report-videos/165954/april-15-2008/the-word---tradition http://www.colbertnation.com/the-colbert-report-videos/174866/june-23-2008/tip-wag---barack-obama http://www.colbertnation.com/the-colbert-report-videos/209942/november-06-2008/un-american-news---obama-edition http://www.colbertnation.com/the-colbert-report-videos/252138/october-12-2009/war-of-peace---shashi-tharoor http://www.colbertnation.com/the-colbert-report-videos/189700/october-29-2008/the-word---i-endorse-barack-obama http://www.comedycentral.com/videos/index.jhtml?videoId=168815&title=carlos-mencia-barack-obama http://www.comedycentral.com/videos/index.jhtml?videoId=186920&title=politibits-pete-lee-obamas-vice http://www.comedycentral.com/videos/index.jhtml?videoId=209899&title=who-made-obama-win http://www.comedycentral.com/videos/index.jhtml?videoId=226113&title=obamas-first-100-days http://www.comedycentral.com/videos/index.jhtml?videoId=210463&title=barack-obamas-wardrobe http://wordpress.tv/2009/10/27/matt-mullenweg-wordpress-open-source/ http://www.traileraddict.com/trailer/by-the-people-election-barack-obama/trailer http://post.ly/aZxr http://post.ly/aZMt http://post.ly/aZQ3 http://post.ly/aZ3r http://post.ly/aZ03 http://post.ly/aYt2 http://post.ly/aYfC http://post.ly/aYdB http://post.ly/aYct http://post.ly/aQKz http://post.ly/aYZP http://post.ly/aXVi http://post.ly/aYQo http://post.ly/aYCi http://post.ly/aY20 http://vimeo.com/10825843 http://vimeo.com/7761373 http://vimeo.com/10551565 http://vimeo.com/10780873 http://vimeo.com/5324878 http://vimeo.com/10923660 http://vimeo.com/10404839 http://vimeo.com/8991556 http://vimeo.com/10716289 http://vimeo.com/10928833 http://vimeo.com/10928964 http://vimeo.com/8332956 http://vimeo.com/10920478 http://vimeo.com/10228447 http://vimeo.com/9873910 http://vimeo.com/7817799 http://www.vimeo.com/10926023 http://vimeo.com/10721651 http://vimeo.com/10800426 http://www.funnyordie.com/videos/b8fa781c42/shotgun-harley-with-jason-jones http://www.funnyordie.com/videos/d47751f7a0/raaaaaaaandy-declares-war-on-justin-bieber?rel=player http://www.funnyordie.com/videos/22103dea0f/rammstein-vs-cookie-monster http://www.funnyordie.com/videos/503ba0f6de/justin-bieber-in-concert?rel=auto_related& http://www.funnyordie.com/videos/a264602741/bieber-takes-a-tumble?rel=player http://tweetphoto.com/18499366 http://tweetphoto.com/18499269 http://tweetphoto.com/18499056 http://tweetphoto.com/18498703 http://tweetphoto.com/18498702 http://tweetphoto.com/18492753 http://tweetphoto.com/18493065 http://tweetphoto.com/18497851 http://tweetphoto.com/18498472 http://tweetphoto.com/18498590 http://tweetphoto.com/18497975 http://tweetphoto.com/18498580 http://tweetphoto.com/18498577 http://tweetphoto.com/18498465 http://tweetphoto.com/18498205 http://tweetphoto.com/18496285 http://tweetphoto.com/18497752 http://tweetphoto.com/18497047 http://tweetphoto.com/18496874 http://tweetphoto.com/18496787 http://tweetphoto.com/18496841 http://tweetphoto.com/18496836 http://tweetphoto.com/16446822 http://tweetphoto.com/18496709 http://tweetphoto.com/18496710 http://tweetphoto.com/18278792 http://tweetphoto.com/18496218 http://tweetphoto.com/18494660 http://tweetphoto.com/18496385 http://tweetphoto.com/18496384 http://www.youtube.com/watch?v=JGupbO3SfzI http://www.youtube.com/watch?v=MZUSrR5TQkI http://www.youtube.com/watch?v=3jR7b6SQWR8 http://www.youtube.com/watch?v=DFpn21dVXrw http://www.youtube.com/watch?v=74T1UjLW8KE http://www.youtube.com/watch?v=5Du9iN99WKU http://www.youtube.com/watch?v=2_Ig0ClYlmM http://www.youtube.com/watch?v=6BiH8jmNQzw http://www.youtube.com/watch?v=4CGgaggeQgA http://www.youtube.com/watch?v=z86yr0wQtiQ& http://www.youtube.com/watch?v=yKnF2xepHV0 http://www.youtube.com/watch?v=EXUN8o6yHJU http://www.youtube.com/watch?v=6jgouieelbk http://www.youtube.com/watch?v=SrgRYdFsWcU http://www.youtube.com/watch?v=KTQ1scE4k1k http://www.youtube.com/watch?v=iYmmh9zkpQM& http://www.youtube.com/watch?v=blOrY-nEGaE http://www.flickr.com/photos/anniemaree/4522364649/ http://www.flickr.com/photos/49266919@N02/4522759998/ http://www.flickr.com/photos/49229844@N03/4515485892/ http://www.flickr.com/photos/49299121@N05/4520968839/ http://www.flickr.com/photos/7203091@N08/4521061753/ http://www.flickr.com/photos/26162566@N02/4517466619/ http://www.flickr.com/photos/kristjanfreyr/4479155519/sizes/o/ http://www.flickr.com/photos/blackbeltjones/4522972990/ http://www.flickr.com/photos/mapgoblin/4486538947/ http://www.amazon.com/dp/B003CN5B6K http://www.amazon.com/dp/B002ZCY7PU http://www.amazon.com/dp/B002ZCY7QY http://www.amazon.com/dp/B003FHC5NU http://www.amazon.com/Wordcatcher-Odyssey-World-Weird-Wonderful/dp/1573444006 http://www.funnyordie.com/videos/b8fa781c42/shotgun-harley-with-jason-jones http://www.funnyordie.com/videos/d47751f7a0/raaaaaaaandy-declares-war-on-justin-bieber?rel=player http://www.funnyordie.com/videos/22103dea0f/rammstein-vs-cookie-monster http://www.funnyordie.com/videos/503ba0f6de/justin-bieber-in-concert?rel=auto_related& http://www.funnyordie.com/videos/a264602741/bieber-takes-a-tumble?rel=player http://www.collegehumor.com/video:1909386 http://www.collegehumor.com/video:1932163 http://www.collegehumor.com/video:1932083 http://www.collegehumor.com/video:1922981 http://www.collegehumor.com/video:1932171 http://www.collegehumor.com/video:1932964 http://www.collegehumor.com/video:1771556 http://www.collegehumor.com/video:1932811 http://www.collegehumor.com/video:1932809 http://www.collegehumor.com/video:1932180 http://www.collegehumor.com/video:1932943 http://www.collegehumor.com/video:1924838 http://www.collegehumor.com/video:1932918 http://www.collegehumor.com/video:1931876 http://www.collegehumor.com/video:1924727 http://www.collegehumor.com/video:1924064 http://www.collegehumor.com/video:1932942 http://www.collegehumor.com/video:1931515 http://www.collegehumor.com/video:1931028 http://www.collegehumor.com/video:1908741 http://www.hulu.com/watch/45644/its-always-sunny-in-philadelphia-the-nightman-cometh http://www.hulu.com/watch/142123/glee-vogue http://www.hulu.com/watch/142227/parenthood-rubber-band-ball#s-p1-sr-i1 http://www.hulu.com/watch/141556/saturday-night-live-teacher http://www.hulu.com/watch/142281/late-night-with-jimmy-fallon-exclusive-performance-the-specials http://www.hulu.com/watch/18138/the-simpsons-tax-day http://bit.ly/aT9B9q http://bit.ly/9u4UTt http://bit.ly/afPLDi http://bit.ly/bRVyh2 http://bit.ly/bzeGnh http://bit.ly/9EtGAC http://bit.ly/cGbfTj http://www.justin.tv/twitterchirp#r=vu9A84A~& http://justin.tv/s/04/KQhCHR4~/radiolamejoram http://justin.tv/s/01/NnaHvRw/stylesomega http://justin.tv/s/01/KQhCHR4/radiolamejoram http://justin.tv/s/01/KQhCHR4/ilformal http://www.justin.tv/channel3#r=hxqwQTE~& http://www.justin.tv/teamenvyus http://www.justin.tv/twitterchirp/b/262242477 http://crackle.com/c/The_Blob/The_Blob/2481060 http://crackle.com/c/Barney_Miller http://www.crackle.com/c/The_Bannen_Way http://crackle.com/c/The_Blob http://crackle.com/c/Star-ving http://www.crackle.com/c/star-ving http://www.fancast.com/tv/Star-Trek/96413/620862403/Star-Trek%3A-The-Original-Series---Return-to-Tomorrow/videos http://www.fancast.com/tv/Glee/103049/1467994754/Vogue/videos http://bit.ly/9XGjeL http://bit.ly/begEF2 http://bit.ly/a1ZWRP http://bit.ly/ciFUEx http://bit.ly/9x2ocN http://bit.ly/8KZpL2 http://bit.ly/cxgVJs http://bit.ly/9jcHCw http://bit.ly/cZnxwZ http://bit.ly/cXaiyc http://bit.ly/78WXz8 http://www.slideshare.net/rascorpion/segmenting-targetting-for-obama-campaign-presentation http://www.slideshare.net/jhcordeiro/aprendendo-com-obama-learning-from-obama http://www.slideshare.net/evon1001c/eco-obama-yes-we-can http://www.slideshare.net/goldenbook/ronald-reagan-oligarchy-pg-1-53-barack-hussein-obama-warning-001-strategy-structure-society-separation-supremacy-intertwined-intimidation-inevitable-conflict-by-gregory-bodenhamer-mechanicsburg-pa-all-rights-reserved-2009 http://www.slideshare.net/Donniefranklin/The-Obama-Strategy http://www.slideshare.net/rmuslim1978/obama-surge http://www.slideshare.net/apscuhuru/can-barack-obama-really-bring-the-change-we-need-presentation-630816 http://www.slideshare.net/carolynallen/obama-100-days-pt1-presentation http://www.slideshare.net/leonwitt/obama-case-by-socialmedia8 http://www.scribd.com/doc/16097258/The-Social-Media-Use-of-Obama-and-McCain http://www.scribd.com/doc/6095094/Barack-Hussein-Obamas-Stealth-Socialism http://www.scribd.com/doc/6464528/Obama-Radical http://www.scribd.com/doc/7660387/Obamas-Socialism-for-Dummies http://www.scribd.com/doc/7539456/Hussein-Obama-Psychopath http://www.scribd.com/doc/28654563/Reasons-to-Impeach-Obama http://www.scribd.com/doc/11481884/Obama http://www.scribd.com/doc/13984347/OBAMAchangeorWhat09 http://www.scribd.com/doc/4773699/Obama-Nation-Unfit-for-Publication http://www.scribd.com/doc/19813078/Obama-Acorn-Could-It-Be-True http://screenr.com/XFU http://screenr.com/xzH http://screenr.com/8BM http://screenr.com/ELB http://screenr.com/Wdg http://screenr.com/09B http://screenr.com/kb2 http://screenr.com/ffH http://screenr.com/o2x http://screenr.com/nF8 http://www.5min.com/Video/Obama-Wants-Tax-on-Banks-259812154 http://www.5min.com/Video/3-Reasons-Why-Obamas-High-Speed-Rail-Will-Go-Nowhere-Fast-265821223 http://www.5min.com/Video/Obamas-Financial-Overhaul-259791853 http://www.5min.com/Video/Obama-on-Housing-259806854 http://www.5min.com/Video/Facts-About-Barack-Obama-Part-2-112437815 http://www.5min.com/Video/Barack-Obama---Profile-171008518 http://www.howcast.com/videos/99965-Rebooting-Politics-20-With-the-Obama-Campaigns-New-Media-Team-Part-1-Of-4 http://www.howcast.com/videos/99968-Rebooting-Politics-20-With-the-Obama-Campaigns-New-Media-Team-Part-3-Of-4 http://www.howcast.com/videos/71601-Obama-Wins-How-Does-It-Impact-Your-IRS-Problem http://www.howcast.com/videos/37649-Obama-and-McCain-Agree-FREE-ISRAEL-FandK-PALESTINE http://www.howcast.com/videos/99970-Rebooting-Politics-20-With-the-Obama-Campaigns-New-Media-Team-Part-4-Of-4 http://www.howcast.com/videos/99967-Rebooting-Politics-20-With-the-Obama-Campaigns-New-Media-Team-Part-2-Of-4 ruby-oembed-0.8.14/spec/0000755000004100000410000000000012546055651015011 5ustar www-datawww-dataruby-oembed-0.8.14/spec/provider_discovery_spec.rb0000644000004100000410000000771512546055651022303 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/spec_helper' require 'vcr' VCR.config do |c| c.default_cassette_options = { :record => :new_episodes } c.cassette_library_dir = 'spec/cassettes' c.stub_with :fakeweb end describe OEmbed::ProviderDiscovery do before(:all) do VCR.insert_cassette('OEmbed_ProviderDiscovery') end after(:all) do VCR.eject_cassette end include OEmbedSpecHelper { 'youtube' => [ 'http://www.youtube.com/watch?v=u6XAPnuFjJc', 'http://www.youtube.com/oembed', :json, ], 'vimeo' => [ 'http://vimeo.com/27953845', {:json=>'http://vimeo.com/api/oembed.json',:xml=>'http://vimeo.com/api/oembed.xml'}, :json, ], #'noteflight' => [ # 'http://www.noteflight.com/scores/view/09665392c94475f65dfaf5f30aadb6ed0921939d', # 'http://www.noteflight.com/services/oembed', # :json, #], #'wordpress' => [ # 'http://sweetandweak.wordpress.com/2011/09/23/nothing-starts-the-morning-like-a-good-dose-of-panic/', # 'http://public-api.wordpress.com/oembed/1.0/', # :json, #], }.each do |context, urls| given_url, expected_endpoint, expected_format = urls context "with #{context} url" do describe "discover_provider" do before(:all) do @provider_default = OEmbed::ProviderDiscovery.discover_provider(given_url) @provider_json = OEmbed::ProviderDiscovery.discover_provider(given_url, :format=>:json) @provider_xml = OEmbed::ProviderDiscovery.discover_provider(given_url, :format=>:xml) end it "should return the correct Class" do expect(@provider_default).to be_instance_of(OEmbed::Provider) expect(@provider_json).to be_instance_of(OEmbed::Provider) expect(@provider_xml).to be_instance_of(OEmbed::Provider) end it "should detect the correct URL" do if expected_endpoint.is_a?(Hash) expect(@provider_json.endpoint).to eq(expected_endpoint[expected_format]) expect(@provider_json.endpoint).to eq(expected_endpoint[:json]) expect(@provider_xml.endpoint).to eq(expected_endpoint[:xml]) else expect(@provider_default.endpoint).to eq(expected_endpoint) expect(@provider_json.endpoint).to eq(expected_endpoint) expect(@provider_xml.endpoint).to eq(expected_endpoint) end end it "should return the correct format" do expect(@provider_default.format).to eq(expected_format) expect(@provider_json.format).to eq(:json) expect(@provider_xml.format).to eq(:xml) end end # discover_provider describe "get" do before(:all) do @response_default = OEmbed::ProviderDiscovery.get(given_url) @response_json = OEmbed::ProviderDiscovery.get(given_url, :format=>:json) @response_xml = OEmbed::ProviderDiscovery.get(given_url, :format=>:xml) end it "should return the correct Class" do expect(@response_default).to be_kind_of(OEmbed::Response) expect(@response_json).to be_kind_of(OEmbed::Response) expect(@response_xml).to be_kind_of(OEmbed::Response) end it "should return the correct format" do expect(@response_default.format).to eq(expected_format.to_s) expect(@response_json.format).to eq('json') expect(@response_xml.format).to eq('xml') end it "should return the correct data" do expect(@response_default.type).to_not be_nil expect(@response_json.type).to_not be_nil expect(@response_xml.type).to_not be_nil # Technically, the following values _could_ be blank, but for the # examples urls we're using we expect them not to be. expect(@response_default.title).to_not be_nil expect(@response_json.title).to_not be_nil expect(@response_xml.title).to_not be_nil end end # get end end # each service endruby-oembed-0.8.14/spec/formatter/0000755000004100000410000000000012546055651017014 5ustar www-datawww-dataruby-oembed-0.8.14/spec/formatter/xml/0000755000004100000410000000000012546055651017614 5ustar www-datawww-dataruby-oembed-0.8.14/spec/formatter/xml/rexml_backend_spec.rb0000644000004100000410000000357212546055651023760 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/../../spec_helper' describe "OEmbed::Formatter::XML::Backends::REXML" do include OEmbedSpecHelper before(:all) do expect { OEmbed::Formatter::XML.backend = 'REXML' }.to_not raise_error expect((!!defined?(REXML))).to eq(true) end it "should support XML" do expect { OEmbed::Formatter.supported?(:xml) }.to_not raise_error end it "should be using the XmlSimple backend" do expect(OEmbed::Formatter::XML.backend).to eq(OEmbed::Formatter::XML::Backends::REXML) end it "should decode an XML String" do decoded = OEmbed::Formatter.decode(:xml, valid_response(:xml)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end it "should raise an OEmbed::ParseError when decoding an invalid XML String" do expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('unclosed_container', :xml)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('unclosed_tag', :xml)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('invalid_syntax', :xml)) }.to raise_error(OEmbed::ParseError) end it "should raise an OEmbed::ParseError when decoding fails with an unexpected error" do error_to_raise = ArgumentError expect(OEmbed::Formatter::XML.backend.parse_error).to_not be_kind_of(error_to_raise) expect(::REXML::Document).to receive(:new). and_raise(error_to_raise.new("unknown error")) expect { decode = OEmbed::Formatter.decode(:xml, valid_response(:xml)) }.to raise_error(OEmbed::ParseError) end endruby-oembed-0.8.14/spec/formatter/xml/nokogiri_backend_spec.rb0000644000004100000410000000372712546055651024454 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/../../spec_helper' describe "OEmbed::Formatter::XML::Backends::Nokogiri" do include OEmbedSpecHelper before(:all) do expect { OEmbed::Formatter::XML.backend = 'Nokogiri' }.to raise_error(LoadError) require 'nokogiri' expect { OEmbed::Formatter::XML.backend = 'Nokogiri' }.to_not raise_error end it "should support XML" do expect { OEmbed::Formatter.supported?(:xml) }.to_not raise_error end it "should be using the Nokogiri backend" do expect(OEmbed::Formatter::XML.backend).to eq(OEmbed::Formatter::XML::Backends::Nokogiri) end it "should decode an XML String" do decoded = OEmbed::Formatter.decode(:xml, valid_response(:xml)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end it "should raise an OEmbed::ParseError when decoding an invalid XML String" do expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('unclosed_container', :xml)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('unclosed_tag', :xml)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('invalid_syntax', :xml)) }.to raise_error(OEmbed::ParseError) end it "should raise an OEmbed::ParseError when decoding fails with an unexpected error" do error_to_raise = ArgumentError expect(OEmbed::Formatter::XML.backend.parse_error).to_not be_kind_of(error_to_raise) expect(::Nokogiri::XML::Document).to receive(:parse). and_raise(error_to_raise.new("unknown error")) expect { decode = OEmbed::Formatter.decode(:xml, valid_response(:xml)) }.to raise_error(OEmbed::ParseError) end endruby-oembed-0.8.14/spec/formatter/xml/xmlsimple_backend_spec.rb0000644000004100000410000000372012546055651024636 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/../../spec_helper' describe "OEmbed::Formatter::XML::Backends::XmlSimple" do include OEmbedSpecHelper before(:all) do expect { OEmbed::Formatter::XML.backend = 'XmlSimple' }.to raise_error(LoadError) require 'xmlsimple' expect { OEmbed::Formatter::XML.backend = 'XmlSimple' }.to_not raise_error end it "should support XML" do expect { OEmbed::Formatter.supported?(:xml) }.to_not raise_error end it "should be using the XmlSimple backend" do expect(OEmbed::Formatter::XML.backend).to eq(OEmbed::Formatter::XML::Backends::XmlSimple) end it "should decode an XML String" do decoded = OEmbed::Formatter.decode(:xml, valid_response(:xml)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end it "should raise an OEmbed::ParseError when decoding an invalid XML String" do expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('unclosed_container', :xml)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('unclosed_tag', :xml)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:xml, invalid_response('invalid_syntax', :xml)) }.to raise_error(OEmbed::ParseError) end it "should raise an OEmbed::ParseError when decoding fails with an unexpected error" do error_to_raise = ArgumentError expect(OEmbed::Formatter::XML.backend.parse_error).to_not be_kind_of(error_to_raise) expect(::XmlSimple).to receive(:xml_in). and_raise(error_to_raise.new("unknown error")) expect { decode = OEmbed::Formatter.decode(:xml, valid_response(:xml)) }.to raise_error(OEmbed::ParseError) end endruby-oembed-0.8.14/spec/formatter/ducktype_backend_spec.rb0000644000004100000410000000514712546055651023661 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/../spec_helper' class WorkingDuck # The WorkingDuck Class should work as a Backend class << self # Fakes a correct deocde response def decode(value) {"version"=>1.0, "string"=>"test", "int"=>42, "html"=>"Cool's\n the \"word\"!",} end def parse_error; RuntimeError; end end # A WorkingDuck instance should work as a Backend def decode(value) self.class.decode(value) end def parse_error; RuntimeError; end end class FailingDuckDecode # Fakes an incorrect decode response def decode(value) {} end def parse_error; RuntimeError; end end describe "OEmbed::Formatter::JSON::Backends::DuckType" do include OEmbedSpecHelper it "should work with WorkingDuck Class" do expect { OEmbed::Formatter::JSON.backend = WorkingDuck }.not_to raise_error expect(OEmbed::Formatter::JSON.backend).to be WorkingDuck end it "should work with a WorkingDuck instance" do instance = WorkingDuck.new expect { OEmbed::Formatter::JSON.backend = instance }.to_not raise_error expect(OEmbed::Formatter::JSON.backend).to be instance end it "should fail with FailingDuckDecode Class" do expect { OEmbed::Formatter::JSON.backend = FailingDuckDecode }.to raise_error(LoadError) expect(OEmbed::Formatter::JSON.backend).to_not be(FailingDuckDecode) end it "should fail with a FailingDuckDecode instance" do instance = FailingDuckDecode.new expect { OEmbed::Formatter::JSON.backend = instance }.to raise_error(LoadError) expect(OEmbed::Formatter::JSON.backend).to_not be(instance) end end describe "OEmbed::Formatter::XML::Backends::DuckType" do include OEmbedSpecHelper it "should work with WorkingDuck Class" do expect { OEmbed::Formatter::XML.backend = WorkingDuck }.to_not raise_error expect(OEmbed::Formatter::XML.backend).to be(WorkingDuck) end it "should work with a WorkingDuck instance" do instance = WorkingDuck.new expect { OEmbed::Formatter::XML.backend = instance }.to_not raise_error expect(OEmbed::Formatter::XML.backend).to be(instance) end it "should fail with FailingDuckDecode Class" do expect { OEmbed::Formatter::XML.backend = FailingDuckDecode }.to raise_error(LoadError) expect(OEmbed::Formatter::XML.backend).to_not be(FailingDuckDecode) end it "should fail with a FailingDuckDecode instance" do instance = FailingDuckDecode.new expect { OEmbed::Formatter::XML.backend = instance }.to raise_error(LoadError) expect(OEmbed::Formatter::XML.backend).to_not be(instance) end endruby-oembed-0.8.14/spec/formatter/json/0000755000004100000410000000000012546055651017765 5ustar www-datawww-dataruby-oembed-0.8.14/spec/formatter/json/jsongem_backend_spec.rb0000644000004100000410000000371612546055651024444 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/../../spec_helper' describe "OEmbed::Formatter::JSON::Backends::JSONGem" do include OEmbedSpecHelper before(:all) do expect { OEmbed::Formatter::JSON.backend = 'JSONGem' }.to raise_error(LoadError) require 'json' expect { OEmbed::Formatter::JSON.backend = 'JSONGem' }.to_not raise_error end it "should support JSON" do expect { OEmbed::Formatter.supported?(:json) }.to_not raise_error end it "should be using the JSONGem backend" do expect(OEmbed::Formatter::JSON.backend).to eq(OEmbed::Formatter::JSON::Backends::JSONGem) end it "should decode a JSON String" do decoded = OEmbed::Formatter.decode(:json, valid_response(:json)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end it "should raise an OEmbed::ParseError when decoding an invalid JSON String" do expect { decode = OEmbed::Formatter.decode(:json, invalid_response('unclosed_container', :json)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:json, invalid_response('unclosed_tag', :json)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:json, invalid_response('invalid_syntax', :json)) }.to raise_error(OEmbed::ParseError) end it "should raise an OEmbed::ParseError when decoding fails with an unexpected error" do error_to_raise = ArgumentError expect(OEmbed::Formatter::JSON.backend.parse_error).to_not be_kind_of(error_to_raise) expect(::JSON).to receive(:parse). and_throw(error_to_raise.new("unknown error")) expect { decode = OEmbed::Formatter.decode(:json, valid_response(:json)) }.to raise_error(OEmbed::ParseError) end endruby-oembed-0.8.14/spec/formatter/json/.DS_Store0000644000004100000410000001400412546055651021447 0ustar www-datawww-dataBud1%  @€ @€ @€ @ E%DSDB`€ @€ @€ @ruby-oembed-0.8.14/spec/formatter/json/yaml_backend_spec.rb0000644000004100000410000000364012546055651023740 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/../../spec_helper' describe "OEmbed::Formatter::JSON::Backends::Yaml" do include OEmbedSpecHelper before(:all) do expect { OEmbed::Formatter::JSON.backend = 'Yaml' }.to_not raise_error expect(!!defined?(YAML)).to eq(true) end it "should support JSON" do expect { OEmbed::Formatter.supported?(:json) }.to_not raise_error end it "should be using the Yaml backend" do expect(OEmbed::Formatter::JSON.backend).to eq(OEmbed::Formatter::JSON::Backends::Yaml) end it "should decode a JSON String" do decoded = OEmbed::Formatter.decode(:json, valid_response(:json)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end it "should raise an OEmbed::ParseError when decoding an invalid JSON String" do expect { decode = OEmbed::Formatter.decode(:json, invalid_response('unclosed_container', :json)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:json, invalid_response('unclosed_tag', :json)) }.to raise_error(OEmbed::ParseError) expect { decode = OEmbed::Formatter.decode(:json, invalid_response('invalid_syntax', :json)) }.to raise_error(OEmbed::ParseError) end it "should raise an OEmbed::ParseError when decoding fails with an unexpected error" do error_to_raise = ArgumentError expect(OEmbed::Formatter::JSON.backend.parse_error).to_not be_kind_of(error_to_raise) expect(OEmbed::Formatter::JSON.backend).to receive(:convert_json_to_yaml). and_throw(error_to_raise.new("unknown error")) expect { decode = OEmbed::Formatter.decode(:json, valid_response(:json)) }.to raise_error(OEmbed::ParseError) end endruby-oembed-0.8.14/spec/spec_helper_examples.yml0000644000004100000410000000545712546055651021736 0ustar www-datawww-data--- :flickr: :url: "http://flickr.com/photos/bees/2362225867/" :body: ! '{"version":"1.0","type":"photo","author_url":"http:\/\/www.flickr.com\/photos\/bees\/","cache_age":3600,"provider_name":"Flickr","provider_url":"http:\/\/www.flickr.com\/","title":"Bacon Lollys","author_name":"\u202e\u202d\u202cbees\u202c","width":"500","height":"375","url":"http:\/\/farm4.staticflickr.com\/3040\/2362225867_4a87ab8baf.jpg"} ' :skitch: :url: "http://skitch.com/sethferreira/nmbr8/the-kings-new-toy" :body: ! '{"type":"photo","version":"1.0","author_name":"sethferreira","author_url":"http:\/\/skitch.com\/sethferreira\/","provider_name":"Skitch.com","provider_url":"http:\/\/skitch.com\/","width":804,"height":804,"url":"https:\/\/img.skitch.com\/20091210-m9cq9r2e6cy1j1sn23acn38kx.jpg","thumbnail_width":337,"thumbnail_height":337,"thumbnail_url":"https:\/\/img.skitch.com\/20091210-m9cq9r2e6cy1j1sn23acn38kx.preview.jpg","cache_age":86400}' :viddler: :url: "http://www.viddler.com/explore/cdevroe/videos/424/" :qik: :url: "http://qik.com/video/49565" :vimeo: :url: "http://vimeo.com/3100878" :body: ! '{"type":"video","version":"1.0","provider_name":"Vimeo","provider_url":"http:\/\/vimeo.com\/","title":"Murmuration","author_name":"Sophie Windsor Clive","author_url":"http:\/\/vimeo.com\/user3069761","is_plus":"0","html":"\n\n\n \n\n \n\n \n\n\n\n \n\n \n\n\n \n\ \n\ " http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://www.youtube.com:80/oembed?format=json&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du6XAPnuFjJc body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-content-type-options: - nosniff expires: - Tue, 27 Apr 1971 19:44:06 EST content-type: - application/json server: - Apache date: - Sat, 12 Nov 2011 23:47:54 GMT cache-control: - no-cache transfer-encoding: - chunked body: "{\"provider_url\": \"http:\\/\\/www.youtube.com\\/\", \"title\": \"RSA Animate - Drive: The surprising truth about what motivates us\", \"html\": \"\\u003cobject width=\\\"480\\\" height=\\\"270\\\"\\u003e\\u003cparam name=\\\"movie\\\" value=\\\"http:\\/\\/www.youtube.com\\/v\\/u6XAPnuFjJc?version=3\\u0026feature=oembed\\\"\\u003e\\u003c\\/param\\u003e\\u003cparam name=\\\"allowFullScreen\\\" value=\\\"true\\\"\\u003e\\u003c\\/param\\u003e\\u003cparam name=\\\"allowscriptaccess\\\" value=\\\"always\\\"\\u003e\\u003c\\/param\\u003e\\u003cembed src=\\\"http:\\/\\/www.youtube.com\\/v\\/u6XAPnuFjJc?version=3\\u0026feature=oembed\\\" type=\\\"application\\/x-shockwave-flash\\\" width=\\\"480\\\" height=\\\"270\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\"\\u003e\\u003c\\/embed\\u003e\\u003c\\/object\\u003e\", \"author_name\": \"theRSAorg\", \"height\": 270, \"thumbnail_width\": 480, \"width\": 480, \"version\": \"1.0\", \"author_url\": \"http:\\/\\/www.youtube.com\\/user\\/theRSAorg\", \"provider_name\": \"YouTube\", \"thumbnail_url\": \"http:\\/\\/i2.ytimg.com\\/vi\\/u6XAPnuFjJc\\/hqdefault.jpg\", \"type\": \"video\", \"thumbnail_height\": 360}" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://www.youtube.com:80/watch?v=u6XAPnuFjJc body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-frame-options: - SAMEORIGIN x-content-type-options: - nosniff expires: - Tue, 27 Apr 1971 19:44:06 EST content-type: - text/html; charset=utf-8 server: - wiseguy/0.6.11 date: - Sat, 12 Nov 2011 23:47:55 GMT set-cookie: - use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com - VISITOR_INFO1_LIVE=koTmg18WI40; path=/; domain=.youtube.com; expires=Mon, 09-Jul-2012 23:47:55 GMT - recently_watched_video_id_list=e7cbc48492077f76fbdf5a81b97f291bWwEAAABzCwAAAHU2WEFQbnVGakpj; path=/; domain=.youtube.com - GEO=d6ebfa7db00082d165d2d13adaa86ea3cwsAAAAzVVNHO/0STr8Fqw==; path=/; domain=.youtube.com cache-control: - no-cache transfer-encoding: - chunked body: "\n\ \n\ \n\ \n \n \n\n \n\n \n RSA Animate - Drive: The surprising truth about what motivates us\n - YouTube\n \n\n \n \n\n \n \n \n \n \n \n\n\n \n\n\n \n\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n \n\n\n\n \n \n\n\n\ \n\ \n
\n \n
\n \n
\n
\n \n \n
\n \n \"YouTube\n \n\n\n\n \n \n\n\n\n\n
\n\
\n\n\n
\n \n\n \n
\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n\n\n \n
\n
\n \n\n\n\n

\n \n\n\n \n RSA Animate - Drive: The surprising truth about what motivates us\n \n\n

\n\n
\n \"theRSAorg\"\n\n \n \n \n 434 videos\n\n \n \n\n \n \n\n\n \n\n \n \n\n \n\n \n \n\n \n\n \"AlertSubscribed\n \n\n\n
\n\n
\n
\n Sign In or Sign Up now!\n\ \n\n
\n
\n\n\n
\n
\n Loading...\n
\n
\n
\n\n
\n \n
\n
\n \n\n
\n \n <div class=\"yt-alert yt-alert-error yt-alert-player yt-rounded \"><img src=\"//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif\" class=\"icon master-sprite\" alt=\"Alert icon\"><div class=\"yt-alert-content\"> You need Adobe Flash Player to watch this video. <br> <a href=\"http://get.adobe.com/flashplayer/\">Download it from Adobe.</a>\n\ </div></div>\n\n\n
\n\n \n
\n \n \n
\n \n
\n
\n \n
\n
\n
\n
\"Alert
Upgrade to Flash Player 10 for improved playback performance. Upgrade Now or More Info.\n\
\n\n\n
\n
\n \n 7,063,876\n \n \n\n
\n \n \n\n \n\n \n\n\n
\n\n
\n
\n
\n\ Loading...\n
\n
\n
\"Alert
Sign In or Sign Up now!\n\ \n\n\
\n
\n
\n
\"Alert
\n
\n
\n\n
\n\n
\n \n
\n\n
\n
\n
\n \n
\n
\n

\n \n\ Uploaded by theRSAorg on Apr 1, 2010\n\n

\n
\n

This lively RSAnimate, adapted from Dan Pink's talk at the RSA, illustrates the hidden truths behind what really motivates us at home and in the workplace.
www.theRSA.org

\n
\n
\n

Category:

\n

News & Politics

\n\n\n\n

Tags:

\n \n\n\n

License:

\n

\n\ Standard YouTube License\n

\n\n\n
\n\n
\n
\n\n
    \n
  • \n
    \n
    \n
    \n
    \n \n\ 52,127 likes, 362 dislikes\n \n
  • \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
  • \n \n \n
  • \n\n\n\n
\n\n\n
\n
\n \n
\n
\n \n
\n
\n\n\n\n
\n\n\n
\n\n
\n \n\n\n
\n\n
\n
\n
\n
Link to this comment:
\n
\n \n
\n
\n Share to:\n \"\"\n \"\"\n \"\"\n
\n
\n
\n\n\n \n
\n

Top Comments

\n
    \n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    It's\xEF\xBB\xBF amusing that even on such an intelligent video such as this, people still insist on acting like 5 year olds.

    \n\

    \n\n
    \n
    \n\n
    \n boogalice\n\n \n 4 days ago\n \n\n \n 6 \n \n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    he didnt suggest the reason why people do poorly at\xEF\xBB\xBF higher paying creative efforts?

    \n\n
    \n
    \n\n
    \n pierce9ray\n\n \n 1 week ago\n \n\n \n 4 \n \n
    \n
    \n\n
  • \n\n\n
\n
\n\n\n \n\n\n
\n
\n
\n see all\n

All Comments (5,310)

\n
\n

\n\ Reactions\n (34)\n

\n
\n
\n
\n
\n Sign In or Sign Up now to post a comment!\n\n
\n
\n \n
\n\n
\n\n\n
    \n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    @jasonrgrullon2015 "Organisation" is\xEF\xBB\xBF not a typo. It is "English" not American English. There is a world outside of the U.S.

    \n\n
    \n
    \n\n
    \n sal0610\n\n \n 6 hours ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    just discovered this video. Mindblowing...to say\xEF\xBB\xBF the least.

    \n\n
    \n
    \n\n
    \n berloonable\n\n \n 15 hours ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    @jasonrgrullon2015 What's\xEF\xBB\xBF wrong with "organisation"? That's the British way to spell the American "organization".

    \n\n
    \n
    \n\n
    \n BlackBulletIV\n\n \n 17 hours ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    @qpraulitoqp Thing is, it costs a lot more to make nice buildings that to record an album, so I can't really see this analogy\xEF\xBB\xBF at work much.

    \n\n
    \n
    \n\n
    \n Nettacki\n\n \n 20 hours ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    "ORGANISATION" Mistake Thumbs up if you caught it\xEF\xBB\xBF

    \n\n
    \n
    \n\n
    \n jasonrgrullon2015\n\n \n 1 day ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    pretty well done , fellow ! Watch my nightmare\xEF\xBB\xBF cartoon video

    \n\n
    \n
    \n\n
    \n literatoons\n\n \n 1 day ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    @pierce9ray its like hip hop. The big people are garbage. So just ask urself why mainstream hip hop sucks dik. Maybe the money makes u lazy, careless, full of urself..but thats hip hop.. A good architect or designer that makes nice ass buildings, on the other hand, would get payed like crazy but still keep making nice buildings. This means despite the amount of pay the creative essence never was effected.. or maybe there\xEF\xBB\xBF just wasnt enough reward given to corrupt it. Who knows?!

    \n\n
    \n
    \n\n
    \n qpraulitoqp\n\n \n 1 day ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    wooww Thank you\xEF\xBB\xBF RSA and professor...

    \n\n
    \n
    \n\n
    \n TheHakim03\n\n \n 1 day ago\n \n\n
    \n
    \n\n
  • \n\n \n\n\n
  • \n\n
    \n
    \n\n
    \n

    9:00 reminds\xEF\xBB\xBF of cod and activision .

    \n\n
    \n
    \n\n
    \n icancount123578\n\n \n 2 days ago\n\ in playlist COMPLEXITY!\n \n\n
    \n
    \n\n
  • \n\n\n
\n
\n\n
\n View all Comments »\n
\n \n \n
\n\n \n\  \n \n\  \n \n\  \n \n\  \n \n\  \n \n\  \n \n\  \n\n Next\n\n
\n\n\n
\n
\n\n
\n
\n
\n\
\n
\n\
  • Share
  • Remove
  • Flag for spam
  • Block User
  • Unblock User
\n
\n\n
Loading...
\n\n\n
\n\n
\n
\n \n\n
\n
\n
\n
\n\ Advertisement\n
\n
\n\n\n\n\

\n
\n
\n
\n
\n \n \n\n\n\n
\n\n
\n
\n \n\
\n\n
\n \n
\n
\n \n
\n \n\n
\n \n \n
\n \n
\n
Loading...
\n\n\n
\n\n \n
\n \n\n\n\n
\n
\n
\n
\"Alert
\n\ 0 / 00Unsaved Playlist\n \n\ Return to active list\n \n\n\
\n
\n\n\
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    \"Loading...\"Loading...Saving...
    \n\n
    \n
      \n
    • \n\ Clear all videos from this list\n
    • \n
    \n\n
    \n\n
      \n
    • Learn more
    • \n
    \n
    \n\n
    \n\n\n
    \n
    \n
    \n
    \n Sign in to add this to a playlist\n\ \n\n
    \n
    \n
    \n \n \n Back to list\n
    \n
    \n\n
    \n
    \n \n Added to playlist:\n \n
    \n\
    150
    \n
    \n
    \n
    \n \n Saving note...\n
    \n
    \n
    \n
    \n \n Note added to:\n
    \n
    \n
    \n
    \n \n Error adding note:\n
      \n Click to add a new note\n
      \n
      \n
      \n \n
      \n\n
      \n
      \n\n
      \n\n\n\n\n
      \n \n \n \n\n\n \n \n\n\n \n\n \n \n\n \n\n\n\n\n\n \n\n \n \n\n\n \n \n\n\n\n\n\n\n \n\n \n\n \n\n\n\n \n\n \n\n\n \n\ \n\ " http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://www.youtube.com:80/oembed?format=json&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du6XAPnuFjJc body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-content-type-options: - nosniff expires: - Tue, 27 Apr 1971 19:44:06 EST content-type: - application/json server: - Apache date: - Sat, 12 Nov 2011 23:47:55 GMT cache-control: - no-cache transfer-encoding: - chunked body: "{\"provider_url\": \"http:\\/\\/www.youtube.com\\/\", \"title\": \"RSA Animate - Drive: The surprising truth about what motivates us\", \"html\": \"\\u003cobject width=\\\"480\\\" height=\\\"270\\\"\\u003e\\u003cparam name=\\\"movie\\\" value=\\\"http:\\/\\/www.youtube.com\\/v\\/u6XAPnuFjJc?version=3\\u0026feature=oembed\\\"\\u003e\\u003c\\/param\\u003e\\u003cparam name=\\\"allowFullScreen\\\" value=\\\"true\\\"\\u003e\\u003c\\/param\\u003e\\u003cparam name=\\\"allowscriptaccess\\\" value=\\\"always\\\"\\u003e\\u003c\\/param\\u003e\\u003cembed src=\\\"http:\\/\\/www.youtube.com\\/v\\/u6XAPnuFjJc?version=3\\u0026feature=oembed\\\" type=\\\"application\\/x-shockwave-flash\\\" width=\\\"480\\\" height=\\\"270\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\"\\u003e\\u003c\\/embed\\u003e\\u003c\\/object\\u003e\", \"author_name\": \"theRSAorg\", \"height\": 270, \"thumbnail_width\": 480, \"width\": 480, \"version\": \"1.0\", \"author_url\": \"http:\\/\\/www.youtube.com\\/user\\/theRSAorg\", \"provider_name\": \"YouTube\", \"thumbnail_url\": \"http:\\/\\/i2.ytimg.com\\/vi\\/u6XAPnuFjJc\\/hqdefault.jpg\", \"type\": \"video\", \"thumbnail_height\": 360}" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://www.youtube.com:80/watch?v=u6XAPnuFjJc body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-frame-options: - SAMEORIGIN x-content-type-options: - nosniff expires: - Tue, 27 Apr 1971 19:44:06 EST content-type: - text/html; charset=utf-8 server: - wiseguy/0.6.11 date: - Sat, 12 Nov 2011 23:47:56 GMT set-cookie: - use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com - VISITOR_INFO1_LIVE=RYAyUEoedt8; path=/; domain=.youtube.com; expires=Mon, 09-Jul-2012 23:47:55 GMT - recently_watched_video_id_list=e7cbc48492077f76fbdf5a81b97f291bWwEAAABzCwAAAHU2WEFQbnVGakpj; path=/; domain=.youtube.com - GEO=d6ebfa7db00082d165d2d13adaa86ea3cwsAAAAzVVNHO/0STr8Fqw==; path=/; domain=.youtube.com cache-control: - no-cache transfer-encoding: - chunked body: "\n\ \n\ \n\ \n \n \n\n \n\n \n RSA Animate - Drive: The surprising truth about what motivates us\n - YouTube\n \n\n \n \n\n \n \n \n \n \n \n\n\n \n\n\n \n\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n \n\n\n\n \n \n\n\n\ \n\ \n
      \n \n
      \n \n
      \n
      \n \n \n
      \n \n \"YouTube\n \n\n\n\n \n \n\n\n\n\n
      \n\
      \n\n\n
      \n \n\n \n
      \n
      \n
      \n \n
      \n
      \n \n \n \n \n \n \n \n \n\n\n \n
      \n
      \n \n\n\n\n

      \n \n\n\n \n RSA Animate - Drive: The surprising truth about what motivates us\n \n\n

      \n\n
      \n \"theRSAorg\"\n\n \n \n \n 434 videos\n\n \n \n\n \n \n\n\n \n\n \n \n\n \n\n \n \n\n \n\n \"AlertSubscribed\n \n\n\n
      \n\n
      \n
      \n Sign In or Sign Up now!\n\ \n\n
      \n
      \n\n\n
      \n
      \n Loading...\n
      \n
      \n
      \n\n
      \n \n
      \n
      \n \n\n
      \n \n <div class=\"yt-alert yt-alert-error yt-alert-player yt-rounded \"><img src=\"//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif\" class=\"icon master-sprite\" alt=\"Alert icon\"><div class=\"yt-alert-content\"> You need Adobe Flash Player to watch this video. <br> <a href=\"http://get.adobe.com/flashplayer/\">Download it from Adobe.</a>\n\ </div></div>\n\n\n
      \n\n \n
      \n \n \n
      \n \n
      \n
      \n \n
      \n
      \n
      \n
      \"Alert
      Upgrade to Flash Player 10 for improved playback performance. Upgrade Now or More Info.\n\
      \n\n\n
      \n
      \n \n 7,063,876\n \n \n\n
      \n \n \n\n \n\n \n\n\n
      \n\n
      \n
      \n
      \n\ Loading...\n
      \n
      \n
      \"Alert
      Sign In or Sign Up now!\n\ \n\n\
      \n
      \n
      \n
      \"Alert
      \n
      \n
      \n\n
      \n\n
      \n \n
      \n\n
      \n
      \n
      \n \n
      \n
      \n

      \n \n\ Uploaded by theRSAorg on Apr 1, 2010\n\n

      \n
      \n

      This lively RSAnimate, adapted from Dan Pink's talk at the RSA, illustrates the hidden truths behind what really motivates us at home and in the workplace.
      www.theRSA.org

      \n
      \n
      \n

      Category:

      \n

      News & Politics

      \n\n\n\n

      Tags:

      \n \n\n\n

      License:

      \n

      \n\ Standard YouTube License\n

      \n\n\n
      \n\n
      \n
      \n\n
        \n
      • \n
        \n
        \n
        \n
        \n \n\ 52,127 likes, 362 dislikes\n \n
      • \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      • \n \n \n
      • \n\n\n\n
      \n\n\n
      \n
      \n \n
      \n
      \n \n
      \n
      \n\n\n\n
      \n\n\n
      \n\n
      \n \n\n\n
      \n\n
      \n
      \n
      \n
      Link to this comment:
      \n
      \n \n
      \n
      \n Share to:\n \"\"\n \"\"\n \"\"\n
      \n
      \n
      \n\n\n \n
      \n

      Top Comments

      \n
        \n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        It's amusing that even on such an intelligent video such\xEF\xBB\xBF as this, people still insist on acting like 5 year olds.

        \n\

        \n\n
        \n
        \n\n
        \n boogalice\n\n \n 4 days ago\n \n\n \n 6 \n \n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        he didnt suggest the reason\xEF\xBB\xBF why people do poorly at higher paying creative efforts?

        \n\n
        \n
        \n\n
        \n pierce9ray\n\n \n 1 week ago\n \n\n \n 4 \n \n
        \n
        \n\n
      • \n\n\n
      \n
      \n\n\n \n\n\n
      \n
      \n
      \n see all\n

      All Comments (5,310)

      \n
      \n

      \n\ Reactions\n (34)\n

      \n
      \n
      \n
      \n
      \n Sign In or Sign Up now to post a comment!\n\n
      \n
      \n \n
      \n\n
      \n\n\n
        \n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        @jasonrgrullon2015 "Organisation" is not a typo. It is "English"\xEF\xBB\xBF not American English. There is a world outside of the U.S.

        \n\n
        \n
        \n\n
        \n sal0610\n\n \n 6 hours ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        just discovered this video.\xEF\xBB\xBF Mindblowing...to say the least.

        \n\n
        \n
        \n\n
        \n berloonable\n\n \n 15 hours ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        @jasonrgrullon2015 What's wrong with "organisation"? That's\xEF\xBB\xBF the British way to spell the American "organization".

        \n\n
        \n
        \n\n
        \n BlackBulletIV\n\n \n 17 hours ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        @qpraulitoqp Thing is, it costs a lot more to make nice buildings that to record an album, so I\xEF\xBB\xBF can't really see this analogy at work much.

        \n\n
        \n
        \n\n
        \n Nettacki\n\n \n 20 hours ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        "ORGANISATION" Mistake\xEF\xBB\xBF Thumbs up if you caught it

        \n\n
        \n
        \n\n
        \n jasonrgrullon2015\n\n \n 1 day ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        pretty well done , fellow\xEF\xBB\xBF ! Watch my nightmare cartoon video

        \n\n
        \n
        \n\n
        \n literatoons\n\n \n 1 day ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        @pierce9ray its like hip hop. The big people\xEF\xBB\xBF are garbage. So just ask urself why mainstream hip hop sucks dik. Maybe the money makes u lazy, careless, full of urself..but thats hip hop.. A good architect or designer that makes nice ass buildings, on the other hand, would get payed like crazy but still keep making nice buildings. This means despite the amount of pay the creative essence never was effected.. or maybe there just wasnt enough reward given to corrupt it. Who knows?!

        \n\n
        \n
        \n\n
        \n qpraulitoqp\n\n \n 1 day ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        wooww Thank you\xEF\xBB\xBF RSA and professor...

        \n\n
        \n
        \n\n
        \n TheHakim03\n\n \n 1 day ago\n \n\n
        \n
        \n\n
      • \n\n \n\n\n
      • \n\n
        \n
        \n\n
        \n

        9:00 reminds of cod and activision .\xEF\xBB\xBF

        \n\n
        \n
        \n\n
        \n icancount123578\n\n \n 2 days ago\n\ in playlist COMPLEXITY!\n \n\n
        \n
        \n\n
      • \n\n\n
      \n
      \n\n
      \n View all Comments »\n
      \n \n \n
      \n\n \n\  \n \n\  \n \n\  \n \n\  \n \n\  \n \n\  \n \n\  \n\n Next\n\n
      \n\n\n
      \n
      \n\n
      \n
      \n
      \n\
      \n
      \n\
      • Share
      • Remove
      • Flag for spam
      • Block User
      • Unblock User
      \n
      \n\n
      Loading...
      \n\n\n
      \n\n
      \n
      \n \n\n
      \n
      \n
      \n
      \n\ Advertisement\n
      \n
      \n\n\n\n\

      \n
      \n
      \n
      \n
      \n \n \n\n\n\n
      \n\n
      \n
      \n \n\
      \n\n
      \n \n
      \n
      \n \n
      \n \n\n
      \n \n \n
      \n \n
      \n
      Loading...
      \n\n\n
      \n\n \n
      \n \n\n\n\n
      \n
      \n
      \n
      \"Alert
      \n\ 0 / 00Unsaved Playlist\n \n\ Return to active list\n \n\n\
      \n
      \n\n\
        1. Your queue is empty. Add videos to your queue using this button:
          or sign in to load a different list.
        \"Loading...\"Loading...Saving...
        \n\n
        \n
          \n
        • \n\ Clear all videos from this list\n
        • \n
        \n\n
        \n\n
          \n
        • Learn more
        • \n
        \n
        \n\n
        \n\n\n
        \n
        \n
        \n
        \n Sign in to add this to a playlist\n\ \n\n
        \n
        \n
        \n \n \n Back to list\n
        \n
        \n\n
        \n
        \n \n Added to playlist:\n \n
        \n\
        150
        \n
        \n
        \n
        \n \n Saving note...\n
        \n
        \n
        \n
        \n \n Note added to:\n
        \n
        \n
        \n
        \n \n Error adding note:\n
          \n Click to add a new note\n
          \n
          \n
          \n \n
          \n\n
          \n
          \n\n
          \n\n\n\n\n
          \n \n \n \n\n\n\n \n\n \n \n\n \n\n\n\n\n\n \n\n \n \n\n\n \n \n\n\n\n\n\n\n \n\n \n\n \n\n\n\n \n\n \n\n\n \n\ \n\ " http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://www.youtube.com:80/oembed?format=xml&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du6XAPnuFjJc body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-content-type-options: - nosniff expires: - Tue, 27 Apr 1971 19:44:06 EST content-type: - text/xml server: - Apache date: - Sat, 12 Nov 2011 23:47:56 GMT cache-control: - no-cache transfer-encoding: - chunked body: |- http://www.youtube.com/RSA Animate - Drive: The surprising truth about what motivates us<object width="480" height="270"><param name="movie" value="http://www.youtube.com/v/u6XAPnuFjJc?version=3&feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/u6XAPnuFjJc?version=3&feature=oembed" type="application/x-shockwave-flash" width="480" height="270" allowscriptaccess="always" allowfullscreen="true"></embed></object>theRSAorg2704804801.0http://www.youtube.com/user/theRSAorgYouTubehttp://i2.ytimg.com/vi/u6XAPnuFjJc/hqdefault.jpgvideo360 http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:47:56 GMT content-type: - text/html; charset=UTF-8 server: - Apache date: - Sat, 12 Nov 2011 23:47:56 GMT set-cookie: - uid=0; expires=Tue, 09-Nov-2021 23:47:56 GMT; path=/; domain=.vimeo.com vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 transfer-encoding: - chunked body: "\n\ \n\ \n \n \n \n Tchaikovsky Timelapse on Vimeo\n\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n\ \n\n\ \n\n\ \n \n\n\ \n\ \n\ \n \n \n \n \n \n \n \n \n \n\n \"\"\n
          \n\n
          \n
          \n \"Vimeo\"\n
          \n
          \n \n
          \n\n \n
          \n\n \n \n \n\n\
          \n
          \"\"
          \n
          \n
          Tchaikovsky Timelapse
          \n \n
          \n 3 months ago\n 3 months ago: Sat, Aug 20, 2011 5:54pm EST (Eastern Standard Time)\n
          \n
          \n\n
          \n
          \n\n\
          \n
          \n\n
          \n
          \n \n
          00:00
          44
          \n\n
          \n
          \n \n\n\ \n\n\
          \n
          \n
          \n\ \tMore
          \n\
          \n\ \tMore
          \n
          \n
          \n\n \n
          \n\ \t
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n\n
          \n
          \n See all\n\n Show me\n
          \n\ \t
          joe clarke's videos
          \n\
          \n\
          \n\ \t
            \n\ \t\t\t\t\t \t\t
          • joe clarke's videos
          • \n\ \t\t\t\t\t \t\t
          • Staff Picks
          • \n\ \t\t\t
          \n\
          \n\n\n
          \n
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \t
          \n\ \t\t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t3. Tchaikovsky Timelapse\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          3 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t2. Cabot Not So Circus\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          8 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t1. They'll Never Take My Soul\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          1 year ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n
          \n\n
          \n
          \n\n
          \n \n
          \n Whilst working on the film I shot this series of time-lapses with the help of students. Instead of just leaving the camera to click away at set intervals, we manually took a frame in synch with the frames Barry was taking as he animated, showing the puppet moving at his intended 25fps, almost!
          \n\
          \n\ Written, directed and animated by: Barry J C Purves
          \n (barrypurves.com)
          \n\
          \n\ Produced by: Irina Margolina
          \n\ (studio-mir.ru)
          \n\
          \n\ Produced by: Loose Moose
          \n\ (loosemoose.net)
          \n\
          \n\ DOP: Justin Noe
          \n\ (justinnoe.co.uk)
          \n\
          \n\ Camera and lighting: Joe Clarke
          \n\ (joe-clarke.com)
          \n\
          \n\ Puppet by: Mackinnon and Saunders
          \n\ (mackinnonandsaunders.com)
          \n \n
          \n
          \n\n
          \n
          \n\
          \n\n\
          \n
          \n
          \n \n \n
          \n\ \t
          \n\ \t\t

          Credits

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n\n
          \n \n
          \n\ \t
          \n\ \t\t

          1,182 Likes

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n \t\n\ \t
          \n\ \t
          \n\ \t\t

          Tags

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
            \n\ \t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t time lapse \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t stop motion \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t animator \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t barry purves \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t behind the scenes \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t tchaikovsky \t\t \t
          • \n\ \t\t\t\t\t\t \t
          \n\ \t \n\ \t \t
          \t
          \n\
          \n\n\n\n
          \n
          \n\n
          \n \n\ \n\n\ \n\ \n\ \n\
            \n
          • \n \n \"\"
            \n
            ben whitehouse 3 months ago
            \n
            Fan-bloody-tastic!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Nile Plumb 3 months ago
            \n
            yay I workedwith barry on this for a day :) I was the writing on the wall from a lady lover :) after a hectic terrible marriage :) You'll see his name being written in a fairly twirly handwriting, as opposed to his manic wife's erractic scribbles
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            SCIENTIFANTASTIC \"plus\" 3 months ago
            \n
            Awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            mpared 3 months ago
            \n
            I only wish it was a bit longer!!! Still very fantastic its up at thecuriousbrain.com/​ well done
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Claudio Salas \"plus\" 2 months ago
            \n
            Looks really awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Samuel Gaehwiler 2 months ago
            \n
            Great idea. Awesome result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Vincent Tetreault 2 months ago
            \n
            Woot !
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Emlyn Lewis \"plus\" 2 months ago
            \n
            So wer n I see the full 'Tchaikovsky' film? :)
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            msbillie 2 months ago
            \n
            \xE2\x99\xA1
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            K C \"plus\" 2 months ago
            \n
            Excellent display of emotion! When can we expect to see the final work?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Sascha Stankov 2 months ago
            \n
            Love it!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Kim Krohn Berle 2 months ago
            \n
            Lookin forward to the result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Alex Karadimos 2 months ago
            \n
            It looks so good and realistic! Im looking forward for the final animation!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Matthew Lokot 2 months ago
            \n
            Absolutely amazing. I'm floored.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Charles Pieper \"plus\" 2 months ago
            \n
            This looks utterly amazing! Wowzers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            shallowmic 2 months ago
            \n
            Amazing!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Frita'Rita 2 months ago
            \n
            Outstanding!
            \n\
            \n\
            \n\ ---------------------------------------------------------
            \n\ facebook.com/​pages/​I-Motion/​182861641774242
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Animated Review 2 months ago
            \n
            Always nice to see something new by Barry. I rewatched Hamilton Mattress recently, supurb. We've shared it with our followers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            Very, very cool!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Renars Vilnis 2 months ago
            \n
            Yo dawg i heard you like timelapses :D
            \n\ but a really outstanding video!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Grayden Laing 2 months ago
            \n
            excellent show!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            jeracravo 2 months ago
            \n
            Amazing!!!!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Shelley Noble 2 months ago
            \n
            Ye are gods. Love it.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Jimi Filipovski 2 months ago
            \n
            oh my god!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            hodessa 2 months ago
            \n
            amazing, where can i see the full video?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Daraul Harris 2 months ago
            \n
            wow.. brilliant
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Ellz Ramclam 2 months ago
            \n
            amazing lighting.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Show Us Your Clips 2 months ago
            \n
            Super cool!
            \n\
            \n\ Just posted this on showusyourclips.com
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            very nice!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            oliver sin 12 days ago
            \n
            mannnn JOE! when did you start doing stuff like this??? glad everything is going well for you :) great stuff!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            I love your stuff!
            \n\ Great!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n\n\
          \n\n \n
          \n This conversation is missing your voice. Take five seconds to join Vimeo or log in.\n
          \n
          \n\n
          \n \n
          \n\ \t
          \n\ \t\t

          Advertisement

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n \n\ \n \n
          \n\ \t
          \n\ \t\t

          Statistics

          \"\"\"\"\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n
          \n \t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t \n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\n\ \t
          DatePlaysLikesComments
          Totals201K1,18231
          Nov 12th7600
          Nov 11th10000
          Nov 10th13400
          Nov 9th19220
          Nov 8th15720
          Nov 7th10010
          Nov 6th7710
          \n\n\ \t
          \n\ \t\t
            \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            836Plays

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            6Likes

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            0Comments

            \n\ \t\t\t
          • \n\ \t\t
          \n\ \t\t\n\ \t\t
          \n\ \t\t\n\ \t\t

          Sun Nov 6, 2011 – Sat Nov 12, 2011

          \n\ \t
          \n\n\ \t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"Prev week\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t
          \n\ \t
          \n\n\ \t
          \n \n
          \t
          \n\
          \n\ \t
          \n\ \t\t

          Related lessons from Vimeo Video School

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n Check out these lessons to learn more about how you can make videos like this one!\n \n
          \t
          \n\
          \n
          \n\n
          \n
          \n
          \n\n\
          \n\n\ \n\ \n\ \n\n\n\n\n\n\n\ \n\ \n
          \n\n \n
          \n \n\n
          \n
          \n\n
          \n\n \n\ \n\ \n\n \n \n \n\ \n" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:47:57 GMT content-type: - text/html; charset=UTF-8 server: - Apache date: - Sat, 12 Nov 2011 23:47:57 GMT set-cookie: - uid=0; expires=Tue, 09-Nov-2021 23:47:57 GMT; path=/; domain=.vimeo.com vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 transfer-encoding: - chunked body: "\n\ \n\ \n \n \n \n Tchaikovsky Timelapse on Vimeo\n\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n\ \n\n\ \n\n\ \n \n\n\ \n\ \n\ \n \n \n \n \n \n \n \n \n \n\n \"\"\n
          \n\n
          \n
          \n \"Vimeo\"\n
          \n
          \n \n
          \n\n \n
          \n\n \n \n \n\n\
          \n
          \"\"
          \n
          \n
          Tchaikovsky Timelapse
          \n \n
          \n 3 months ago\n 3 months ago: Sat, Aug 20, 2011 5:54pm EST (Eastern Standard Time)\n
          \n
          \n\n
          \n
          \n\n\
          \n
          \n\n
          \n
          \n \n
          00:00
          44
          \n\n
          \n
          \n \n\n\ \n\n\
          \n
          \n
          \n\ \tMore
          \n\
          \n\ \tMore
          \n
          \n
          \n\n \n
          \n\ \t
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n\n
          \n
          \n See all\n\n Show me\n
          \n\ \t
          joe clarke's videos
          \n\
          \n\
          \n\ \t
            \n\ \t\t\t\t\t \t\t
          • joe clarke's videos
          • \n\ \t\t\t\t\t \t\t
          • Staff Picks
          • \n\ \t\t\t
          \n\
          \n\n\n
          \n
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \t
          \n\ \t\t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t3. Tchaikovsky Timelapse\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          3 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t2. Cabot Not So Circus\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          8 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t1. They'll Never Take My Soul\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          1 year ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n
          \n\n
          \n
          \n\n
          \n \n
          \n Whilst working on the film I shot this series of time-lapses with the help of students. Instead of just leaving the camera to click away at set intervals, we manually took a frame in synch with the frames Barry was taking as he animated, showing the puppet moving at his intended 25fps, almost!
          \n\
          \n\ Written, directed and animated by: Barry J C Purves
          \n (barrypurves.com)
          \n\
          \n\ Produced by: Irina Margolina
          \n\ (studio-mir.ru)
          \n\
          \n\ Produced by: Loose Moose
          \n\ (loosemoose.net)
          \n\
          \n\ DOP: Justin Noe
          \n\ (justinnoe.co.uk)
          \n\
          \n\ Camera and lighting: Joe Clarke
          \n\ (joe-clarke.com)
          \n\
          \n\ Puppet by: Mackinnon and Saunders
          \n\ (mackinnonandsaunders.com)
          \n \n
          \n
          \n\n
          \n
          \n\
          \n\n\
          \n
          \n
          \n \n \n
          \n\ \t
          \n\ \t\t

          Credits

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n\n
          \n \n
          \n\ \t
          \n\ \t\t

          1,182 Likes

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n \t\n\ \t
          \n\ \t
          \n\ \t\t

          Tags

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
            \n\ \t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t time lapse \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t stop motion \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t animator \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t barry purves \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t behind the scenes \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t tchaikovsky \t\t \t
          • \n\ \t\t\t\t\t\t \t
          \n\ \t \n\ \t \t
          \t
          \n\
          \n\n\n\n
          \n
          \n\n
          \n \n\ \n\n\ \n\ \n\ \n\
            \n
          • \n \n \"\"
            \n
            ben whitehouse 3 months ago
            \n
            Fan-bloody-tastic!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Nile Plumb 3 months ago
            \n
            yay I workedwith barry on this for a day :) I was the writing on the wall from a lady lover :) after a hectic terrible marriage :) You'll see his name being written in a fairly twirly handwriting, as opposed to his manic wife's erractic scribbles
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            SCIENTIFANTASTIC \"plus\" 3 months ago
            \n
            Awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            mpared 3 months ago
            \n
            I only wish it was a bit longer!!! Still very fantastic its up at thecuriousbrain.com/​ well done
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Claudio Salas \"plus\" 2 months ago
            \n
            Looks really awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Samuel Gaehwiler 2 months ago
            \n
            Great idea. Awesome result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Vincent Tetreault 2 months ago
            \n
            Woot !
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Emlyn Lewis \"plus\" 2 months ago
            \n
            So wer n I see the full 'Tchaikovsky' film? :)
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            msbillie 2 months ago
            \n
            \xE2\x99\xA1
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            K C \"plus\" 2 months ago
            \n
            Excellent display of emotion! When can we expect to see the final work?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Sascha Stankov 2 months ago
            \n
            Love it!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Kim Krohn Berle 2 months ago
            \n
            Lookin forward to the result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Alex Karadimos 2 months ago
            \n
            It looks so good and realistic! Im looking forward for the final animation!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Matthew Lokot 2 months ago
            \n
            Absolutely amazing. I'm floored.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Charles Pieper \"plus\" 2 months ago
            \n
            This looks utterly amazing! Wowzers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            shallowmic 2 months ago
            \n
            Amazing!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Frita'Rita 2 months ago
            \n
            Outstanding!
            \n\
            \n\
            \n\ ---------------------------------------------------------
            \n\ facebook.com/​pages/​I-Motion/​182861641774242
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Animated Review 2 months ago
            \n
            Always nice to see something new by Barry. I rewatched Hamilton Mattress recently, supurb. We've shared it with our followers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            Very, very cool!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Renars Vilnis 2 months ago
            \n
            Yo dawg i heard you like timelapses :D
            \n\ but a really outstanding video!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Grayden Laing 2 months ago
            \n
            excellent show!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            jeracravo 2 months ago
            \n
            Amazing!!!!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Shelley Noble 2 months ago
            \n
            Ye are gods. Love it.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Jimi Filipovski 2 months ago
            \n
            oh my god!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            hodessa 2 months ago
            \n
            amazing, where can i see the full video?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Daraul Harris 2 months ago
            \n
            wow.. brilliant
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Ellz Ramclam 2 months ago
            \n
            amazing lighting.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Show Us Your Clips 2 months ago
            \n
            Super cool!
            \n\
            \n\ Just posted this on showusyourclips.com
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            very nice!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            oliver sin 12 days ago
            \n
            mannnn JOE! when did you start doing stuff like this??? glad everything is going well for you :) great stuff!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            I love your stuff!
            \n\ Great!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n\n\
          \n\n \n
          \n This conversation is missing your voice. Take five seconds to join Vimeo or log in.\n
          \n
          \n\n
          \n \n
          \n\ \t
          \n\ \t\t

          Advertisement

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n \n\ \n \n
          \n\ \t
          \n\ \t\t

          Statistics

          \"\"\"\"\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n
          \n \t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t \n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\n\ \t
          DatePlaysLikesComments
          Totals201K1,18231
          Nov 12th7600
          Nov 11th10000
          Nov 10th13400
          Nov 9th19220
          Nov 8th15720
          Nov 7th10010
          Nov 6th7710
          \n\n\ \t
          \n\ \t\t
            \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            836Plays

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            6Likes

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            0Comments

            \n\ \t\t\t
          • \n\ \t\t
          \n\ \t\t\n\ \t\t
          \n\ \t\t\n\ \t\t

          Sun Nov 6, 2011 – Sat Nov 12, 2011

          \n\ \t
          \n\n\ \t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"Prev week\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t
          \n\ \t
          \n\n\ \t
          \n \n
          \t
          \n\
          \n\ \t
          \n\ \t\t

          Related lessons from Vimeo Video School

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n Check out these lessons to learn more about how you can make videos like this one!\n \n
          \t
          \n\
          \n
          \n\n
          \n
          \n
          \n\n\
          \n\n\ \n\ \n\ \n\n\n\n\n\n\n\ \n\ \n
          \n\n \n
          \n \n\n
          \n
          \n\n
          \n\n \n\ \n\ \n\n \n \n \n\ \n" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:47:58 GMT content-type: - text/html; charset=UTF-8 server: - Apache date: - Sat, 12 Nov 2011 23:47:58 GMT set-cookie: - uid=0; expires=Tue, 09-Nov-2021 23:47:58 GMT; path=/; domain=.vimeo.com vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 transfer-encoding: - chunked body: "\n\ \n\ \n \n \n \n Tchaikovsky Timelapse on Vimeo\n\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n\ \n\n\ \n\n\ \n \n\n\ \n\ \n\ \n \n \n \n \n \n \n \n \n \n\n \"\"\n
          \n\n
          \n
          \n \"Vimeo\"\n
          \n
          \n \n
          \n\n \n
          \n\n \n \n \n\n\
          \n
          \"\"
          \n
          \n
          Tchaikovsky Timelapse
          \n \n
          \n 3 months ago\n 3 months ago: Sat, Aug 20, 2011 5:54pm EST (Eastern Standard Time)\n
          \n
          \n\n
          \n
          \n\n\
          \n
          \n\n
          \n
          \n \n
          00:00
          44
          \n\n
          \n
          \n \n\n\ \n\n\
          \n
          \n
          \n\ \tMore
          \n\
          \n\ \tMore
          \n
          \n
          \n\n \n
          \n\ \t
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n\n
          \n
          \n See all\n\n Show me\n
          \n\ \t
          joe clarke's videos
          \n\
          \n\
          \n\ \t
            \n\ \t\t\t\t\t \t\t
          • joe clarke's videos
          • \n\ \t\t\t\t\t \t\t
          • Staff Picks
          • \n\ \t\t\t
          \n\
          \n\n\n
          \n
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \t
          \n\ \t\t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t3. Tchaikovsky Timelapse\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          3 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t2. Cabot Not So Circus\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          8 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t1. They'll Never Take My Soul\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          1 year ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n
          \n\n
          \n
          \n\n
          \n \n
          \n Whilst working on the film I shot this series of time-lapses with the help of students. Instead of just leaving the camera to click away at set intervals, we manually took a frame in synch with the frames Barry was taking as he animated, showing the puppet moving at his intended 25fps, almost!
          \n\
          \n\ Written, directed and animated by: Barry J C Purves
          \n (barrypurves.com)
          \n\
          \n\ Produced by: Irina Margolina
          \n\ (studio-mir.ru)
          \n\
          \n\ Produced by: Loose Moose
          \n\ (loosemoose.net)
          \n\
          \n\ DOP: Justin Noe
          \n\ (justinnoe.co.uk)
          \n\
          \n\ Camera and lighting: Joe Clarke
          \n\ (joe-clarke.com)
          \n\
          \n\ Puppet by: Mackinnon and Saunders
          \n\ (mackinnonandsaunders.com)
          \n \n
          \n
          \n\n
          \n
          \n\
          \n\n\
          \n
          \n
          \n \n \n
          \n\ \t
          \n\ \t\t

          Credits

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n\n
          \n \n
          \n\ \t
          \n\ \t\t

          1,182 Likes

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n \t\n\ \t
          \n\ \t
          \n\ \t\t

          Tags

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
            \n\ \t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t time lapse \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t stop motion \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t animator \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t barry purves \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t behind the scenes \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t tchaikovsky \t\t \t
          • \n\ \t\t\t\t\t\t \t
          \n\ \t \n\ \t \t
          \t
          \n\
          \n\n\n\n
          \n
          \n\n
          \n \n\ \n\n\ \n\ \n\ \n\
            \n
          • \n \n \"\"
            \n
            ben whitehouse 3 months ago
            \n
            Fan-bloody-tastic!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Nile Plumb 3 months ago
            \n
            yay I workedwith barry on this for a day :) I was the writing on the wall from a lady lover :) after a hectic terrible marriage :) You'll see his name being written in a fairly twirly handwriting, as opposed to his manic wife's erractic scribbles
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            SCIENTIFANTASTIC \"plus\" 3 months ago
            \n
            Awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            mpared 3 months ago
            \n
            I only wish it was a bit longer!!! Still very fantastic its up at thecuriousbrain.com/​ well done
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Claudio Salas \"plus\" 2 months ago
            \n
            Looks really awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Samuel Gaehwiler 2 months ago
            \n
            Great idea. Awesome result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Vincent Tetreault 2 months ago
            \n
            Woot !
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Emlyn Lewis \"plus\" 2 months ago
            \n
            So wer n I see the full 'Tchaikovsky' film? :)
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            msbillie 2 months ago
            \n
            \xE2\x99\xA1
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            K C \"plus\" 2 months ago
            \n
            Excellent display of emotion! When can we expect to see the final work?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Sascha Stankov 2 months ago
            \n
            Love it!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Kim Krohn Berle 2 months ago
            \n
            Lookin forward to the result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Alex Karadimos 2 months ago
            \n
            It looks so good and realistic! Im looking forward for the final animation!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Matthew Lokot 2 months ago
            \n
            Absolutely amazing. I'm floored.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Charles Pieper \"plus\" 2 months ago
            \n
            This looks utterly amazing! Wowzers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            shallowmic 2 months ago
            \n
            Amazing!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Frita'Rita 2 months ago
            \n
            Outstanding!
            \n\
            \n\
            \n\ ---------------------------------------------------------
            \n\ facebook.com/​pages/​I-Motion/​182861641774242
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Animated Review 2 months ago
            \n
            Always nice to see something new by Barry. I rewatched Hamilton Mattress recently, supurb. We've shared it with our followers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            Very, very cool!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Renars Vilnis 2 months ago
            \n
            Yo dawg i heard you like timelapses :D
            \n\ but a really outstanding video!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Grayden Laing 2 months ago
            \n
            excellent show!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            jeracravo 2 months ago
            \n
            Amazing!!!!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Shelley Noble 2 months ago
            \n
            Ye are gods. Love it.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Jimi Filipovski 2 months ago
            \n
            oh my god!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            hodessa 2 months ago
            \n
            amazing, where can i see the full video?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Daraul Harris 2 months ago
            \n
            wow.. brilliant
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Ellz Ramclam 2 months ago
            \n
            amazing lighting.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Show Us Your Clips 2 months ago
            \n
            Super cool!
            \n\
            \n\ Just posted this on showusyourclips.com
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            very nice!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            oliver sin 12 days ago
            \n
            mannnn JOE! when did you start doing stuff like this??? glad everything is going well for you :) great stuff!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            I love your stuff!
            \n\ Great!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n\n\
          \n\n \n
          \n This conversation is missing your voice. Take five seconds to join Vimeo or log in.\n
          \n
          \n\n
          \n \n
          \n\ \t
          \n\ \t\t

          Advertisement

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n \n\ \n \n
          \n\ \t
          \n\ \t\t

          Statistics

          \"\"\"\"\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n
          \n \t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t \n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\n\ \t
          DatePlaysLikesComments
          Totals201K1,18231
          Nov 12th7600
          Nov 11th10000
          Nov 10th13400
          Nov 9th19220
          Nov 8th15720
          Nov 7th10010
          Nov 6th7710
          \n\n\ \t
          \n\ \t\t
            \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            836Plays

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            6Likes

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            0Comments

            \n\ \t\t\t
          • \n\ \t\t
          \n\ \t\t\n\ \t\t
          \n\ \t\t\n\ \t\t

          Sun Nov 6, 2011 – Sat Nov 12, 2011

          \n\ \t
          \n\n\ \t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"Prev week\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t
          \n\ \t
          \n\n\ \t
          \n \n
          \t
          \n\
          \n\ \t
          \n\ \t\t

          Related lessons from Vimeo Video School

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n Check out these lessons to learn more about how you can make videos like this one!\n \n
          \t
          \n\
          \n
          \n\n
          \n
          \n
          \n\n\
          \n\n\ \n\ \n\ \n\n\n\n\n\n\n\ \n\ \n
          \n\n \n
          \n \n\n
          \n
          \n\n
          \n\n \n\ \n\ \n\n \n \n \n\ \n" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:47:58 GMT content-type: - text/html; charset=UTF-8 server: - Apache date: - Sat, 12 Nov 2011 23:47:58 GMT set-cookie: - uid=0; expires=Tue, 09-Nov-2021 23:47:58 GMT; path=/; domain=.vimeo.com vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 transfer-encoding: - chunked body: "\n\ \n\ \n \n \n \n Tchaikovsky Timelapse on Vimeo\n\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n\ \n\n\ \n\n\ \n \n\n\ \n\ \n\ \n \n \n \n \n \n \n \n \n \n\n \"\"\n
          \n\n
          \n
          \n \"Vimeo\"\n
          \n
          \n \n
          \n\n \n
          \n\n \n \n \n\n\
          \n
          \"\"
          \n
          \n
          Tchaikovsky Timelapse
          \n \n
          \n 3 months ago\n 3 months ago: Sat, Aug 20, 2011 5:54pm EST (Eastern Standard Time)\n
          \n
          \n\n
          \n
          \n\n\
          \n
          \n\n
          \n
          \n \n
          00:00
          44
          \n\n
          \n
          \n \n\n\ \n\n\
          \n
          \n
          \n\ \tMore
          \n\
          \n\ \tMore
          \n
          \n
          \n\n \n
          \n\ \t
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n\n
          \n
          \n See all\n\n Show me\n
          \n\ \t
          joe clarke's videos
          \n\
          \n\
          \n\ \t
            \n\ \t\t\t\t\t \t\t
          • joe clarke's videos
          • \n\ \t\t\t\t\t \t\t
          • Staff Picks
          • \n\ \t\t\t
          \n\
          \n\n\n
          \n
          \n
          \n\ \t\n\
          \n\ \t
          \n\ \t\t
          \t
          \n\ \t\t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t3. Tchaikovsky Timelapse\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          3 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t2. Cabot Not So Circus\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          8 months ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\"\"\t\n\ \t\t\t\t\t\t\n\ \t\t\t\t\t\t
          \n\ \t\t\t\t1. They'll Never Take My Soul\t\t\t\t\t\t\t\t\n\ \t\t\t\t
          1 year ago
          \n\ \t\t\t
          \n\ \t\t\t
          \n\ \t\t
          \n\ \t
          \n\
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
          \n\ \t
          \n\
          \n\ \n\n\
          \n
          \n\n
          \n
          \n\n
          \n \n
          \n Whilst working on the film I shot this series of time-lapses with the help of students. Instead of just leaving the camera to click away at set intervals, we manually took a frame in synch with the frames Barry was taking as he animated, showing the puppet moving at his intended 25fps, almost!
          \n\
          \n\ Written, directed and animated by: Barry J C Purves
          \n (barrypurves.com)
          \n\
          \n\ Produced by: Irina Margolina
          \n\ (studio-mir.ru)
          \n\
          \n\ Produced by: Loose Moose
          \n\ (loosemoose.net)
          \n\
          \n\ DOP: Justin Noe
          \n\ (justinnoe.co.uk)
          \n\
          \n\ Camera and lighting: Joe Clarke
          \n\ (joe-clarke.com)
          \n\
          \n\ Puppet by: Mackinnon and Saunders
          \n\ (mackinnonandsaunders.com)
          \n \n
          \n
          \n\n
          \n
          \n\
          \n\n\
          \n
          \n
          \n \n \n
          \n\ \t
          \n\ \t\t

          Credits

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n\n
          \n \n
          \n\ \t
          \n\ \t\t

          1,182 Likes

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n\n \t\n\ \t
          \n\ \t
          \n\ \t\t

          Tags

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n\ \t
            \n\ \t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t time lapse \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t stop motion \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t animator \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t barry purves \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t behind the scenes \t\t \t
          • \n\ \t\t\t\t\t\t \t \t\t\t\t\t\t\t \t
          • \n\ \t\t \t tchaikovsky \t\t \t
          • \n\ \t\t\t\t\t\t \t
          \n\ \t \n\ \t \t
          \t
          \n\
          \n\n\n\n
          \n
          \n\n
          \n \n\ \n\n\ \n\ \n\ \n\
            \n
          • \n \n \"\"
            \n
            ben whitehouse 3 months ago
            \n
            Fan-bloody-tastic!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Nile Plumb 3 months ago
            \n
            yay I workedwith barry on this for a day :) I was the writing on the wall from a lady lover :) after a hectic terrible marriage :) You'll see his name being written in a fairly twirly handwriting, as opposed to his manic wife's erractic scribbles
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            SCIENTIFANTASTIC \"plus\" 3 months ago
            \n
            Awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            mpared 3 months ago
            \n
            I only wish it was a bit longer!!! Still very fantastic its up at thecuriousbrain.com/​ well done
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Claudio Salas \"plus\" 2 months ago
            \n
            Looks really awesome!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Samuel Gaehwiler 2 months ago
            \n
            Great idea. Awesome result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Vincent Tetreault 2 months ago
            \n
            Woot !
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Emlyn Lewis \"plus\" 2 months ago
            \n
            So wer n I see the full 'Tchaikovsky' film? :)
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            msbillie 2 months ago
            \n
            \xE2\x99\xA1
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            K C \"plus\" 2 months ago
            \n
            Excellent display of emotion! When can we expect to see the final work?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Sascha Stankov 2 months ago
            \n
            Love it!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Kim Krohn Berle 2 months ago
            \n
            Lookin forward to the result!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Alex Karadimos 2 months ago
            \n
            It looks so good and realistic! Im looking forward for the final animation!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Matthew Lokot 2 months ago
            \n
            Absolutely amazing. I'm floored.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Charles Pieper \"plus\" 2 months ago
            \n
            This looks utterly amazing! Wowzers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            shallowmic 2 months ago
            \n
            Amazing!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Frita'Rita 2 months ago
            \n
            Outstanding!
            \n\
            \n\
            \n\ ---------------------------------------------------------
            \n\ facebook.com/​pages/​I-Motion/​182861641774242
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Animated Review 2 months ago
            \n
            Always nice to see something new by Barry. I rewatched Hamilton Mattress recently, supurb. We've shared it with our followers.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            Very, very cool!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Renars Vilnis 2 months ago
            \n
            Yo dawg i heard you like timelapses :D
            \n\ but a really outstanding video!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Grayden Laing 2 months ago
            \n
            excellent show!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            jeracravo 2 months ago
            \n
            Amazing!!!!!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Shelley Noble 2 months ago
            \n
            Ye are gods. Love it.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Jimi Filipovski 2 months ago
            \n
            oh my god!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            hodessa 2 months ago
            \n
            amazing, where can i see the full video?
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Daraul Harris 2 months ago
            \n
            wow.. brilliant
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Ellz Ramclam 2 months ago
            \n
            amazing lighting.
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            Show Us Your Clips 2 months ago
            \n
            Super cool!
            \n\
            \n\ Just posted this on showusyourclips.com
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            very nice!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n
            oliver sin 12 days ago
            \n
            mannnn JOE! when did you start doing stuff like this??? glad everything is going well for you :) great stuff!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n
          • \n \n \"\"
            \n \n
            I love your stuff!
            \n\ Great!
            \n
            \n
            \n
          • \n\n
          • \n  \n
          • \n\n\
          \n\n \n
          \n This conversation is missing your voice. Take five seconds to join Vimeo or log in.\n
          \n
          \n\n
          \n \n
          \n\ \t
          \n\ \t\t

          Advertisement

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n \n\n
          \t
          \n\
          \n \n\ \n \n
          \n\ \t
          \n\ \t\t

          Statistics

          \"\"\"\"\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n
          \n \t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t \n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\n\ \t
          DatePlaysLikesComments
          Totals201K1,18231
          Nov 12th7600
          Nov 11th10000
          Nov 10th13400
          Nov 9th19220
          Nov 8th15720
          Nov 7th10010
          Nov 6th7710
          \n\n\ \t
          \n\ \t\t
            \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            836Plays

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            6Likes

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            0Comments

            \n\ \t\t\t
          • \n\ \t\t
          \n\ \t\t\n\ \t\t
          \n\ \t\t\n\ \t\t

          Sun Nov 6, 2011 – Sat Nov 12, 2011

          \n\ \t
          \n\n\ \t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"Prev week\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t
          \n\ \t
          \n\n\ \t
          \n \n
          \t
          \n\
          \n\ \t
          \n\ \t\t

          Related lessons from Vimeo Video School

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n Check out these lessons to learn more about how you can make videos like this one!\n \n
          \t
          \n\
          \n
          \n\n
          \n
          \n
          \n\n\
          \n\n\ \n\ \n\ \n\n\n\n\n\n\n\ \n\ \n
          \n\n \n
          \n \n\n
          \n
          \n\n
          \n\n \n\ \n\ \n\n \n \n \n\ \n" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/api/oembed.json?format=json&url=http%3A%2F%2Fvimeo.com%2F27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:47:59 GMT content-type: - application/json server: - Apache date: - Sat, 12 Nov 2011 23:47:59 GMT content-length: - "1222" vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 body: "{\"type\":\"video\",\"version\":\"1.0\",\"provider_name\":\"Vimeo\",\"provider_url\":\"http:\\/\\/vimeo.com\\/\",\"title\":\"Tchaikovsky Timelapse\",\"author_name\":\"joe clarke\",\"author_url\":\"http:\\/\\/vimeo.com\\/joeclarke\",\"is_plus\":\"1\",\"html\":\"\n\n \t\n\ \n \n\
          \n\ \t
          \n\ \t\t

          About this video

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t\t
          \n\
          \n \n
          \n\ \t
          \n\ \t\t

          Statistics

          \"\"\"\"\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n
          \n \t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t \n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\n\ \t
          DatePlaysLikesComments
          Totals201K1,18231
          Nov 12th7600
          Nov 11th10000
          Nov 10th13400
          Nov 9th19220
          Nov 8th15720
          Nov 7th10010
          Nov 6th7710
          \n\n\ \t
          \n\ \t\t
            \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            836Plays

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            6Likes

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            0Comments

            \n\ \t\t\t
          • \n\ \t\t
          \n\ \t\t\n\ \t\t
          \n\ \t\t\n\ \t\t

          Sun Nov 6, 2011 – Sat Nov 12, 2011

          \n\ \t
          \n\n\ \t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"Prev week\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t
          \n\ \t
          \n\n\ \t
          \n \n
          \t
          \n\
          \n\ \t
          \n\ \t\t

          Related lessons from Vimeo Video School

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n Check out these lessons to learn more about how you can make videos like this one!\n \n
          \t
          \n\
          \n \n\n
          \n \n \n\n\
          \n\n\ \n\ \n\ \n\n\n\n\n\n\n\ \n\ \n
          \n\n \n
          \n \n\n
          \n \n\n \n\n \n\ \n\ \n\n \n \n \n\ \n" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/api/oembed.json?format=json&url=http%3A%2F%2Fvimeo.com%2F27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:48:00 GMT content-type: - application/json server: - Apache date: - Sat, 12 Nov 2011 23:48:00 GMT content-length: - "1222" vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 body: "{\"type\":\"video\",\"version\":\"1.0\",\"provider_name\":\"Vimeo\",\"provider_url\":\"http:\\/\\/vimeo.com\\/\",\"title\":\"Tchaikovsky Timelapse\",\"author_name\":\"joe clarke\",\"author_url\":\"http:\\/\\/vimeo.com\\/joeclarke\",\"is_plus\":\"1\",\"html\":\"\n\n \t\n\ \n \n\
          \n\ \t
          \n\ \t\t

          About this video

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t\t
          \n\
          \n \n
          \n\ \t
          \n\ \t\t

          Statistics

          \"\"\"\"\t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n
          \n \t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\n\ \t\t\t\t \n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\t\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\t\t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\t\n\ \t\t\t\t\n\ \t \t\t\t\n\ \t
          DatePlaysLikesComments
          Totals201K1,18231
          Nov 12th7600
          Nov 11th10000
          Nov 10th13400
          Nov 9th19220
          Nov 8th15720
          Nov 7th10010
          Nov 6th7710
          \n\n\ \t
          \n\ \t\t
            \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            836Plays

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            6Likes

            \n\ \t\t\t
          • \n\ \t\t\t
          • \n\ \t\t\t\t
            \n\ \t\t\t\t

            0Comments

            \n\ \t\t\t
          • \n\ \t\t
          \n\ \t\t\n\ \t\t
          \n\ \t\t\n\ \t\t

          Sun Nov 6, 2011 – Sat Nov 12, 2011

          \n\ \t
          \n\n\ \t
          \n\ \t\t\t\t\t\n\ \t\t\t\t\"\"Prev week\n\ \t\t\t\n\ \t\t\n\ \t\t\n\ \t\t
          \n\ \t
          \n\n\ \t
          \n \n
          \t
          \n\
          \n\ \t
          \n\ \t\t

          Related lessons from Vimeo Video School

          \t
          \n\ \t
          \n\ \t
          \n\ \t\t
          \n Check out these lessons to learn more about how you can make videos like this one!\n \n
          \t
          \n\
          \n \n\n
          \n \n \n\n\
          \n\n\ \n\ \n\ \n\n\n\n\n\n\n\ \n\ \n
          \n\n \n
          \n \n\n
          \n \n\n \n\n \n\ \n\ \n\n \n \n \n\ \n" http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://vimeo.com:80/api/oembed.xml?format=xml&url=http%3A%2F%2Fvimeo.com%2F27953845 body: headers: response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-powered-by: - PHP/5.3.5-0.dotdeb.0 expires: - Sat, 12 Nov 2011 11:48:01 GMT content-type: - text/xml;charset=UTF-8 server: - Apache date: - Sat, 12 Nov 2011 23:48:01 GMT content-length: - "1488" vary: - Accept-Encoding cache-control: - no-store, no-cache, must-revalidate - post-check=0, pre-check=0 body: |- video 1.0 Vimeo http://vimeo.com/ Tchaikovsky Timelapse joe clarke http://vimeo.com/joeclarke 1 <iframe src="http://player.vimeo.com/video/27953845" width="1280" height="720" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe> 1280 720 44 Whilst working on the film I shot this series of time-lapses with the help of students. Instead of just leaving the camera to click away at set intervals, we manually took a frame in synch with the frames Barry was taking as he animated, showing the puppet moving at his intended 25fps, almost! Written, directed and animated by: Barry J C Purves (www.barrypurves.com) Produced by: Irina Margolina (www.studio-mir.ru) Produced by: Loose Moose (www.loosemoose.net) DOP: Justin Noe (www.justinnoe.co.uk) Camera and lighting: Joe Clarke (www.joe-clarke.com) Puppet by: Mackinnon and Saunders (www.mackinnonandsaunders.com) http://b.vimeocdn.com/ts/186/078/186078196_640.jpg 640 360 27953845 http_version: "1.1" ruby-oembed-0.8.14/spec/response_spec.rb0000644000004100000410000001543112546055651020212 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/spec_helper' describe OEmbed::Response do include OEmbedSpecHelper let(:flickr) { flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/") flickr << "http://*.flickr.com/*" flickr } let(:skitch) { OEmbed::Provider.new("https://skitch.com/oembed") } let(:qik) { qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}", :xml) qik << "http://qik.com/video/*" qik << "http://qik.com/*" qik } let(:viddler) { viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/", :json) viddler << "http://*.viddler.com/*" viddler } let(:new_res) { OEmbed::Response.new(valid_response(:object), OEmbed::Providers::OohEmbed) } let(:default_res) { OEmbed::Response.create_for(valid_response(:json), @flickr, example_url(:flickr), :json) } let(:xml_res) { OEmbed::Response.create_for(valid_response(:xml), @qik, example_url(:qik), :xml) } let(:json_res) { OEmbed::Response.create_for(valid_response(:json), @viddler, example_url(:viddler), :json) } let(:expected_helpers) { { "type" => "random", "version" => "1.0", "html" => "<em>Hello world!</em>", "url" => "http://foo.com/bar", } } let(:expected_skipped) { { "fields" => "hello", "__id__" => 1234, "provider" => "oohEmbed", "to_s" => "random string", } } let(:all_expected) { expected_helpers.merge(expected_skipped) } describe "#initialize" do it "should parse the data into fields" do # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. new_res.fields.keys.should == valid_response(:object).keys new_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s} default_res.fields.keys.should == valid_response(:object).keys default_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s} xml_res.fields.keys.should == valid_response(:object).keys xml_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s} json_res.fields.keys.should == valid_response(:object).keys json_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s} end it "should set the provider" do new_res.provider.should == OEmbed::Providers::OohEmbed default_res.provider.should == @flickr xml_res.provider.should == @qik json_res.provider.should == @viddler end it "should set the format" do new_res.format.should be_nil default_res.format.to_s.should == 'json' xml_res.format.to_s.should == 'xml' json_res.format.to_s.should == 'json' end it "should set the request_url" do new_res.request_url.should be_nil default_res.request_url.to_s.should == example_url(:flickr) xml_res.request_url.to_s.should == example_url(:qik) json_res.request_url.to_s.should == example_url(:viddler) end end describe "create_for" do it "should only allow JSON or XML" do expect { OEmbed::Response.create_for(valid_response(:json), flickr, example_url(:flickr), :json) }.not_to raise_error expect { OEmbed::Response.create_for(valid_response(:xml), flickr, example_url(:flickr), :xml) }.not_to raise_error expect { OEmbed::Response.create_for(valid_response(:yml), flickr, example_url(:flickr), :yml) }.to raise_error(OEmbed::FormatNotSupported) end it "should not parse the incorrect format" do expect { OEmbed::Response.create_for(valid_response(:object), example_url(:flickr), flickr, :json) }.to raise_error(OEmbed::ParseError) expect { OEmbed::Response.create_for(valid_response(:xml), example_url(:flickr), viddler, :json) }.to raise_error(OEmbed::ParseError) expect { OEmbed::Response.create_for(valid_response(:json), example_url(:flickr), viddler, :xml) }.to raise_error(OEmbed::ParseError) end end it "should access the XML data through #field" do xml_res.field(:type).should == "photo" xml_res.field(:version).should == "1.0" xml_res.field(:fields).should == "hello" xml_res.field(:__id__).should == "1234" end it "should access the JSON data through #field" do json_res.field(:type).should == "photo" json_res.field(:version).should == "1.0" json_res.field(:fields).should == "hello" json_res.field(:__id__).should == "1234" end describe "#define_methods!" do it "should automagically define helpers" do local_res = OEmbed::Response.new(all_expected, OEmbed::Providers::OohEmbed) all_expected.each do |method, value| local_res.should respond_to(method) end expected_helpers.each do |method, value| local_res.send(method).should == value end expected_skipped.each do |method, value| local_res.send(method).should_not == value end end it "should protect most already defined methods" do Object.new.should respond_to('__id__') Object.new.should respond_to('to_s') all_expected.keys.should include('__id__') all_expected.keys.should include('to_s') local_res = OEmbed::Response.new(all_expected, OEmbed::Providers::OohEmbed) local_res.__id__.should_not == local_res.field('__id__') local_res.to_s.should_not == local_res.field('to_s') end it "should not protect already defined methods that are specifically overridable" do class Object def version "two point oh" end end Object.new.should respond_to('version') String.new.should respond_to('version') all_expected.keys.should include('version') all_expected['version'].should_not == String.new.version local_res = OEmbed::Response.new(all_expected, OEmbed::Providers::OohEmbed) local_res.version.should == local_res.field('version') local_res.version.should_not == String.new.version end end describe "OEmbed::Response::Photo" do describe "#html" do it "should include the title, if given" do response = OEmbed::Response.create_for(example_body(:flickr), example_url(:flickr), flickr, :json) response.should respond_to(:title) response.title.should_not be_empty response.html.should_not be_nil response.html.should match(/alt='#{response.title}'/) end it "should work just fine, without a title" do response = OEmbed::Response.create_for(example_body(:skitch), example_url(:skitch), skitch, :json) response.should_not respond_to(:title) response.html.should_not be_nil response.html.should match(/alt=''/) end end end end ruby-oembed-0.8.14/spec/providers_spec.rb0000644000004100000410000002011012546055651020357 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/spec_helper' describe OEmbed::Providers do include OEmbedSpecHelper before(:all) do @flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/") @qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}") @flickr << "http://*.flickr.com/*" @qik << "http://qik.com/video/*" @qik << "http://qik.com/*" end after(:each) do OEmbed::Providers.unregister_all end describe ".register" do it "should register providers" do OEmbed::Providers.urls.should be_empty OEmbed::Providers.register(@flickr, @qik) OEmbed::Providers.urls.keys.should == @flickr.urls + @qik.urls @flickr.urls.each do |regexp| OEmbed::Providers.urls.should have_key(regexp) OEmbed::Providers.urls[regexp].should include(@flickr) end @qik.urls.each do |regexp| OEmbed::Providers.urls.should have_key(regexp) OEmbed::Providers.urls[regexp].should include(@qik) end end it "should find by URLs" do OEmbed::Providers.register(@flickr, @qik) # tested in "should register providers" OEmbed::Providers.find(example_url(:flickr)).should == @flickr OEmbed::Providers.find(example_url(:qik)).should == @qik end end describe ".unregister" do it "should unregister providers" do OEmbed::Providers.register(@flickr, @qik) # tested in "should register providers" OEmbed::Providers.unregister(@flickr) @flickr.urls.each do |regexp| OEmbed::Providers.urls.should_not have_key(regexp) end OEmbed::Providers.urls.keys.should == @qik.urls @qik.urls.each do |regexp| OEmbed::Providers.urls.should have_key(regexp) OEmbed::Providers.urls[regexp].should include(@qik) end end it "should not unregister duplicate provider urls at first" do @qik_mirror = OEmbed::Provider.new("http://mirror.qik.com/api/oembed.{format}") @qik_mirror << "http://qik.com/*" @qik_mirror.urls.each do |regexp| @qik.urls.should include(regexp) end OEmbed::Providers.register(@qik, @qik_mirror) OEmbed::Providers.urls.keys.should == @qik.urls @qik_mirror.urls.each do |regexp| OEmbed::Providers.urls[regexp].should include(@qik_mirror) OEmbed::Providers.urls[regexp].should include(@qik) end OEmbed::Providers.find(example_url(:qik)).should == @qik OEmbed::Providers.unregister(@qik) urls = OEmbed::Providers.urls.dup @qik_mirror.urls.each do |regexp| OEmbed::Providers.urls[regexp].should include(@qik_mirror) end OEmbed::Providers.find(example_url(:qik)).should == @qik_mirror OEmbed::Providers.unregister(@qik_mirror) @qik_mirror.urls.each do |regexp| OEmbed::Providers.urls.should_not have_key(regexp) end end end #it "should use the OEmbed::ProviderDiscovery fallback provider correctly" do # url = example_url(:vimeo) # # # None of the registered providers should match # all_example_urls.each do |url| # provider = OEmbed::Providers.find(url) # if provider # provider.should_not_receive(:raw) # provider.should_not_receive(:get) # end # end # # # Register the fallback # OEmbed::Providers.register_fallback(OEmbed::ProviderDiscovery) # # provider = OEmbed::ProviderDiscovery # provider.should_receive(:raw). # with(url, {}). # and_return(valid_response(:raw)) # provider.should_receive(:get). # with(url, {}). # and_return(valid_response(:object)) #end describe "#raw and #get" do it "should bridge #get and #raw to the right provider" do OEmbed::Providers.register_all all_example_urls.each do |url| provider = OEmbed::Providers.find(url) expect(provider).should_receive(:raw). with(url, {}) expect(provider).should_receive(:get). with(url, {}) OEmbed::Providers.raw(url) OEmbed::Providers.get(url) end end it "should raise an error if no embeddable content is found" do OEmbed::Providers.register_all ["http://fake.com/", example_url(:google_video)].each do |url| proc { OEmbed::Providers.get(url) }.should raise_error(OEmbed::NotFound) proc { OEmbed::Providers.raw(url) }.should raise_error(OEmbed::NotFound) end end end describe ".register_fallback" do it "should register fallback providers" do OEmbed::Providers.register_fallback(OEmbed::Providers::Hulu) OEmbed::Providers.register_fallback(OEmbed::Providers::OohEmbed) OEmbed::Providers.fallback.should == [ OEmbed::Providers::Hulu, OEmbed::Providers::OohEmbed] end it "should fallback to the appropriate provider when URL isn't found" do OEmbed::Providers.register_all OEmbed::Providers.register_fallback(OEmbed::Providers::Hulu) OEmbed::Providers.register_fallback(OEmbed::Providers::OohEmbed) url = example_url(:google_video) provider = OEmbed::Providers.fallback.last provider.should_receive(:raw). with(url, {}). and_return(valid_response(:raw)) provider.should_receive(:get). with(url, {}). and_return(valid_response(:object)) OEmbed::Providers.fallback.each do |p| next if p == provider p.should_receive(:raw).and_raise(OEmbed::NotFound) p.should_receive(:get).and_raise(OEmbed::NotFound) end OEmbed::Providers.raw(url) OEmbed::Providers.get(url) end it "should still raise an error if no embeddable content is found" do OEmbed::Providers.register_all OEmbed::Providers.register_fallback(OEmbed::Providers::Hulu) OEmbed::Providers.register_fallback(OEmbed::Providers::OohEmbed) ["http://fa.ke/"].each do |url| proc { OEmbed::Providers.get(url) }.should raise_error(OEmbed::NotFound) proc { OEmbed::Providers.raw(url) }.should raise_error(OEmbed::NotFound) end end end describe ".register_all" do after(:each) do OEmbed::Providers.send(:remove_const, :Fake) if defined?(OEmbed::Providers::Fake) end it "should not register a provider that is not marked as official" do defined?(OEmbed::Providers::Fake).should_not be class OEmbed::Providers Fake = OEmbed::Provider.new("http://new.fa.ke/oembed/") Fake << "http://new.fa.ke/*" end OEmbed::Providers.register_all ["http://new.fa.ke/20C285E0"].each do |url| provider = OEmbed::Providers.find(url) provider.should be_nil end end describe 'add_official_provider' do it "should register a new official provider" do defined?(OEmbed::Providers::Fake).should_not be class OEmbed::Providers Fake = OEmbed::Provider.new("http://official.fa.ke/oembed/") Fake << "http://official.fa.ke/*" add_official_provider(Fake) end ["http://official.fa.ke/20C285E0"].each do |url| provider = OEmbed::Providers.find(url) provider.should_not be_a(OEmbed::Provider) end OEmbed::Providers.register_all ["http://official.fa.ke/20C285E0"].each do |url| provider = OEmbed::Providers.find(url) provider.should be_a(OEmbed::Provider) end end it "should register an official sub_type provider separately" do defined?(OEmbed::Providers::Fake).should_not be class OEmbed::Providers Fake = OEmbed::Provider.new("http://sub.fa.ke/oembed/") Fake << "http://sub.fa.ke/*" add_official_provider(Fake, :fakes) end OEmbed::Providers.register_all ["http://sub.fa.ke/20C285E0"].each do |url| provider = OEmbed::Providers.find(url) provider.should_not be_a(OEmbed::Provider) end OEmbed::Providers.register_all(:fakes) ["http://sub.fa.ke/20C285E0"].each do |url| provider = OEmbed::Providers.find(url) provider.should be_a(OEmbed::Provider) end end end end end ruby-oembed-0.8.14/spec/provider_spec.rb0000644000004100000410000003175112546055651020211 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/spec_helper' require 'vcr' VCR.config do |c| c.default_cassette_options = { :record => :new_episodes } c.cassette_library_dir = 'spec/cassettes' c.stub_with :fakeweb end describe OEmbed::Provider do before(:all) do VCR.insert_cassette('OEmbed_Provider') end after(:all) do VCR.eject_cassette end include OEmbedSpecHelper before(:all) do @default = OEmbed::Formatter.default @flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/") @qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}", :xml) @viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/", :json) @flickr << "http://*.flickr.com/*" @qik << "http://qik.com/video/*" @qik << "http://qik.com/*" @viddler << "http://*.viddler.com/*" end it "should require a valid endpoint for a new instance" do expect { OEmbed::Provider.new("http://foo.com/oembed/") }. not_to raise_error expect { OEmbed::Provider.new("https://foo.com/oembed/") }. not_to raise_error end it "should allow a {format} string in the endpoint for a new instance" do expect { OEmbed::Provider.new("http://foo.com/oembed.{format}/get") }. not_to raise_error end it "should raise an ArgumentError given an invalid endpoint for a new instance" do [ "httpx://foo.com/oembed/", "ftp://foo.com/oembed/", "foo.com/oembed/", "http://not a uri", nil, 1, ].each do |endpoint| expect { OEmbed::Provider.new(endpoint) }. to raise_error(ArgumentError) end end it "should allow no URI schema to be given" do provier = OEmbed::Provider.new("http://foo.com/oembed") expect(provier).to include("http://foo.com/1") expect(provier).to include("http://bar.foo.com/1") expect(provier).to include("http://bar.foo.com/show/1") expect(provier).to include("https://bar.foo.com/1") expect(provier).to include("http://asdf.com/1") expect(provier).to include("asdf") end it "should allow a String as a URI schema" do provier = OEmbed::Provider.new("http://foo.com/oembed") provier << "http://bar.foo.com/*" expect(provier).to include("http://bar.foo.com/1") expect(provier).to include("http://bar.foo.com/show/1") expect(provier).to_not include("https://bar.foo.com/1") expect(provier).to_not include("http://foo.com/1") end it "should allow multiple path wildcards in a String URI schema" do provier = OEmbed::Provider.new("http://foo.com/oembed") provier << "http://bar.foo.com/*/show/*" expect(provier).to include("http://bar.foo.com/photo/show/1") expect(provier).to include("http://bar.foo.com/video/show/2") expect(provier).to include("http://bar.foo.com/help/video/show/2") expect(provier).to_not include("https://bar.foo.com/photo/show/1") expect(provier).to_not include("http://foo.com/video/show/2") expect(provier).to_not include("http://bar.foo.com/show/1") expect(provier).to_not include("http://bar.foo.com/1") end it "should NOT allow multiple domain wildcards in a String URI schema", :pending => true do provier = OEmbed::Provider.new("http://foo.com/oembed") expect { provier << "http://*.com/*" }. to raise_error(ArgumentError) expect(provier).to_not include("http://foo.com/1") end it "should allow a sub-domain wildcard in String URI schema" do provier = OEmbed::Provider.new("http://foo.com/oembed") provier << "http://*.foo.com/*" expect(provier).to include("http://bar.foo.com/1") expect(provier).to include("http://foo.foo.com/2") expect(provier).to include("http://foo.com/3") expect(provier).to_not include("https://bar.foo.com/1") expect(provier).to_not include("http://my.bar.foo.com/1") provier << "http://my.*.foo.com/*" end it "should allow multiple sub-domain wildcards in a String URI schema" do provier = OEmbed::Provider.new("http://foo.com/oembed") provier << "http://*.my.*.foo.com/*" expect(provier).to include("http://my.bar.foo.com/1") expect(provier).to include("http://my.foo.com/2") expect(provier).to include("http://bar.my.bar.foo.com/3") expect(provier).to_not include("http://bar.foo.com/1") expect(provier).to_not include("http://foo.bar.foo.com/1") end it "should NOT allow a scheme wildcard in a String URI schema", :pending => true do provier = OEmbed::Provider.new("http://foo.com/oembed") expect { provier << "*://foo.com/*" }. to raise_error(ArgumentError) expect(provier).to_not include("http://foo.com/1") end it "should allow a scheme other than http in a String URI schema" do provier = OEmbed::Provider.new("http://foo.com/oembed") provier << "https://foo.com/*" expect(provier).to include("https://foo.com/1") gopher_url = "gopher://foo.com/1" expect(provier).to_not include(gopher_url) provier << "gopher://foo.com/*" expect(provier).to include(gopher_url) end it "should allow a Regexp as a URI schema" do provier = OEmbed::Provider.new("http://foo.com/oembed") provier << %r{^https?://([^\.]*\.)?foo.com/(show/)?\d+} expect(provier).to include("http://bar.foo.com/1") expect(provier).to include("http://bar.foo.com/show/1") expect(provier).to include("http://foo.com/1") expect(provier).to include("https://bar.foo.com/1") expect(provier).to_not include("http://bar.foo.com/video/1") expect(provier).to_not include("gopher://foo.com/1") end it "should by default use OEmbed::Formatter.default" do expect(@flickr.format).to eq(@default) end it "should allow xml" do expect(@qik.format).to eq(:xml) end it "should allow json" do expect(@viddler.format).to eq(:json) end it "should allow random formats on initialization" do expect { yaml_provider = OEmbed::Provider.new("http://foo.com/api/oembed.{format}", :yml) yaml_provider << "http://foo.com/*" }. not_to raise_error end it "should not allow random formats to be parsed" do yaml_provider = OEmbed::Provider.new("http://foo.com/api/oembed.{format}", :yml) yaml_provider << "http://foo.com/*" yaml_url = "http://foo.com/video/1" expect(yaml_provider).to receive(:raw). with(yaml_url, {:format=>:yml}). and_return(valid_response(:json)) expect { yaml_provider.get(yaml_url) }. to raise_error(OEmbed::FormatNotSupported) end it "should add URL schemes" do expect(@flickr.urls).to eq([%r{^http://([^\.]+\.)?flickr\.com/(.*?)}]) expect(@qik.urls).to eq([%r{^http://qik\.com/video/(.*?)}, %r{^http://qik\.com/(.*?)}]) end it "should match URLs" do expect(@flickr).to include(example_url(:flickr)) expect(@qik).to include(example_url(:qik)) end it "should raise error if the URL is invalid" do expect{ @flickr.send(:build, example_url(:fake)) }.to raise_error(OEmbed::NotFound) expect{ @qik.send(:build, example_url(:fake)) }.to raise_error(OEmbed::NotFound) end describe "#build" do it "should return a proper URL" do uri = @flickr.send(:build, example_url(:flickr)) expect(uri.host).to eq("www.flickr.com") expect(uri.path).to eq("/services/oembed/") expect(uri.query).to include("format=#{@flickr.format}") expect(uri.query).to include("url=#{CGI.escape 'http://flickr.com/photos/bees/2362225867/'}") uri = @qik.send(:build, example_url(:qik)) expect(uri.host).to eq("qik.com") expect(uri.path).to eq("/api/oembed.xml") expect(uri.query).to_not include("format=#{@qik.format}") expect(uri.query).to eq("url=#{CGI.escape 'http://qik.com/video/49565'}") end it "should accept parameters" do uri = @flickr.send(:build, example_url(:flickr), :maxwidth => 600, :maxheight => 200, :format => :xml, :another => "test") expect(uri.query).to include("maxwidth=600") expect(uri.query).to include("maxheight=200") expect(uri.query).to include("format=xml") expect(uri.query).to include("another=test") end it "should build correctly when format is in the endpoint URL" do uri = @qik.send(:build, example_url(:qik), :format => :json) expect(uri.path).to eq("/api/oembed.json") end it "should build correctly with query parameters in the endpoint URL" do provider = OEmbed::Provider.new('http://www.youtube.com/oembed?scheme=https') provider << 'http://*.youtube.com/*' url = 'http://youtube.com/watch?v=M3r2XDceM6A' expect(provider).to include(url) uri = provider.send(:build, url) expect(uri.query).to include("scheme=https") expect(uri.query).to include("url=#{CGI.escape url}") end it "should not include the :timeout parameter in the query string" do uri = @flickr.send(:build, example_url(:flickr), :timeout => 5, :another => "test") expect(uri.query).to_not include("timeout=5") expect(uri.query).to include("another=test") end end describe "#raw" do it "should return the body on 200" do res = @flickr.send(:raw, example_url(:flickr)) expect(res).to eq(example_body(:flickr)) end it "should return the body on 200 even over https" do @vimeo_ssl = OEmbed::Provider.new("https://vimeo.com/api/oembed.{format}") @vimeo_ssl << "http://*.vimeo.com/*" @vimeo_ssl << "https://*.vimeo.com/*" expect { res = @vimeo_ssl.send(:raw, example_url(:vimeo_ssl)) expect(res).to eq(example_body(:vimeo_ssl)) }.not_to raise_error end it "should raise an UnknownFormat error on 501" do # Note: This test relies on a custom-written VCR response in the # cassettes/OEmbed_Provider.yml file. expect { @flickr.send(:raw, File.join(example_url(:flickr), '501')) }.to raise_error(OEmbed::UnknownFormat) end it "should raise a NotFound error on 404" do # Note: This test relies on a custom-written VCR response in the # cassettes/OEmbed_Provider.yml file. expect { @flickr.send(:raw, File.join(example_url(:flickr), '404')) }.to raise_error(OEmbed::NotFound) end it "should raise an UnknownResponse error on other responses" do # Note: This test relies on a custom-written VCR response in the # cassettes/OEmbed_Provider.yml file. statuses_to_check = ['405', '500'] statuses_to_check.each do |status| expect { @flickr.send(:raw, File.join(example_url(:flickr), status)) }.to raise_error(OEmbed::UnknownResponse) end end end describe "#get" do it "should send the specified format" do expect(@flickr).to receive(:raw). with(example_url(:flickr), {:format=>:json}). and_return(valid_response(:json)) @flickr.get(example_url(:flickr), :format=>:json) expect(@flickr).to receive(:raw). with(example_url(:flickr), {:format=>:xml}). and_return(valid_response(:xml)) @flickr.get(example_url(:flickr), :format=>:xml) expect { expect(@flickr).to receive(:raw). with(example_url(:flickr), {:format=>:yml}). and_return(valid_response(:json)) @flickr.get(example_url(:flickr), :format=>:yml) }.to raise_error(OEmbed::FormatNotSupported) end it "should return OEmbed::Response" do allow(@flickr).to receive(:raw).and_return(valid_response(@default)) expect(@flickr.get(example_url(:flickr))).to be_a(OEmbed::Response) end it "should be calling OEmbed::Response#create_for internally" do allow(@flickr).to receive(:raw).and_return(valid_response(@default)) expect(OEmbed::Response).to receive(:create_for). with(valid_response(@default), @flickr, example_url(:flickr), @default.to_s) @flickr.get(example_url(:flickr)) allow(@qik).to receive(:raw).and_return(valid_response(:xml)) expect(OEmbed::Response).to receive(:create_for). with(valid_response(:xml), @qik, example_url(:qik), 'xml') @qik.get(example_url(:qik)) allow(@viddler).to receive(:raw).and_return(valid_response(:json)) expect(OEmbed::Response).to receive(:create_for). with(valid_response(:json), @viddler, example_url(:viddler), 'json') @viddler.get(example_url(:viddler)) end it "should send the provider's format if none is specified" do expect(@flickr).to receive(:raw). with(example_url(:flickr), :format => @default). and_return(valid_response(@default)) @flickr.get(example_url(:flickr)) expect(@qik).to receive(:raw). with(example_url(:qik), :format=>:xml). and_return(valid_response(:xml)) @qik.get(example_url(:qik)) expect(@viddler).to receive(:raw). with(example_url(:viddler), :format=>:json). and_return(valid_response(:json)) @viddler.get(example_url(:viddler)) end it "handles the :timeout option" do expect_any_instance_of(Net::HTTP).to receive(:open_timeout=).with(5) expect_any_instance_of(Net::HTTP).to receive(:read_timeout=).with(5) @flickr.get(example_url(:flickr), :timeout => 5) end end end ruby-oembed-0.8.14/spec/formatter_spec.rb0000644000004100000410000000231712546055651020356 0ustar www-datawww-datarequire File.dirname(__FILE__) + '/spec_helper' describe OEmbed::Formatter do include OEmbedSpecHelper it "should support JSON" do expect { OEmbed::Formatter.supported?(:json) }.to_not raise_error end it "should default to JSON" do expect(OEmbed::Formatter.default).to eq('json') end it "should decode a JSON String" do decoded = OEmbed::Formatter.decode(:json, valid_response(:json)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end it "should support XML" do expect { OEmbed::Formatter.supported?(:xml) }.to_not raise_error end it "should decode an XML String" do decoded = OEmbed::Formatter.decode(:xml, valid_response(:xml)) # We need to compare keys & values separately because we don't expect all # non-string values to be recognized correctly. expect(decoded.keys).to eq(valid_response(:object).keys) expect(decoded.values.map{|v|v.to_s}).to eq(valid_response(:object).values.map{|v|v.to_s}) end endruby-oembed-0.8.14/README.rdoc0000644000004100000410000000756712546055651015704 0ustar www-datawww-data= ruby-oembed http://stillmaintained.com/metavida/ruby-oembed.png An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See {oembed.com}[http://oembed.com] for more about the protocol. = Installation gem install ruby-oembed = Get Started == Providers Get information about a URL via an OEmbed::Provider. This library comes with many Providers built right in, to make your life easy. resource = OEmbed::Providers::Youtube.get("http://www.youtube.com/watch?v=2BYXBC8WQ5k") resource.video? #=> true resource.thumbnail_url #=> "http://i3.ytimg.com/vi/2BYXBC8WQ5k/hqdefault.jpg" resource.html #=> <<-HTML HTML If you'd like to use a provider that isn't included in the library, it's easy to create one. Just provide the oEmbed API endpoint and URL scheme(s). my_provider = OEmbed::Provider.new("http://my.cool-service.com/api/oembed_endpoint.{format}") my_provider << "http://*.cool-service.com/image/*" my_provider << "http://*.cool-service.com/video/*" resource = my_provider.get("http://a.cool-service.com/video/1") #=> OEmbed::Response resource.provider.name #=> "My Cool Service" To use multiple Providers at once, simply register them. OEmbed::Providers.register(OEmbed::Providers::Youtube, my_provider) resource = OEmbed::Providers.get("http://www.youtube.com/watch?v=2BYXBC8WQ5k") #=> OEmbed::Response resource.type #=> "video" resource.provider.name #=> "Youtube" Last but not least, ruby-oembed supports both {oohEmbed}[http://oohembed.com] and {Embedly}[http://embed.ly]. These services are provider aggregators. Each supports a wide array of websites ranging from {Amazon.com}[http://www.amazon.com] to {xkcd}[http://www.xkcd.com]. == Formatters This library works wonderfully on its own, but can get a speed boost by using 3rd party libraries to parse oEmbed data. To use a 3rd party Formatter, just be sure to require the library _before_ ruby-oembed. require 'json' require 'xmlsimple' require 'oembed' OEmbed::Formatter::JSON.backend #=> OEmbed::Formatter::JSON::Backends::JSONGem OEmbed::Formatter::XML.backend #=> OEmbed::Formatter::XML::Backends::XmlSimple The following, optional, backends are currently supported: * The {JSON implementation for Ruby}[http://flori.github.com/json/] * Rails' ActiveSupport::JSON (confirmed to work with Rails 3.0.x and should work with Rails 2.0+) * {XmlSimple}[http://xml-simple.rubyforge.org/] = Lend a Hand Code for the ruby-oembed library is {hosted on GitHub}[https://github.com/judofyr/ruby-oembed]. # Get the code. git clone git://github.com/judofyr/ruby-oembed.git cd ruby-oembed # Install all development-related gems. gem install bundler bundle install # Run the tests. bundle exec rake If you encounter any bug, feel free to {create an Issue}[https://github.com/judofyr/ruby-oembed/issues]. We gladly accept pull requests! Just {fork}[http://help.github.com/forking/] the library and commit your changes along with relevant tests. Once you're happy with the changes, {send a pull request}[http://help.github.com/pull-requests/]. We do our best to {keep our tests green}[http://travis-ci.org/metavida/ruby-oembed] https://secure.travis-ci.org/metavida/ruby-oembed.png = Contributors Thanks to {all who have made contributions}[https://github.com/judofyr/ruby-oembed/contributors] to this gem, both large and small. = License This code is free to use under the terms of the MIT license. ruby-oembed-0.8.14/.travis.yml0000644000004100000410000000012512546055651016166 0ustar www-datawww-datalanguage: ruby cache: bundler rvm: - 1.9.3 - 2.0.0 - 2.1.1 - 2.1.2 - 2.2.0 ruby-oembed-0.8.14/lib/0000755000004100000410000000000012546055651014625 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/0000755000004100000410000000000012546055651016060 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/formatter.rb0000644000004100000410000000633012546055651020412 0ustar www-datawww-datarequire 'oembed/formatter/base' require 'oembed/formatter/json' require 'oembed/formatter/xml' module OEmbed # Takes the raw response from an oEmbed server and turns it into a nice Hash of data. module Formatter class << self # Returns the default format for OEmbed::Provider requests as a String. def default # Listed in order of preference. %w{json xml}.detect { |type| supported?(type) rescue false } end # Given the name of a format we want to know about (e.g. 'json'), returns # true if there is a valid backend. If there is no backend, raises # OEmbed::FormatNotSupported. def supported?(format) case format.to_s when 'json' JSON.supported? when 'xml' XML.supported? else raise OEmbed::FormatNotSupported, format end end # Convert the given value into a nice Hash of values. The format should # be the name of the response format (e.g. 'json'). The value should be # a String or IO containing the response from an oEmbed server. # # For example: # value = '{"version": "1.0", "type": "link", "title": "Some Cool News Article"}' # OEmbed::Formatter.decode('json', value) # #=> {"version": "1.0", "type": "link", "title": "Some Cool News Article"} def decode(format, value) supported?(format) begin case format.to_s when 'json' begin JSON.decode(value) rescue JSON.backend.parse_error raise OEmbed::ParseError, $!.message end when 'xml' begin XML.decode(value) rescue XML.backend.parse_error raise OEmbed::ParseError, $!.message end end rescue raise OEmbed::ParseError, "#{$!.class}: #{$!.message}" end end # Test the given backend to make sure it parses known values correctly. # The backend_module should be either a JSON or XML backend. def test_backend(backend_module) expected = { "version"=>1.0, "string"=>"test", "int"=>42, "html"=>"Cool's\n the \"word\"!", } given_value = case backend_module.to_s when /OEmbed::Formatter::JSON::Backends::/ <<-JSON {"version":"1.0", "string":"test", "int":42,"html":"Cool's\\n the \\"word\\"\\u0021"} JSON when /OEmbed::Formatter::XML::Backends::/ <<-XML 1.0 test 42 <i>Cool's</i>\n the "word"! XML else nil end actual = backend_module.decode(given_value) # For the test to be true the actual output Hash should have the # exact same list of keys _and_ the values should be the same # if we ignoring typecasting. actual.keys.sort == expected.keys.sort && !actual.detect { |key, value| value.to_s != expected[key].to_s } end end # self end end ruby-oembed-0.8.14/lib/oembed/formatter/0000755000004100000410000000000012546055651020063 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/formatter/xml.rb0000644000004100000410000000232512546055651021212 0ustar www-datawww-datamodule OEmbed module Formatter # Handles parsing XML values using the best available backend. module XML # A Array of all available backends, listed in order of preference. DECODERS = %w(XmlSimple REXML) class << self include ::OEmbed::Formatter::Base # Returns the current XML backend. def backend set_default_backend unless defined?(@backend) raise OEmbed::FormatNotSupported, :xml unless defined?(@backend) @backend end def set_default_backend DECODERS.find do |name| begin self.backend = name true rescue LoadError # Try next decoder. false end end end private def backend_path 'xml/backends' end def test_value <<-XML 1.0 test 42 <i>Cool's</i>\n the "word"! XML end end # self end # XML end endruby-oembed-0.8.14/lib/oembed/formatter/json.rb0000644000004100000410000000215712546055651021366 0ustar www-datawww-datamodule OEmbed module Formatter # Handles parsing JSON values using the best available backend. module JSON # A Array of all available backends, listed in order of preference. DECODERS = %w(ActiveSupportJSON JSONGem Yaml) class << self include ::OEmbed::Formatter::Base # Returns the current JSON backend. def backend set_default_backend unless defined?(@backend) raise OEmbed::FormatNotSupported, :json unless defined?(@backend) @backend end def set_default_backend DECODERS.find do |name| begin self.backend = name true rescue LoadError # Try next decoder. false end end end private def backend_path 'json/backends' end def test_value <<-JSON {"version":"1.0", "string":"test", "int":42,"html":"Cool's\\n the \\"word\\"\\u0021"} JSON end end # self end # JSON end endruby-oembed-0.8.14/lib/oembed/formatter/xml/0000755000004100000410000000000012546055651020663 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/formatter/xml/backends/0000755000004100000410000000000012546055651022435 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/formatter/xml/backends/rexml.rb0000644000004100000410000000225412546055651024114 0ustar www-datawww-data# Unlike other backends, require REXML if it's not already loaded require 'rexml/document' unless defined?(REXML) module OEmbed module Formatter module XML module Backends # Use the REXML library, part of the standard library, to parse XML values. module REXML extend self # Parses an XML string or IO and convert it into an object def decode(xml) if !xml.respond_to?(:read) xml = StringIO.new(xml) end obj = {} doc = ::REXML::Document.new(xml) doc.elements[1].elements.each do |el| obj[el.name] = el.text end obj rescue case $! when parse_error raise $! else raise parse_error, "Couldn't parse the given document." end end def decode_fail_msg "The version of the REXML library you have installed isn't parsing XML like ruby-oembed expected." end def parse_error ::REXML::ParseException end end end end end end ruby-oembed-0.8.14/lib/oembed/formatter/xml/backends/nokogiri.rb0000644000004100000410000000217412546055651024607 0ustar www-datawww-data# Only allow this backend the nokogiri gem is already loaded raise ::LoadError, "The nokogiri library isn't available. require 'nokogiri'" unless defined?(Nokogiri) module OEmbed module Formatter module XML module Backends # Use the nokogiri gem to parse XML values. module Nokogiri extend self # Parses an XML string or IO and convert it into an object. def decode(xml) obj = {} doc = ::Nokogiri::XML(xml) { |config| config.strict } doc.root.elements.each do |el| obj[el.name] = el.text end obj rescue case $! when parse_error raise $! else raise parse_error, "Couldn't parse the given document." end end def decode_fail_msg "The version of the nokogiri library you have installed isn't parsing XML like ruby-oembed expected." end def parse_error ::Nokogiri::XML::SyntaxError end end end end end end ruby-oembed-0.8.14/lib/oembed/formatter/xml/backends/xmlsimple.rb0000644000004100000410000000211112546055651024767 0ustar www-datawww-data# Only allow this backend the xml-simple gem is already loaded raise ::LoadError, "The xml-simple library isn't available. require 'xmlsimple'" unless defined?(XmlSimple) module OEmbed module Formatter module XML module Backends # Use the xml-simple gem to parse XML values. module XmlSimple extend self # Parses an XML string or IO and convert it into an object. def decode(xml) if !xml.respond_to?(:read) xml = StringIO.new(xml) end ::XmlSimple.xml_in(xml, 'ForceArray'=>false) rescue case $! when parse_error raise $! else raise parse_error, "Couldn't parse the given document." end end def decode_fail_msg "The version of the xml-simple library you have installed isn't parsing XML like ruby-oembed expected." end def parse_error ::ArgumentError end end end end end end ruby-oembed-0.8.14/lib/oembed/formatter/base.rb0000644000004100000410000000770112546055651021327 0ustar www-datawww-datamodule OEmbed module Formatter # These are methods that are shared by the OEmbed::Formatter sub-classes # (i.e. OEmbed::Formatter:JSON and OEmbed::Formatter::XML). module Base # Returns true if there is a valid backend. Otherwise, raises OEmbed::FormatNotSupported def supported? !!backend end # Parses a String or IO and convert it into an Object def decode(value) backend.decode(value) end # Given either a String (the name of the backend to use) or an Object (which # must respond to the decode method), sets the current backend. Raises a LoadError # if the given backend cannot be loaded (e.g. an invalid String name, or the # decode method doesn't work properly). # OEmbed::Formatter::XML.backend = 'REXML' # OEmbed::Formatter::JSON.backend = MyCustomJsonDecoder.new def backend=(new_backend) new_backend_obj = case new_backend when String already_required = false begin already_required = self::Backends.const_defined?(new_backend, false) rescue ArgumentError # we're dealing with ruby < 1.9 where const_defined? only takes 1 argument, but behaves the way we want it to. already_required = self::Backends.const_defined?(new_backend) rescue NameError # no backends have been loaded yet already_required = false end require "oembed/formatter/#{backend_path}/#{new_backend.downcase}" unless already_required self::Backends.const_get(new_backend) else new_backend end test_backend(new_backend_obj) @backend = new_backend_obj rescue raise LoadError, "There was an error setting the backend: #{new_backend.inspect} - #{$!.message}" end # Perform a set of operations using a backend other than the current one. # OEmbed::Formatter::XML.with_backend('XmlSimple') do # OEmbed::Formatter::XML.decode(xml_value) # end def with_backend(new_backend) old_backend, self.backend = backend, new_backend yield ensure self.backend = old_backend end private # Makes sure the given backend can correctly parse values using the decode # method. def test_backend(new_backend) raise LoadError, "The given backend must respond to the decode method: #{new_backend.inspect}" unless new_backend.respond_to?(:decode) expected = { "version"=>1.0, "string"=>"test", "int"=>42, "html"=>"Cool's\n the \"word\"!", } actual = new_backend.decode(test_value) # For the test to be true the actual output Hash should have the # exact same list of keys _and_ the values should be the same # if we ignoring typecasting. if( actual.keys.sort != expected.keys.sort || actual.detect { |key, value| value.to_s != expected[key].to_s } ) msg = new_backend.decode_fail_msg rescue nil msg ||= "The given backend failed to decode the test string correctly" raise LoadError, "#{msg}: #{new_backend.inspect}" end end # Must return a String representing the sub-directory where in-library # backend rb files live (e.g. 'json/backends') def backend_path raise "This method must be defined by a format-specific OEmbed::Formatter sub-class." end # Must return a String that when parsed by a backend returns the following ruby Hash # { # "version"=>1.0, # "string"=>"test", # "int"=>42, # "html"=>"Cool's\n the \"word\"!", # } def test_value raise "This method must be defined by a format-specific OEmbed::Formatter sub-class." end end # SharedMethods end endruby-oembed-0.8.14/lib/oembed/formatter/json/0000755000004100000410000000000012546055651021034 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/formatter/json/backends/0000755000004100000410000000000012546055651022606 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/formatter/json/backends/jsongem.rb0000644000004100000410000000142712546055651024601 0ustar www-datawww-data# Only allow this backend the json gem is already loaded raise LoadError, "The json library isn't available. require 'json'" unless defined?(JSON) module OEmbed module Formatter module JSON module Backends module JSONGem extend self # Parses a JSON string or IO and convert it into an object. def decode(json) if json.respond_to?(:read) json = json.read end ::JSON.parse(json) end def decode_fail_msg "The version of the json library you have installed isn't parsing JSON like ruby-oembed expected." end def parse_error ::JSON::ParserError end end end end end end ruby-oembed-0.8.14/lib/oembed/formatter/json/backends/yaml.rb0000644000004100000410000000543512546055651024104 0ustar www-datawww-data# Unlike other backends, require YAML if it's not already loaded require 'yaml' unless defined?(YAML) module OEmbed module Formatter module JSON module Backends # Use the YAML library, part of the standard library, to parse JSON values that has been converted to YAML. module Yaml extend self # Parses a JSON string or IO and converts it into an object. def decode(json) if json.respond_to?(:read) json = json.read end YAML.load(convert_json_to_yaml(json)) rescue ArgumentError, Psych::SyntaxError raise parse_error, "Invalid JSON string" end def decode_fail_msg "The version of the YAML library you have installed isn't parsing JSON like ruby-oembed expected." end def parse_error ::StandardError end protected # Ensure that ":" and "," are always followed by a space def convert_json_to_yaml(json) #:nodoc: require 'strscan' unless defined? ::StringScanner scanner, quoting, marks, pos = ::StringScanner.new(json), false, [], nil scanner.scan_until(/\{/) while scanner.scan_until(/(\\['"]|['":,\\]|\\.)/) case char = scanner[1] when '"', "'" if !quoting quoting = char pos = scanner.pos elsif quoting == char quoting = false end when ":","," marks << scanner.pos - 1 unless quoting when "\\" scanner.skip(/\\/) end end raise parse_error unless scanner.scan_until(/\}/) if marks.empty? raise parse_error else left_pos = [-1].push(*marks) right_pos = marks << scanner.pos + scanner.rest_size output = [] left_pos.each_with_index do |left, i| scanner.pos = left.succ chunk = scanner.peek(right_pos[i] - scanner.pos + 1) chunk.gsub!(/\\([\\\/]|u[[:xdigit:]]{4})/) do ustr = $1 if ustr.index('u') == 0 [ustr[1..-1].to_i(16)].pack("U") elsif ustr == '\\' '\\\\' else ustr end end output << chunk end output = output * " " output.gsub!(/\\\//, '/') output end end end end end end end ruby-oembed-0.8.14/lib/oembed/formatter/json/backends/activesupportjson.rb0000644000004100000410000000142612546055651026740 0ustar www-datawww-data# Only allow this backend if ActiveSupport::JSON is already loaded raise LoadError, "ActiveSupport::JSON isn't available. require 'activesupport/json'" unless defined?(ActiveSupport::JSON) module OEmbed module Formatter module JSON module Backends module ActiveSupportJSON extend self # Parses a JSON string or IO and convert it into an object. def decode(json) ::ActiveSupport::JSON.decode(json) end def decode_fail_msg "The version of ActiveSupport::JSON you have installed isn't parsing JSON like ruby-oembed expected." end def parse_error ::ActiveSupport::JSON.parse_error end end end end end end ruby-oembed-0.8.14/lib/oembed/errors.rb0000644000004100000410000000230612546055651017722 0ustar www-datawww-datamodule OEmbed # A generic OEmbed-related Error. The OEmbed library does its best to capture all internal # errors and wrap them in an OEmbed::Error class so that the error-handling code in your # application can more easily identify the source of errors. # # The following Classes inherit from OEmbed::Error # * OEmbed::FormatNotSupported # * OEmbed::NotFound # * OEmbed::ParseError # * OEmbed::UnknownFormat # * OEmbed::UnknownResponse class Error < StandardError end # This is a test class NotFound < OEmbed::Error # :nodoc: def to_s "No embeddable content at '#{super}'" end end class UnknownFormat < OEmbed::Error # :nodoc: def to_s "The provider doesn't support the '#{super}' format" end end class FormatNotSupported < OEmbed::Error # :nodoc: def to_s "This server doesn't have the correct libraries installed to support the '#{super}' format" end end class UnknownResponse < OEmbed::Error # :nodoc: def to_s "Got unknown response (#{super}) from server" end end class ParseError < OEmbed::Error # :nodoc: def to_s "There was an error parsing the server response (#{super})" end end end ruby-oembed-0.8.14/lib/oembed/response.rb0000644000004100000410000000657112546055651020254 0ustar www-datawww-datamodule OEmbed # Contains oEmbed data about a URL, as returned by an OEmbed::Provider. The data # stored in Response instances can be accessed by either using the field method # _or_ by using the appropriate automatically-defined helper method. # # For example: # @response.type #=> 'rich' # @response.field('width') #=> '500' # @response.width #=> '500' class Response # An Hash of data (probably from a Provider) just as it was parsed. attr_reader :fields # The Provider instance that generated this Response attr_reader :provider # The URL that was sent to the provider, that this Response contains data about. attr_reader :request_url # The name of the format used get this data from the Provider (e.g. 'json'). attr_reader :format # Create a new Response instance of the correct type given raw # which is data from the provider, about the url, in the given # format that needs to be decoded. def self.create_for(raw, provider, url, format) fields = OEmbed::Formatter.decode(format, raw) resp_type = case fields['type'] when 'photo' then OEmbed::Response::Photo when 'video' then OEmbed::Response::Video when 'link' then OEmbed::Response::Link when 'rich' then OEmbed::Response::Rich else self end resp_type.new(fields, provider, url, format) end def initialize(fields, provider, url=nil, format=nil) @fields = fields @provider = provider @request_url = url @format = format define_methods! end # The String value associated with this key. While you can use helper methods # like Response#version, the field method is helpful if the Provider returns # non-standard values that conflict with Ruby methods. # # For example, if the Provider returns a "clone" value of "true": # # The following calls the Object#clone method # @response.clone #=> # 'true' def field(key) @fields[key.to_s].to_s end # Returns true if this is an oEmbed video response. def video? is_a?(OEmbed::Response::Video) end # Returns true if this is an oEmbed photo response. def photo? is_a?(OEmbed::Response::Photo) end # Returns true if this is an oEmbed link response. def link? is_a?(OEmbed::Response::Link) end # Returns true if this is an oEmbed rich response. def rich? is_a?(OEmbed::Response::Rich) end private # An Array of helper methods names define_methods! must be able to override # when is's called. In general, define_methods! tries its best _not_ to override # existing methods, so this Array is important if some other library has # defined a method that uses an oEmbed name. For example: Object#version def must_override %w{ type version title author_name author_url provider_name provider_url cache_age thumbnail_url thumbnail_width thumbnail_height } end def define_methods! @fields.keys.each do |key| next if self.respond_to?(key) && !must_override.include?(key.to_s) class << self self end.send(:define_method, key) do field(key) end end end end end ruby-oembed-0.8.14/lib/oembed/providers.rb0000644000004100000410000003471612546055651020435 0ustar www-datawww-datarequire 'rubygems' require 'yaml' module OEmbed # Allows OEmbed to perform tasks across several, registered, Providers # at once. class Providers class << self @@urls = {} @@fallback = [] @@to_register = {} # A Hash of all url schemes, where the keys represent schemes supported by # all registered Provider instances and values are an Array of Providers # that support that scheme. def urls @@urls end # Given one ore more Provider instances, register their url schemes for # future get calls. def register(*providers) providers.each do |provider| provider.urls.each do |url| @@urls[url] ||= [] @@urls[url] << provider end end end # Given one ore more Provider instances, un-register their url schemes. # Future get calls will not use these Providers. def unregister(*providers) providers.each do |provider| provider.urls.each do |url| if @@urls[url].is_a?(Array) @@urls[url].delete(provider) @@urls.delete(url) if @@urls[url].empty? end end end end # Register all Providers built into this gem. # The including_sub_type parameter should be one of the following values: # * :aggregators: also register provider aggregator endpoints, like Embedly def register_all(*including_sub_type) register(*@@to_register[""]) including_sub_type.each do |sub_type| register(*@@to_register[sub_type.to_s]) end end # Unregister all currently-registered Provider instances. def unregister_all @@urls = {} @@fallback = [] end # Takes an array of Provider instances or ProviderDiscovery # Use this method to register fallback providers. # When the raw or get methods are called, if the URL doesn't match # any of the registerd url patters the fallback providers # will be called (in order) with the URL. # # A common example: # OEmbed::Providers.register_fallback(OEmbed::ProviderDiscovery, OEmbed::Providers::OohEmbed) def register_fallback(*providers) @@fallback += providers end # Returns an array of all registerd fallback Provider instances. def fallback @@fallback end # Returns a Provider instance who's url scheme matches the given url. def find(url) providers = @@urls[@@urls.keys.detect { |u| u =~ url }] Array(providers).first || nil end # Finds the appropriate Provider for this url and return the raw response. # @deprecated *Note*: This method will be made private in the future. def raw(url, options = {}) provider = find(url) if provider provider.raw(url, options) else fallback.each do |p| return p.raw(url, options) rescue OEmbed::Error end raise(OEmbed::NotFound) end end # Finds the appropriate Provider for this url and returns an OEmbed::Response, # using Provider#get. def get(url, options = {}) provider = find(url) if provider provider.get(url, options) else fallback.each do |p| return p.get(url, options) rescue OEmbed::Error end raise(OEmbed::NotFound) end end private # Takes an OEmbed::Provider instance and registers it so that when we call # the register_all method, they all register. The sub_type can be be any value # used to uniquely group providers. Official sub_types are: # * nil: a normal provider # * :aggregators: an endpoint for an OEmbed aggregator def add_official_provider(provider_class, sub_type=nil) raise TypeError, "Expected OEmbed::Provider instance but was #{provider_class.class}" \ unless provider_class.is_a?(OEmbed::Provider) @@to_register[sub_type.to_s] ||= [] @@to_register[sub_type.to_s] << provider_class end end # Custom providers: # Provider for youtube.com # http://apiblog.youtube.com/2009/10/oembed-support.html # # Options: # * To get the iframe embed code # OEmbed::Providers::Youtube.endpoint += "?iframe=1" # * To get the flash/object embed code # OEmbed::Providers::Youtube.endpoint += "?iframe=0" # * To require https embed code # OEmbed::Providers::Youtube.endpoint += "?scheme=https" Youtube = OEmbed::Provider.new("http://www.youtube.com/oembed?scheme=https") Youtube << "http://*.youtube.com/*" Youtube << "https://*.youtube.com/*" Youtube << "http://*.youtu.be/*" Youtube << "https://*.youtu.be/*" add_official_provider(Youtube) # Provider for flickr.com Flickr = OEmbed::Provider.new("https://www.flickr.com/services/oembed/") Flickr << "http://*.flickr.com/*" Flickr << "https://*.flickr.com/*" Flickr << "http://flic.kr/*" Flickr << "https://flic.kr/*" add_official_provider(Flickr) # Provider for viddler.com # http://developers.viddler.com/documentation/services/oembed/ Viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/") Viddler << "http://*.viddler.com/*" add_official_provider(Viddler) # Provider for qik.com # http://qik.com/blog/qik-embraces-oembed-for-embedding-videos/ Qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}") Qik << "http://qik.com/*" Qik << "http://qik.com/video/*" add_official_provider(Qik) # Provider for revision3.com Revision3 = OEmbed::Provider.new("http://revision3.com/api/oembed/") Revision3 << "http://*.revision3.com/*" add_official_provider(Revision3) # Provider for hulu.com Hulu = OEmbed::Provider.new("http://www.hulu.com/api/oembed.{format}") Hulu << "http://www.hulu.com/watch/*" add_official_provider(Hulu) # Provider for vimeo.com # https://developer.vimeo.com/apis/oembed Vimeo = OEmbed::Provider.new("https://vimeo.com/api/oembed.{format}") Vimeo << "http://*.vimeo.com/*" Vimeo << "https://*.vimeo.com/*" add_official_provider(Vimeo) # Provider for twitter.com # https://dev.twitter.com/rest/reference/get/statuses/oembed Twitter = OEmbed::Provider.new("https://api.twitter.com/1/statuses/oembed.{format}") Twitter << "https://*.twitter.com/*/status/*" add_official_provider(Twitter) # Provider for vine.co # https://dev.twitter.com/web/vine/oembed Vine = OEmbed::Provider.new("https://vine.co/oembed.{format}") Vine << "http://*.vine.co/v/*" Vine << "https://*.vine.co/v/*" add_official_provider(Vine) # Provider for instagram.com # https://instagr.am/developer/embedding/ Instagram = OEmbed::Provider.new("https://api.instagram.com/oembed", :json) Instagram << "http://instagr.am/p/*" Instagram << "http://instagram.com/p/*" Instagram << "https://instagr.am/p/*" Instagram << "https://instagram.com/p/*" add_official_provider(Instagram) # Provider for slideshare.net # http://www.slideshare.net/developers/oembed Slideshare = OEmbed::Provider.new("http://www.slideshare.net/api/oembed/2") Slideshare << "http://www.slideshare.net/*/*" Slideshare << "http://www.slideshare.net/mobile/*/*" add_official_provider(Slideshare) # Provider for yfrog # http://code.google.com/p/imageshackapi/wiki/OEMBEDSupport Yfrog = OEmbed::Provider.new("http://www.yfrog.com/api/oembed", :json) Yfrog << "http://yfrog.com/*" add_official_provider(Yfrog) # Provider for imgur.com Imgur = OEmbed::Provider.new("https://api.imgur.com/oembed.{format}") Imgur << "https://*.imgur.com/gallery/*" Imgur << "http://*.imgur.com/gallery/*" add_official_provider(Imgur) # provider for mlg-tv # http://tv.majorleaguegaming.com/oembed MlgTv = OEmbed::Provider.new("http://tv.majorleaguegaming.com/oembed") MlgTv << "http://tv.majorleaguegaming.com/video/*" MlgTv << "http://mlg.tv/video/*" add_official_provider(MlgTv) # pownce.com closed in 2008 #Pownce = OEmbed::Provider.new("http://api.pownce.com/2.1/oembed.{format}") #Pownce << "http://*.pownce.com/*" #add_official_provider(Pownce) # Provider for polleverywhere.com PollEverywhere = OEmbed::Provider.new("http://www.polleverywhere.com/services/oembed/") PollEverywhere << "http://www.polleverywhere.com/polls/*" PollEverywhere << "http://www.polleverywhere.com/multiple_choice_polls/*" PollEverywhere << "http://www.polleverywhere.com/free_text_polls/*" add_official_provider(PollEverywhere) # Provider for my.opera.com # http://my.opera.com/devblog/blog/2008/12/02/embedding-my-opera-content-oembed MyOpera = OEmbed::Provider.new("http://my.opera.com/service/oembed", :json) MyOpera << "http://my.opera.com/*" add_official_provider(MyOpera) # Provider for clearspring.com ClearspringWidgets = OEmbed::Provider.new("http://widgets.clearspring.com/widget/v1/oembed/") ClearspringWidgets << "http://www.clearspring.com/widgets/*" add_official_provider(ClearspringWidgets) # Provider for nfb.ca NFBCanada = OEmbed::Provider.new("http://www.nfb.ca/remote/services/oembed/") NFBCanada << "http://*.nfb.ca/film/*" add_official_provider(NFBCanada) # Provider for scribd.com Scribd = OEmbed::Provider.new("http://www.scribd.com/services/oembed") Scribd << "http://*.scribd.com/*" add_official_provider(Scribd) # Provider for movieclips.com MovieClips = OEmbed::Provider.new("http://movieclips.com/services/oembed/") MovieClips << "http://movieclips.com/watch/*/*/" add_official_provider(MovieClips) # Provider for 23hq.com TwentyThree = OEmbed::Provider.new("http://www.23hq.com/23/oembed") TwentyThree << "http://www.23hq.com/*" add_official_provider(TwentyThree) # Provider for soundcloud.com # http://developers.soundcloud.com/docs/oembed SoundCloud = OEmbed::Provider.new("http://soundcloud.com/oembed", :json) SoundCloud << "http://*.soundcloud.com/*" SoundCloud << "https://*.soundcloud.com/*" add_official_provider(SoundCloud) # Provider for spotify.com # https://twitter.com/nicklas2k/status/330094611202723840 # http://blog.embed.ly/post/45149936446/oembed-for-spotify Spotify = OEmbed::Provider.new("https://embed.spotify.com/oembed/") Spotify << "http://open.spotify.com/*" Spotify << "https://open.spotify.com/*" Spotify << "http://play.spotify.com/*" Spotify << "https://play.spotify.com/*" Spotify << /^spotify\:(.*?)/ add_official_provider(Spotify) # Provider for skitch.com # http://skitch.com/oembed/%3C/endpoint Skitch = OEmbed::Provider.new("http://skitch.com/oembed") Skitch << "http://*.skitch.com/*" Skitch << "https://*.skitch.com/*" add_official_provider(Skitch) ## Provider for clikthrough.com # http://corporate.clikthrough.com/wp/?p=275 #Clickthrough = OEmbed::Provider.new("http://www.clikthrough.com/services/oembed/") #Clickthrough << "http://*.clikthrough.com/theater/video/*" #add_official_provider(Clickthrough) ## Provider for kinomap.com # http://www.kinomap.com/#!oEmbed #Kinomap = OEmbed::Provider.new("http://www.kinomap.com/oembed") #Kinomap << "http://www.kinomap.com/*" #add_official_provider(Kinomap) # Provider for oohembed.com, which is a provider aggregator. See # OEmbed::Providers::OohEmbed.urls for a full list of supported url schemas. # Embed.ly has taken over the oohembed.com domain and as of July 20 all oohEmbed # request will require you use an API key. For details on the transition see # http://blog.embed.ly/oohembed OohEmbed = OEmbed::Provider.new("http://oohembed.com/oohembed/", :json) OohEmbed << "http://*.5min.com/Video/*" # micro-video host OohEmbed << %r{http://(.*?).amazon.(com|co.uk|de|ca|jp)/(.*?)/(gp/product|o/ASIN|obidos/ASIN|dp)/(.*?)} # Online product shopping OohEmbed << "http://*.blip.tv/*" OohEmbed << "http://*.clikthrough.com/theater/video/*" OohEmbed << "http://*.collegehumor.com/video:*" # Comedic & original videos OohEmbed << "http://*.thedailyshow.com/video/*" # Syndicated show OohEmbed << "http://*.dailymotion.com/*" OohEmbed << "http://dotsub.com/view/*" OohEmbed << "http://*.flickr.com/photos/*" OohEmbed << "http://*.funnyordie.com/videos/*" # Comedy video host OohEmbed << "http://video.google.com/videoplay?*" # Video hosting OohEmbed << "http://www.hulu.com/watch/*" OohEmbed << "http://*.kinomap.com/*" OohEmbed << "http://*.livejournal.com/" OohEmbed << "http://*.metacafe.com/watch/*" # Video host OohEmbed << "http://*.nfb.ca/film/*" OohEmbed << "http://*.photobucket.com/albums/*" OohEmbed << "http://*.photobucket.com/groups/*" OohEmbed << "http://*.phodroid.com/*/*/*" # Photo host OohEmbed << "http://qik.com/*" OohEmbed << "http://*.revision3.com/*" OohEmbed << "http://*.scribd.com/*" OohEmbed << "http://*.slideshare.net/*" # Share presentations online OohEmbed << "http://*.twitpic.com/*" # Picture hosting for Twitter OohEmbed << "http://twitter.com/*/statuses/*" # Mirco-blogging network OohEmbed << "http://*.viddler.com/explore/*" OohEmbed << "http://www.vimeo.com/*" OohEmbed << "http://www.vimeo.com/groups/*/videos/*" OohEmbed << "http://*.wikipedia.org/wiki/*" # Online encyclopedia OohEmbed << "http://*.wordpress.com/*/*/*/*" # Blogging Engine & community OohEmbed << "http://*.xkcd.com/*" # A hilarious stick figure comic OohEmbed << %r{http://yfrog.(com|ru|com.tr|it|fr|co.il|co.uk|com.pl|pl|eu|us)/(.*?)} # image & video hosting OohEmbed << "http://*.youtube.com/watch*" # Provider for Embedly.com, which is a provider aggregator. See # OEmbed::Providers::Embedly.urls for a full list of supported url schemas. # http://embed.ly/docs/endpoints/1/oembed # # You can append your Embed.ly API key to the provider so that all requests are signed # OEmbed::Providers::Embedly.endpoint += "?key=#{my_embedly_key}" # # If you don't yet have an API key you'll need to sign up here: http://embed.ly/pricing Embedly = OEmbed::Provider.new("http://api.embed.ly/1/oembed") # Add all known URL regexps for Embedly. To update this list run `rake oembed:update_embedly` YAML.load_file(File.join(File.dirname(__FILE__), "/providers/embedly_urls.yml")).each do |url| Embedly << url end add_official_provider(Embedly, :aggregators) end end ruby-oembed-0.8.14/lib/oembed/response/0000755000004100000410000000000012546055651017716 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/response/video.rb0000644000004100000410000000050712546055651021353 0ustar www-datawww-datamodule OEmbed class Response # A Response used for representing playable videos. class Video < self private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ html width height } + super end end end endruby-oembed-0.8.14/lib/oembed/response/link.rb0000644000004100000410000000063612546055651021205 0ustar www-datawww-datamodule OEmbed class Response # A fairly generic type of Response where the url of the resource is # the original request_url. class Link < self # Returns the request_url def url request_url end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override super end end end endruby-oembed-0.8.14/lib/oembed/response/photo.rb0000644000004100000410000000077612546055651021406 0ustar www-datawww-datamodule OEmbed class Response # A Response used for representing static photos. class Photo < self # Returns an tag pointing at the appropraite URL. def html "#{(self.respond_to?(:title) ? self.title : nil)}" end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ url width height } + super end end end end ruby-oembed-0.8.14/lib/oembed/response/rich.rb0000644000004100000410000000061412546055651021171 0ustar www-datawww-datamodule OEmbed class Response # A Response used for representing rich HTML content that does not fall under # one of the other Response categories. class Rich < self private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ html width height } + super end end end endruby-oembed-0.8.14/lib/oembed/providers/0000755000004100000410000000000012546055651020075 5ustar www-datawww-dataruby-oembed-0.8.14/lib/oembed/providers/embedly_urls.yml0000644000004100000410000006101412546055651023310 0ustar www-datawww-data--- - http://*.23video.com/* - http://*.bandcamp.com/ - http://*.bandcamp.com/album/* - http://*.bandcamp.com/track/* - http://*.blip.tv/*/* - http://*.brainsonic.com/* - http://*.bubb.li/* - http://*.cartodb.com/*/* - http://*.crocodoc.com/* - http://*.crowdmap.com/map/* - http://*.crowdmap.com/post/* - http://*.dailymotion.com/*/video/* - http://*.dailymotion.com/video/* - http://*.deviantart.com - http://*.deviantart.com/#/* - http://*.deviantart.com/*/*.gif - http://*.deviantart.com/*/*.jpg - http://*.deviantart.com/art/* - http://*.deviantart.com/gallery - http://*.deviantart.com/gallery/* - http://*.deviantart.net/*/*.gif - http://*.deviantart.net/*/*.jpg - http://*.iplayerhd.com/player/video/* - http://*.iplayerhd.com/playerframe/* - http://*.kastio.com/webcasts/* - http://*.kinomap.com/* - http://*.linkedin.com/company/* - http://*.linkedin.com/in/* - http://*.linkedin.com/pub/* - http://*.looplogic.com/* - http://*.polarb.com/* - http://*.slideshare.net/*/* - http://*.smugmug.com/* - http://*.smugmug.com/*#* - http://*.status.net/notice/* - http://*.tinypic.com/*.jpg - http://*.tinypic.com/*.png - http://*.tochka.net/* - http://*.tumblr.com/post/* - http://*.twitrpix.com/* - http://*.univision.com/*/video/* - http://*.uservoice.com/*/suggestions/* - http://*.vidcaster.com/* - http://*.vzaar.me/* - http://*.web.tv/* - http://*.wi.st/* - http://*.wikipedia.org/wiki/* - http://*.wistia.com/* - http://*.yahoo.com/movies/* - http://*.youtube.com/*#*/* - http://*.youtube.com/playlist* - http://*.youtube.com/profile* - http://*.youtube.com/user/* - http://*.youtube.com/v/* - http://*.youtube.com/view_play_list* - http://*amazon.*/*/ASIN/* - http://*amazon.*/*/dp/* - http://*amazon.*/dp/* - http://*amazon.*/gp/aw/d/* - http://*amazon.*/gp/offer-listing/* - http://*amazon.*/gp/product/* - http://*amazon.*/gp/product/images/* - http://*amazon.*/o/ASIN/* - http://*boxofficebuz.com/video/* - http://*crackle.com/c/* - http://*dribbble.com/shots/* - http://*imgur.com/* - http://*meetup.com/* - http://*nfb.ca/film/* - http://*revision3.com/* - http://*twitch.tv/* - http://*twitch.tv/*/b/* - http://*viddler.com/v/* - http://*vidyard.com/* - http://*yfrog.*/* - http://*youtube.com/watch* - http://23hq.com/*/photo/* - http://23video.com/* - http://360.io/* - http://4cook.net/recipe/* - http://4sq.com/* - http://59saniye.com/* - http://abcnews.com/*/video/* - http://abcnews.com/video/playerIndex* - http://abcnews.go.com/*/video/* - http://abcnews.go.com/video/playerIndex* - http://achewood.com/* - http://achewood.com/index.php* - http://alkislarlayasiyorum.com/* - http://amzn.com/* - http://aniboom.com/animation-video/* - http://animal.discovery.com/videos/* - http://animoto.com/play/* - http://answers.polldaddy.com/poll/* - http://api.lovelive.tv/v1/* - http://api.minoto-video.com/publishers/*/videos/* - http://api.shopstyle.com/action/apiVisitRetailer* - http://app.sliderocket.com/* - http://app.ustudio.com/embed/*/* - http://app.wistia.com/embed/medias/* - http://askmen.com/video/* - http://asofterworld.com/*.jpg - http://audioboom.com/boos/* - http://bale.io/* - http://bambuser.com/channel/* - http://bambuser.com/channel/*/broadcast/* - http://bambuser.com/v/* - http://bcove.me/* - http://behance.net/gallery/* - http://beta-sliderocket.com/* - http://beta.polstir.com/*/* - http://bigthink.com/ideas/* - http://bigthink.com/series/* - http://blip.tv/*/* - http://boo.fm/b* - http://bop.fm/s/*/* - http://boston.com/*video* - http://boston.com/video* - http://brainshark.com/*/* - http://brainsonic.com/* - http://bravotv.com/*/*/videos/* - http://break.com/*/* - http://bubb.li/* - http://bunkrapp.com/*/* - http://canalplus.fr/* - http://cbsnews.com/video/watch/* - http://chirb.it/* - http://cl.ly/* - http://cl.ly/*/content - http://clipter.com/c/* - http://clyp.it/* - http://cnbc.com/id/*/play/1/video/* - http://cnbc.com/id/*?*video* - http://codepen.io/*/pen/* - http://codepen.io/*/pen/* - http://codepicnic.com/bites/* - http://codepicnic.com/consoles/* - http://codeply.com/view/* - http://collegehumor.com/video/* - http://collegehumor.com/video:* - http://confreaks.com/videos/* - http://confreaks.net/videos/* - http://coub.com/embed/* - http://coub.com/view/* - http://crocodoc.com/* - http://crowdmap.com/map/* - http://crowdmap.com/post/* - http://crunchbase.com/*/* - http://d.pr/i/* - http://dashboard.minoto-video.com/main/video/details/* - http://distrify.com/film/* - http://dnbradio.com/* - http://dotsub.com/view/* - http://drbl.in/* - http://dsc.discovery.com/videos/* - http://edition.cnn.com/video/* - http://embed.imajize.com/* - http://embed.minoto-video.com/* - http://espn.go.com/*/story* - http://espn.go.com/video/clip* - http://etsy.com/listing/* - http://fav.me/* - http://fb.me/* - http://fiverr.com/*/* - http://flic.kr/* - http://flowvella.com/s/* - http://fora.tv/*/*/*/* - http://formspring.me/* - http://formspring.me/*/q/* - http://fotokritik.com/*/* - http://fotopedia.com/*/* - http://foursquare.com/* - http://fr.peoplbrain.com/tutoriaux/* - http://freemusicarchive.org/curator/* - http://freemusicarchive.org/music/* - http://frontback.me/p/* - http://funnyordie.com/m/* - http://funnyordie.com/videos/* - http://galeri.uludagsozluk.com/* - http://gametrailers.com/video* - http://gfycat.com/* - http://giflike.com/a/* - http://giphy.com/gifs/* - http://gist.github.com/* - http://goanimate.com/videos/* - http://godtube.com/featured/video/* - http://godtube.com/watch/* - http://google.com/profiles/* - http://gph.is/* - http://grindtv.com/*/video/* - http://grooveshark.com/* - http://gty.im/* - http://guardian.co.uk/*/video/*/*/*/* - http://health.discovery.com/videos/* - http://huffduffer.com/*/* - http://hulu.com/w/* - http://hulu.com/watch* - http://hypem.com/premiere/* - http://i*.photobucket.com/albums/* - http://i.giflike.com/* - http://identi.ca/notice/* - http://ifood.tv/channel/user/* - http://ifood.tv/recipe/* - http://ifood.tv/video/* - http://iframe.minoto-video.com/* - http://ifttt.com/recipes/* - http://ign.com/videos/* - http://img.ly/* - http://img.skitch.com/* - http://imgs.xkcd.com/* - http://infomous.com/node/* - http://instagr.am/p/* - http://instagram.com/p/* - http://investigation.discovery.com/videos/* - http://isnare.com/* - http://issuu.com/*/docs/* - http://itunes.apple.com/* - http://izlesene.com/video/* - http://jdsupra.com/legalnews/* - http://jibjab.com/view/* - http://jsbin.com/* - http://jsbin.com/*/* - http://jsfiddle.net/* - http://kastio.com/webcasts/* - http://khanacademy.org/* - http://link.brightcove.com/services/player/bcpid* - http://linkedin.com/company/* - http://linkedin.com/in/* - http://linkedin.com/in/* - http://linkedin.com/pub/* - http://list.ly/list/* - http://live.huffingtonpost.com/r/segment/*/* - http://liveleak.com/view?* - http://lockerz.com/s/* - http://logotv.com/video/* - http://lonelyplanet.com/Clip.aspx?* - http://lustich.de/videos/* - http://m.youtube.com/index* - http://m.youtube.com/watch* - http://maps.google.com/?* - http://maps.google.com/maps/ms?* - http://maps.google.com/maps?* - http://meadd.com/* - http://meadd.com/*/* - http://media.photobucket.com/image/* - http://mediamatters.org/mmtv/* - http://meetu.ps/* - http://megavisor.com/en/view/* - http://megavisor.com/view/* - http://military.discovery.com/videos/* - http://minilogs.com/* - http://mixergy.com/* - http://mlkshk.com/p/* - http://moby.to/* - http://money.cnn.com/video/* - http://mpora.com/videos/* - http://msn.foxsports.com/video* - http://msnbc.msn.com/*/watch/* - http://multimedia.foxsports.com/m/video/*/* - http://muvi.es/* - http://muzu.tv/* - http://my.opera.com/*/albums/show.dml?id=* - http://my.opera.com/*/albums/showpic.dml?album=*&picture=* - http://myloc.me/* - http://mynet.com/video/* - http://nbcnews.com/* - http://new.livestream.com/* - http://nyti.ms/* - http://nzonscreen.com/title/* - http://on.aol.com/playlist/* - http://on.aol.com/video/* - http://on.bubb.li/* - http://open.spotify.com/* - http://ow.ly/i/* - http://pastebin.com/* - http://pastie.org/* - http://photozou.jp/photo/photo_only/*/* - http://photozou.jp/photo/show/*/* - http://picasaweb.google.com*/*/* - http://picasaweb.google.com*/*/*#* - http://picasaweb.google.com*/lh/photo/* - http://pics.lockerz.com/s/* - http://pikchur.com/* - http://pixorial.com/watch/* - http://planetgreen.discovery.com/videos/* - http://play.minoto-video.com/* - http://play.spotify.com/* - http://player.vimeo.com/* - http://plus.google.com/* - http://polarb.com/* - http://polldaddy.com/community/poll/* - http://polldaddy.com/poll/* - http://polstir.com/*/* - http://ponga.com/* - http://portal.sliderocket.com/* - http://prezi.com/*/* - http://public.chartblocks.com/c/* - http://public.talely.com/*/* - http://qik.com/* - http://qik.com/video/* - http://qik.ly/* - http://questionablecontent.net/ - http://questionablecontent.net/comics/*.png - http://questionablecontent.net/view.php* - http://quora.com/* - http://radd.it/comments/* - http://radd.it/magic/* - http://radd.it/playlists/* - http://radd.it/r/* - http://radd.it/user/* - http://radionomy.com/*/radio/* - http://radioreddit.com/?q=songs* - http://radioreddit.com/songs* - http://rapidengage.com/s/* - http://redux.com/f/*/* - http://redux.com/stream/item/*/* - http://reuters.com/video/* - http://s*.photobucket.com/albums/* - http://say.ly/* - http://science.discovery.com/videos/* - http://sciencestage.com/a/*.html - http://sciencestage.com/v/*.html - http://screencast.com/*/media/* - http://screencast.com/t/* - http://screenr.com/* - http://scribblemaps.com/maps/view/*/* - http://scribd.com/doc/* - http://scribd.com/mobile/documents/* - http://sendables.jibjab.com/originals/* - http://sendables.jibjab.com/view/* - http://sendvid.com/* - http://shoplocket.com/products/* - http://showme.com/sh/* - http://siteanalytics.compete.com/* - http://skitch.com/*/*/* - http://sliderocket.com/* - http://slidesha.re/* - http://snappytv.com/* - http://snd.sc/* - http://snotr.com/video/* - http://socialcam.com/v/* - http://some.ly/* - http://someecards.com/*/* - http://soundcloud.com/* - http://soundcloud.com/*/* - http://soundcloud.com/*/sets/* - http://soundcloud.com/groups/* - http://speakerdeck.com/*/* - http://spiegel.de/video/* - http://spoti.fi/* - http://spreecast.com/events/* - http://sproutvideo.com/videos/* - http://stepic.org/* - http://storify.com/*/* - http://streamio.com/api/v1/* - http://streetfire.net/video/*.htm* - http://tagmotion.com/tree/* - http://telly.com/* - http://thecolbertreport.cc.com/videos/* - http://thedailyshow.cc.com/videos/* - http://theguardian.com/*/video/*/*/*/* - http://theonion.com/video/* - http://tinypic.com/player.php* - http://tinypic.com/r/*/* - http://tinypic.com/view.php* - http://tl.gd/* - http://tlc.discovery.com/videos/* - http://tochka.net/* - http://today.msnbc.msn.com/id/*/ns/* - http://today.msnbc.msn.com/id/*/vp/* - http://tr.instela.com/* - http://tudou.com/programs/view/* - http://tumblr.com/* - http://tun.in/* - http://tunein.com/* - http://twitgoo.com/* - http://twitlonger.com/show/* - http://twitpic.com/* - http://twitpic.com/photos/* - http://twitrpix.com/* - http://ustre.am/* - http://v.youku.com/v_playlist/* - http://v.youku.com/v_show/* - http://veoh.com/watch/* - http://vibi.com/videocard/* - http://vice.com/* - http://vid.me/* - http://video.allthingsd.com/video/* - http://video.esri.com/* - http://video.forbes.com/fvn/* - http://video.foxbusiness.com/v/* - http://video.foxnews.com/v/* - http://video.google.com/videoplay?* - http://video.nytimes.com/video/* - http://video.pbs.org/video/* - http://video.uludagsozluk.com/* - http://video214.com/play/* - http://videodetective.com/*/* - http://videodonor.com/video/* - http://videos.nymag.com/* - http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid* - http://vimeo.com/* - http://vimeo.com/groups/*/videos/* - http://vimeo.com/m/#/* - http://vine.co/v/* - http://vol.at/video/* - http://vube.com/*/* - http://vzaar.com/videos/* - http://vzaar.me/* - http://vzaar.tv/* - http://washingtonpost.com/wp-dyn/*/video/*/*/*/* - http://weavly.com/watch/* - http://web.tv/* - http://wedgi.es/* - http://wh.gov/photos-and-video/video/* - http://wh.gov/video/* - http://wi.st/* - http://wirewax.com/* - http://wistia.com/* - http://wordpress.tv/*/*/*/*/ - http://worldstarhiphop.com/videos/video*.php?v=* - http://www.23hq.com/*/photo/* - http://www.59saniye.com/* - http://www.achewood.com/* - http://www.achewood.com/index.php* - http://www.alkislarlayasiyorum.com/* - http://www.allego.com/* - http://www.amzn.com/* - http://www.aniboom.com/animation-video/* - http://www.askmen.com/video/* - http://www.asofterworld.com/*.jpg - http://www.asofterworld.com/index.php?id=* - http://www.audioboom.com/boos/* - http://www.behance.net/gallery/* - http://www.boston.com/*video* - http://www.boston.com/video* - http://www.brainshark.com/*/* - http://www.branchtrack.com/projects/* - http://www.bravotv.com/*/*/videos/* - http://www.break.com/*/* - http://www.canalplus.fr/* - http://www.clikthrough.com/theater/video/* - http://www.clipfish.de/*/*/video/* - http://www.clipsyndicate.com/video/playlist/*/* - http://www.cnbc.com/id/*/play/1/video/* - http://www.cnbc.com/id/*?*video* - http://www.cnn.com/video/* - http://www.codeply.com/view/* - http://www.colbertnation.com/full-episodes/* - http://www.colbertnation.com/the-colbert-report-collections/* - http://www.colbertnation.com/the-colbert-report-videos/* - http://www.collegehumor.com/video/* - http://www.collegehumor.com/video:* - http://www.comedycentral.com/videos/index.jhtml?* - http://www.confreaks.com/videos/* - http://www.confreaks.net/videos/* - http://www.crunchbase.com/*/* - http://www.dailymile.com/people/*/entries/* - http://www.dnbradio.com/* - http://www.etsy.com/listing/* - http://www.eyeem.com/a/* - http://www.eyeem.com/p/* - http://www.eyeem.com/u/* - http://www.facebook.com/*/photos/* - http://www.facebook.com/*/posts/* - http://www.facebook.com/photo.php* - http://www.facebook.com/video.php* - http://www.fiverr.com/*/* - http://www.flickr.com/photos/* - http://www.formspring.me/* - http://www.formspring.me/*/q/* - http://www.fotokritik.com/*/* - http://www.fotopedia.com/*/* - http://www.foursquare.com/* - http://www.freemusicarchive.org/curator/* - http://www.freemusicarchive.org/music/* - http://www.funnyordie.com/m/* - http://www.funnyordie.com/videos/* - http://www.gametrailers.com/video* - http://www.gettyimages.com/detail/photo/* - http://www.giflike.com/a/* - http://www.globalpost.com/dispatch/* - http://www.globalpost.com/video/* - http://www.godtube.com/featured/video/* - http://www.godtube.com/watch/* - http://www.gogoyoko.com/song/* - http://www.google.com/profiles/* - http://www.grindtv.com/*/video/* - http://www.guardian.co.uk/*/video/*/*/*/* - http://www.hark.com/clips/* - http://www.howcast.com/videos/* - http://www.hulu.com/embed/* - http://www.hulu.com/w/* - http://www.hulu.com/watch* - http://www.hurriyettv.com/* - http://www.hurriyettv.com/* - http://www.ifood.tv/channel/user/* - http://www.ifood.tv/recipe/* - http://www.ifood.tv/video/* - http://www.ign.com/videos/* - http://www.isnare.com/* - http://www.izlesene.com/video/ - http://www.jdsupra.com/legalnews/* - http://www.khanacademy.org/* - http://www.kickstarter.com/projects/*/* - http://www.kiva.org/lend/* - http://www.koldcast.tv/#video:* - http://www.koldcast.tv/video/* - http://www.last.fm/music/* - http://www.last.fm/music/*/* - http://www.last.fm/music/*/_/* - http://www.last.fm/music/+images/* - http://www.last.fm/music/+videos/* - http://www.liveleak.com/view?* - http://www.livestream.com/* - http://www.logotv.com/video/* - http://www.lonelyplanet.com/Clip.aspx?* - http://www.meinvz.net/* - http://www.meinvz.net/Gadgets/Info/* - http://www.meinvz.net/Gadgets/Install/* - http://www.meinvz.net/Groups/Overview/* - http://www.meinvz.net/Profile/* - http://www.meinvz.net/l/* - http://www.metacafe.com/w/* - http://www.metacafe.com/watch/* - http://www.metacdn.com/r/c/*/* - http://www.metacdn.com/r/m/*/* - http://www.minilogs.com/* - http://www.mixcloud.com/*/*/ - http://www.mobypicture.com/user/*/view/* - http://www.mpora.com/videos/* - http://www.msnbc.msn.com/*/watch/* - http://www.msnbc.msn.com/id/*/ns/* - http://www.msnbc.msn.com/id/*/vp/* - http://www.muzu.tv/* - http://www.mynet.com/video/ - http://www.myspace.com/index.cfm?fuseaction=*&videoid* - http://www.myvideo.de/watch/* - http://www.nbcnews.com/* - http://www.npr.org/*/*/*/*/* - http://www.npr.org/*/*/*/*/*/* - http://www.npr.org/*/*/*/*/*/*/* - http://www.npr.org/templates/story/story.php* - http://www.nytimes.com/video/*/* - http://www.nzonscreen.com/title/* - http://www.overstream.net/view.php?oid=* - http://www.pastie.org/* - http://www.pixorial.com/watch/* - http://www.polleverywhere.com/free_text_polls/* - http://www.polleverywhere.com/multiple_choice_polls/* - http://www.polleverywhere.com/polls/* - http://www.quantcast.com/* - http://www.quantcast.com/wd:* - http://www.questionablecontent.net/ - http://www.questionablecontent.net/comics/*.png - http://www.questionablecontent.net/view.php* - http://www.quora.com/* - http://www.qwantz.com/index.php?comic=* - http://www.qwiki.com/q/* - http://www.radionomy.com/*/radio/* - http://www.radioreddit.com/?q=songs* - http://www.radioreddit.com/songs* - http://www.rdio.com/#/artist/*/album/* - http://www.rdio.com/artist/*/album/* - http://www.redux.com/f/*/* - http://www.redux.com/stream/item/*/* - http://www.reuters.com/video/* - http://www.rts.ch/play/tv/* - http://www.saynow.com/playMsg.html* - http://www.saynow.com/playMsg.html* - http://www.schooltube.com/video/*/* - http://www.schuelervz.net/* - http://www.schuelervz.net/Gadgets/Info/* - http://www.schuelervz.net/Gadgets/Install/* - http://www.schuelervz.net/Groups/Overview/* - http://www.schuelervz.net/Profile/* - http://www.schuelervz.net/l/* - http://www.sciencestage.com/a/*.html - http://www.sciencestage.com/v/*.html - http://www.scrapblog.com/viewer/viewer.aspx* - http://www.screencast.com/*/media/* - http://www.screencast.com/t/* - http://www.scribblemaps.com/maps/view/*/* - http://www.scribd.com/doc/* - http://www.scribd.com/mobile/documents/* - http://www.shopstyle.com/action/apiVisitRetailer* - http://www.shopstyle.com/action/viewLook* - http://www.shopstyle.com/browse* - http://www.showme.com/sh/* - http://www.sliderocket.com/* - http://www.slideshare.net/*/* - http://www.slideshare.net/mobile/*/* - http://www.snappytv.com/* - http://www.snotr.com/video/* - http://www.socialcam.com/v/* - http://www.some.ly/* - http://www.someecards.com/*/* - http://www.spiegel.de/video/* - http://www.spike.com/video/* - http://www.spreecast.com/events/* - http://www.srf.ch/play/*/*/*/*?id=* - http://www.streamio.com/api/v1/* - http://www.streetfire.net/video/*.htm* - http://www.studivz.net/* - http://www.studivz.net/Gadgets/Info/* - http://www.studivz.net/Gadgets/Install/* - http://www.studivz.net/Groups/Overview/* - http://www.studivz.net/Profile/* - http://www.studivz.net/l/* - http://www.tagmotion.com/tree/* - http://www.ted.com/index.php/talks/*.html* - http://www.ted.com/index.php/talks/lang/*/*.html* - http://www.ted.com/talks/ - http://www.ted.com/talks/*.html* - http://www.ted.com/talks/lang/*/*.html* - http://www.telly.com/* - http://www.thedailyshow.com/collection/*/*/* - http://www.thedailyshow.com/full-episodes/* - http://www.thedailyshow.com/watch/* - http://www.theguardian.com/*/video/*/*/*/* - http://www.theonion.com/video/* - http://www.timetoast.com/timelines/* - http://www.tinypic.com/player.php* - http://www.tinypic.com/r/*/* - http://www.tinypic.com/view.php* - http://www.traileraddict.com/clip/* - http://www.traileraddict.com/poster/* - http://www.traileraddict.com/trailer/* - http://www.trailerspy.com/trailer/* - http://www.trailerspy.com/trailer/*/* - http://www.trailerspy.com/view_video.php* - http://www.trutv.com/video/* - http://www.tudou.com/programs/view/* - http://www.twitlonger.com/show/* - http://www.twitpic.com/* - http://www.twitpic.com/photos/* - http://www.ustream.tv/* - http://www.ustream.tv/channel/* - http://www.ustream.tv/recorded/* - http://www.veoh.com/watch/* - http://www.vevo.com/video/* - http://www.vevo.com/watch/* - http://www.vice.com/* - http://www.viddy.com/*/v/* - http://www.viddy.com/video/* - http://www.videodetective.com/*/* - http://www.vimeo.com/* - http://www.vimeo.com/groups/*/videos/* - http://www.vine.co/v/* - http://www.vol.at/video/* - http://www.vtility.net/virtualtour/* - http://www.vube.com/*/* - http://www.vzaar.com/videos/* - http://www.vzaar.tv/* - http://www.washingtonpost.com/wp-dyn/*/video/*/*/*/* - http://www.weavly.com/watch/* - http://www.whitehouse.gov/photos-and-video/video/* - http://www.whitehouse.gov/video/* - http://www.whosay.com/*/content/* - http://www.whosay.com/*/photos/* - http://www.whosay.com/*/videos/* - http://www.wikimedia.org/wiki/File* - http://www.wikipedia.org/wiki/* - http://www.wirewax.com/* - http://www.worldstarhiphop.com/videos/video*.php?v=* - http://www.xiami.com/song/* - http://www.xkcd.com/* - http://www.xtranormal.com/watch/* - http://www.youtube.com/embed/* - http://www.youtube.com/gif* - http://www.zapiks.com/* - http://www.zapkolik.com/video/* - http://www.zeit.de/video/* - http://www.zero-inch.com/* - http://www.zie.nl/video/* - http://xiami.com/song/* - http://xkcd.com/* - http://yahoo.com/movies/* - http://youtu.be/* - http://youtube.com/gif* - http://zeit.de/video/* - http://zie.nl/video/* - https://*.23video.com/* - https://*.brainsonic.com/* - https://*.cartodb.com/*/* - https://*.crocodoc.com/* - https://*.iplayerhd.com/player/video/* - https://*.iplayerhd.com/playerframe/* - https://*.looplogic.com/* - https://*.stream.co.jp/apiservice/* - https://*.stream.ne.jp/apiservice/* - https://*.wi.st/* - https://*.wistia.com/* - https://*.yahoo.com/movies/* - https://*.youtube.com/playlist* - https://*.youtube.com/v/* - https://*vidyard.com/* - https://*youtube.com/watch* - https://23video.com/* - https://animoto.com/play/* - https://api.lovelive.tv/v1/* - https://app.devhv.com/oembed/* - https://app.wistia.com/embed/medias/* - https://bop.fm/a/* - https://bop.fm/p/* - https://bop.fm/s/*/* - https://brainshark.com/*/* - https://brainsonic.com/* - https://bunkrapp.com/*/* - https://chirb.it/* - https://clipmine.com/embed/* - https://clipmine.com/video/* - https://clipter.com/c/* - https://cloudup.com/* - https://clyp.it/* - https://codepicnic.com/bites/* - https://codepicnic.com/consoles/* - https://crocodoc.com/* - https://fb.me/* - https://flowvella.com/s/* - https://foursquare.com/* - https://fr.peoplbrain.com/tutoriaux/* - https://ganxy.com/* - https://gfycat.com/* - https://gist.github.com/* - https://hackpad.com/* - https://ifttt.com/recipes/* - https://img.skitch.com/* - https://itunes.apple.com/* - https://khanacademy.org/* - https://maps.google.com/?* - https://maps.google.com/maps/ms?* - https://maps.google.com/maps?* - https://medium.com/* - https://medium.com/*/* - https://megavisor.com/en/view/* - https://megavisor.com/view/* - https://mix.office.com/MyMixes/Details/* - https://mix.office.com/embed/* - https://mix.office.com/mix/* - https://mix.office.com/watch/* - https://mixbit.com/v/* - https://open.spotify.com/* - https://picasaweb.google.com*/*/* - https://picasaweb.google.com*/*/*#* - https://picasaweb.google.com*/lh/photo/* - https://play.spotify.com/* - https://player.vimeo.com/* - https://plus.google.com/* - https://portfolium.com/entry/* - https://public.chartblocks.com/c/* - https://quora.com/* - https://rapidengage.com/s/* - https://readtapestry.com/s/*/ - https://reelhouse.org/* - https://screen.yahoo.com/*/* - https://scribblemaps.com/maps/view/*/* - https://sendvid.com/* - https://sfx.io/* - https://sketchfab.com/models/* - https://sketchfab.com/show/* - https://skitch.com/*/*/* - https://soundcloud.com/* - https://soundcloud.com/*/* - https://soundcloud.com/*/sets/* - https://soundcloud.com/groups/* - https://speakerdeck.com/*/* - https://stepic.org/* - https://storify.com/*/* - https://streamio.com/api/v1/* - https://tr.instela.com/* - https://tun.in/* - https://tunein.com/* - https://urtak.com/clr/* - https://urtak.com/u/* - https://vid.me/* - https://vidd.me/* - https://video.esri.com/* - https://video214.com/play/* - https://vimeo.com/* - https://vine.co/v/* - https://wi.st/* - https://wistia.com/* - https://www.allego.com/* - https://www.brainshark.com/*/* - https://www.branchtrack.com/projects/* - https://www.facebook.com/*/photos/* - https://www.facebook.com/*/posts/* - https://www.facebook.com/photo.php* - https://www.facebook.com/video.php* - https://www.foursquare.com/* - https://www.ganxy.com/* - https://www.khanacademy.org/* - https://www.quora.com/* - https://www.reelhouse.org/* - https://www.scribblemaps.com/maps/view/*/* - https://www.streamio.com/api/v1/* - https://www.vimeo.com/* - https://www.vine.co/v/* - https://www.wedgies.com/question/* - https://www.youtube.com/embed/* - https://www.youtube.com/gif* - https://yahoo.com/movies/* - https://youtube.com/gif* ruby-oembed-0.8.14/lib/oembed/providers/oohembed_urls.yml0000644000004100000410000000107612546055651023453 0ustar www-datawww-data--- - http://*.blip.tv/* - http://*.clikthrough.com/theater/video/* - http://*.dailymotion.com/* - http://*.flickr.com/photos/* - http://*.kinomap.com/* - http://*.nfb.ca/film/* - http://*.photobucket.com/albums/*|http://*.photobucket.com/groups/* - http://*.revision3.com/* - http://*.scribd.com/* - http://*.viddler.com/explore/* - http://*.youtube.com/watch* - http://dotsub.com/view/* - http://qik.com/* - http://www.hulu.com/watch/* - http://www.vimeo.com/* and http://www.vimeo.com/groups/*/videos/* - http://yfrog.(com|ru|com.tr|it|fr|co.il|co.uk|com.pl|pl|eu|us)/* ruby-oembed-0.8.14/lib/oembed/provider.rb0000644000004100000410000001536112546055651020245 0ustar www-datawww-datarequire 'cgi' module OEmbed # An OEmbed::Provider has information about an individual oEmbed enpoint. class Provider # The String that is the http URI of the Provider's oEmbed endpoint. # This URL may also contain a {{format}} portion. In actual requests to # this Provider, this string will be replaced with a string representing # the request format (e.g. "json"). attr_accessor :endpoint # The name of the default format for all request to this Provider (e.g. 'json'). attr_accessor :format # An Array of all URL schemes supported by this Provider. attr_accessor :urls # The human-readable name of the Provider. # # @deprecated *Note*: This accessor currently isn't used anywhere in the codebase. attr_accessor :name # @deprecated *Note*: Added in a fork of the gem, a while back. I really would like # to get rid of it, though. --Marcos attr_accessor :url # Construct a new OEmbed::Provider instance, pointing at a specific oEmbed # endpoint. # # The endpoint should be a String representing the http URI of the Provider's # oEmbed endpoint. The endpoint String may also contain a {format} portion. # In actual requests to this Provider, this string will be replaced with a String # representing the request format (e.g. "json"). # # If give, the format should be the name of the default format for all request # to this Provider (e.g. 'json'). Defaults to OEmbed::Formatter.default # # For example: # # If requests should be sent to: # # "http://my.service.com/oembed?format=#{OEmbed::Formatter.default}" # @provider = OEmbed::Provider.new("http://my.service.com/oembed") # # # If requests should be sent to: # # "http://my.service.com/oembed.xml" # @xml_provider = OEmbed::Provider.new("http://my.service.com/oembed.{format}", :xml) def initialize(endpoint, format = OEmbed::Formatter.default) endpoint_uri = URI.parse(endpoint.gsub(/[\{\}]/,'')) rescue nil raise ArgumentError, "The given endpoint isn't a valid http(s) URI: #{endpoint.to_s}" unless endpoint_uri.is_a?(URI::HTTP) @endpoint = endpoint @urls = [] @format = format end # Adds the given url scheme to this Provider instance. # The url scheme can be either a String, containing wildcards specified # with an asterisk, (see http://oembed.com/#section2.1 for details), # or a Regexp. # # For example: # @provider << "http://my.service.com/video/*" # @provider << "http://*.service.com/photo/*/slideshow" # @provider << %r{^http://my.service.com/((help)|(faq))/\d+[#\?].*} def <<(url) if !url.is_a?(Regexp) full, scheme, domain, path = *url.match(%r{([^:]*)://?([^/?]*)(.*)}) domain = Regexp.escape(domain).gsub("\\*", "(.*?)").gsub("(.*?)\\.", "([^\\.]+\\.)?") path = Regexp.escape(path).gsub("\\*", "(.*?)") url = Regexp.new("^#{Regexp.escape(scheme)}://#{domain}#{path}") end @urls << url end # Send a request to the Provider endpoint to get information about the # given url and return the appropriate OEmbed::Response. # # The query parameter should be a Hash of values which will be # sent as query parameters in this request to the Provider endpoint. The # following special cases apply to the query Hash: # :timeout:: specifies the timeout (in seconds) for the http request. # :format:: overrides this Provider's default request format. # :url:: will be ignored, replaced by the url param. def get(url, query = {}) query[:format] ||= @format OEmbed::Response.create_for(raw(url, query), self, url, query[:format].to_s) end # Determine whether the given url is supported by this Provider by matching # against the Provider's URL schemes. def include?(url) @urls.empty? || !!@urls.detect{ |u| u =~ url } end # @deprecated *Note*: This method will be made private in the future. def build(url, query = {}) raise OEmbed::NotFound, url unless include?(url) query = query.merge({:url => ::CGI.escape(url)}) query.delete(:timeout) # TODO: move this code exclusively into the get method, once build is private. this_format = (query[:format] ||= @format.to_s).to_s endpoint = @endpoint.clone if endpoint.include?("{format}") endpoint["{format}"] = this_format query.delete(:format) end base = endpoint.include?('?') ? '&' : '?' query = base + query.inject("") do |memo, (key, value)| "#{key}=#{value}&#{memo}" end.chop URI.parse(endpoint + query).instance_eval do @format = this_format def format @format end self end end # @deprecated *Note*: This method will be made private in the future. def raw(url, query = {}) uri = build(url, query) found = false max_redirects = 4 until found http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme == 'https' http.verify_mode = OpenSSL::SSL::VERIFY_PEER http.read_timeout = http.open_timeout = query[:timeout] if query[:timeout] methods = if RUBY_VERSION < "2.2" %w{scheme userinfo host port registry} else %w{scheme userinfo host port} end methods.each { |method| uri.send("#{method}=", nil) } req = Net::HTTP::Get.new(uri.to_s) req['User-Agent'] = "Mozilla/5.0 (compatible; ruby-oembed/#{OEmbed::VERSION})" res = http.request(req) #res = Net::HTTP.start(uri.host, uri.port) {|http| http.get(uri.request_uri) } res.header['location'] ? uri = URI.parse(res.header['location']) : found = true if max_redirects == 0 found = true else max_redirects -= 1 end end case res when Net::HTTPNotImplemented raise OEmbed::UnknownFormat, format when Net::HTTPNotFound raise OEmbed::NotFound, url when Net::HTTPSuccess res.body else raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error' end rescue StandardError # Convert known errors into OEmbed::UnknownResponse for easy catching # up the line. This is important if given a URL that doesn't support # OEmbed. The following are known errors: # * Net::* errors like Net::HTTPBadResponse # * JSON::JSONError errors like JSON::ParserError if defined?(::JSON) && $!.is_a?(::JSON::JSONError) || $!.class.to_s =~ /\ANet::/ raise OEmbed::UnknownResponse, res && res.respond_to?(:code) ? res.code : 'Error' else raise $! end end end end ruby-oembed-0.8.14/lib/oembed/provider_discovery.rb0000644000004100000410000000536712546055651022341 0ustar www-datawww-datamodule OEmbed # Uses {oEmbed Discover}[http://oembed.com/#section4] to generate a new Provider # instance about a URL for which a Provider didn't previously exist. class ProviderDiscovery class << self # Discover the Provider for the given url, then call Provider#raw on that provider. # The query parameter will be passed to both discover_provider and Provider#raw # @deprecated *Note*: This method will be made private in the future. def raw(url, query={}) provider = discover_provider(url, query) provider.raw(url, options) end # Discover the Provider for the given url, then call Provider#get on that provider. # The query parameter will be passed to both discover_provider and Provider#get def get(url, query={}) provider = discover_provider(url, query) provider.get(url, query) end # Returns a new Provider instance based on information from oEmbed discovery # performed on the given url. # # The options Hash recognizes the following keys: # :format:: If given only discover endpoints for the given format. If not format is given, use the first available format found. def discover_provider(url, options = {}) uri = URI.parse(url) res = Net::HTTP.start(uri.host, uri.port) do |http| http.get(uri.request_uri) end case res when Net::HTTPNotFound raise OEmbed::NotFound, url when Net::HTTPSuccess format = options[:format] if format.nil? || format == :json provider_endpoint ||= //.match(res.body)[1] rescue nil provider_endpoint ||= //.match(res.body)[1] rescue nil format ||= :json if provider_endpoint end if format.nil? || format == :xml # {The specification}[http://oembed.com/#section4] says XML discovery should have # type="text/xml+oembed" but some providers use type="application/xml+oembed" provider_endpoint ||= //.match(res.body)[1] rescue nil provider_endpoint ||= //.match(res.body)[2] rescue nil format ||= :xml if provider_endpoint end begin provider_endpoint = URI.parse(provider_endpoint) provider_endpoint.query = nil provider_endpoint = provider_endpoint.to_s rescue URI::Error raise OEmbed::NotFound, url end Provider.new(provider_endpoint, format || OEmbed::Formatter.default) else raise OEmbed::UnknownResponse, res.code end end end end end ruby-oembed-0.8.14/lib/oembed/version.rb0000644000004100000410000000050712546055651020074 0ustar www-datawww-datamodule OEmbed class Version MAJOR = 0 MINOR = 8 PATCH = 14 STRING = "#{MAJOR}.#{MINOR}.#{PATCH}" class << self # A String representing the current version of the OEmbed gem. def inspect STRING end alias_method :to_s, :inspect end end VERSION = Version::STRING endruby-oembed-0.8.14/lib/oembed.rb0000644000004100000410000000056412546055651016412 0ustar www-datawww-data$:.unshift File.dirname(__FILE__) require 'net/http' require 'oembed/version' require 'oembed/errors' require 'oembed/formatter' require 'oembed/provider' require 'oembed/provider_discovery' require 'oembed/providers' require 'oembed/response' require 'oembed/response/photo' require 'oembed/response/video' require 'oembed/response/link' require 'oembed/response/rich' ruby-oembed-0.8.14/lib/tasks/0000755000004100000410000000000012546055651015752 5ustar www-datawww-dataruby-oembed-0.8.14/lib/tasks/rspec.rake0000644000004100000410000000013212546055651017726 0ustar www-datawww-datarequire 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:specs) task :default => :specsruby-oembed-0.8.14/lib/tasks/oembed.rake0000644000004100000410000000304512546055651020053 0ustar www-datawww-databegin require 'yaml' require 'json' require 'open-uri' namespace :oembed do desc "Update the embedly_urls.yml file using the services api." task :update_embedly do # Details at http://api.embed.ly/docs/service json_uri = URI.parse("http://api.embed.ly/1/services") yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/embedly_urls.yml") services = JSON.parse(json_uri.read) url_regexps = [] services.each do |service| url_regexps += service['regex'].map{|r| r.strip } end url_regexps.sort! YAML.dump(url_regexps, File.open(yaml_path, 'w')) end # Note: At the moment the list of enpoints in the oohembed-provided JSON file # do NOT match the full listing on their website. Until we sort that out, we'll # continue to use the manually entered list of oohembed URLs desc "Update the list of URLs supported by oohembed via their API" task :update_oohembed do # Details in the Q & A section of http://oohembed.com/ json_uri = URI.parse("http://oohembed.com/static/endpoints.json") yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/oohembed_urls.yml") services = JSON.parse(json_uri.read) url_regexps = [] services.each do |service| url_regexps << service['url'] end url_regexps.sort! YAML.dump(url_regexps, File.open(yaml_path, 'w')) end end rescue LoadError puts "The oembed rake tasks require JSON. Install it with: gem install json" endruby-oembed-0.8.14/metadata.yml0000644000004100000410000001353312546055651016367 0ustar www-datawww-data--- !ruby/object:Gem::Specification name: ruby-oembed version: !ruby/object:Gem::Version version: 0.8.14 platform: ruby authors: - Magnus Holm - Alex Kessinger - Aris Bartee - Marcos Wright Kuhns autorequire: bindir: bin cert_chain: [] date: 2012-11-19 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: json requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: xml-simple requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: nokogiri requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: rspec requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.0' - !ruby/object:Gem::Dependency name: vcr requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '1.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '1.0' - !ruby/object:Gem::Dependency name: fakeweb requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' description: An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See http://oembed.com for more information about the protocol. email: arisbartee@gmail.com executables: [] extensions: [] extra_rdoc_files: - CHANGELOG.rdoc - README.rdoc - LICENSE files: - ".gitignore" - ".rvmrc" - ".travis.yml" - ".yardopts" - CHANGELOG.rdoc - Gemfile - LICENSE - README.rdoc - Rakefile - integration_test/test.rb - integration_test/test_urls.csv - lib/oembed.rb - lib/oembed/errors.rb - lib/oembed/formatter.rb - lib/oembed/formatter/base.rb - lib/oembed/formatter/json.rb - lib/oembed/formatter/json/backends/activesupportjson.rb - lib/oembed/formatter/json/backends/jsongem.rb - lib/oembed/formatter/json/backends/yaml.rb - lib/oembed/formatter/xml.rb - lib/oembed/formatter/xml/backends/nokogiri.rb - lib/oembed/formatter/xml/backends/rexml.rb - lib/oembed/formatter/xml/backends/xmlsimple.rb - lib/oembed/provider.rb - lib/oembed/provider_discovery.rb - lib/oembed/providers.rb - lib/oembed/providers/embedly_urls.yml - lib/oembed/providers/oohembed_urls.yml - lib/oembed/response.rb - lib/oembed/response/link.rb - lib/oembed/response/photo.rb - lib/oembed/response/rich.rb - lib/oembed/response/video.rb - lib/oembed/version.rb - lib/tasks/oembed.rake - lib/tasks/rspec.rake - ruby-oembed.gemspec - spec/cassettes/OEmbed_Provider.yml - spec/cassettes/OEmbed_ProviderDiscovery.yml - spec/formatter/ducktype_backend_spec.rb - spec/formatter/json/.DS_Store - spec/formatter/json/jsongem_backend_spec.rb - spec/formatter/json/yaml_backend_spec.rb - spec/formatter/xml/nokogiri_backend_spec.rb - spec/formatter/xml/rexml_backend_spec.rb - spec/formatter/xml/xmlsimple_backend_spec.rb - spec/formatter_spec.rb - spec/provider_discovery_spec.rb - spec/provider_spec.rb - spec/providers_spec.rb - spec/response_spec.rb - spec/spec_helper.rb - spec/spec_helper_examples.yml homepage: http://github.com/judofyr/ruby-oembed licenses: - MIT metadata: {} post_install_message: rdoc_options: - "--main" - README.rdoc - "--title" - ruby-oembed-0.8.14 - "--inline-source" - "--exclude" - tasks - CHANGELOG.rdoc require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.2.2 signing_key: specification_version: 3 summary: oEmbed for Ruby test_files: - spec/cassettes/OEmbed_Provider.yml - spec/cassettes/OEmbed_ProviderDiscovery.yml - spec/formatter/ducktype_backend_spec.rb - spec/formatter/json/.DS_Store - spec/formatter/json/jsongem_backend_spec.rb - spec/formatter/json/yaml_backend_spec.rb - spec/formatter/xml/nokogiri_backend_spec.rb - spec/formatter/xml/rexml_backend_spec.rb - spec/formatter/xml/xmlsimple_backend_spec.rb - spec/formatter_spec.rb - spec/provider_discovery_spec.rb - spec/provider_spec.rb - spec/providers_spec.rb - spec/response_spec.rb - spec/spec_helper.rb - spec/spec_helper_examples.yml ruby-oembed-0.8.14/.gitignore0000644000004100000410000000010012546055651016036 0ustar www-datawww-data/pkg /.bundle /rails_oembed /doc Gemfile.lock .yardoc .DS_Store ruby-oembed-0.8.14/ruby-oembed.gemspec0000644000004100000410000000456112546055651017644 0ustar www-datawww-data# -*- encoding: utf-8 -*- lib = File.expand_path('../lib/', __FILE__) $:.unshift lib unless $:.include?(lib) require 'oembed/version' Gem::Specification.new do |s| s.name = "ruby-oembed" s.version = OEmbed::Version.to_s s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Magnus Holm", "Alex Kessinger", "Aris Bartee", "Marcos Wright Kuhns"] s.date = "2012-11-19" s.description = "An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See http://oembed.com for more information about the protocol." s.email = "arisbartee@gmail.com" s.homepage = "http://github.com/judofyr/ruby-oembed" s.licenses = ["MIT"] s.files = `git ls-files`.split("\n") s.test_files = s.files.grep(%r{^(test|spec|features,integration_test)/}) s.rdoc_options = ["--main", "README.rdoc", "--title", "ruby-oembed-#{OEmbed::Version}", "--inline-source", "--exclude", "tasks", "CHANGELOG.rdoc"] s.extra_rdoc_files = s.files.grep(%r{\.rdoc$}) + %w{LICENSE} s.require_paths = ["lib"] s.rubygems_version = "1.8.19" s.summary = "oEmbed for Ruby" if s.respond_to? :specification_version then s.specification_version = 3 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, ["~> 3.0"]) s.add_development_dependency(%q, ["~> 1.0"]) s.add_development_dependency(%q, [">= 0"]) else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 3.0"]) s.add_dependency(%q, ["~> 1.0"]) s.add_dependency(%q, [">= 0"]) end else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["~> 3.0"]) s.add_dependency(%q, ["~> 1.0"]) s.add_dependency(%q, [">= 0"]) end end ruby-oembed-0.8.14/.rvmrc0000644000004100000410000000004012546055651015203 0ustar www-datawww-datarvm --create use default@oembed ruby-oembed-0.8.14/.yardopts0000644000004100000410000000012712546055651015725 0ustar www-datawww-data--readme README.rdoc --markup rdoc --exclude tasks lib/**/*.rb - CHANGELOG.rdoc LICENSEruby-oembed-0.8.14/LICENSE0000644000004100000410000000204612546055651015066 0ustar www-datawww-dataCopyright (c) 2010 Magnus Holm, et al. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.