imgproxy 1.2.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +238 -113
- data/lib/imgproxy/builder.rb +47 -55
- data/lib/imgproxy/config.rb +96 -30
- data/lib/imgproxy/extensions/active_storage.rb +10 -0
- data/lib/imgproxy/extensions/shrine.rb +10 -0
- data/lib/imgproxy/options.rb +86 -120
- data/lib/imgproxy/options_aliases.rb +45 -0
- data/lib/imgproxy/options_casters/adjust.rb +22 -0
- data/lib/imgproxy/options_casters/array.rb +12 -0
- data/lib/imgproxy/options_casters/base64.rb +12 -0
- data/lib/imgproxy/options_casters/bool.rb +12 -0
- data/lib/imgproxy/options_casters/crop.rb +23 -0
- data/lib/imgproxy/options_casters/extend.rb +26 -0
- data/lib/imgproxy/options_casters/float.rb +16 -0
- data/lib/imgproxy/options_casters/gif_options.rb +21 -0
- data/lib/imgproxy/options_casters/gravity.rb +23 -0
- data/lib/imgproxy/options_casters/group.rb +21 -0
- data/lib/imgproxy/options_casters/integer.rb +10 -0
- data/lib/imgproxy/options_casters/jpeg_options.rb +26 -0
- data/lib/imgproxy/options_casters/png_options.rb +23 -0
- data/lib/imgproxy/options_casters/resize.rb +21 -0
- data/lib/imgproxy/options_casters/size.rb +24 -0
- data/lib/imgproxy/options_casters/string.rb +10 -0
- data/lib/imgproxy/options_casters/trim.rb +28 -0
- data/lib/imgproxy/options_casters/watermark.rb +30 -0
- data/lib/imgproxy/trim_array.rb +11 -0
- data/lib/imgproxy/url_adapters/active_storage.rb +35 -0
- data/lib/imgproxy/url_adapters/shrine.rb +16 -6
- data/lib/imgproxy/url_adapters.rb +0 -4
- data/lib/imgproxy/version.rb +1 -1
- data/lib/imgproxy.rb +72 -50
- metadata +69 -23
- data/lib/imgproxy/url_adapters/active_storage_gcs.rb +0 -31
- data/lib/imgproxy/url_adapters/active_storage_s3.rb +0 -23
- data/lib/imgproxy/url_adapters/shrine_s3.rb +0 -21
@@ -0,0 +1,26 @@
|
|
1
|
+
require "imgproxy/options_casters/group"
|
2
|
+
require "imgproxy/options_casters/bool"
|
3
|
+
require "imgproxy/options_casters/integer"
|
4
|
+
|
5
|
+
module Imgproxy
|
6
|
+
module OptionsCasters
|
7
|
+
# Casts jpeg_options option
|
8
|
+
module JpegOptions
|
9
|
+
CASTER = Imgproxy::OptionsCasters::Group.new(
|
10
|
+
progressive: Imgproxy::OptionsCasters::Bool,
|
11
|
+
no_subsample: Imgproxy::OptionsCasters::Bool,
|
12
|
+
trellis_quant: Imgproxy::OptionsCasters::Bool,
|
13
|
+
overshoot_deringing: Imgproxy::OptionsCasters::Bool,
|
14
|
+
optimize_scans: Imgproxy::OptionsCasters::Bool,
|
15
|
+
quant_table: Imgproxy::OptionsCasters::Integer,
|
16
|
+
).freeze
|
17
|
+
|
18
|
+
def self.cast(raw)
|
19
|
+
return raw unless raw.is_a?(Hash)
|
20
|
+
|
21
|
+
values = CASTER.cast(raw)
|
22
|
+
values.empty? ? nil : values
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "imgproxy/options_casters/group"
|
2
|
+
require "imgproxy/options_casters/bool"
|
3
|
+
require "imgproxy/options_casters/integer"
|
4
|
+
|
5
|
+
module Imgproxy
|
6
|
+
module OptionsCasters
|
7
|
+
# Casts png_options option
|
8
|
+
module PngOptions
|
9
|
+
CASTER = Imgproxy::OptionsCasters::Group.new(
|
10
|
+
interlaced: Imgproxy::OptionsCasters::Bool,
|
11
|
+
quantize: Imgproxy::OptionsCasters::Bool,
|
12
|
+
quantization_colors: Imgproxy::OptionsCasters::Integer,
|
13
|
+
).freeze
|
14
|
+
|
15
|
+
def self.cast(raw)
|
16
|
+
return raw unless raw.is_a?(Hash)
|
17
|
+
|
18
|
+
values = CASTER.cast(raw)
|
19
|
+
values.empty? ? nil : values
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "imgproxy/trim_array"
|
2
|
+
require "imgproxy/options_casters/string"
|
3
|
+
require "imgproxy/options_casters/size"
|
4
|
+
|
5
|
+
module Imgproxy
|
6
|
+
module OptionsCasters
|
7
|
+
# Casts resize option
|
8
|
+
module Resize
|
9
|
+
using TrimArray
|
10
|
+
|
11
|
+
def self.cast(raw)
|
12
|
+
return raw unless raw.is_a?(Hash)
|
13
|
+
|
14
|
+
[
|
15
|
+
Imgproxy::OptionsCasters::String.cast(raw[:resizing_type]) || "fit",
|
16
|
+
*Imgproxy::OptionsCasters::Size.cast(raw),
|
17
|
+
].trim!
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "imgproxy/trim_array"
|
2
|
+
require "imgproxy/options_casters/integer"
|
3
|
+
require "imgproxy/options_casters/bool"
|
4
|
+
require "imgproxy/options_casters/extend"
|
5
|
+
|
6
|
+
module Imgproxy
|
7
|
+
module OptionsCasters
|
8
|
+
# Casts size option
|
9
|
+
module Size
|
10
|
+
using TrimArray
|
11
|
+
|
12
|
+
def self.cast(raw)
|
13
|
+
return raw unless raw.is_a?(Hash)
|
14
|
+
|
15
|
+
[
|
16
|
+
Imgproxy::OptionsCasters::Integer.cast(raw[:width]) || 0,
|
17
|
+
Imgproxy::OptionsCasters::Integer.cast(raw[:height]) || 0,
|
18
|
+
Imgproxy::OptionsCasters::Bool.cast(raw[:enlarge]),
|
19
|
+
Imgproxy::OptionsCasters::Extend.cast(raw[:extend]),
|
20
|
+
].trim!
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "imgproxy/options_casters/group"
|
2
|
+
require "imgproxy/options_casters/float"
|
3
|
+
require "imgproxy/options_casters/string"
|
4
|
+
require "imgproxy/options_casters/bool"
|
5
|
+
|
6
|
+
module Imgproxy
|
7
|
+
module OptionsCasters
|
8
|
+
# Casts trim option
|
9
|
+
module Trim
|
10
|
+
CASTER = Imgproxy::OptionsCasters::Group.new(
|
11
|
+
threshold: Imgproxy::OptionsCasters::Float,
|
12
|
+
color: Imgproxy::OptionsCasters::String,
|
13
|
+
equal_hor: Imgproxy::OptionsCasters::Bool,
|
14
|
+
equal_ver: Imgproxy::OptionsCasters::Bool,
|
15
|
+
).freeze
|
16
|
+
|
17
|
+
def self.cast(raw)
|
18
|
+
# Allow trim to be just a numeric
|
19
|
+
return Imgproxy::OptionsCasters::Float.cast(raw) if raw.is_a?(Numeric)
|
20
|
+
|
21
|
+
return raw unless raw.is_a?(Hash)
|
22
|
+
return unless raw[:threshold]
|
23
|
+
|
24
|
+
CASTER.cast(raw)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require "imgproxy/options_casters/group"
|
2
|
+
require "imgproxy/options_casters/float"
|
3
|
+
require "imgproxy/options_casters/string"
|
4
|
+
require "imgproxy/options_casters/integer"
|
5
|
+
|
6
|
+
module Imgproxy
|
7
|
+
module OptionsCasters
|
8
|
+
# Casts string option
|
9
|
+
module Watermark
|
10
|
+
CASTER = Imgproxy::OptionsCasters::Group.new(
|
11
|
+
opacity: Imgproxy::OptionsCasters::Float,
|
12
|
+
position: Imgproxy::OptionsCasters::String,
|
13
|
+
x_offset: Imgproxy::OptionsCasters::Integer,
|
14
|
+
y_offset: Imgproxy::OptionsCasters::Integer,
|
15
|
+
scale: Imgproxy::OptionsCasters::Float,
|
16
|
+
).freeze
|
17
|
+
|
18
|
+
def self.cast(raw)
|
19
|
+
# Allow watermark to be just a numeric
|
20
|
+
return Imgproxy::OptionsCasters::Float.cast(raw) if raw.is_a?(Numeric)
|
21
|
+
|
22
|
+
return raw unless raw.is_a?(Hash)
|
23
|
+
return unless raw[:opacity]
|
24
|
+
|
25
|
+
values = CASTER.cast(raw)
|
26
|
+
values[0].zero? ? 0 : values
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -15,8 +15,43 @@ module Imgproxy
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def url(image)
|
18
|
+
return s3_url(image) if use_s3_url(image)
|
19
|
+
return gcs_url(image) if use_gcs_url(image)
|
20
|
+
|
18
21
|
Rails.application.routes.url_helpers.url_for(image)
|
19
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def s3_url(image)
|
27
|
+
"s3://#{service(image).bucket.name}/#{image.key}"
|
28
|
+
end
|
29
|
+
|
30
|
+
def use_s3_url(image)
|
31
|
+
config.use_s3_urls && service(image).is_a?(::ActiveStorage::Service::S3Service)
|
32
|
+
end
|
33
|
+
|
34
|
+
def gcs_url(image)
|
35
|
+
"gs://#{config.gcs_bucket}/#{image.key}"
|
36
|
+
end
|
37
|
+
|
38
|
+
def use_gcs_url(image)
|
39
|
+
config.use_gcs_urls && service(image).is_a?(::ActiveStorage::Service::GCSService)
|
40
|
+
end
|
41
|
+
|
42
|
+
def service(image)
|
43
|
+
unwrap_service(image.service)
|
44
|
+
end
|
45
|
+
|
46
|
+
def unwrap_service(service)
|
47
|
+
return service unless defined?(::ActiveStorage::Service::MirrorService)
|
48
|
+
return service unless service.is_a?(::ActiveStorage::Service::MirrorService)
|
49
|
+
unwrap_service(service.primary)
|
50
|
+
end
|
51
|
+
|
52
|
+
def config
|
53
|
+
Imgproxy.config
|
54
|
+
end
|
20
55
|
end
|
21
56
|
end
|
22
57
|
end
|
@@ -8,18 +8,28 @@ module Imgproxy
|
|
8
8
|
#
|
9
9
|
# Imgproxy.url_for(user.avatar)
|
10
10
|
class Shrine
|
11
|
-
def initialize(host: nil)
|
12
|
-
@host = host
|
13
|
-
end
|
14
|
-
|
15
11
|
def applicable?(image)
|
16
12
|
image.is_a?(::Shrine::UploadedFile)
|
17
13
|
end
|
18
14
|
|
19
15
|
def url(image)
|
16
|
+
return s3_url(image) if use_s3_url(image)
|
17
|
+
|
20
18
|
opts = {}
|
21
|
-
opts[:host] =
|
22
|
-
image.url(opts)
|
19
|
+
opts[:host] = Imgproxy.config.shrine_host if Imgproxy.config.shrine_host
|
20
|
+
image.url(**opts)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def s3_url(image)
|
26
|
+
path = [*image.storage.prefix, image.id].join("/")
|
27
|
+
"s3://#{image.storage.bucket.name}/#{path}"
|
28
|
+
end
|
29
|
+
|
30
|
+
def use_s3_url(image)
|
31
|
+
Imgproxy.config.use_s3_urls &&
|
32
|
+
image.storage.is_a?(::Shrine::Storage::S3)
|
23
33
|
end
|
24
34
|
end
|
25
35
|
end
|
@@ -1,9 +1,5 @@
|
|
1
1
|
require "imgproxy/url_adapters/active_storage"
|
2
|
-
require "imgproxy/url_adapters/active_storage_s3"
|
3
|
-
require "imgproxy/url_adapters/active_storage_gcs"
|
4
|
-
|
5
2
|
require "imgproxy/url_adapters/shrine"
|
6
|
-
require "imgproxy/url_adapters/shrine_s3"
|
7
3
|
|
8
4
|
module Imgproxy
|
9
5
|
# URL adapters config. Allows to use this gem with ActiveStorage, Shrine, etc.
|
data/lib/imgproxy/version.rb
CHANGED
data/lib/imgproxy.rb
CHANGED
@@ -19,8 +19,8 @@ module Imgproxy
|
|
19
19
|
#
|
20
20
|
# Imgproxy.configure do |config|
|
21
21
|
# config.endpoint = "http://imgproxy.example.com"
|
22
|
-
# config.
|
23
|
-
# config.
|
22
|
+
# config.key = "your_key"
|
23
|
+
# config.salt = "your_salt"
|
24
24
|
# config.use_short_options = true
|
25
25
|
# end
|
26
26
|
#
|
@@ -38,92 +38,114 @@ module Imgproxy
|
|
38
38
|
# width: 500,
|
39
39
|
# height: 400,
|
40
40
|
# resizing_type: :fill,
|
41
|
-
# sharpen: 0.5
|
41
|
+
# sharpen: 0.5,
|
42
|
+
# gravity: {
|
43
|
+
# type: :soea,
|
44
|
+
# x_offset: 10,
|
45
|
+
# y_offset: 5,
|
46
|
+
# },
|
47
|
+
# crop: {
|
48
|
+
# width: 2000,
|
49
|
+
# height: 1000,
|
50
|
+
# gravity: {
|
51
|
+
# type: :nowe,
|
52
|
+
# x_offset: 20,
|
53
|
+
# y_offset: 30,
|
54
|
+
# },
|
55
|
+
# },
|
42
56
|
# )
|
43
57
|
#
|
44
58
|
# @return [String] imgproxy URL
|
45
59
|
# @param [String,URI, Object] image Source image URL or object applicable for
|
46
60
|
# the configured URL adapters
|
47
61
|
# @param [Hash] options Processing options
|
62
|
+
# @option options [Hash|Array|String] :resize
|
63
|
+
# @option options [Hash|Array|String] :size
|
48
64
|
# @option options [String] :resizing_type
|
65
|
+
# @option options [String] :resizing_algorithm supported only by imgproxy pro
|
49
66
|
# @option options [Integer] :width
|
50
67
|
# @option options [Integer] :height
|
51
68
|
# @option options [Float] :dpr
|
52
69
|
# @option options [Boolean] :enlarge
|
53
|
-
# @option options [Boolean] :extend
|
54
|
-
# @option options [String] :
|
55
|
-
# @option options [
|
56
|
-
# @option options [Float] :extend_gravity_y
|
57
|
-
# @option options [String] :gravity
|
58
|
-
# @option options [Float] :gravity_x
|
59
|
-
# @option options [Float] :gravity_y
|
60
|
-
# @option options [Integer] :crop_width
|
61
|
-
# @option options [Integer] :crop_height
|
62
|
-
# @option options [String] :crop_gravity
|
63
|
-
# @option options [Float] :crop_gravity_x
|
64
|
-
# @option options [Float] :crop_gravity_y
|
65
|
-
# @option options [Integer] :trim_threshold
|
66
|
-
# @option options [String] :trim_color
|
70
|
+
# @option options [Hash|Array|Boolean|String] :extend
|
71
|
+
# @option options [Hash|Array|String] :gravity
|
72
|
+
# @option options [Hash|Array|String] :crop
|
67
73
|
# @option options [Array] :padding
|
68
|
-
# @option options [
|
69
|
-
# @option options [
|
74
|
+
# @option options [Hash|Array|String] :trim
|
75
|
+
# @option options [Integer] :rotate
|
70
76
|
# @option options [Integer] :quality
|
71
77
|
# @option options [Integer] :max_bytes
|
72
|
-
# @option options [Array] :background
|
78
|
+
# @option options [Array|String] :background
|
79
|
+
# @option options [Float] :background_alpha supported only by imgproxy pro
|
80
|
+
# @option options [Hash|Array|String] :adjust
|
73
81
|
# @option options [Integer] :brightness supported only by imgproxy pro
|
74
82
|
# @option options [Float] :contrast supported only by imgproxy pro
|
75
83
|
# @option options [Float] :saturation supported only by imgproxy pro
|
76
84
|
# @option options [Float] :blur
|
77
85
|
# @option options [Float] :sharpen
|
78
86
|
# @option options [Integer] :pixelate supported only by imgproxy pro
|
79
|
-
# @option options [
|
80
|
-
# @option options [String] :
|
81
|
-
# @option options [
|
82
|
-
# @option options [Integer] :watermark_y_offset
|
83
|
-
# @option options [Float] :watermark_scale
|
87
|
+
# @option options [String] :unsharpening supported only by imgproxy pro
|
88
|
+
# @option options [Hash|Array|Float|String] :watermark
|
89
|
+
# @option options [String] :watermark_url supported only by imgproxy pro
|
84
90
|
# @option options [String] :style supported only by imgproxy pro
|
91
|
+
# @option options [Hash|Array|String] :jpeg_options supported only by imgproxy pro
|
92
|
+
# @option options [Hash|Array|String] :png_options supported only by imgproxy pro
|
93
|
+
# @option options [Hash|Array|String] :gif_options supported only by imgproxy pro
|
94
|
+
# @option options [Integer] :page supported only by imgproxy pro
|
95
|
+
# @option options [Integer] :video_thumbnail_second supported only by imgproxy pro
|
85
96
|
# @option options [Array] :preset
|
86
97
|
# @option options [String] :cachebuster
|
98
|
+
# @option options [Boolean] :strip_metadata
|
99
|
+
# @option options [Boolean] :strip_color_profile
|
100
|
+
# @option options [Boolean] :auto_rotate
|
101
|
+
# @option options [String] :filename
|
87
102
|
# @option options [String] :format
|
103
|
+
# @option options [Boolean] :return_attachment
|
104
|
+
# @option options [Integer] :expires
|
88
105
|
# @option options [Boolean] :use_short_options
|
89
106
|
# @option options [Boolean] :base64_encode_urls
|
90
|
-
# @
|
91
|
-
#
|
107
|
+
# @option options [Boolean] :escape_plain_url
|
108
|
+
# @see https://docs.imgproxy.net/#/generating_the_url_advanced?id=processing-options
|
109
|
+
# Available imgproxy URL processing options and their arguments
|
92
110
|
def url_for(image, options = {})
|
93
111
|
Imgproxy::Builder.new(options).url_for(image)
|
94
112
|
end
|
95
113
|
|
96
|
-
#
|
97
|
-
# and adds URL adapters for ActiveStorage
|
114
|
+
# Genrates imgproxy info URL. Supported only by imgproxy pro
|
98
115
|
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
# @
|
102
|
-
# @param
|
103
|
-
|
104
|
-
|
105
|
-
|
116
|
+
# Imgproxy.info_url_for("http://images.example.com/images/image.jpg")
|
117
|
+
#
|
118
|
+
# @return [String] imgproxy info URL
|
119
|
+
# @param [String,URI, Object] image Source image URL or object applicable for
|
120
|
+
# the configured URL adapters
|
121
|
+
# @param [Hash] options Processing options
|
122
|
+
# @option options [Boolean] :base64_encode_urls
|
123
|
+
# @option options [Boolean] :escape_plain_url
|
124
|
+
def info_url_for(image, options = {})
|
125
|
+
Imgproxy::Builder.new(options).info_url_for(image)
|
126
|
+
end
|
106
127
|
|
107
|
-
|
128
|
+
# Extends +ActiveStorage::Blob+ with {Imgproxy::Extensions::ActiveStorage.imgproxy_url} method
|
129
|
+
# and adds URL adapters for ActiveStorage
|
130
|
+
def extend_active_storage!
|
131
|
+
return unless defined?(ActiveSupport) && ActiveSupport.respond_to?(:on_load)
|
108
132
|
|
109
|
-
|
110
|
-
|
111
|
-
url_adapters.add(Imgproxy::UrlAdapters::ActiveStorage.new)
|
133
|
+
ActiveSupport.on_load(:active_storage_blob) do
|
134
|
+
::ActiveStorage::Blob.include Imgproxy::Extensions::ActiveStorage
|
135
|
+
Imgproxy.config.url_adapters.add(Imgproxy::UrlAdapters::ActiveStorage.new)
|
112
136
|
end
|
113
137
|
end
|
114
138
|
|
115
|
-
# Extends Shrine::UploadedFile with {Imgproxy::Extensions::Shrine.imgproxy_url} method
|
139
|
+
# Extends +Shrine::UploadedFile+ with {Imgproxy::Extensions::Shrine.imgproxy_url} method
|
116
140
|
# and adds URL adapters for Shrine
|
117
|
-
|
118
|
-
|
119
|
-
# @param use_s3 [Boolean] enable Amazon S3 source URLs
|
120
|
-
def extend_shrine!(host: nil, use_s3: false)
|
121
|
-
::Shrine::UploadedFile.include Imgproxy::Extensions::Shrine
|
122
|
-
|
123
|
-
url_adapters = Imgproxy.config.url_adapters
|
141
|
+
def extend_shrine!
|
142
|
+
return unless defined?(::Shrine::UploadedFile)
|
124
143
|
|
125
|
-
|
126
|
-
url_adapters.add(Imgproxy::UrlAdapters::Shrine.new
|
144
|
+
::Shrine::UploadedFile.include Imgproxy::Extensions::Shrine
|
145
|
+
Imgproxy.config.url_adapters.add(Imgproxy::UrlAdapters::Shrine.new)
|
127
146
|
end
|
128
147
|
end
|
129
148
|
end
|
149
|
+
|
150
|
+
Imgproxy.extend_active_storage!
|
151
|
+
Imgproxy.extend_shrine!
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imgproxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Alexandrovich
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: anyway_config
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: benchmark-memory
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.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.2.0
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: pry-byebug
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -30,70 +58,70 @@ dependencies:
|
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.
|
61
|
+
version: 3.11.0
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.
|
68
|
+
version: 3.11.0
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: rspec_junit_formatter
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
75
|
+
version: 0.5.1
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
80
|
- - "~>"
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
82
|
+
version: 0.5.1
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: rubocop
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
87
|
- - "~>"
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
89
|
+
version: 1.30.1
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
94
|
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
96
|
+
version: 1.30.1
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rubocop-rspec
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - "~>"
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
103
|
+
version: 2.11.1
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
110
|
+
version: 2.11.1
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: aws-sdk-s3
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - "~>"
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.64
|
117
|
+
version: '1.64'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - "~>"
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.64
|
124
|
+
version: '1.64'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: google-cloud-storage
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +142,14 @@ dependencies:
|
|
114
142
|
requirements:
|
115
143
|
- - "~>"
|
116
144
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
145
|
+
version: 7.0.3
|
118
146
|
type: :development
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
150
|
- - "~>"
|
123
151
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
152
|
+
version: 7.0.3
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
154
|
name: shrine
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,18 +192,36 @@ files:
|
|
164
192
|
- lib/imgproxy/extensions/active_storage.rb
|
165
193
|
- lib/imgproxy/extensions/shrine.rb
|
166
194
|
- lib/imgproxy/options.rb
|
195
|
+
- lib/imgproxy/options_aliases.rb
|
196
|
+
- lib/imgproxy/options_casters/adjust.rb
|
197
|
+
- lib/imgproxy/options_casters/array.rb
|
198
|
+
- lib/imgproxy/options_casters/base64.rb
|
199
|
+
- lib/imgproxy/options_casters/bool.rb
|
200
|
+
- lib/imgproxy/options_casters/crop.rb
|
201
|
+
- lib/imgproxy/options_casters/extend.rb
|
202
|
+
- lib/imgproxy/options_casters/float.rb
|
203
|
+
- lib/imgproxy/options_casters/gif_options.rb
|
204
|
+
- lib/imgproxy/options_casters/gravity.rb
|
205
|
+
- lib/imgproxy/options_casters/group.rb
|
206
|
+
- lib/imgproxy/options_casters/integer.rb
|
207
|
+
- lib/imgproxy/options_casters/jpeg_options.rb
|
208
|
+
- lib/imgproxy/options_casters/png_options.rb
|
209
|
+
- lib/imgproxy/options_casters/resize.rb
|
210
|
+
- lib/imgproxy/options_casters/size.rb
|
211
|
+
- lib/imgproxy/options_casters/string.rb
|
212
|
+
- lib/imgproxy/options_casters/trim.rb
|
213
|
+
- lib/imgproxy/options_casters/watermark.rb
|
214
|
+
- lib/imgproxy/trim_array.rb
|
167
215
|
- lib/imgproxy/url_adapters.rb
|
168
216
|
- lib/imgproxy/url_adapters/active_storage.rb
|
169
|
-
- lib/imgproxy/url_adapters/active_storage_gcs.rb
|
170
|
-
- lib/imgproxy/url_adapters/active_storage_s3.rb
|
171
217
|
- lib/imgproxy/url_adapters/shrine.rb
|
172
|
-
- lib/imgproxy/url_adapters/shrine_s3.rb
|
173
218
|
- lib/imgproxy/version.rb
|
174
219
|
homepage: https://github.com/imgproxy/imgproxy.rb
|
175
220
|
licenses:
|
176
221
|
- MIT
|
177
|
-
metadata:
|
178
|
-
|
222
|
+
metadata:
|
223
|
+
rubygems_mfa_required: 'true'
|
224
|
+
post_install_message:
|
179
225
|
rdoc_options: []
|
180
226
|
require_paths:
|
181
227
|
- lib
|
@@ -183,15 +229,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
229
|
requirements:
|
184
230
|
- - ">="
|
185
231
|
- !ruby/object:Gem::Version
|
186
|
-
version: '2.
|
232
|
+
version: '2.5'
|
187
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
234
|
requirements:
|
189
235
|
- - ">="
|
190
236
|
- !ruby/object:Gem::Version
|
191
237
|
version: '0'
|
192
238
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
194
|
-
signing_key:
|
239
|
+
rubygems_version: 3.3.7
|
240
|
+
signing_key:
|
195
241
|
specification_version: 4
|
196
242
|
summary: imgproxy URL generator
|
197
243
|
test_files: []
|