echo_uploads 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/echo_uploads/mapper.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8858ce36c39e3bfef07642b2db1e6e7c581ddf0
|
4
|
+
data.tar.gz: b60a1708ca9f78931cc6ecc6dee84a672388fb07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ad2e39ab5c892ebfcc9905c53a00473364eae67ad5aedbffe2cfc40075c2c7a9508a0dce04a2105ee7112e7cfad05b94f3de618fa69de494a887a3373afd25a
|
7
|
+
data.tar.gz: 4c682d02a3760e23f3e7b9052234137dd4bd04632404ea36b0a8392d6836ae6b1b6376732502df27fe6527977cf67e0e9868bc9b01e1a1236ed8618ce311f6d7
|
data/lib/echo_uploads/mapper.rb
CHANGED
@@ -24,6 +24,9 @@ module EchoUploads
|
|
24
24
|
FileUtils.mkdir_p folder
|
25
25
|
path = ::File.join(folder, SecureRandom.hex(15) + ext)
|
26
26
|
yield path
|
27
|
+
unless ::File.exists? path
|
28
|
+
raise "Called echo_upload with the :map option, but failed to write a file to #{path}"
|
29
|
+
end
|
27
30
|
file = ::File.open path, 'rb'
|
28
31
|
mapped_file = ::EchoUploads::MappedFile.new(
|
29
32
|
tempfile: file, filename: @uploaded_file.original_filename
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: echo_uploads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarrett Colby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|