carrierwave-roz 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -1
- data/lib/carrierwave_roz/client.rb +3 -2
- data/lib/carrierwave_roz/version.rb +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: 00189d4c697f734d23f0736ea72c97616800001d
|
4
|
+
data.tar.gz: 838a2ff26f5c11159f291540a4ca4819faaa4fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93c3010b753078153e300a0e882e1d3ef4484e0a538946603ec38e7254ee1089c3e3645da182d766387d973f986e41c79dd4d82a39e6b01081efee7bcd72e8a1
|
7
|
+
data.tar.gz: 4626e2d4a4ef0ae4d9ebf4a7ed4c28fb73b6fce8fcb336e18a10b2d8b4c4290ab985937d73f2bbeefe2ea2ed3dffd584298d53369053de54f6d3f75a1f757199
|
data/README.md
CHANGED
@@ -1,4 +1,31 @@
|
|
1
1
|
CarrierWave Roz
|
2
2
|
===============
|
3
3
|
|
4
|
-
|
4
|
+
carrierwave-roz is a [carrierwave](https://github.com/carrierwaveuploader/carrierwave) storage plugin that for the [roz](https://github.com/biola/roz) file storage API.
|
5
|
+
|
6
|
+
Installation
|
7
|
+
------------
|
8
|
+
|
9
|
+
Add the following to your `Gemfile`
|
10
|
+
|
11
|
+
gem carrierwave-roz
|
12
|
+
|
13
|
+
Run `bundle install`
|
14
|
+
|
15
|
+
Usage
|
16
|
+
-----
|
17
|
+
|
18
|
+
Add the following to your uploader class
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
class ExampleUploader < CarrierWave::Uploader::Base
|
22
|
+
storage :roz
|
23
|
+
|
24
|
+
api_base_url "https://api.example.com/assets"
|
25
|
+
files_base_url "https://assets.example.com"
|
26
|
+
access_id "*************"
|
27
|
+
secret_key "*************"
|
28
|
+
# ...
|
29
|
+
```
|
30
|
+
|
31
|
+
*See [Roz documentation](https://github.com/biola/roz#configuration) for creating cilent `access_id` and `secret_key`*
|
@@ -47,8 +47,9 @@ module CarrierwaveRoz
|
|
47
47
|
def send_request(request, uri)
|
48
48
|
ApiAuth.sign! request, access_id, secret_key
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
ssl = uri.scheme == 'https'
|
51
|
+
|
52
|
+
Net::HTTP.start(uri.host, uri.port, use_ssl: ssl) do |http|
|
52
53
|
http.request(request)
|
53
54
|
end
|
54
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-roz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|