dynamic_image 2.0.19 → 2.0.20

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
  SHA256:
3
- metadata.gz: b8a443b4bff71c2168b0564f451cbe768ab6c5543e4527e80514e2abc95ec608
4
- data.tar.gz: c30e81b7cb0a61e53de91a6abfbdbddaf9dd9cbc71275377b174f7b4ac225c33
3
+ metadata.gz: f0a95aa4e97d054b1bd7d757c14f0a98790061806a930b6a2c8bc9294d85d00a
4
+ data.tar.gz: dbe583ffcfe362d0406c0b272bc1f7a53d625be553d0e804baa5bf6753100cae
5
5
  SHA512:
6
- metadata.gz: 1fac29b093705e10f1183269128d4db4874d3a500b2bbc25ae67b03993e0e05228148e548d7f1183766c204ecbb9711857b26dea513653628be7692df85e6aa2
7
- data.tar.gz: 40bf839a47d7ae69b55455b919d16973117b7e7877980802f9c5d3a8b761f7c8460893705b4fa60b08a8e9ea1988265855d6dfdd25a934c89ac3aa1f9a9969dc
6
+ metadata.gz: 681e4621406b2e6c4eae033dcba0ca1ea085c3429307a29e897eed62cbf22f2810183107142aae0432c351e2a8a47f5a25aa7ca901afe4e908109cf6126d54d3
7
+ data.tar.gz: a7e5975010f4eb0f3dfaa3bf9185ea5a8e4d134f6f963d353da7d7dca0c4894094aee2a8557083bf1870ef9770fc26e3a5e58346fe55742f0af07f73e691f612
data/README.md CHANGED
@@ -15,9 +15,9 @@ uploaded, DynamicImage stores the original file and generates images
15
15
  on demand. It handles cropping, resizing, format and colorspace
16
16
  conversion.
17
17
 
18
- Supported formats at the moment are JPEG, PNG, GIF, BMP and TIFF. The
19
- latter will automatically be converted to JPG. CMYK images will be
20
- converted to RGB, and RGB images will be converted to the sRGB
18
+ Supported formats at the moment are JPEG, PNG, GIF, BMP, WebP and TIFF.
19
+ BMP, WebP and TIFF images will automatically be converted to JPG. CMYK
20
+ images will be converted to RGB, and RGB images will be converted to the sRGB
21
21
  colorspace for consistent appearance in all browsers.
22
22
 
23
23
  DynamicImage is built on [Dis](https://github.com/elektronaut/dis)
@@ -59,7 +59,7 @@ module DynamicImage
59
59
  render(file: File.join(File.dirname(__FILE__), "templates/show"),
60
60
  layout: false, locals: { options: options })
61
61
  end
62
- format.any(:gif, :jpeg, :png, :tiff) do
62
+ format.any(:gif, :jpeg, :png, :tiff, :webp) do
63
63
  send_image(DynamicImage::ProcessedImage.new(@record, options))
64
64
  end
65
65
  end
@@ -69,7 +69,7 @@ module DynamicImage
69
69
  return unless stale?(@record)
70
70
 
71
71
  respond_to do |format|
72
- format.any(:gif, :jpeg, :png, :tiff) do
72
+ format.any(:gif, :jpeg, :png, :tiff, :webp) do
73
73
  send_data(@record.data,
74
74
  filename: filename,
75
75
  content_type: @record.content_type,
@@ -11,7 +11,8 @@ module DynamicImage
11
11
  "\xff\xd8", # JPEG
12
12
  "\x49\x49\x2a\x00", # TIFF
13
13
  "\x4d\x4d\x00\x2a",
14
- "\x42\x4d" # BMP
14
+ "\x42\x4d", # BMP
15
+ "\x52\x49\x46\x46" # WEBP
15
16
  ].map { |s| s.dup.force_encoding("binary") }
16
17
  end
17
18
  end
@@ -69,7 +69,8 @@ module DynamicImage
69
69
  image/jpeg
70
70
  image/pjpeg
71
71
  image/png
72
- image/tiff]
72
+ image/tiff
73
+ image/webp]
73
74
  end
74
75
  end
75
76
 
@@ -141,7 +141,8 @@ module DynamicImage
141
141
  "image/gif" => "GIF",
142
142
  "image/jpeg" => "JPEG",
143
143
  "image/pjpeg" => "JPEG",
144
- "image/tiff" => "TIFF" }[record.content_type]
144
+ "image/tiff" => "TIFF",
145
+ "image/webp" => "WEBP" }[record.content_type]
145
146
  end
146
147
 
147
148
  def require_valid_image!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DynamicImage
4
- VERSION = "2.0.19"
4
+ VERSION = "2.0.20"
5
5
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_image
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.19
4
+ version: 2.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inge Jørgensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 1.0.6
20
17
  - - "~>"
21
18
  - !ruby/object:Gem::Version
22
19
  version: '1.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.6
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 1.0.6
30
27
  - - "~>"
31
28
  - !ruby/object:Gem::Version
32
29
  version: '1.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.6
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: mini_magick
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
- rubygems_version: 3.0.1
160
+ rubygems_version: 3.1.2
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: Rails plugin that simplifies image uploading and processing