Skip to content

Commit

Permalink
Merge branch 'master' of github.com:resolve/refinerycms
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Feb 15, 2010
2 parents 9e57148 + 2b74cfb commit 96499dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/application.rb
Expand Up @@ -85,5 +85,8 @@ def gem_version
config.gem "slim_scrooge", :version => ">= 1.0.3", :lib => "slim_scrooge", :source => "http://gemcutter.org" unless RUBY_PLATFORM =~ /mswin|mingw/ # kill gem when windows is running.
config.gem "hpricot", :version => ">= 0.8.1", :lib => "hpricot", :source => "http://gemcutter.org"
#===REFINERY END OF REQUIRED GEMS===

# Pull in attachment_fu patch for windows
require 'attachment_fu_patch' if RUBY_PLATFORM =~ /mswin/
end
end
16 changes: 16 additions & 0 deletions lib/attachment_fu_patch.rb
@@ -0,0 +1,16 @@
# This patches the windows tempfile problem that attachment_fu depends on. See:
# http://epirsch.blogspot.com/2008/01/fixing-attachmentfu-on-windows-like.html

require 'tempfile'

class Tempfile
def size
if @tmpfile
@tmpfile.fsync # added this line
@tmpfile.flush
@tmpfile.stat.size
else
0
end
end
end

0 comments on commit 96499dc

Please sign in to comment.