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 +4 -4
- data/README.md +7 -5
- data/lib/shrine/plugins/transloadit.rb +1 -1
- data/shrine-transloadit.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: 5d366d63207d1f1f9344a18d85cb0600c1666fa9
|
4
|
+
data.tar.gz: c78ce1f611b524aa62d971603f5de6c4e3974eff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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
|
data/shrine-transloadit.gemspec
CHANGED
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.
|
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-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|