imagekitio 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f16b0137caabb312f3f4dea41a5558075f6ee24032b733fd4ce986807f695fbf
4
- data.tar.gz: 50bc622d4cd9042275cbb1c21920fb371f28ba046fcbd76b74099b288a74227a
3
+ metadata.gz: db316e0a4525fa5a4f72d3f993da7fdb12480e18957cf40f0a84ec40c255ab2e
4
+ data.tar.gz: f24d4d783f368bb5ba90807f3dec82f677f943a9ccff4373dd6d56471e524517
5
5
  SHA512:
6
- metadata.gz: e73e581e5709d7ac0de28d6ca9276fea1931b47a1e88595a67fcdb51ee654deed3e6b3aac208198432385c5e2f64c3ea765f366033dd678017fc9fda73d80933
7
- data.tar.gz: 0aad82e39f813c480edfeffaf10401bf90aa935b09cc313ddd48a05dc4f51b666074d1e28033398255a807ed40a0f2ac4d42d4b9bfa3571cdc2e706b70f0a846
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-config)
17
- - [ActiveStorage](#ActiveStorage-config)
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.0.0](#Upgrade)
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.0.0
718
+ ## Upgrade to 2.x
719
719
 
720
- If you are upgrading to 2.0.0 from version 1.x, make the following changes in your application:
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).url
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 = '/' + filename.to_s if filename.is_a? ActiveStorage::Filename
150
- client.url(path: filename, url_endpoint: config.url_endpoint)
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
@@ -1,5 +1,5 @@
1
1
  module ImageKitIo
2
2
  module Sdk
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
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.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-06 00:00:00.000000000 Z
11
+ date: 2021-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave