My favorites
▼
|
Sign in
substruct
Open-source Ruby on Rails E-Commerce
Project Home
Downloads
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
149
attachment: win32_attachment_fu_patch.diff
(993 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Index: plugins/substruct/lib/substruct.rb
===================================================================
--- plugins/substruct/lib/substruct.rb (revision 31)
+++ plugins/substruct/lib/substruct.rb (working copy)
@@ -1,6 +1,8 @@
# Copyright (c) 2006 Subimage Interactive - http://www.subimage.com
require_dependency 'substruct/login_system.rb'
+require 'patch_attachment_fu'
+
module Substruct
# Should we use live rate calculation via FedEx?
mattr_accessor :use_live_rate_calculation
Index: plugins/substruct/lib/patch_attachment_fu.rb
===================================================================
--- plugins/substruct/lib/patch_attachment_fu.rb (revision 0)
+++ plugins/substruct/lib/patch_attachment_fu.rb (revision 0)
@@ -0,0 +1,16 @@
+if RUBY_PLATFORM =~ /win32|mingw/
+
+require 'tempfile'
+class Tempfile
+ def size
+ if @tmpfile
+ @tmpfile.fsync # added this line
+ @tmpfile.flush
+ @tmpfile.stat.size
+ else
+ 0
+ end
+ end
+end
+
+end
Powered by
Google Project Hosting