<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,36 +5,26 @@ module ScribdFu
     end
 
     module InstanceMethods
-      
+
       def self.included(base)
         base.extend ClassMethods
       end
 
       # Returns a URL for a thumbnail for this model's attachment.
-      #
-      # If Scribd does not provide a thumbnail URL, then Attachment_fu's
-      # thumbnail is fallen back on by returning the value of
-      # &lt;tt&gt;public_filename(:thumb)&lt;/tt&gt;.
-      #
-      # Sample use in a view:
-      #  &lt;%= image_tag(@attachment.thumbnail_url, :alt =&gt; @attachment.name) %&gt;
       def thumbnail_url
         (ipaper_document &amp;&amp; ipaper_document.thumbnail_url) || public_filename(:thumb)
       end
 
+      # Returns the content type for this model's attachment.
       def get_content_type
         self.content_type
       end
 
       # Yields the correct path to the file, either the local filename or the S3 URL.
       def file_path
-        if public_filename =~ /^https{0,1}:\/\/s3.amazonaws.com/
-          public_filename
-        else
-          &quot;#{RAILS_ROOT}/public#{public_filename}&quot;
-        end
+        public_filename =~ ScribdFu::S3 ? public_filename : &quot;#{RAILS_ROOT}/public#{public_filename}&quot;
       end
     end
-  
+
   end
 end</diff>
      <filename>lib/scribd_fu/attachment_fu.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ module ScribdFu
     end
 
     module InstanceMethods
-      
+
       def self.included(base)
         base.extend ClassMethods
       end
@@ -15,14 +15,7 @@ module ScribdFu
         self.send(&quot;#{prefix}_content_type&quot;)
       end
 
-      # Returns a URL for a thumbnail for the specified +attribute+ attachment.
-      #
-      # If Scribd does not provide a thumbnail URL, then Paperclip's thumbnail
-      # is fallen back on by returning the value of
-      # &lt;tt&gt;attribute.url(:thumb)&lt;/tt&gt;.
-      #
-      # Sample use in a view:
-      #  &lt;%= image_tag(@attachment.thumbnail_url, :alt =&gt; @attachment.name) %&gt;
+      # Returns a URL for a thumbnail for the attached file object.
       def thumbnail_url
         begin
           (ipaper_document &amp;&amp; ipaper_document.thumbnail_url) || attached_file.url(:thumb)
@@ -35,11 +28,7 @@ module ScribdFu
       # stored on S3, this is a full S3 URI, while it is a full path to the
       # local file if the file is stored locally.
       def file_path
-        if attached_file.url =~ /^https{0,1}:\/\/s3.amazonaws.com/
-          attached_file.url
-        else
-          attached_file.path
-        end
+        attached_file.url =~ ScribdFu::S3 ? attached_file.url : attached_file.path
       end
 
 </diff>
      <filename>lib/scribd_fu/paperclip.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f0fbb3559cb33351c2713c57a05edf831ffb5164</id>
    </parent>
  </parents>
  <author>
    <name>Matt Darby</name>
    <email>matt@matt-darby.com</email>
  </author>
  <url>http://github.com/mdarby/scribd_fu/commit/7f1593af1aeb1119db0eca0e974bca2e61931118</url>
  <id>7f1593af1aeb1119db0eca0e974bca2e61931118</id>
  <committed-date>2009-04-06T19:20:35-07:00</committed-date>
  <authored-date>2009-04-06T19:20:35-07:00</authored-date>
  <message>Tightened up #filepath, formatting</message>
  <tree>597df805ff760eb76b50b54151fd8062674bbac0</tree>
  <committer>
    <name>Matt Darby</name>
    <email>matt@matt-darby.com</email>
  </committer>
</commit>
