jobmensa_assets 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/jobmensa_assets/attachment_type.rb +5 -5
- data/lib/jobmensa_assets/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe7cf84aa7cf5dd7eeabfe513f58dda9c9a5986
|
4
|
+
data.tar.gz: d17d6babc34adb1daee6c9e9ffc96bb30959e9d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a840c4a7b3cbd7ed0d99dd1a7aa2c6dc271339f0c9d3ff862fb33807ae50ce884261db661945f674bc55926b0e76e3b695a711e3506e45e6aa19db3efd4e03
|
7
|
+
data.tar.gz: 9e29e6f4db77064cf3b7c127b8ceb81e82ec7a337662885c867b3ed84d77fe74090378631aec239262b4d6878878b5065fd92d544339864522573ad70dff6179
|
data/Gemfile.lock
CHANGED
@@ -32,14 +32,14 @@ GEM
|
|
32
32
|
json (~> 1.4)
|
33
33
|
nokogiri (>= 1.4.4)
|
34
34
|
builder (3.2.2)
|
35
|
-
degu (0.
|
35
|
+
degu (0.6.0)
|
36
36
|
activerecord (>= 3.0, < 5.0)
|
37
37
|
diff-lcs (1.2.5)
|
38
38
|
i18n (0.7.0)
|
39
39
|
json (1.8.2)
|
40
40
|
kgio (2.9.3)
|
41
41
|
le (2.6.2)
|
42
|
-
mime-types (2.
|
42
|
+
mime-types (2.5)
|
43
43
|
mini_magick (4.2.3)
|
44
44
|
mini_portile (0.6.2)
|
45
45
|
minitest (5.6.0)
|
@@ -3,10 +3,10 @@ require 'degu'
|
|
3
3
|
module JobmensaAssets
|
4
4
|
enum :AttachmentType do
|
5
5
|
field :content_type
|
6
|
-
|
6
|
+
|
7
7
|
# Path for image if no thumnail is available
|
8
8
|
field :default_thumbnail_path
|
9
|
-
|
9
|
+
|
10
10
|
Image(
|
11
11
|
content_type: ['image/jpeg', 'image/gif', 'image/png'],
|
12
12
|
default_thumbnail_path: ''
|
@@ -22,7 +22,7 @@ module JobmensaAssets
|
|
22
22
|
)
|
23
23
|
|
24
24
|
PDF(
|
25
|
-
content_type: ['application/pdf'],
|
25
|
+
content_type: ['application/pdf', 'application/x-pdf'],
|
26
26
|
default_thumbnail_path: 'jobmensa/attachment-pdf.png'
|
27
27
|
)
|
28
28
|
|
@@ -50,13 +50,13 @@ module JobmensaAssets
|
|
50
50
|
content_type.each_with_object([]) { |type, memo| memo << MIME::Types[type].flat_map(&:extensions) }.flatten.uniq
|
51
51
|
end
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
def self.attachment_type_for(content_type)
|
55
55
|
all.select do |attachment_type|
|
56
56
|
attachment_type.content_type.include? content_type
|
57
57
|
end.first
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def self.max_filesize(_type)
|
61
61
|
Refile.cache.max_size
|
62
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jobmensa_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jobmensa dev team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -172,3 +172,4 @@ summary: Our image resize and delivery app.
|
|
172
172
|
test_files:
|
173
173
|
- spec/jobmensa_assets_spec.rb
|
174
174
|
- spec/spec_helper.rb
|
175
|
+
has_rdoc:
|