smallpict 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/smallpict/models/optimize_options.rb +4 -1
- data/lib/smallpict/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07f81540dbb9ffdc18b971d6b7519d928505ba89713483e842ce7d5591b7283f
|
|
4
|
+
data.tar.gz: ad857c51ab6a2c763ce57c8ee213ed793c22d6750a709fe505b5bd4343bb8d33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3bebb0287a363cc4822f714b892ca1d179cb128ce1b93da684fd02e27a6eb3618adf03fea5f323733fcc991586bab0a1acb66db44646ca7390e46272fd9911fb
|
|
7
|
+
data.tar.gz: a9c4ba6d3d0dc9ec41699a8b66c2b44ab32b664e06726c39fce4afbcb7dd7f5417f8d4d002a0cab65c8124ec1cef10806143bd11e43b275efc46645953325679
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Official Ruby gem for the [SmallPict Image Optimization API](https://smallpict.a
|
|
|
4
4
|
|
|
5
5
|
[](https://rubygems.org/gems/smallpict)
|
|
6
6
|
[](LICENSE)
|
|
7
|
-
[](https://www.ruby-lang.org)
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module SmallPict
|
|
4
4
|
module Models
|
|
5
5
|
class OptimizeOptions
|
|
6
|
-
attr_reader :format, :quality, :max_width, :max_height, :fit,
|
|
6
|
+
attr_reader :format, :quality, :max_width, :max_height, :max_dimension, :fit,
|
|
7
7
|
:lossless, :strip_metadata, :filename, :mime_type, :content_type, :idempotency_key
|
|
8
8
|
|
|
9
9
|
def initialize(
|
|
@@ -11,6 +11,7 @@ module SmallPict
|
|
|
11
11
|
quality: 80,
|
|
12
12
|
max_width: nil,
|
|
13
13
|
max_height: nil,
|
|
14
|
+
max_dimension: nil,
|
|
14
15
|
fit: "cover",
|
|
15
16
|
lossless: false,
|
|
16
17
|
strip_metadata: true,
|
|
@@ -23,6 +24,7 @@ module SmallPict
|
|
|
23
24
|
@quality = quality&.clamp(1, 100)
|
|
24
25
|
@max_width = max_width
|
|
25
26
|
@max_height = max_height
|
|
27
|
+
@max_dimension = max_dimension
|
|
26
28
|
@fit = fit.to_s
|
|
27
29
|
@lossless = lossless
|
|
28
30
|
@strip_metadata = strip_metadata
|
|
@@ -38,6 +40,7 @@ module SmallPict
|
|
|
38
40
|
quality: @quality,
|
|
39
41
|
max_width: @max_width,
|
|
40
42
|
max_height: @max_height,
|
|
43
|
+
max_dimension: @max_dimension,
|
|
41
44
|
fit: @fit,
|
|
42
45
|
lossless: @lossless,
|
|
43
46
|
strip_metadata: @strip_metadata
|
data/lib/smallpict/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smallpict
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SmallPict Engineering
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
119
119
|
requirements:
|
|
120
120
|
- - ">="
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
|
-
version: 3.
|
|
122
|
+
version: 3.2.0
|
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
requirements:
|
|
125
125
|
- - ">="
|