paperclip 2.3.2 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of paperclip might be problematic. Click here for more details.
- data/lib/paperclip/processor.rb +1 -1
- data/lib/paperclip/railtie.rb +4 -2
- data/lib/paperclip/version.rb +1 -1
- data/test/paperclip_test.rb +1 -1
- metadata +3 -3
data/lib/paperclip/processor.rb
CHANGED
@@ -43,7 +43,7 @@ module Paperclip
|
|
43
43
|
# Replaces Tempfile's +make_tmpname+ with one that honors file extensions.
|
44
44
|
def make_tmpname(basename, n)
|
45
45
|
extension = File.extname(basename)
|
46
|
-
sprintf("%s,%d,%d%s", File.basename(basename, extension), $$, n, extension)
|
46
|
+
sprintf("%s,%d,%d%s", File.basename(basename, extension), $$, n.to_i, extension)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
data/lib/paperclip/railtie.rb
CHANGED
@@ -4,8 +4,10 @@ module Paperclip
|
|
4
4
|
if defined? Rails::Railtie
|
5
5
|
require 'rails'
|
6
6
|
class Railtie < Rails::Railtie
|
7
|
-
|
8
|
-
|
7
|
+
initializer 'paperclip.insert_into_active_record' do
|
8
|
+
ActiveSupport.on_load :active_record do
|
9
|
+
Paperclip::Railtie.insert
|
10
|
+
end
|
9
11
|
end
|
10
12
|
rake_tasks do
|
11
13
|
load "tasks/paperclip.rake"
|
data/lib/paperclip/version.rb
CHANGED
data/test/paperclip_test.rb
CHANGED
@@ -308,7 +308,7 @@ class PaperclipTest < Test::Unit::TestCase
|
|
308
308
|
end
|
309
309
|
|
310
310
|
should "have a file size min/max error message" do
|
311
|
-
assert @dummy.errors[:avatar_file_size] =~ %r/between 0 and 10240 bytes/
|
311
|
+
assert [@dummy.errors[:avatar_file_size]].flatten.any?{|error| error =~ %r/between 0 and 10240 bytes/ }
|
312
312
|
end
|
313
313
|
end
|
314
314
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 2.3.
|
8
|
+
- 3
|
9
|
+
version: 2.3.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jon Yurek
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-09 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|