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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 44fd7310fe53d3e86b451820183df6a5dfb1bbd9
4
- data.tar.gz: f4f11d18200d7a233147d9bd1b851d774d6de44c
2
+ SHA256:
3
+ metadata.gz: 72d852ce420b15983f981ac19cd6bd8f3b5d5f5d5750e9843a6ee88f8c6d4a4b
4
+ data.tar.gz: e3dbef98ddbf4b8b6897590371020a214576abfb4a091ed29ff2c92d6d2908e3
5
5
  SHA512:
6
- metadata.gz: 875d9ecbe9bbdbd95af66971f992722470dcb71758991132d7c55385d31b14b8aec8fe0b32e9feed266b37e87d2cb9957a774d2a3c62eedff7d5e6ba311f686c
7
- data.tar.gz: d768031f8d091a3a9e3152accde460d860e801eddc2a825744b87d590aef1ebc35338a8b3eb60ab1935e256b7eebe63f5fde29c03fc12528cf6653a8ffed7d5b
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-transloadit"
3
- gem.version = "0.5.0"
3
+ gem.version = "0.5.1"
4
4
 
5
5
  gem.required_ruby_version = ">= 2.2"
6
6
 
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.0
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-03-31 00:00:00.000000000 Z
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.11
171
+ rubygems_version: 2.7.6
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Provides Transloadit integration for Shrine.