shrine-imgix 0.2.1 → 0.3.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 +5 -4
- data/lib/shrine/storage/imgix.rb +2 -2
- data/shrine-imgix.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13821100dcfca77321605576fbcd0e605ad8b00d
|
4
|
+
data.tar.gz: 313318ca99ddec0836d2d67aa5aaa5844178f0bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c89621b4f825f34ee15daa18804438d5978311bd116a86d20f59b947181531dbe1e4479dabd981531c662e1a3e66907658bcfea0e525a2505e73100b7c0c273c
|
7
|
+
data.tar.gz: ba3d4788f98c2ad94f0280b50944c373fcfbdaee8209109723e86f0f103eb0b9ce6483215d3faafaab8adda7d90e3b530e4d68ca6260fd6eabc29b1769e9d8a3
|
data/README.md
CHANGED
@@ -22,11 +22,11 @@ various sources (S3, Web Folder or Web Proxy), so you first need to set that up
|
|
22
22
|
require "shrine/storage/imgix"
|
23
23
|
require "shrine/storage/s3"
|
24
24
|
|
25
|
-
s3 = Shrine::Storage::S3.new(**s3_options)
|
26
25
|
imgix = Shrine::Storage::Imgix.new(
|
27
|
-
storage:
|
28
|
-
|
29
|
-
|
26
|
+
storage: Shrine::Storage::S3.new(**s3_options),
|
27
|
+
api_key: "xzy123",
|
28
|
+
host: "my-subdomain.imgix.net",
|
29
|
+
secure_url_token: "abc123", # optional
|
30
30
|
)
|
31
31
|
|
32
32
|
Shrine.storages[:store] = imgix
|
@@ -56,6 +56,7 @@ appropriate credentials:
|
|
56
56
|
# .env
|
57
57
|
IMGIX_API_KEY="..."
|
58
58
|
IMGIX_HOST="..."
|
59
|
+
IMGIX_SECURE_URL_TOKEN="..." # optional
|
59
60
|
S3_ACCESS_KEY_ID="..."
|
60
61
|
S3_SECRET_ACCESS_KEY="..."
|
61
62
|
S3_REGION="..."
|
data/lib/shrine/storage/imgix.rb
CHANGED
@@ -15,7 +15,7 @@ class Shrine
|
|
15
15
|
# reader for the token.
|
16
16
|
def initialize(storage:, **options)
|
17
17
|
@client = ::Imgix::Client.new(options)
|
18
|
-
@
|
18
|
+
@api_key = options.fetch(:api_key)
|
19
19
|
@storage = storage
|
20
20
|
end
|
21
21
|
|
@@ -51,7 +51,7 @@ class Shrine
|
|
51
51
|
# Removes the file from Imgix, along with the generated versions.
|
52
52
|
def purge(id)
|
53
53
|
uri = URI.parse(PURGE_URL)
|
54
|
-
uri.user = @
|
54
|
+
uri.user = @api_key
|
55
55
|
|
56
56
|
post(uri, "url" => url(id))
|
57
57
|
end
|
data/shrine-imgix.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-imgix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|