echo_uploads 0.0.23 → 0.0.24

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
2
  SHA1:
3
- metadata.gz: 804822a92afb63c74d6ee6dd5a87dc4b0d017bf8
4
- data.tar.gz: 3ef8ca40d697d45725331a3cab0f646318d16051
3
+ metadata.gz: f1dd51bbcb9657176869717783e241b4cdeb51b6
4
+ data.tar.gz: 021f04224daa528a2621d1e41f074196a689c7e7
5
5
  SHA512:
6
- metadata.gz: ed779c8251d35a4d4e56df9b4098af245e5127aefb060bb5af18f9550febf82c2de8f102053ac87338c24a042567ec2626d2f43dd665e82e7a9852fd21d5c3cd
7
- data.tar.gz: bfe6cbebde5c81dd5d1ba28479569621605e2e841735d5cfce07c6a57e8548b8e61d76d1a4c38fab69405feb05418a5cbc1da88c5c70e19b54046c286a20fb31
6
+ metadata.gz: 8ddc99678cf446bc653c95c1e5075302544572012bd416aade488609905ef99f1d57070881cc95aa3bd180f2b126c60c3adff7adfa9e06e1affda0bf1eeb44d3
7
+ data.tar.gz: 9d65c84855543dd8da4dd19d47a1b99f119696e4023288bfe76cdfcf7242a3c53d4d42ccce93130c887021d5c76a9a53ca774e6ddce1ad615f1f0fed780e2397
@@ -57,7 +57,7 @@ module EchoUploads
57
57
  end
58
58
  end
59
59
 
60
- # Helper method used internally Echo Uploads.
60
+ # Helper method used internally by Echo Uploads.
61
61
  def echo_uploads_map_metadata(attr, options)
62
62
  meta = send("#{attr}_metadata")
63
63
  meta ? yield(meta) : nil
@@ -240,6 +240,10 @@ module EchoUploads
240
240
  echo_uploads_maybe_write_tmp_file(attr, options)
241
241
  end
242
242
 
243
+ define_method("destroy_#{attr}") do
244
+ echo_uploads_map_metadata(attr, options, &:destroy)
245
+ end
246
+
243
247
  # Define the association with the metadata model.
244
248
  if options[:multiple]
245
249
  has_many("#{attr}_metadatas".to_sym,
@@ -1,3 +1,3 @@
1
1
  module EchoUploads
2
- VERSION = '0.0.23'
2
+ VERSION = '0.0.24'
3
3
  end
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.23
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2017-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2'
27
- - !ruby/object:Gem::Dependency
28
- name: turn
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  description: Gracefully handles invalid form submissions, so users don't have to resubmit
42
28
  the file. Supports transforming the file before saving, e.g. scaling an image. Compatible
43
29
  with any storage mechanism, including the local filesystem and the cloud.
@@ -81,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
67
  version: '0'
82
68
  requirements: []
83
69
  rubyforge_project:
84
- rubygems_version: 2.6.8
70
+ rubygems_version: 2.6.12
85
71
  signing_key:
86
72
  specification_version: 4
87
73
  summary: Uploaded files for Rails