s3cp 1.1.24 → 1.1.25

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.1.25 (2013-03-19)
2
+
3
+ * Changed: Don't display progress bar during upload to S3 unless $stdout.isatty
4
+
1
5
  === 1.1.24 (2013-03-15)
2
6
 
3
7
  * Changed: Commands now print a succint error code + message instead of
data/lib/s3cp/s3cp.rb CHANGED
@@ -176,7 +176,7 @@ class ProxyIO
176
176
 
177
177
  def read(size)
178
178
  result = @io.read(size)
179
- @progress_bar.inc result.length if result
179
+ @progress_bar.inc result.length if result && @progress_bar
180
180
  result
181
181
  end
182
182
 
@@ -322,8 +322,10 @@ def local_to_s3(bucket_to, key, file, options = {})
322
322
  s3_options[:single_request] = true
323
323
  end
324
324
 
325
- progress_bar = ProgressBar.new(File.basename(file), File.size(file)).tap do |p|
326
- p.file_transfer_mode
325
+ progress_bar = if $stdout.isatty
326
+ ProgressBar.new(File.basename(file), File.size(file)).tap do |p|
327
+ p.file_transfer_mode
328
+ end
327
329
  end
328
330
 
329
331
  File.open(file) do |io|
data/lib/s3cp/version.rb CHANGED
@@ -16,5 +16,5 @@
16
16
  # the License.
17
17
 
18
18
  module S3CP
19
- VERSION = "1.1.24"
19
+ VERSION = "1.1.25"
20
20
  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: 35
4
+ hash: 33
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 24
10
- version: 1.1.24
9
+ - 25
10
+ version: 1.1.25
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: 2013-03-15 00:00:00 Z
18
+ date: 2013-03-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement