<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,7 +12,7 @@ class Plugin &lt; DataMapper::Base
   after_create :install
   after_create :set_create_activity
   after_update :set_update_activity
-  after_destroy :remove
+  #after_destroy :remove
 
   class &lt;&lt; self
     @@loaded = []
@@ -22,21 +22,26 @@ class Plugin &lt; DataMapper::Base
   # This grabs the plugin using its url, unpacks it, and loads the metadata for it
   def download
     # Load the manifest yaml
-    manifest = YAML::load(Net::HTTP.get(URI.parse(url + &quot;/manifest.yml&quot;)))
+    manifest = YAML::load(Net::HTTP.get(URI.parse(url + &quot;.yml&quot;)))
     # Grab metadata from manifest
-    self.name = manifest[&quot;plugin&quot;][&quot;name&quot;]
-    self.author = manifest[&quot;plugin&quot;][&quot;author&quot;]
-    self.version = manifest[&quot;plugin&quot;][&quot;version&quot;]
-    self.homepage = manifest[&quot;plugin&quot;][&quot;homepage&quot;]
-    self.about = manifest[&quot;plugin&quot;][&quot;about&quot;]
+    self.name = manifest[&quot;name&quot;]
+    self.author = manifest[&quot;author&quot;]
+    self.version = manifest[&quot;version&quot;]
+    self.homepage = manifest[&quot;homepage&quot;]
+    self.about = manifest[&quot;about&quot;]
     # Build the path
     self.path = File.join(File.join(File.join(Merb.root, &quot;app&quot;), &quot;plugins&quot;), URI.parse(url).path.split(&quot;/&quot;).last.split(&quot;.&quot;).first)
     # Remove any existing plugin at the path
     FileUtils.rm_rf(self.path)
-    # Download all of the plugin contents
-    recurse(manifest[&quot;plugin&quot;][&quot;contents&quot;])
+    Dir.mkdir(self.path)
+    # Download the package and untgz
+    require 'zlib'
+    require 'stringio'
+    require 'archive/tar/minitar'
+    package = Net::HTTP.get(URI.parse(url + &quot;.tgz&quot;))
+    Archive::Tar::Minitar.unpack(Zlib::GzipReader.new(StringIO.new(package)), self.path)
     # Unpack any gems downloaded
-    unpack_gems(manifest[&quot;plugin&quot;][&quot;contents&quot;][&quot;gems&quot;][&quot;.&quot;]) unless manifest[&quot;plugin&quot;][&quot;contents&quot;][&quot;gems&quot;].nil?
+    unpack_gems(manifest[&quot;gems&quot;][&quot;.&quot;]) unless manifest[&quot;gems&quot;].nil?
   end
 
   ##</diff>
      <filename>app/models/plugin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -46,6 +46,7 @@ use_test :rspec, 'merb_stories'
 
 # These are some examples of how you might specify dependencies.
 # 
+gem &quot;archive-tar-minitar&quot;
 dependencies &quot;merb_helpers&quot;
 dependencies &quot;merb-assets&quot;
 dependencies &quot;merb-cache&quot;</diff>
      <filename>config/init.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>69f7329cc9035f5dd945f1e6eb47c0537a9a6c15</id>
    </parent>
  </parents>
  <author>
    <name>Alexander Flatter</name>
    <email>flatter@alexander-flatters-macbook-pro.local</email>
  </author>
  <url>http://github.com/mleung/feather/commit/f79ee25efcee0d83b3431912cd943b7799a69833</url>
  <id>f79ee25efcee0d83b3431912cd943b7799a69833</id>
  <committed-date>2008-05-20T08:47:29-07:00</committed-date>
  <authored-date>2008-05-20T08:47:29-07:00</authored-date>
  <message>Changed Plugin to support tgz packages</message>
  <tree>13f8b506c9ab37ddd63ae9ea807febc85e4e1500</tree>
  <committer>
    <name>Alexander Flatter</name>
    <email>flatter@alexander-flatters-macbook-pro.local</email>
  </committer>
</commit>
