<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,7 +35,15 @@ Install it!
 
         script/plugin install git://github.com/mamuso/acts_as_unvlogable.git
         
-2. Optionally you can create the `config/unvlogable.yml` to store keys for the different services. You have in the plugin a [sample file](http://github.com/mamuso/acts_as_unvlogable/tree/master/unvlogable_sample.yml). At this moment you only need specify keys for youtube and flickr.
+2. Optionally you can create the `config/unvlogable.yml` to store keys for the different services. You have in the plugin a [sample file](http://github.com/mamuso/acts_as_unvlogable/tree/master/unvlogable_sample.yml). At this moment you only need specify keys for flickr.
+
+
+Dependencies
+------------
+
+The plugin depends on [youtube-g](http://rubyforge.org/projects/youtube-g/) and [hpricot](https://code.whytheluckystiff.net/hpricot/).
+
+We have included a modified version of the flickr gem to skip the gem dependency and manage video capabilities.
 
 
 Use it!</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 # Included gems
-require 'youtube'
+require 'youtube_g'
 require 'flickr'
 # String extension
 require 'string_extend'
@@ -38,7 +38,7 @@ class UnvlogIt
   end
   
   def embed_url
-    @object.embed_url #rescue nil
+    @object.embed_url rescue nil
   end
 
   def embed_html(width=425, height=344, options={})</diff>
      <filename>lib/acts_as_unvlogable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ class VgMetacafe
     
     #is the video 'youtubed'?
     @youtubed = @args[1].index(&quot;yt-&quot;).nil? ? false : true
-    @yt = @youtubed ? VgYoutube.new(&quot;http://www.youtube.com/watch?v=#{@args[1].sub('yt-', '')}&quot;, options) : nil
+    @yt = @youtubed ? VgYoutube.new(&quot;http://www.youtube.com/watch?v=#{@args[1].sub('yt-', '')}&quot;) : nil
   end
   
   def title</diff>
      <filename>lib/vg_metacafe.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,13 +7,11 @@
 class VgYoutube
   
   def initialize(url=nil, options={})
-    # general settings
-    settings ||= YAML.load_file(RAILS_ROOT + '/config/unvlogable.yml') rescue {}
-    object = YouTube::Client.new(options.nil? || options[:key].nil? ? settings['youtube_key'] : options[:key]) rescue {}
-    
+    object = YouTubeG::Client.new rescue {}
     @url = url
     @video_id = parse_url(url)
-    @details = object.video_details(@video_id)
+    @details = object.video_by(@video_id)
+    raise if @details.blank?
   end
   
   def title
@@ -21,15 +19,15 @@ class VgYoutube
   end
   
   def thumbnail
-    @details.thumbnail_url
+    @details.thumbnails.first.url
   end
   
   def embed_url
-    &quot;http://www.youtube.com/v/#{@video_id}&quot; if @details.embed_allowed == true
+    @details.media_content.first.url if @details.noembed == false
   end
   
   def embed_html(width=425, height=344, options={})
-    &quot;&lt;object width='#{width}' height='#{height}'&gt;&lt;param name='movie' value='#{embed_url}&amp;fs=1'&gt;&lt;/param&gt;&lt;param name='allowFullScreen' value='true'&gt;&lt;/param&gt;&lt;param name='allowscriptaccess' value='always'&gt;&lt;/param&gt;&lt;embed src='#{embed_url}&amp;fs=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='#{width}' height='#{height}'&gt;&lt;/embed&gt;&lt;/object&gt;&quot; if @details.embed_allowed == true
+    &quot;&lt;object width='#{width}' height='#{height}'&gt;&lt;param name='movie' value='#{embed_url}&amp;fs=1'&gt;&lt;/param&gt;&lt;param name='allowFullScreen' value='true'&gt;&lt;/param&gt;&lt;param name='allowscriptaccess' value='always'&gt;&lt;/param&gt;&lt;embed src='#{embed_url}&amp;fs=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='#{width}' height='#{height}'&gt;&lt;/embed&gt;&lt;/object&gt;&quot; if @details.noembed == false
   end
   
   </diff>
      <filename>lib/vg_youtube.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ class ActsAsUnvlogableTest &lt; Test::Unit::TestCase
 # ----------------------------------------------------------
     context &quot;with an existent youtube url&quot; do
       setup do
-        @videotron = UnvlogIt.new(&quot;http://www.youtube.com/watch?v=muLIPWjks_M&quot;, {:key =&gt; &quot;RCofu-vAmeY&quot;}) # =&gt; Ninja cat comes closer while not moving!
+        @videotron = UnvlogIt.new(&quot;http://www.youtube.com/watch?v=muLIPWjks_M&quot;) # =&gt; Ninja cat comes closer while not moving!
       end
       should &quot;initialize a VgYoutube instance&quot; do
         assert_equal VgYoutube, @videotron.instance_values['object'].class
@@ -49,7 +49,7 @@ class ActsAsUnvlogableTest &lt; Test::Unit::TestCase
 
     context &quot;with an existent youtube url that can not be embedded&quot; do
       setup do
-        @videotron = UnvlogIt.new(&quot;http://www.youtube.com/watch?v=3Oec8RuwVVs&quot;, {:key =&gt; &quot;RCofu-vAmeY&quot;}) # =&gt; The Killers - Read My Mind
+        @videotron = UnvlogIt.new(&quot;http://www.youtube.com/watch?v=3Oec8RuwVVs&quot;) # =&gt; The Killers - Read My Mind
       end
       should &quot;initialize a VgYoutube instance&quot; do
         assert_equal VgYoutube, @videotron.instance_values['object'].class
@@ -65,7 +65,7 @@ class ActsAsUnvlogableTest &lt; Test::Unit::TestCase
     
     context &quot;with an inexistent youtube url&quot; do
       should &quot;raise an ArgumentError&quot; do
-        assert_raise(ArgumentError, &quot;Unsuported url or service&quot;) { UnvlogIt.new(&quot;http://www.youtube.com/watch?v=inexistente&quot;, {:key =&gt; &quot;RCofu-vAmeY&quot;}) }
+        assert_raise(ArgumentError, &quot;Unsuported url or service&quot;) { UnvlogIt.new(&quot;http://www.youtube.com/watch?v=inexistente&quot;) }
       end
     end
 
@@ -102,7 +102,7 @@ class ActsAsUnvlogableTest &lt; Test::Unit::TestCase
 # ----------------------------------------------------------
     context &quot;with an existent metacafe url&quot; do
       setup do
-        @videotron = UnvlogIt.new(&quot;http://www.metacafe.com/watch/1135061/close_call_a320_caught_in_crosswinds/&quot;, {:key =&gt; &quot;RCofu-vAmeY&quot;}) # =&gt; Close Call! A320 Caught in Crosswinds 
+        @videotron = UnvlogIt.new(&quot;http://www.metacafe.com/watch/1135061/close_call_a320_caught_in_crosswinds/&quot;) # =&gt; Close Call! A320 Caught in Crosswinds 
       end
       should &quot;initialize a VgMetacafe instance&quot; do
         assert_equal VgMetacafe, @videotron.instance_values['object'].class
@@ -119,7 +119,7 @@ class ActsAsUnvlogableTest &lt; Test::Unit::TestCase
     
     context &quot;with an existent 'youtubed' metacafe url&quot; do
       setup do
-        @videotron = UnvlogIt.new(&quot;http://www.metacafe.com/watch/yt-r07zdVLOWBA/pop_rocks_and_coke_myth/&quot;, {:key =&gt; &quot;RCofu-vAmeY&quot;}) # =&gt; Close Call! A320 Caught in Crosswinds 
+        @videotron = UnvlogIt.new(&quot;http://www.metacafe.com/watch/yt-r07zdVLOWBA/pop_rocks_and_coke_myth/&quot;) # =&gt; Close Call! A320 Caught in Crosswinds 
       end
       should &quot;initialize a VgMetacafe instance&quot; do
         assert_equal VgMetacafe, @videotron.instance_values['object'].class</diff>
      <filename>test/acts_as_unvlogable_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,5 @@
 # fill the gaps :)
 # 
 # 
-# youtube =&gt; http://code.google.com/intl/en-EN/apis/youtube/2.0/developers_guide_protocol.html#Developer_Key
-youtube_key: 
-
 # flickr =&gt; 
 flickr_key: </diff>
      <filename>unvlogable_sample.yml</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/youtube.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>1fc684b3c4345baf9f64cf14a2fb3ada1085209b</id>
    </parent>
  </parents>
  <author>
    <name>manuel mu&#241;oz solera</name>
    <email>mamusino@gmail.com</email>
  </author>
  <url>http://github.com/mamuso/acts_as_unvlogable/commit/29ff09227280fbada8fd925956ed77410d6aac5d</url>
  <id>29ff09227280fbada8fd925956ed77410d6aac5d</id>
  <committed-date>2009-01-04T11:49:25-08:00</committed-date>
  <authored-date>2009-01-04T11:49:25-08:00</authored-date>
  <message>using youtube_g to the youtube video service</message>
  <tree>badff62aa4183f612b0ad417ab5bf9bbe207e3c6</tree>
  <committer>
    <name>manuel mu&#241;oz solera</name>
    <email>mamusino@gmail.com</email>
  </committer>
</commit>
