aeden-moneta 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/moneta/s3.rb +6 -4
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'spec/rake/spectask'
5
5
  require 'date'
6
6
 
7
7
  GEM = "moneta"
8
- GEM_VERSION = "0.6.2"
8
+ GEM_VERSION = "0.6.3"
9
9
  AUTHOR = "Yehuda Katz"
10
10
  EMAIL = "wycats@gmail.com"
11
11
  HOMEPAGE = "http://www.yehudakatz.com"
@@ -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. Will be created if it doesn't
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 => options.delete(:multi_thread) || false
43
+ :multi_thread => multi_thread
42
44
  }
43
45
  )
44
- @bucket = s3.bucket(options.delete(:bucket), true)
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.2
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-06-03 00:00:00 -07:00
12
+ date: 2009-07-09 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15