<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -131,4 +131,5 @@ These people have contributed patches that have been added to the extension:
 [jm]: http://github.com/johnmuhl
 [djcp]: http://www.kookdujour.com/
 [jb]: http://github.com/jjburka
-[ihoka]: http://github.com/ihoka
\ No newline at end of file
+[ihoka]: http://github.com/ihoka
+                                   </diff>
      <filename>README.md</filename>
    </modified>
    <modified>
      <diff>@@ -22,4 +22,4 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
 end
 
 # Load any custom rakefiles for extension
-Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
\ No newline at end of file
+Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,32 @@
 class PageAttachmentsController &lt; ApplicationController
-	def move_higher
-		if request.post?
-			@attachment = PageAttachment.find(params[:id])
-			@attachment.move_higher
-			render :partial =&gt; 'admin/pages/attachment', :layout =&gt; false, :collection =&gt; @attachment.page.attachments
-		end
-	end
+  def move_higher
+    if request.post?
+      @attachment = PageAttachment.find(params[:id])
+      @attachment.move_higher
+      render :partial =&gt; 'admin/pages/attachment',
+             :layout =&gt; false,
+             :collection =&gt; @attachment.page.attachments
+    end
+  end
 
-	def move_lower
-		if request.post?
-			@attachment = PageAttachment.find(params[:id])
-			@attachment.move_lower
-			render :partial =&gt; 'admin/pages/attachment', :layout =&gt; false, :collection =&gt; @attachment.page.attachments
-		end
-	end
-	
-	def destroy
-		if request.post?
-			@attachment = PageAttachment.find(params[:id])
-			page = @attachment.page
-			@attachment.destroy
-			render :partial =&gt; 'admin/pages/attachment', :layout =&gt; false, :collection =&gt; page.attachments
-		end
-	end
+  def move_lower
+    if request.post?
+      @attachment = PageAttachment.find(params[:id])
+      @attachment.move_lower
+      render :partial =&gt; 'admin/pages/attachment',
+             :layout =&gt; false,
+             :collection =&gt; @attachment.page.attachments
+    end
+  end
+
+  def destroy
+    if request.post?
+      @attachment = PageAttachment.find(params[:id])
+      page = @attachment.page
+      @attachment.destroy
+      render :partial =&gt; 'admin/pages/attachment',
+             :layout =&gt; false,
+             :collection =&gt; page.attachments
+    end
+  end
 end</diff>
      <filename>app/controllers/page_attachments_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
-module ObservePageAttachments
-  def self.included(base)
-    base.send :observe, User, Page, Layout, Snippet, PageAttachment
-  end
-end
\ No newline at end of file
+module ObservePageAttachments
+  def self.included(base)
+    base.send :observe, User, Page, Layout, Snippet, PageAttachment
+  end
+end</diff>
      <filename>app/models/observe_page_attachments.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,28 @@
-class PageAttachment &lt; ActiveRecord::Base
-  acts_as_list :scope =&gt; :page_id
-  has_attachment :storage =&gt; :file_system, 
-                     :thumbnails =&gt; defined?(PAGE_ATTACHMENT_SIZES) &amp;&amp; PAGE_ATTACHMENT_SIZES || {:icon =&gt; '50x50&gt;'},
-                     :max_size =&gt; 10.megabytes
-  validates_as_attachment
-    
-  belongs_to :created_by, :class_name =&gt; 'User', 
-               :foreign_key =&gt; 'created_by'
-  belongs_to :updated_by, :class_name =&gt; 'User',
-               :foreign_key =&gt; 'updated_by'
-               
-  belongs_to :page
-
-  def short_filename(wanted_length = 15, suffix = ' ...')
-	  (self.filename.length &gt; wanted_length) ? (self.filename[0,(wanted_length - suffix.length)] + suffix) : self.filename
-  end
-
-  def short_title(wanted_length = 15, suffix = ' ...')
-	  (self.title.length &gt; wanted_length) ? (self.title[0,(wanted_length - suffix.length)] + suffix) : self.title
-  end
-
-  def short_description(wanted_length = 15, suffix = ' ...')
-	  (self.description.length &gt; wanted_length) ? (self.description[0,(wanted_length - suffix.length)] + suffix) : self.description
-  end
-
-end
+class PageAttachment &lt; ActiveRecord::Base
+  acts_as_list :scope =&gt; :page_id
+  has_attachment :storage =&gt; :file_system,
+                 :thumbnails =&gt; defined?(PAGE_ATTACHMENT_SIZES) &amp;&amp; PAGE_ATTACHMENT_SIZES || {:icon =&gt; '50x50&gt;'},
+                 :max_size =&gt; 10.megabytes
+  validates_as_attachment
+
+  belongs_to :created_by,
+             :class_name =&gt; 'User',
+             :foreign_key =&gt; 'created_by'
+  belongs_to :updated_by,
+             :class_name =&gt; 'User',
+             :foreign_key =&gt; 'updated_by'
+  belongs_to :page
+
+  def short_filename(wanted_length = 15, suffix = ' ...')
+          (self.filename.length &gt; wanted_length) ? (self.filename[0,(wanted_length - suffix.length)] + suffix) : self.filename
+  end
+
+  def short_title(wanted_length = 15, suffix = ' ...')
+          (self.title.length &gt; wanted_length) ? (self.title[0,(wanted_length - suffix.length)] + suffix) : self.title
+  end
+
+  def short_description(wanted_length = 15, suffix = ' ...')
+          (self.description.length &gt; wanted_length) ? (self.description[0,(wanted_length - suffix.length)] + suffix) : self.description
+  end
+
+end</diff>
      <filename>app/models/page_attachment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,17 @@
 module PageAttachmentAssociations
   def self.included(base)
     base.class_eval {
-      has_many :attachments, :class_name =&gt; &quot;PageAttachment&quot;, :dependent =&gt; :destroy, :order =&gt; 'position'
+      has_many :attachments,
+               :class_name =&gt; &quot;PageAttachment&quot;,
+               :dependent =&gt; :destroy,
+               :order =&gt; 'position'
       attr_accessor :add_attachments
       after_save :save_attachments
       include InstanceMethods
     }
   end
-  
-  module InstanceMethods     
+
+  module InstanceMethods
     # Currently recursive, but could be simplified with some SQL
     def attachment(name)
       att = attachments.find(:first, :conditions =&gt; [&quot;filename LIKE ?&quot;, name.to_s])
@@ -17,16 +20,16 @@ module PageAttachmentAssociations
 
     def save_attachments
       if @add_attachments &amp;&amp; ! @add_attachments['file'].blank?
-		    i = 0
+        i = 0
         @add_attachments['file'].each do |page_attach|
           attachments &lt;&lt; PageAttachment.new(
-			                    :uploaded_data =&gt; page_attach, 
-                  			  :title =&gt; @add_attachments['title'][i],
-                  			  :description =&gt; @add_attachments['description'][i])
-  		    i += 1
-        end  
+                                            :uploaded_data =&gt; page_attach,
+                                            :title =&gt; @add_attachments['title'][i],
+                                            :description =&gt; @add_attachments['description'][i])
+          i += 1
+        end
       end
       @add_attachments = nil
-    end  
+    end
   end
 end</diff>
      <filename>app/models/page_attachment_associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,14 +2,14 @@ module PageAttachmentTags
   include Radiant::Taggable
 
   class TagError &lt; StandardError; end
-  
+
   desc %{
     The namespace for referencing page attachments/files.  You may specify the 'name'
-    attribute (for the filename) on this tag for all contained tags to refer to that attachment.  
+    attribute (for the filename) on this tag for all contained tags to refer to that attachment.
     Attachments can be inherited from parent pages.
-    
+
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment name=&quot;file.txt&quot;&gt;...&lt;/r:attachment&gt;&lt;/code&gt;&lt;/pre&gt;
   }
   tag &quot;attachment&quot; do |tag|
@@ -17,14 +17,14 @@ module PageAttachmentTags
     tag.locals.attachment = page.attachment(tag.attr['name']) rescue nil if tag.attr['name']
     tag.expand
   end
-  
+
   desc %{
     Renders the url or public filename of the attachment for use in links, stylesheets, etc.
     The 'name' attribute is required on this tag or the parent tag.  The optional 'size' attribute
     applies only to images.
-    
+
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:url name=&quot;file.jpg&quot; [size=&quot;icon&quot;]/&gt;&lt;/code&gt;&lt;/pre&gt;
   }
   tag &quot;attachment:url&quot; do |tag|
@@ -34,24 +34,24 @@ module PageAttachmentTags
     attachment = tag.locals.attachment || page.attachment(name)
     attachment.public_filename(size)
   end
-  
+
   [:short_title,:short_description,:short_filename].each do |key|
   desc %{
   Renders the '#{key}' attribute of the attachment.
-  The 'name' attribute is required on this tag or the parent tag. 
+  The 'name' attribute is required on this tag or the parent tag.
   The optional 'length' attribute defines how many characters of the attribute to display. It defaults to 15 total characters, including the 'suffix'.
   If the attribute exceeds 'length', 'suffix' says what to tag onto the back to show truncation. It defaults to ' ...'
-    
-	*Usage*:
-    
+
+        *Usage*:
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:#{key} name=&quot;file.jpg&quot; [length=&quot;number of characters&quot;] [suffix=&quot;More . . .&quot;]/&gt;&lt;/code&gt;&lt;/pre&gt;
   }
     tag &quot;attachment:#{key}&quot; do |tag|
       raise TagError, &quot;'name' attribute required&quot; unless name = tag.attr['name'] or tag.locals.attachment
       page = tag.locals.page
       attachment = tag.locals.attachment || page.attachment(name)
-	  tlength = (tag.attr['length']) ? tag.attr['length'].to_i : 15
-	  suffix = (tag.attr['suffix']) ? tag.attr['suffix'].to_s : ' ...'
+          tlength = (tag.attr['length']) ? tag.attr['length'].to_i : 15
+          suffix = (tag.attr['suffix']) ? tag.attr['suffix'].to_s : ' ...'
       attachment.send(&quot;#{key}&quot;,tlength,suffix)
     end
   end
@@ -59,31 +59,31 @@ module PageAttachmentTags
   desc %{
   Renders the 'size' attribute of the attachment.
   The 'name' attribute is required on this tag or the parent tag. Returns bytes by default. Use the optional 'units' parameter to change the units this tag returns.
-    
-	*Usage*:
-    
+
+        *Usage*:
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:size name=&quot;file.jpg&quot; [units=&quot;bytes|kilobytes|megabytes|gigabytes&quot;] /&gt;&lt;/code&gt;&lt;/pre&gt;
  }
   tag &quot;attachment:size&quot; do |tag|
       raise TagError, &quot;'name' attribute required&quot; unless name = tag.attr['name'] or tag.locals.attachment
       page = tag.locals.page
       attachment = tag.locals.attachment || page.attachment(name)
-	  units = tag.attr['units'] || 'bytes'
-	  valid_units = ['bytes','byte','kilobytes','kilobyte','megabytes','megabyte','gigabytes','gigabyte']
-	  units = (valid_units.include?(units)) ? units : 'bytes'
-	  return attachment.size if units == 'bytes'
+          units = tag.attr['units'] || 'bytes'
+          valid_units = ['bytes','byte','kilobytes','kilobyte','megabytes','megabyte','gigabytes','gigabyte']
+          units = (valid_units.include?(units)) ? units : 'bytes'
+          return attachment.size if units == 'bytes'
       sprintf('%.2f',(attachment.size.to_f / 1.send(units)))
   end
 
-  
+
   [:content_type, :width, :height, :title, :description, :position, :filename].each do |key|
     desc %{
-      Renders the '#{key}' attribute of the attachment.     
+      Renders the '#{key}' attribute of the attachment.
       The 'name' attribute is required on this tag or the parent tag.  The optional 'size'
       attributes applies only to images.
-      
+
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:#{key} name=&quot;file.jpg&quot; [size=&quot;icon&quot;]/&gt;&lt;/code&gt;&lt;/pre&gt;
     }
     tag &quot;attachment:#{key}&quot; do |tag|
@@ -93,7 +93,7 @@ module PageAttachmentTags
       attachment.attributes[&quot;#{key}&quot;]
     end
   end
-  
+
   desc %{
     Renders the date the attachment was uploaded using the specified 'format' (Ruby's strftime syntax).
     The 'name' attribute is required on this tag or the parent tag.
@@ -102,10 +102,10 @@ module PageAttachmentTags
     raise TagError, &quot;'name' attribute required&quot; unless name = tag.attr['name'] or tag.locals.attachment
     page = tag.locals.page
     attachment = tag.locals.attachment || page.attachment(name)
-    format = tag.attr['format'] || &quot;%F&quot;  
+    format = tag.attr['format'] || &quot;%F&quot;
     attachment.created_at.strftime(format)
   end
-  
+
   desc %{
     Renders an image tag for the attachment (assuming it's an image).
     The 'name' attribute is required on this tag or the parent tag.
@@ -113,7 +113,7 @@ module PageAttachmentTags
     The optional 'size' attribute allows you to show the icon size of the image.
 
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:image name=&quot;file.jpg&quot; [size=&quot;icon&quot;]/&gt;&lt;/code&gt;&lt;/pre&gt;
 
     }
@@ -127,15 +127,15 @@ module PageAttachmentTags
     attributes = tag.attr.inject([]){ |a,(k,v)| a &lt;&lt; %{#{k}=&quot;#{v}&quot;} }.join(&quot; &quot;).strip
     %{&lt;img src=&quot;#{filename}&quot; #{attributes + &quot; &quot; unless attributes.empty?}/&gt;}
   end
-  
+
   desc %{
     Renders a hyperlink to the attachment. The 'name' attribute is required on this tag or the parent tag.
-    You can use the 'label' attribute to specify the textual contents of the tag.  Any other attributes 
+    You can use the 'label' attribute to specify the textual contents of the tag.  Any other attributes
     will be added as HTML attributes to the rendered tag.  This tag works as both a singleton and a container.
     Any contained content will be rendered inside the resulting link.  The optional 'size' attribute applies only to images.
 
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:link name=&quot;file.jpg&quot; [size=&quot;thumbnail&quot;]/&gt;&lt;/code&gt;&lt;/pre&gt;
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:link name=&quot;file.jpg&quot; [size=&quot;thumbnail&quot;]&gt; Some text in the link &lt;/r:attachment:link&gt;&lt;/code&gt;&lt;/pre&gt;
   }
@@ -151,36 +151,36 @@ module PageAttachmentTags
     output &lt;&lt; (tag.double? ? tag.expand : label)
     output &lt;&lt; &quot;&lt;/a&gt;&quot;
   end
-  
+
   desc %{
     Renders the name of who uploaded the attachment. The 'name' attribute is required on this tag or the parent tag.
-    
+
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:author name=&quot;file.jpg&quot; /&gt;&lt;/code&gt;&lt;/pre&gt;
   }
   tag &quot;attachment:author&quot; do |tag|
     raise TagError, &quot;'name' attribute required&quot; unless name = tag.attr.delete('name') or tag.locals.attachment
     page = tag.locals.page
-    attachment = tag.locals.attachment || page.attachment(name) 
+    attachment = tag.locals.attachment || page.attachment(name)
     if attachment and author = attachment.created_by
       author.name
     end
   end
-  
+
   desc %{
     Iterates through all the attachments in the current page.  The 'name' attribute is not required
     on any nested attachment tags.
-    
+
     *Usage*:
-    
+
     &lt;pre&gt;&lt;code&gt;&lt;r:attachment:each [order=&quot;asc|desc&quot;] [by=&quot;filename|size|created_at|...&quot;] [limit=0] [offset=0] [extensions=&quot;png|pdf|doc&quot;]&gt;
         &lt;r:link /&gt; - &lt;r:date&gt;
     &lt;/r:attachment:each&gt;&lt;/code&gt;&lt;/pre&gt;
   }
   tag &quot;attachment:each&quot; do |tag|
     page = tag.locals.page
-    
+
     returning String.new do |output|
       page.attachments.find(:all, attachments_find_options(tag)).each do |att|
         tag.locals.attachment = att
@@ -188,12 +188,12 @@ module PageAttachmentTags
       end
     end
   end
-  
+
   desc %{
     Renders the contained elements only if the current contextual page has one or
     more attachments. The @min_count@ attribute specifies the minimum number of required
     attachments. You can also filter by extensions with the @extensions@ attribute.
-    
+
     *Usage:*
     &lt;pre&gt;&lt;code&gt;&lt;r:if_attachments [min_count=&quot;n&quot;] [extensions=&quot;doc|pdf&quot;]&gt;...&lt;/r:if_attachments&gt;&lt;/code&gt;&lt;/pre&gt;
   }
@@ -202,12 +202,12 @@ module PageAttachmentTags
     attachments = tag.locals.page.attachments.count(:conditions =&gt; attachments_find_options(tag)[:conditions])
     tag.expand if attachments &gt;= count
   end
-  
+
   desc %{
     Renders the 'extension' virtual attribute of the attachment, extracted from filename.
-    
+
   *Usage*:
-  
+
 &lt;pre&gt;&lt;code&gt;
 &lt;ul&gt;
   &lt;r:attachment:each extensions=&quot;doc|pdf&quot;&gt;
@@ -223,22 +223,22 @@ module PageAttachmentTags
     attachment = tag.locals.attachment
     attachment.filename[/\.(\w+)$/, 1]
   end
-  
+
   private
     def attachments_find_options(tag)
       attr = tag.attr.symbolize_keys
-      
+
       extensions = attr[:extensions] &amp;&amp; attr[:extensions].split('|') || []
       conditions = unless extensions.blank?
-        [ extensions.map { |ext| &quot;page_attachments.filename LIKE ?&quot;}.join(' OR '), 
+        [ extensions.map { |ext| &quot;page_attachments.filename LIKE ?&quot;}.join(' OR '),
           *extensions.map { |ext| &quot;%.#{ext}&quot; } ]
       else
         nil
       end
-      
+
       by = attr[:by] || &quot;position&quot;
       order = attr[:order] || &quot;asc&quot;
-      
+
       options = {
         :order =&gt; &quot;#{by} #{order}&quot;,
         :limit =&gt; attr[:limit] || nil,</diff>
      <filename>app/models/page_attachment_tags.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,18 @@
-module PageAttachmentsInterface
-  def self.included(base)
-    base.class_eval {
-      before_filter :add_page_attachment_partials, :only =&gt; [:edit, :new]
-      include InstanceMethods
-    }
-  end
-  
-  module InstanceMethods
-    def add_page_attachment_partials
-      @buttons_partials ||= []
-      @buttons_partials &lt;&lt; &quot;attachments_box&quot;
-      include_javascript 'page_attachments'
-      include_stylesheet 'admin/page_attachments'
-    end
-  end
-end
\ No newline at end of file
+module PageAttachmentsInterface
+  def self.included(base)
+    base.class_eval {
+      before_filter :add_page_attachment_partials,
+                    :only =&gt; [:edit, :new]
+      include InstanceMethods
+    }
+  end
+
+  module InstanceMethods
+    def add_page_attachment_partials
+      @buttons_partials ||= []
+      @buttons_partials &lt;&lt; &quot;attachments_box&quot;
+      include_javascript 'page_attachments'
+      include_stylesheet 'admin/page_attachments'
+    end
+  end
+end</diff>
      <filename>app/models/page_attachments_interface.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,19 @@
 &lt;li id=&quot;attachment_&lt;%= attachment.id %&gt;&quot; class=&quot;attachment clearfix&quot;&gt;
 &lt;div&gt;
-	&lt;%= image_tag &quot;admin/minus.png&quot;, :alt =&gt; &quot;Delete&quot;, :class =&gt; 'delete' %&gt;
-	&lt;% unless attachment.first? %&gt;
-		&lt;%= image_tag &quot;admin/move_higher.png&quot;, :alt =&gt; &quot;Move Higher&quot;, :class =&gt; 'higher' %&gt;
-	&lt;% end %&gt;
-	&lt;% unless attachment.last? %&gt;
-		&lt;%= image_tag &quot;admin/move_lower.png&quot;, :alt =&gt; &quot;Move Lower&quot;, :class =&gt; 'lower' %&gt;
-	&lt;% end %&gt;
+  &lt;%= image_tag &quot;admin/minus.png&quot;, :alt =&gt; &quot;Delete&quot;, :class =&gt; 'delete' %&gt;
+  &lt;% unless attachment.first? %&gt;
+  &lt;%= image_tag &quot;admin/move_higher.png&quot;, :alt =&gt; &quot;Move Higher&quot;, :class =&gt; 'higher' %&gt;
+  &lt;% end %&gt;
+  &lt;% unless attachment.last? %&gt;
+  &lt;%= image_tag &quot;admin/move_lower.png&quot;, :alt =&gt; &quot;Move Lower&quot;, :class =&gt; 'lower' %&gt;
+  &lt;% end %&gt;
 &lt;/div&gt;
-  &lt;% unless attachment.thumbnails.empty? %&gt;
-    &lt;%= link_to image_tag(attachment.public_filename(&quot;icon&quot;)),
-      attachment.public_filename, :class =&gt; 'thumbnail' %&gt;
-    &lt;% end %&gt;
-    &lt;% unless attachment.title.blank? %&gt;
-		&lt;p&gt;&lt;%= h attachment.short_title %&gt;&lt;/p&gt;
-	&lt;% end %&gt;
-	&lt;%= link_to attachment.short_filename, attachment.public_filename %&gt;
+&lt;% unless attachment.thumbnails.empty? %&gt;
+&lt;%= link_to image_tag(attachment.public_filename(&quot;icon&quot;)),
+attachment.public_filename, :class =&gt; 'thumbnail' %&gt;
+&lt;% end %&gt;
+&lt;% unless attachment.title.blank? %&gt;
+&lt;p&gt;&lt;%= h attachment.short_title %&gt;&lt;/p&gt;
+&lt;% end %&gt;
+&lt;%= link_to attachment.short_filename, attachment.public_filename %&gt;
 &lt;/li&gt;</diff>
      <filename>app/views/admin/pages/_attachment.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -6,10 +6,10 @@
 
   &lt;%= javascript_tag &quot;var auth_token = '#{form_authenticity_token}';&quot; %&gt;
   &lt;% unless @page.attachments.count.zero? %&gt;
-    &lt;ol id=&quot;attachment_list&quot;&gt;
-      &lt;%= render :partial =&gt; 'attachment', :collection =&gt; @page.attachments %&gt;
-    &lt;/ol&gt;
-    &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
+  &lt;ol id=&quot;attachment_list&quot;&gt;
+    &lt;%= render :partial =&gt; 'attachment', :collection =&gt; @page.attachments %&gt;
+  &lt;/ol&gt;
+  &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
   &lt;% end %&gt;
   &lt;p id=&quot;reorder_notice&quot; style=&quot;display:none;&quot;&gt;Page attachments order will appear on site only when cache is cleared (on save or after 5min).&lt;/p&gt;
 &lt;/div&gt;</diff>
      <filename>app/views/admin/pages/_attachments_box.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -15,8 +15,8 @@ class CreatePageAttachmentsExtensionSchema &lt; ActiveRecord::Migration
       t.column &quot;page_id&quot;,      :integer
     end
   end
-  
+
   def self.down
     drop_table &quot;page_attachments&quot;
   end
-end
\ No newline at end of file
+end</diff>
      <filename>db/migrate/001_create_page_attachments_extension_schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,20 @@
-module DifferenceTestHelper
-  # http://project.ioni.st/post/217#post-217
-  #
-  #  def test_new_publication
-  #    assert_difference(Publication, :count) do
-  #      post :create, :publication =&gt; {...}
-  #      # ...
-  #    end
-  #  end
-  # 
-  def assert_difference(object, method = nil, difference = 1)
-    initial_value = object.send(method)
-    yield
-    assert_equal initial_value + difference, object.send(method), &quot;#{object}##{method}&quot;
-  end
-
-  def assert_no_difference(object, method, &amp;block)
-    assert_difference object, method, 0, &amp;block
-  end
-end
\ No newline at end of file
+module DifferenceTestHelper
+  # http://project.ioni.st/post/217#post-217
+  #
+  #  def test_new_publication
+  #    assert_difference(Publication, :count) do
+  #      post :create, :publication =&gt; {...}
+  #      # ...
+  #    end
+  #  end
+  #
+  def assert_difference(object, method = nil, difference = 1)
+    initial_value = object.send(method)
+    yield
+    assert_equal initial_value + difference, object.send(method), &quot;#{object}##{method}&quot;
+  end
+
+  def assert_no_difference(object, method, &amp;block)
+    assert_difference object, method, 0, &amp;block
+  end
+end</diff>
      <filename>lib/difference_test_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 namespace :radiant do
   namespace :extensions do
     namespace :page_attachments do
-      
+
       desc &quot;Runs the migration of the Page Attachments extension&quot;
       task :migrate =&gt; :environment do
         require 'radiant/extension_migrator'
@@ -12,7 +12,7 @@ namespace :radiant do
         end
       end
 
-      desc &quot;Installs files relevant to Page Attachments into public/&quot;    
+      desc &quot;Installs files relevant to Page Attachments into public/&quot;
       task :update =&gt; :environment do
         FileUtils.cp PageAttachmentsExtension.root + &quot;/public/stylesheets/page_attachments.css&quot;, RAILS_ROOT + &quot;/public/stylesheets/admin&quot;
         FileUtils.cp PageAttachmentsExtension.root + &quot;/public/javascripts/page_attachments.js&quot;, RAILS_ROOT + &quot;/public/javascripts&quot;</diff>
      <filename>lib/tasks/page_attachments_extension_tasks.rake</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ class PageAttachmentsExtension &lt; Radiant::Extension
    define_routes do |map|
      map.connect 'page_attachments/:action/:id', :controller =&gt; 'page_attachments'
    end
-  
+
   def activate
     # Regular page attachments stuff
     Page.class_eval {</diff>
      <filename>page_attachments_extension.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
-document.observe(&quot;dom:loaded&quot;, function() {
+Document.observe(&quot;dom:loaded&quot;, function() {
   when('attachments', function(container) {
     var upload = '&lt;div class=&quot;attachment-upload&quot;&gt;&lt;p class=&quot;title&quot;&gt;Upload file&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;&lt;label for=&quot;title_input&quot;&gt;Title:&lt;/label&gt;&lt;/th&gt;&lt;td&gt;&lt;input id=&quot;title_input&quot; size=&quot;60&quot; name=&quot;page[add_attachments][title][]&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;&lt;label for=&quot;description_input&quot;&gt;Description:&lt;/label&gt;&lt;/th&gt;&lt;td&gt;&lt;input id=&quot;description_input&quot; type=&quot;text&quot; size=&quot;60&quot;  name=&quot;page[add_attachments][description][]&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;&lt;label for=&quot;file_input&quot;&gt;File:&lt;/label&gt;&lt;/th&gt;&lt;td&gt;&lt;input id=&quot;file_input&quot; type=&quot;file&quot; size=&quot;60&quot; name=&quot;page[add_attachments][file][]&quot; /&gt;&lt;img src=&quot;/images/admin/minus.png&quot; alt=&quot;cancel&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'
     container.observe('click', function(e) {
       var target = $(e.target)
-      
+
       if (target.match('img[alt=Add]')) {
         container.insert(upload)
       }
@@ -16,18 +16,18 @@ document.observe(&quot;dom:loaded&quot;, function() {
           var attachment = e.findElement('.attachment')
           var id = attachment.id.split('_').last()
           new Ajax.Updater('attachment_list','/page_attachments/destroy/', {method:'post', parameters:{id: id, authenticity_token: auth_token}})
-		  var attach_count = $('attachment_count')
-		  attach_count.update(parseInt(attach_count.innerHTML) - 1) 
+                  var attach_count = $('attachment_count')
+                  attach_count.update(parseInt(attach_count.innerHTML) - 1)
         }
       } else if(target.match('img.higher')) {
         var attachment = e.findElement('.attachment')
         var id = attachment.id.split('_').last()
         new Ajax.Updater('attachment_list','/page_attachments/move_higher/', {method:'post', parameters:{id: id, authenticity_token: auth_token}})
-	  } else if(target.match('img.lower')) {
+          } else if(target.match('img.lower')) {
         var attachment = e.findElement('.attachment')
         var id = attachment.id.split('_').last()
         new Ajax.Updater('attachment_list','/page_attachments/move_lower/', {method:'post', parameters:{id: id, authenticity_token: auth_token}})
-	  }
+          }
     })
   })
 })</diff>
      <filename>public/javascripts/page_attachments.js</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
   background: white;
   margin: 10px 0;
 }
-#attachments .toolbar { 
+#attachments .toolbar {
   float: right;
   padding: 10px;
   width: 50px;
@@ -49,7 +49,7 @@
 {
   margin-left:20px;
 }
-#attachments ol li div 
+#attachments ol li div
 {
   float:left;width:25px;
 }
@@ -57,11 +57,11 @@
 {
   float:left;margin:0 10px 0 10px;
 }
-#attachments ol li p  
+#attachments ol li p
 {
   margin:0 0 5px 0;
 }
-#attachments ol li  
+#attachments ol li
 {
   margin-bottom:10px;border-bottom:1px dashed #cccccc;width:66%;padding-bottom:3px;
 }
@@ -72,7 +72,7 @@
 
 #attachments p.title
 {
-	border-bottom:1px #EAE3C5 solid;width:66%;font-size:17px;font-weight:bold;
+        border-bottom:1px #EAE3C5 solid;width:66%;font-size:17px;font-weight:bold;
 }
 #attachments table th
 {
@@ -80,7 +80,7 @@
 }
 #attachments table td
 {
- padding-bottom:5px; 
+ padding-bottom:5px;
 }
 #attachments p#reorder_notice
 {</diff>
      <filename>public/stylesheets/page_attachments.css</filename>
    </modified>
    <modified>
      <diff>@@ -4,23 +4,23 @@ class PageAttachmentsExtensionTest &lt; Test::Unit::TestCase
 
   fixtures :page_attachments, :pages, :users
   test_helper :pages, :render
-  
+
   # Replace this with your real tests.
   def setup
     @page = pages(:homepage)
   end
-  
+
   def test_initialization
     assert_equal RAILS_ROOT + '/vendor/extensions/page_attachments', PageAttachmentsExtension.root
     assert_equal 'Page Attachments', PageAttachmentsExtension.extension_name
   end
-  
+
   def test_module_inclusion
     assert Page.included_modules.include?(PageAttachmentTags)
     assert Page.included_modules.include?(PageAttachmentAssociations)
     assert UserActionObserver.included_modules.include?(ObservePageAttachments)
-	assert ActiveRecord::Base.included_modules.include?(ActiveRecord::Acts::List)
-	assert Technoweenie::AttachmentFu
+        assert ActiveRecord::Base.included_modules.include?(ActiveRecord::Acts::List)
+        assert Technoweenie::AttachmentFu
 
     assert UserActionObserver.methods.include?('observed_class')
     #assert_equal UserActionObserver.instance.observed_class, [User, Page, Layout, Snippet, Asset]
@@ -28,18 +28,18 @@ class PageAttachmentsExtensionTest &lt; Test::Unit::TestCase
 
   def test_page_instance_methods
     assert Page.instance_methods.include?(&quot;attachments&quot;)
-    assert Page.instance_methods.include?(&quot;attachments=&quot;)    
-    assert Page.instance_methods.include?(&quot;attachment&quot;)    
-    assert Page.instance_methods.include?(&quot;add_attachments&quot;)    
+    assert Page.instance_methods.include?(&quot;attachments=&quot;)
+    assert Page.instance_methods.include?(&quot;attachment&quot;)
+    assert Page.instance_methods.include?(&quot;add_attachments&quot;)
     assert Page.instance_methods.include?(&quot;add_attachments=&quot;)
     assert Page.instance_methods.include?(&quot;save_attachments&quot;)
-    
+
     assert Page.instance_methods.include?(&quot;tag:attachment&quot;)
     [:content_type, :size, :width, :height, :date, :image, :link, :author, :title, :short_title, :short_description, :short_filename, :description, :position].each do |key|
       assert Page.instance_methods.include?(&quot;tag:attachment:#{key}&quot;)
     end
   end
-  
+
   def test_global_tags
     img = page_attachments(:rails_png)
     txt = page_attachments(:foo_txt)
@@ -47,7 +47,7 @@ class PageAttachmentsExtensionTest &lt; Test::Unit::TestCase
     [:url, :content_type, :size, :width, :height, :date, :image, :link, :author, :title].each do |key|
       assert_render_error &quot;'name' attribute required&quot;, &quot;&lt;r:attachment:#{key} /&gt;&quot;, '/'
     end
-    
+
     assert_renders &quot;&quot;, &quot;&lt;r:attachment&gt;&lt;/r:attachment&gt;&quot;, &quot;/&quot;
     assert_renders img.public_filename, '&lt;r:attachment:url name=&quot;rails.png&quot; /&gt;', '/'
     assert_renders img.title, '&lt;r:attachment:title name=&quot;rails.png&quot; /&gt;', '/'
@@ -57,48 +57,48 @@ class PageAttachmentsExtensionTest &lt; Test::Unit::TestCase
     assert_renders img.size.to_s, '&lt;r:attachment:size name=&quot;rails.png&quot; units=&quot;blargobytes&quot; /&gt;', '/'
     assert_renders &quot;1.75&quot;, '&lt;r:attachment:size name=&quot;rails.png&quot; units=&quot;kilobytes&quot; /&gt;', '/'
 
-    assert_renders img.width.to_s, '&lt;r:attachment:width name=&quot;rails.png&quot; /&gt;', '/'    
+    assert_renders img.width.to_s, '&lt;r:attachment:width name=&quot;rails.png&quot; /&gt;', '/'
     assert_renders img.height.to_s, '&lt;r:attachment:height name=&quot;rails.png&quot; /&gt;', '/'
     assert_renders img.content_type, '&lt;r:attachment:content_type name=&quot;rails.png&quot; /&gt;', '/'
     assert_renders img.created_at.strftime(&quot;%Y-%m-%d&quot;), '&lt;r:attachment:date name=&quot;rails.png&quot; format=&quot;%Y-%m-%d&quot; /&gt;', '/'
     assert_renders img.created_by.name, '&lt;r:attachment:author name=&quot;rails.png&quot; /&gt;', '/'
-	assert_renders &quot;&quot;, '&lt;r:attachment:height name=&quot;foo.txt&quot;/&gt;','/'
-	assert_renders &quot;&quot;, '&lt;r:attachment:width name=&quot;foo.txt&quot;/&gt;','/'
+        assert_renders &quot;&quot;, '&lt;r:attachment:height name=&quot;foo.txt&quot;/&gt;','/'
+        assert_renders &quot;&quot;, '&lt;r:attachment:width name=&quot;foo.txt&quot;/&gt;','/'
 
     assert_renders %{&lt;img src=&quot;#{img.public_filename}&quot; /&gt;}, '&lt;r:attachment:image name=&quot;rails.png&quot; /&gt;', '/'
     assert_renders %{&lt;img src=&quot;#{img.public_filename}&quot; style=&quot;float: right;&quot; /&gt;}, '&lt;r:attachment:image name=&quot;rails.png&quot; style=&quot;float: right;&quot;/&gt;', '/'
-    
+
     assert_renders %{&lt;a href=&quot;#{img.public_filename}&quot;&gt;rails.png&lt;/a&gt;}, '&lt;r:attachment:link name=&quot;rails.png&quot; /&gt;', '/'
     assert_renders %{&lt;a href=&quot;#{img.public_filename}&quot; id=&quot;mylink&quot;&gt;rails.png&lt;/a&gt;}, '&lt;r:attachment:link name=&quot;rails.png&quot; id=&quot;mylink&quot; /&gt;', '/'
     assert_renders %{&lt;a href=&quot;#{img.public_filename}&quot;&gt;Rails&lt;/a&gt;}, '&lt;r:attachment:link name=&quot;rails.png&quot;&gt;Rails&lt;/r:attachment:link&gt;', '/'
     assert_renders %{&lt;a href=&quot;#{img.public_filename}&quot;&gt;Rails&lt;/a&gt;}, '&lt;r:attachment:link name=&quot;rails.png&quot; label=&quot;Rails&quot;/&gt;', '/'
-    
-	assert_renders %{Rails logo},'&lt;r:attachment:title name=&quot;rails.png&quot;/&gt;','/'
-	assert_renders %{Rails logo},'&lt;r:attachment:short_title name=&quot;rails.png&quot;/&gt;','/'
-	assert_renders %{The awesome Rails logo.},'&lt;r:attachment:description name=&quot;rails.png&quot;/&gt;','/'
 
-	assert_renders %{The awesome ...},'&lt;r:attachment:short_description name=&quot;rails.png&quot;/&gt;','/'
-	assert_renders %{The aweso ...},'&lt;r:attachment:short_description name=&quot;rails.png&quot; length=&quot;13&quot; /&gt;','/'
-	assert_renders %{The awesome Rails logo.}, '&lt;r:attachment:short_description name=&quot;rails.png&quot; length=&quot;35&quot; /&gt;','/'
+        assert_renders %{Rails logo},'&lt;r:attachment:title name=&quot;rails.png&quot;/&gt;','/'
+        assert_renders %{Rails logo},'&lt;r:attachment:short_title name=&quot;rails.png&quot;/&gt;','/'
+        assert_renders %{The awesome Rails logo.},'&lt;r:attachment:description name=&quot;rails.png&quot;/&gt;','/'
 
-	assert_renders %{The awesome....}, '&lt;r:attachment:short_description name=&quot;rails.png&quot; length=&quot;15&quot; suffix=&quot;....&quot; /&gt;','/'
+        assert_renders %{The awesome ...},'&lt;r:attachment:short_description name=&quot;rails.png&quot;/&gt;','/'
+        assert_renders %{The aweso ...},'&lt;r:attachment:short_description name=&quot;rails.png&quot; length=&quot;13&quot; /&gt;','/'
+        assert_renders %{The awesome Rails logo.}, '&lt;r:attachment:short_description name=&quot;rails.png&quot; length=&quot;35&quot; /&gt;','/'
 
-	assert_renders %{rails.png},'&lt;r:attachment:filename name=&quot;rails.png&quot;/&gt;','/'
-	assert_renders %{rails.png},'&lt;r:attachment:short_filename name=&quot;rails.png&quot;/&gt;','/'
-	assert_renders %{rails...},'&lt;r:attachment:short_filename name=&quot;rails.png&quot; suffix=&quot;...&quot; length=&quot;8&quot; /&gt;','/'
+        assert_renders %{The awesome....}, '&lt;r:attachment:short_description name=&quot;rails.png&quot; length=&quot;15&quot; suffix=&quot;....&quot; /&gt;','/'
+
+        assert_renders %{rails.png},'&lt;r:attachment:filename name=&quot;rails.png&quot;/&gt;','/'
+        assert_renders %{rails.png},'&lt;r:attachment:short_filename name=&quot;rails.png&quot;/&gt;','/'
+        assert_renders %{rails...},'&lt;r:attachment:short_filename name=&quot;rails.png&quot; suffix=&quot;...&quot; length=&quot;8&quot; /&gt;','/'
 
     assert_render_error &quot;attachment is not an image.&quot;, '&lt;r:attachment:image name=&quot;foo.txt&quot; /&gt;', '/'
   end
- 
+
   def test_positions
-	  img = page_attachments(:rails_png)
-	  txt = page_attachments(:foo_txt)
-	  assert_equal 1, img.position
-	  assert_equal 2, txt.position
-	  img.move_lower
-	  txt.reload
-	  assert_equal 2, img.position
-	  assert_equal 1, txt.position
+          img = page_attachments(:rails_png)
+          txt = page_attachments(:foo_txt)
+          assert_equal 1, img.position
+          assert_equal 2, txt.position
+          img.move_lower
+          txt.reload
+          assert_equal 2, img.position
+          assert_equal 1, txt.position
   end
 
   def test_iteration
@@ -109,17 +109,17 @@ class PageAttachmentsExtensionTest &lt; Test::Unit::TestCase
     assert_renders %{&lt;a href=&quot;#{txt.public_filename}&quot;&gt;foo.txt&lt;/a&gt;&lt;a href=&quot;#{img.public_filename}&quot;&gt;rails.png&lt;/a&gt;},
                   %{&lt;r:attachment:each by=&quot;filename&quot;&gt;&lt;r:link/&gt;&lt;/r:attachment:each&gt;}, '/'
   end
-  
+
   def test_limit_offset
     img = page_attachments(:rails_png)
     txt = page_attachments(:foo_txt)
-    
+
     assert_renders %{&lt;a href=&quot;#{img.public_filename}&quot;&gt;rails.png&lt;/a&gt;},
                   %{&lt;r:attachment:each limit=&quot;1&quot; offset=&quot;1&quot; by=&quot;filename&quot;&gt;&lt;r:link/&gt;&lt;/r:attachment:each&gt;}, '/'
     assert_renders %{&lt;a href=&quot;#{txt.public_filename}&quot;&gt;foo.txt&lt;/a&gt;},
                   %{&lt;r:attachment:each limit=&quot;1&quot; offset=&quot;0&quot; by=&quot;filename&quot;&gt;&lt;r:link/&gt;&lt;/r:attachment:each&gt;}, '/'
   end
-  
+
   def test_attachment_inheritance
     @page = pages(:documentation)
     img = page_attachments(:rails_png)
@@ -127,12 +127,12 @@ class PageAttachmentsExtensionTest &lt; Test::Unit::TestCase
     assert_renders img.public_filename, '&lt;r:attachment:url name=&quot;rails.png&quot; /&gt;', '/documentation'
     assert_renders txt.public_filename, '&lt;r:attachment:url name=&quot;foo.txt&quot; /&gt;', '/documentation'
   end
-  
+
   def test_filter_by_extension
     assert_renders &quot;rails.png&quot;, %{&lt;r:attachment:each extensions=&quot;png&quot;&gt;&lt;r:filename/&gt;&lt;/r:attachment:each&gt;}
     assert_renders &quot;rails.pngfoo.txt&quot;, %{&lt;r:attachment:each extensions=&quot;png|txt&quot;&gt;&lt;r:filename/&gt;&lt;/r:attachment:each&gt;}
   end
-  
+
   def test_if_attachment_tag
     assert_renders &quot;content&quot;, %{&lt;r:if_attachments&gt;content&lt;/r:if_attachments&gt;}
     assert_renders &quot;&quot;, %{&lt;r:if_attachments min_count=&quot;3&quot;&gt;content&lt;/r:if_attachments&gt;}</diff>
      <filename>test/functional/page_attachments_extension_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,13 +14,13 @@ end
 require &quot;#{RADIANT_ROOT}/test/test_helper&quot;
 
 class Test::Unit::TestCase
-  
+
   # Include a helper to make testing Radius tags easier
   test_helper :extension_tags
-  
+
   # Add the fixture directory to the fixture path
   self.fixture_path &lt;&lt; File.dirname(__FILE__) + &quot;/fixtures&quot;
-  
+
   # Add more helper methods to be used by all extension tests here...
-  
+
 end</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b7e64f11037ccd0a0d07eb1a70fc90240ab6ec6e</id>
    </parent>
  </parents>
  <author>
    <name>john</name>
    <email>git@johnmuhl.com</email>
  </author>
  <url>http://github.com/radiant/radiant-page-attachments-extension/commit/c512e290c84c158c832e900bccd11e023d3de098</url>
  <id>c512e290c84c158c832e900bccd11e023d3de098</id>
  <committed-date>2009-04-26T11:11:54-07:00</committed-date>
  <authored-date>2009-04-26T11:11:54-07:00</authored-date>
  <message>cleanup messy whitespace and change DOS to Unix LF</message>
  <tree>85359389e8525ee76a9c49442593d833d6cf8c50</tree>
  <committer>
    <name>john</name>
    <email>git@johnmuhl.com</email>
  </committer>
</commit>
