advance 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/Gemfile.lock +2 -2
- data/bin/concat_csv.rb +1 -1
- data/bin/split_csv.rb +1 -1
- data/lib/advance.rb +1 -1
- data/lib/advance/version.rb +1 -1
- 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: b554bb49d7d5003e2fc5031754afe1a4c08f7741
|
4
|
+
data.tar.gz: 5231a634d47aca8a8d15a578b0b4e0d2f7b17fd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02c498e7694e15b3b59cb2ac69582b0ddefab93de3b2863cc838e4b700dcc08ec873801268cbcb0fc47f308d705ce31f4d7db03a6fc11c9fa5d4d8791f590757
|
7
|
+
data.tar.gz: 3526bb8ed0671d1cc43a1aae89b91ecaaa541d5143526acec587cdcdef9a1e605483f068449f7d279080197dee6c5ae9bf5e32d87dfb40d9f184430d31044e87
|
data/Gemfile.lock
CHANGED
data/bin/concat_csv.rb
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
files_dir_path = ARGV[0]
|
13
13
|
output_file = ARGV[1]
|
14
|
-
files = Find.find(files_dir_path).reject { |p| FileTest.directory?(p) || p
|
14
|
+
files = Find.find(files_dir_path).reject { |p| FileTest.directory?(p) || File.basename(p) == "log" }
|
15
15
|
|
16
16
|
# 1. capture the header from the first file
|
17
17
|
do_cmd "ghead -n 1 #{files.first} > header"
|
data/bin/split_csv.rb
CHANGED
@@ -11,7 +11,7 @@ lines = ARGV[1]
|
|
11
11
|
csv_file_name = File.basename(csv_file)
|
12
12
|
system "ghead -n 1 #{csv_file} > #{csv_file_name}_header"
|
13
13
|
system "gtail -n +2 #{csv_file} | gsplit -l #{lines} -a 3 - #{csv_file_name}_"
|
14
|
-
files = Dir.entries(".").reject { |f| f =~ %r{^(\.\.?|
|
14
|
+
files = Dir.entries(".").reject { |f| f =~ %r{^(\.\.?|log)$} }
|
15
15
|
TeamEffort.work(files, 1) do |file|
|
16
16
|
tmp_file = "tmp_#{file}"
|
17
17
|
do_cmd "gcat #{csv_file_name}_header #{file} >> #{tmp_file}"
|
data/lib/advance.rb
CHANGED
data/lib/advance/version.rb
CHANGED