shrine-transloadit 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f40ec5ac77cc70adcbccbe3dd19c37fea7eb515
4
- data.tar.gz: f2dcde874d01e7edfdeccbafdc1913181b55e319
3
+ metadata.gz: 5d366d63207d1f1f9344a18d85cb0600c1666fa9
4
+ data.tar.gz: c78ce1f611b524aa62d971603f5de6c4e3974eff
5
5
  SHA512:
6
- metadata.gz: f4da721d4c333e12d33683349b53d68086b79fd5902addc2ae21d99c85b98549b61094b0ac090f9bffd6f380f56f6726e0669148a6f60f72b55656b1de0bc0fc
7
- data.tar.gz: d9b21d982ea502e0e612d808943cac381ad6644d23866f608cefccc5a5bc7a901d86abdeca9e760d145629c83c005f6ffdf70312ac7d3d87841475d4bd5a6e73
6
+ metadata.gz: 77b6562932f477793fec069cb1a71d8ec568b48729c0a8e3d60bd30655f737db9c479ce63723959fc556d88ba8409cbe3c35792d127c929dba5eeb7f816d2748
7
+ data.tar.gz: a1dd95f697d0882d92f7b362d5ae1757902d1d59fd3a9787ea56d73ede417a21b7c6c48d550e21dd27d5343d69512a78d04de8834fda697a6f670fc4eb53cc91
data/README.md CHANGED
@@ -21,16 +21,16 @@ gem "aws-sdk"
21
21
  require "shrine"
22
22
  require "shrine/storage/s3"
23
23
 
24
+ Shrine.plugin :transloadit,
25
+ auth_key: "your transloadit key",
26
+ auth_secret: "your transloadit secret"
27
+
24
28
  Shrine.storages[:store] = Shrine::Storage::S3.new(
25
29
  access_key_id: "xyz",
26
30
  secret_access_key: "abc",
27
31
  region: "my-region",
28
32
  bucket: "my-app",
29
33
  )
30
-
31
- Shrine.plugin :transloadit,
32
- auth_key: "your transloadit key",
33
- auth_secret: "your transloadit secret"
34
34
  ```
35
35
 
36
36
  ```rb
@@ -39,7 +39,9 @@ post "/webhooks/transloadit" do
39
39
  end
40
40
  ```
41
41
 
42
- With this setup you can do [direct uploads](#direct-uploads) to Transloadit.
42
+ This setup assumes you want to do [direct uploads](#direct-uploads) to
43
+ Transloadit. This is completely optional, the plugin will work equally well
44
+ with whatever your `:cache` storage is.
43
45
 
44
46
  ## How it works
45
47
 
@@ -232,7 +232,7 @@ class Shrine
232
232
  module FileMethods
233
233
  def transloadit_response
234
234
  @transloadit_response ||= (
235
- body = metadata.fetch("transloadit_response")
235
+ body = metadata["transloadit_response"] or return
236
236
  body.instance_eval { def body; self; end }
237
237
  response = ::Transloadit::Response.new(body)
238
238
  response.extend ::Transloadit::Response::Assembly
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-transloadit"
3
- gem.version = "0.2.0"
3
+ gem.version = "0.2.1"
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-transloadit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
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-07-07 00:00:00.000000000 Z
11
+ date: 2016-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shrine