fakes3 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fakes3 (0.1.2)
4
+ fakes3 (0.1.3)
5
5
  builder
6
6
  thor
7
7
 
@@ -18,10 +18,10 @@ Gem::Specification.new do |s|
18
18
  s.add_development_dependency "aws-s3"
19
19
  s.add_development_dependency "right_aws"
20
20
  #s.add_development_dependency "aws-sdk"
21
+ #s.add_development_dependency "ruby-debug"
21
22
  #s.add_development_dependency "ruby-debug19"
22
23
  s.add_dependency "thor"
23
24
  s.add_dependency "builder"
24
- #s.add_dependency "algorithms"
25
25
 
26
26
  s.files = `git ls-files`.split("\n")
27
27
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -60,6 +60,7 @@ module FakeS3
60
60
  @buckets << bucket_obj
61
61
  @bucket_hash[bucket] = bucket_obj
62
62
  end
63
+ bucket_obj
63
64
  end
64
65
 
65
66
  def delete_bucket(bucket_name)
@@ -129,6 +129,11 @@ module FakeS3
129
129
  @store.copy_object(s_req.src_bucket,s_req.src_object,s_req.bucket,s_req.object)
130
130
  when Request::STORE
131
131
  bucket_obj = @store.get_bucket(s_req.bucket)
132
+ if !bucket_obj
133
+ # Lazily create a bucket. TODO fix this to return the proper error
134
+ bucket_obj = @store.create_bucket(s_req.bucket)
135
+ end
136
+
132
137
  real_obj = @store.store_object(bucket_obj,s_req.object,s_req.webrick_request)
133
138
  response['Etag'] = real_obj.md5
134
139
  when Request::CREATE_BUCKET
@@ -1,3 +1,3 @@
1
1
  module FakeS3
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Curtis Spencer