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: 88a8c0f03cf1d3e03b7221b539e1040981270278
4
- data.tar.gz: 080020d7849b2ccde4c053b8e510870b1bb6f74e
3
+ metadata.gz: fd9c8f0306e305e95f9057e29fddd3a38c26999b
4
+ data.tar.gz: 26a8ef48dbeca325815c0e66f7c1d938b32f504d
5
5
  SHA512:
6
- metadata.gz: 5a31702afc3bc2f3ea76c92f15f82fff4ad1d10b563731d4949d1e11203dd11d75134fce06d84171f5a7b83761ea61736e6a828566928cd682f55fae226a8ede
7
- data.tar.gz: b0ed6bcd952ac2eabb088ae31d9c2232f9dabf4f3e0838048489fdfd2a4a42584cbabf862f073e2ad8126f764026b09974be3c0a5bf6b5f24546da8099f8d34e
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
- @swift_upload.execute @uploader.filename, ::File.new(file.file)
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
- list = @swift_list.execute(prefix: identifier)
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}/#{@attrs["name"]}"
28
+ "#{NightcrawlerSwift.connection.public_url}/#{NightcrawlerSwift.options.bucket}/#{path}"
32
29
  end
33
30
 
34
31
  def delete
@@ -1,7 +1,7 @@
1
1
  module Carrierwave
2
2
  module Nightcrawler
3
3
  module Swift
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
7
7
  end
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.0
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-07-27 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler