<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,31 +1,18 @@
 h2. Description
 
-*URLTempfile* is a descendent of Tempfile that creates a temp file from the 
-data/response body of an HTTP GET request to the specified URL.  This code was
-designed to be used with the 
-&quot;Paperclip&quot;:http://github.com/thoughtbot/paperclip/tree/master Rails plugin.
+*URLTempfile* is a descendent of Tempfile that creates a temp file from the data/response body of an HTTP GET request to the specified URL.  This code was designed to be used with the &quot;Paperclip&quot;:http://github.com/thoughtbot/paperclip/tree/master Rails plugin.
   
-Note, I consider this somewhat of a hack right now.  It's being used in a
-production application, but you should review the code prior to your own
-use.  I heartily welcome enhancements, please do send pull requests.
+Note, I consider this somewhat of a hack right now.  It's being used in a production application, but you should review the code prior to your own use.  I heartily welcome enhancements, please do send pull requests.
 
 h2. Usage
 
-First, place the URLTempfile.rb file into your Rails application's @lib@
-directory.
+First, place the URLTempfile.rb file into your Rails application's @lib@ directory.
 
-To use this in your Rails app, you will need to modify your HTML form to
-have a field where the user enters a URL, and then some mechanism to determine
-that they have specified a URL (my app currently uses a pulldown menu to pick
-between File or URL to upload, and then swaps out different fields depending
-on that choice, but you could also just detect if there is text in a text field
-and so on).  Then, in your controller code, you'd just set the &quot;photo&quot; (or
-whatever named attribute you're using for Paperclip) to the URLTempfile:
+To use this in your Rails app, you will need to modify your HTML form to have a field where the user enters a URL, and then some mechanism to determine that they have specified a URL (my app currently uses a pulldown menu to pick between File or URL to upload, and then swaps out different fields depending on that choice, but you could also just detect if there is text in a text field and so on).  Then, in your controller code, you'd just set the &quot;photo&quot; (or whatever named attribute you're using for Paperclip) to the URLTempfile:
 
 @params[:blog_entry][:photo] = URLTempfile.new(params[:photo_url])@
   
-That's it, from there on, the regular Paperclip file handling/functionality
-takes over and stores your file, makes thumbnails or what not.
+That's it, from there on, the regular Paperclip file handling/functionality takes over and stores your file, makes thumbnails or what not.
 
 h2. Warning!
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ class URLTempfile &lt; Tempfile
     begin
       # HACK to get around inability to set VERIFY_NONE with open-uri
       old_verify_peer_value = OpenSSL::SSL::VERIFY_PEER
-      OpenSSL::SSL.const_set(&quot;VERIFY_PEER&quot;, OpenSSL::SSL::VERIFY_NONE)
+      openssl_verify_peer = OpenSSL::SSL::VERIFY_NONE
       
       super('urlupload')
       Kernel.open(url) do |file|
@@ -32,7 +32,7 @@ class URLTempfile &lt; Tempfile
         self.flush
       end
     ensure
-      OpenSSL::SSL.const_set(&quot;VERIFY_PEER&quot;, old_verify_peer_value)
+      openssl_verify_peer = old_verify_peer_value
     end
   end
   
@@ -42,4 +42,12 @@ class URLTempfile &lt; Tempfile
     match = @url.path.match(/^.*\/(.+)$/)
     return (match ? match[1] : nil)
   end
+  
+  protected
+  
+  def openssl_verify_peer=(value)
+    silence_warnings do
+      OpenSSL::SSL.const_set(&quot;VERIFY_PEER&quot;, value)
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>lib/URLTempfile.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d386d670c01ad19d17813de830fe5c15fff83b7c</id>
    </parent>
  </parents>
  <author>
    <name>Christopher Bailey</name>
    <email>chris@cobaltedge.com</email>
  </author>
  <url>http://github.com/chris/paperclip_url_support/commit/82c879913ea60b9a36d7d96ab67844e0d38ca975</url>
  <id>82c879913ea60b9a36d7d96ab67844e0d38ca975</id>
  <committed-date>2008-12-10T14:55:13-08:00</committed-date>
  <authored-date>2008-12-10T14:55:13-08:00</authored-date>
  <message>Silence the const_set warnings.  Update the README to not manually line wrap, since it's Textile format anyway.</message>
  <tree>f81fb6fdd0c3cab6ba6995187f2e02318eba99df</tree>
  <committer>
    <name>Christopher Bailey</name>
    <email>chris@cobaltedge.com</email>
  </committer>
</commit>
