s3cp 0.1.7 → 0.1.8

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.8 / (Pending)
1
+ === 0.1.9 / (Pending)
2
+
3
+ === 0.1.8 / (2011-12-29)
4
+
5
+ * Fixed: Apparently, File.new(path, File::CREAT|File::WRONLY) does not
6
+ truncate existing files; use File.new(path, "wb") instead.
2
7
 
3
8
  === 0.1.7 / (2011-12-29)
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::O_WRONLY)
54
+ out = File.new(file.path, "wb")
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::O_WRONLY)
163
+ f = File.new(dest, "wb")
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.7"
3
+ VERSION = "0.1.8"
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: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Boisvert