shrine-imgix 0.2.1 → 0.3.0

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
  SHA1:
3
- metadata.gz: c487828ea71251d6412abe0616b014a87c52f131
4
- data.tar.gz: b86ab166bcd9fe131441e96cca4605c484babdd7
3
+ metadata.gz: 13821100dcfca77321605576fbcd0e605ad8b00d
4
+ data.tar.gz: 313318ca99ddec0836d2d67aa5aaa5844178f0bb
5
5
  SHA512:
6
- metadata.gz: ac4085f40501cae8d4a45204087c6eb2b76ff7e2744fad5e2c0e0c63c74bca730cdf1bf4af434c934016cd3d79481dea2e2ff67854123a68ea8ba6b3ff451c32
7
- data.tar.gz: f95dde075eb1be129cde2bab790df035b71b85c2888815ca052e479b2ce1768b5bc7d91616f340b602982a8f2b09bea5218a225caf4ed647c706915d503e76fe
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: s3,
28
- host: "my-subdomain.imgix.net",
29
- token: "abc123",
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="..."
@@ -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
- @token = options[:secure_url_token]
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 = @token
54
+ uri.user = @api_key
55
55
 
56
56
  post(uri, "url" => url(id))
57
57
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-imgix"
3
- gem.version = "0.2.1"
3
+ gem.version = "0.3.0"
4
4
 
5
5
  gem.required_ruby_version = ">= 2.1"
6
6
 
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.2.1
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-08 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shrine