redsnapper 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/redsnapper.rb +4 -4
- data/redsnapper.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96c456504dac06475028bb36eec1c3507d5bda1e
|
4
|
+
data.tar.gz: 0647ef320057d250e84a88a850f4b87bc93e6ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a53bc2eab8617fcf3a6ee4ca6d5945dd2d7a89bb50003d0a17719c01224fcbf06081ed1b788af07b7e1d53f31959e795cee6c6d51ee86942807090fa2ab228
|
7
|
+
data.tar.gz: 7a30e38cbb77bd770b51b5be08fdbdd0de19039fe735940627fd56142f5b099c54438ab190efb154fd379452ce14549d1a03ab754f52b50a9e006f3132731be5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/redsnapper.rb
CHANGED
@@ -15,8 +15,8 @@ class RedSnapper
|
|
15
15
|
command = [ TARSNAP, '-tf', @archive, *@options[:tarsnap_options] ]
|
16
16
|
command.push(@options[:directory]) if @options[:directory]
|
17
17
|
|
18
|
-
files =
|
19
|
-
|
18
|
+
files = Open3.popen3(*command) do |_, out, _|
|
19
|
+
out.gets(nil).split.reject { |f| f.end_with?('/') }
|
20
20
|
end
|
21
21
|
|
22
22
|
files.each_slice([ (files.size.to_f / THREAD_POOL_SIZE).ceil, MAX_FILES_PER_JOB].min).to_a
|
@@ -28,10 +28,10 @@ class RedSnapper
|
|
28
28
|
|
29
29
|
file_groups.each do |chunk|
|
30
30
|
pool.process do
|
31
|
-
command = [ TARSNAP, '-xvf', @archive,
|
31
|
+
command = [ TARSNAP, '-xvf', @archive, *(@options[:tarsnap_options] + chunk) ]
|
32
32
|
Open3.popen3(*command) do |_, _, err|
|
33
33
|
while line = err.gets
|
34
|
-
mutex.synchronize { warn line }
|
34
|
+
mutex.synchronize { warn line.chomp }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/redsnapper.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: redsnapper 0.1.
|
5
|
+
# stub: redsnapper 0.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "redsnapper"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|