shrine-transloadit 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/shrine/plugins/transloadit.rb +3 -1
- data/shrine-transloadit.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 72d852ce420b15983f981ac19cd6bd8f3b5d5f5d5750e9843a6ee88f8c6d4a4b
|
4
|
+
data.tar.gz: e3dbef98ddbf4b8b6897590371020a214576abfb4a091ed29ff2c92d6d2908e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 640d10e9ee8d7ddd884166dd1d8d0f26c0bf16ee3b22e25bf2c605e1677230c4c75a123aefdf84799350fc786136cf886f820bec9b318e1a73c5707122ac792e
|
7
|
+
data.tar.gz: dbf511fd3c4382c4ba11cacc38988e7e1542df5254f9d5c0842d64fc44799ef78d3ff132db766ec1b88a1e4abe1dc8dab6d74425fa81e9b33f29b8e3ef8149c7
|
@@ -99,7 +99,7 @@ class Shrine
|
|
99
99
|
|
100
100
|
if versions = response["fields"]["versions"]
|
101
101
|
stored_file = versions.inject({}) do |hash, (name, step_name)|
|
102
|
-
results = response["results"].fetch(step_name)
|
102
|
+
results = response["results"].fetch(step_name) { [] }
|
103
103
|
uploaded_files = results.map { |result| store.transloadit_uploaded_file(result) }
|
104
104
|
multiple = response["fields"]["multiple"].to_h[name]
|
105
105
|
|
@@ -107,6 +107,8 @@ class Shrine
|
|
107
107
|
hash.merge!(name => uploaded_files)
|
108
108
|
elsif uploaded_files.one?
|
109
109
|
hash.merge!(name => uploaded_files[0])
|
110
|
+
elsif uploaded_files.empty?
|
111
|
+
hash
|
110
112
|
else
|
111
113
|
raise Error, "Step produced multiple files but wasn't marked as multiple"
|
112
114
|
end
|
data/shrine-transloadit.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-transloadit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.6
|
171
|
+
rubygems_version: 2.7.6
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Provides Transloadit integration for Shrine.
|