simple_attribute 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_attribute/matcher.rb +2 -1
- data/lib/simple_attribute/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30aeee5921d4baaf2745a62c810f6970db01dae8
|
4
|
+
data.tar.gz: 7211e0a0902cbd9ec116a9ffc45a3608ec6965d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36fe80040f4cc26ba41ec4311a9dd17e5d4f45af6d278972b74450e48d5f5bfee9d5ff13db3458f379e5b0847c9f0fce30d98482cf5bae3959e9d2a2f4da852
|
7
|
+
data.tar.gz: 32cfdbaea05f094922a7433b1838748d591332df1752417777f22edfc1f81c769839b4e9cedf07c640ec35a7b51b1bf7fc2c113b685ca04abee4c3756abd0cff
|
@@ -28,7 +28,8 @@ module SimpleAttribute
|
|
28
28
|
|
29
29
|
# Find file type
|
30
30
|
def find_file_type
|
31
|
-
media_type = MiniMime.lookup_by_filename("#{@value}")
|
31
|
+
media_type = MiniMime.lookup_by_filename("#{@value}")
|
32
|
+
media_type = media_type.content_type.split('/').first unless media_type.nil?
|
32
33
|
available = [:image, :video]
|
33
34
|
|
34
35
|
available.find { |t| "#{t}" == media_type } || :file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_attribute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonian Guveli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|