<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,3 @@
 *.swp
 tmp
+s3.yml</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,9 @@ require 'rake/testtask'
 require 'rake/rdoctask'
 require 'rake/gempackagetask'
 
+$LOAD_PATH &lt;&lt; File.join(File.dirname(__FILE__), 'lib')
+require 'paperclip'
+
 desc 'Default: run unit tests.'
 task :default =&gt; [:clean, :test]
 
@@ -44,7 +47,7 @@ end
 
 spec = Gem::Specification.new do |s| 
   s.name              = &quot;paperclip&quot;
-  s.version           = &quot;2.1.0&quot;
+  s.version           = Paperclip::VERSION
   s.author            = &quot;Jon Yurek&quot;
   s.email             = &quot;jyurek@thoughtbot.com&quot;
   s.homepage          = &quot;http://www.thoughtbot.com/&quot;
@@ -67,3 +70,15 @@ end
 Rake::GemPackageTask.new(spec) do |pkg| 
   pkg.need_tar = true 
 end 
+
+desc &quot;Release new version&quot;
+task :release =&gt; [:test, :sync_docs, :gem] do
+  require 'rubygems'
+  require 'rubyforge'
+  r = RubyForge.new
+  r.login
+  r.add_release spec.rubyforge_project,
+                spec.name,
+                spec.version,
+                File.join(&quot;pkg&quot;, &quot;#{spec.name}-#{spec.version}.gem&quot;)
+end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1 @@
 require File.join(File.dirname(__FILE__), &quot;lib&quot;, &quot;paperclip&quot;)
-ActiveRecord::Base.extend( Paperclip::ClassMethods )
-File.send :include, Paperclip::Upfile
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,6 +35,9 @@ require 'paperclip/attachment'
 
 # The base module that gets included in ActiveRecord::Base.
 module Paperclip
+
+  VERSION = &quot;2.1.0&quot;
+
   class &lt;&lt; self
     # Provides configurability to Paperclip. There are a number of options available, such as:
     # * whiny_thumbnails: Will raise an error if Paperclip cannot process thumbnails of 
@@ -198,3 +201,9 @@ module Paperclip
   end
 
 end
+
+# Set it all up.
+if Object.const_defined?(&quot;ActiveRecord&quot;)
+  ActiveRecord::Base.send(:include, Paperclip)
+  File.send(:include, Paperclip::Upfile)
+end</diff>
      <filename>lib/paperclip.rb</filename>
    </modified>
    <modified>
      <diff>@@ -81,6 +81,7 @@ class AttachmentTest &lt; Test::Unit::TestCase
       Paperclip::Attachment.default_options.merge!({
         :path =&gt; &quot;:rails_root/tmp/:attachment/:class/:style/:id/:basename.:extension&quot;
       })
+      FileUtils.rm_rf(&quot;tmp&quot;)
       @instance = stub
       @instance.stubs(:id).returns(41)
       @instance.stubs(:class).returns(Dummy)
@@ -172,6 +173,23 @@ class AttachmentTest &lt; Test::Unit::TestCase
           should &quot;still have its #file attribute not be nil&quot; do
             assert ! @attachment.file.nil?
           end
+
+          context &quot;and deleted&quot; do
+            setup do
+              @existing_names = @attachment.styles.keys.collect do |style|
+                @attachment.path(style)
+              end
+              @instance.expects(:[]=).with(:test_file_name, nil)
+              @instance.expects(:[]=).with(:test_content_type, nil)
+              @instance.expects(:[]=).with(:test_file_size, nil)
+              @attachment.assign nil
+              @attachment.save
+            end
+
+            should &quot;delete the files&quot; do
+              @existing_names.each{|f| assert ! File.exists?(f) }
+            end
+          end
         end
       end
     end</diff>
      <filename>test/test_attachment.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c44048d0a303c617e1e3ffbd695cb4eaece3eb9e</id>
    </parent>
  </parents>
  <author>
    <name>Jon Yurek</name>
    <email>jyurek@thoughtbot.com</email>
  </author>
  <url>http://github.com/thoughtbot/paperclip/commit/c6ccb54d61f487567b73a56a4ef16fc7f3716e97</url>
  <id>c6ccb54d61f487567b73a56a4ef16fc7f3716e97</id>
  <committed-date>2008-04-18T07:22:33-07:00</committed-date>
  <authored-date>2008-04-18T07:22:33-07:00</authored-date>
  <message>Rearranged stuff and added a gem build/deploy process. Official release of 2.1.0.</message>
  <tree>6803ba8c1d25d746a3c1f9fcaccd98119b45cf02</tree>
  <committer>
    <name>Jon Yurek</name>
    <email>jyurek@thoughtbot.com</email>
  </committer>
</commit>
