imagekitio 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/active_storage/service/image_kit_io_service.rb +7 -6
- data/lib/imagekitio/sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db316e0a4525fa5a4f72d3f993da7fdb12480e18957cf40f0a84ec40c255ab2e
|
4
|
+
data.tar.gz: f24d4d783f368bb5ba90807f3dec82f677f943a9ccff4373dd6d56471e524517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cd39012d46c350b0cbaefce9dfe60fc7bdf5e8fd110fc01e05b06fa95c9bff171c679dc0d724cc41ddf1b968ea2f3fef3dd30e867d6f2da1935d0e4cd02afd8
|
7
|
+
data.tar.gz: 360f33ade97be7c1c72e7c6be026008688dfced40b4201ba17d33b180f93270070a77e23718072fb779386f1707abb3c7f1b2ba6ba4ff5102cc03ca4747ad809
|
data/README.md
CHANGED
@@ -13,14 +13,14 @@ ImageKit gem for Ruby on Rails that allows you to use real-time [image resizing]
|
|
13
13
|
Table of contents -
|
14
14
|
* [Installation](#Installation)
|
15
15
|
* [Initialization](#Initialization)
|
16
|
-
- [CarrierWave](#Carrierwave
|
17
|
-
- [ActiveStorage](#
|
16
|
+
- [CarrierWave](#Carrierwave)
|
17
|
+
- [ActiveStorage](#activeStorage)
|
18
18
|
* [URL Generation](#URL-generation)
|
19
19
|
* [File Upload](#File-Upload)
|
20
20
|
* [File Management](#File-Management)
|
21
21
|
* [Utility Functions](#Utility-functions)
|
22
22
|
* [Sample applications](#Sample-Application)
|
23
|
-
* [Upgrade to 2.
|
23
|
+
* [Upgrade to 2.x](#upgrade-to-2.x)
|
24
24
|
* [Support](#Support)
|
25
25
|
* [Links](#Links)
|
26
26
|
|
@@ -715,9 +715,9 @@ There are three sample apps:
|
|
715
715
|
|
716
716
|
Please see the sample applications in [here](https://github.com/imagekit-samples/quickstart).
|
717
717
|
|
718
|
-
## Upgrade to 2.
|
718
|
+
## Upgrade to 2.x
|
719
719
|
|
720
|
-
If you are upgrading to 2.
|
720
|
+
If you are upgrading to 2.x from version 1.x, make the following changes in your application:
|
721
721
|
|
722
722
|
- Remove config from environment file to initializer file as described [here](#Initialization).
|
723
723
|
- Include `ImageKitIo::CarrierWave` in uploader class(for Carrierwave).
|
@@ -132,7 +132,7 @@ if defined? Rails
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def url(key, filename: nil, content_type: '', **options)
|
135
|
-
image_kit_file(key).
|
135
|
+
generate_url(key, filename: filename, content_type: content_type, path: image_kit_file(key).path, **options)
|
136
136
|
end
|
137
137
|
|
138
138
|
def open(*args, **options, &block)
|
@@ -141,13 +141,14 @@ if defined? Rails
|
|
141
141
|
|
142
142
|
private
|
143
143
|
|
144
|
-
def private_url(key, expires_in:, filename:, disposition:, content_type:, **)
|
145
|
-
generate_url(key, expires_in: expires_in, filename: filename, disposition: disposition, content_type: content_type)
|
144
|
+
def private_url(key, expires_in:, filename:, disposition:, content_type:, **options)
|
145
|
+
generate_url(key, expires_in: expires_in, filename: filename, disposition: disposition, content_type: content_type, path: image_kit_file(key).path, **options)
|
146
146
|
end
|
147
147
|
|
148
|
-
def generate_url(key, expires_in:, filename:, content_type:, disposition
|
149
|
-
filename =
|
150
|
-
|
148
|
+
def generate_url(key, expires_in:, filename:, content_type:, disposition:, **options)
|
149
|
+
# filename = filename.to_s if filename.is_a? ActiveStorage::Filename
|
150
|
+
# options[:filename] = filename if filename
|
151
|
+
client.url(url_endpoint: config.url_endpoint, **options)
|
151
152
|
end
|
152
153
|
|
153
154
|
def client
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imagekitio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ImageKit.io team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|