formeze 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/formeze.gemspec +1 -1
- data/lib/formeze/field.rb +3 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39b1043817638b51294f4ca2da81e2e2fa1829f7209eb0026bedffca84c7b430
|
4
|
+
data.tar.gz: 0e4d59c83e428005f01522430e740795accb24831dcc226cd1ce30eda28afada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 865f278fd2c8456a1def21e04d2150d6487727eceda9bc6d1ce375cba906f4a177e76cb158eea0cbe40d1cd1c6da785efb512c301647ebbcc8155d2aae8a7061
|
7
|
+
data.tar.gz: e20a37f37ebbb28932174a148cedd37fd251f97fa05986b0302ddf4e7f7897638d3f722af071060fca0704d0f97265e273478cd01721a1383b72feabb1279896
|
data/CHANGES.md
CHANGED
data/formeze.gemspec
CHANGED
data/lib/formeze/field.rb
CHANGED
@@ -59,16 +59,14 @@ class Formeze::Field
|
|
59
59
|
form.send(:"#{name}=", object)
|
60
60
|
end
|
61
61
|
|
62
|
-
BINARY = MIME::Types['application/octet-stream'].first
|
63
|
-
|
64
62
|
def acceptable_file?(object)
|
65
|
-
type = MIME::Types[object.content_type].first
|
66
|
-
|
67
63
|
types = MIME::Types.type_for(object.original_filename)
|
68
64
|
|
69
|
-
if
|
65
|
+
if object.content_type == 'application/octet-stream'
|
70
66
|
types.any? { |type| accept.include?(type) }
|
71
67
|
else
|
68
|
+
type = MIME::Types[object.content_type].first
|
69
|
+
|
72
70
|
accept.include?(type) && types.include?(type)
|
73
71
|
end
|
74
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formeze
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Craft
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby gem for validating form data
|
14
14
|
email:
|