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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/echo_uploads/mapper.rb +3 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9783284ac5f99c46c6113e2d0878e9984f5de3ac
4
- data.tar.gz: bd81c015c45482841a9109fc1842640b0dc00184
3
+ metadata.gz: d8858ce36c39e3bfef07642b2db1e6e7c581ddf0
4
+ data.tar.gz: b60a1708ca9f78931cc6ecc6dee84a672388fb07
5
5
  SHA512:
6
- metadata.gz: 2eb7f8fe6990a8be2dff7081b7dfe8725978d101695c7efa2ff9b761a7a2e428967d0965d3ce52010e895a57d2fac22b452f2e0e7d1ad95edf971dd8656f7a31
7
- data.tar.gz: 6cfa0bd003b5d26ff9837bf5ef549eebd8777b3f5ecba2b22056c5bb4a8ba2f3a1a2e746f4d6ea15e6402b520b2bc2be11e0c2e1d17e17813f0e4eca99935b7c
6
+ metadata.gz: 0ad2e39ab5c892ebfcc9905c53a00473364eae67ad5aedbffe2cfc40075c2c7a9508a0dce04a2105ee7112e7cfad05b94f3de618fa69de494a887a3373afd25a
7
+ data.tar.gz: 4c682d02a3760e23f3e7b9052234137dd4bd04632404ea36b0a8392d6836ae6b1b6376732502df27fe6527977cf67e0e9868bc9b01e1a1236ed8618ce311f6d7
@@ -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.8
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-03 00:00:00.000000000 Z
11
+ date: 2014-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types