carrierwave-nightcrawler-swift 0.1.0 → 0.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd9c8f0306e305e95f9057e29fddd3a38c26999b
|
4
|
+
data.tar.gz: 26a8ef48dbeca325815c0e66f7c1d938b32f504d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 963f3a24fa8832cda2e59838c751f96ecc67bb49bf9fc74001c74feef9e972349d9b5baa1d93c7588409f3d8a121db67c106ed4b0e40d261ee5d39ee4db676be
|
7
|
+
data.tar.gz: d29efe401601876736d253dc047f702f09c0821acc473d32a1154f5995d03035bf3d8e2da26cf7eef3fda6a1e6f888f9fe45a36f2fd76fef9742a86c89970ccb
|
@@ -4,18 +4,15 @@ module Carrierwave
|
|
4
4
|
class Storage < CarrierWave::Storage::Abstract
|
5
5
|
def initialize(uploader)
|
6
6
|
super(uploader)
|
7
|
-
|
8
|
-
@swift_list = NightcrawlerSwift::List.new
|
9
|
-
@swift_upload = NightcrawlerSwift::Upload.new
|
10
7
|
end
|
11
8
|
|
12
9
|
def store!(file)
|
13
|
-
|
10
|
+
upload = NightcrawlerSwift::Upload.new
|
11
|
+
upload.execute @uploader.filename, ::File.new(file.file)
|
14
12
|
end
|
15
13
|
|
16
14
|
def retrieve!(identifier)
|
17
|
-
|
18
|
-
SwiftFile.new(list[0]) if (list.is_a?(Array) && (list.count > 0))
|
15
|
+
SwiftFile.new({"name" => identifier})
|
19
16
|
end
|
20
17
|
|
21
18
|
class SwiftFile
|
@@ -28,7 +25,7 @@ module Carrierwave
|
|
28
25
|
end
|
29
26
|
|
30
27
|
def url(options = {})
|
31
|
-
"#{NightcrawlerSwift.connection.public_url}/#{NightcrawlerSwift.options.bucket}/#{
|
28
|
+
"#{NightcrawlerSwift.connection.public_url}/#{NightcrawlerSwift.options.bucket}/#{path}"
|
32
29
|
end
|
33
30
|
|
34
31
|
def delete
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-nightcrawler-swift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wandenberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|