s3cp 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,9 @@
1
- === 0.1.7 / (Pending)
1
+ === 0.1.8 / (Pending)
2
+
3
+ === 0.1.7 / (2011-12-29)
4
+
5
+ * Fixed: s3cp would not truncate existing files when overwriting, possibly
6
+ resulting in corrupted files.
2
7
 
3
8
  === 0.1.6 / (2011-12-16)
4
9
 
data/lib/s3cp/s3cat.rb CHANGED
@@ -51,7 +51,7 @@ fail "Your URL looks funny, doesn't it?" unless @bucket
51
51
  if options[:tty]
52
52
  # store contents to file to display with PAGER
53
53
  file = Tempfile.new('s3cat')
54
- out = File.new(file.path, File::CREAT|File::RDWR)
54
+ out = File.new(file.path, File::CREAT|File::O_WRONLY)
55
55
  begin
56
56
  @s3.get(@bucket, @prefix) do |chunk|
57
57
  out.write(chunk)
data/lib/s3cp/s3cp.rb CHANGED
@@ -160,7 +160,7 @@ end
160
160
 
161
161
  def s3_to_local(bucket_from, key_from, dest)
162
162
  log("Copy s3://#{bucket_from}/#{key_from} to #{dest}")
163
- f = File.new(dest, File::CREAT|File::RDWR)
163
+ f = File.new(dest, File::CREAT|File::O_WRONLY)
164
164
  begin
165
165
  @s3.interface.get(bucket_from, key_from) do |chunk|
166
166
  f.write(chunk)
data/lib/s3cp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module S3CP
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3cp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Boisvert
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-16 00:00:00 Z
18
+ date: 2011-12-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement