aeden-moneta 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/moneta/s3.rb +6 -4
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/moneta/s3.rb
CHANGED
@@ -28,20 +28,22 @@ module Moneta
|
|
28
28
|
# Required values passed in the options hash:
|
29
29
|
# * <tt>:access_key_id</tt>: The access id key
|
30
30
|
# * <tt>:secret_access_key</tt>: The secret key
|
31
|
-
# * <tt>:bucket</tt>: The name of bucket.
|
32
|
-
# exist
|
31
|
+
# * <tt>:bucket</tt>: The name of bucket. If run in multi-thread mode
|
32
|
+
# then the bucket must already exist, otherwise the bucket will be created
|
33
|
+
# if it doesn't exist.
|
33
34
|
# * <tt>:multi_thread</tt>: Set to true if using threading
|
34
35
|
def initialize(options = {})
|
36
|
+
multi_thread = options.delete(:multi_thread) || false
|
35
37
|
validate_options(options)
|
36
38
|
s3 = RightAws::S3.new(
|
37
39
|
options[:access_key_id],
|
38
40
|
options[:secret_access_key],
|
39
41
|
{
|
40
42
|
:logger => logger,
|
41
|
-
:multi_thread =>
|
43
|
+
:multi_thread => multi_thread
|
42
44
|
}
|
43
45
|
)
|
44
|
-
@bucket = s3.bucket(options.delete(:bucket),
|
46
|
+
@bucket = s3.bucket(options.delete(:bucket), !multi_thread)
|
45
47
|
end
|
46
48
|
|
47
49
|
def key?(key)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aeden-moneta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ autorequire: moneta
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-07-09 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|