advance 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11542c24800ef304fe093477353514b3ef19d24c47cb0d73b01e8b7cf53fdada
4
- data.tar.gz: 2402f1b57100d0e020b78420af424d071661e201f0e9bd422685f24551efd2f6
3
+ metadata.gz: cdf46d870056e20495b4b92b9dfcd06c38d3ade3dae154c21eeff54aa7f2f5ab
4
+ data.tar.gz: c00f97812bf6edbd4d2ee7a271cf814657d184ef5e9a8ffc5d46d422b9abfd27
5
5
  SHA512:
6
- metadata.gz: 68b5ec9be819cd2a035fec58f70de53c1b1202a267504c8025990fb4c2837164416caca4a072dd6b4659a3102d989bc1eb14c75406ffd1d120e7a47fb8538477
7
- data.tar.gz: 223c8acac2a3a914544aefabb635da7f9d7b93fc030391e82a3638c7313610274d88e0f6cc0e648815a6eaabfcae20d49288a3b4a165bcd9d12b0b29470c8c13
6
+ metadata.gz: 0c0d111aa4ad70c433619fbc4e99b65f543799b67d271d9e502994bf3bd30e83a88a35415eb951e054ec2ee5e8f24f1dc468a24b85ea44b219a36d63adc94ee1
7
+ data.tar.gz: fd87fa0dc60c52e4962391f7b0aead58e8a6c9fbdc535ff4980086c1391b5ba785ef800274009e7ce4bdfe06de266d67ff3158c421e613859084a533001be679
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- advance (0.3.10)
4
+ advance (0.3.11)
5
5
  team_effort
6
6
 
7
7
  GEM
data/bin/concat_csv.rb CHANGED
@@ -14,18 +14,18 @@ output_file = ARGV[1]
14
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
- do_cmd "ghead -n 1 #{files.first} > header"
17
+ do_cmd "head -n 1 #{files.first} > header"
18
18
 
19
19
  # 2. strip the header from all files
20
20
  TeamEffort.work(files) do |file_path|
21
21
  file = File.basename(file_path)
22
- do_cmd "gtail -n +2 #{file_path} > #{file}"
22
+ do_cmd "tail -n +2 #{file_path} > #{file}"
23
23
  end
24
24
 
25
25
  # 3. concate the header and all files
26
26
  tmp_files = files.map{|f| File.basename(f)}
27
27
  (["header"] + tmp_files).each_slice(20) do |files_to_concat|
28
28
  file_list = files_to_concat.join(' ')
29
- do_cmd "gcat #{file_list} >> #{output_file}"
29
+ do_cmd "cat #{file_list} >> #{output_file}"
30
30
  do_cmd "rm #{file_list}"
31
31
  end
data/bin/concat_csv_nh.rb CHANGED
@@ -14,5 +14,5 @@ files = Find.find(files_dir_path).reject { |p| FileTest.directory?(p) || File.ba
14
14
 
15
15
  files.each_slice(20) do |files_to_concat|
16
16
  file_list = files_to_concat.join(' ')
17
- do_cmd "gcat #{file_list} >> #{output_file}"
17
+ do_cmd "cat #{file_list} >> #{output_file}"
18
18
  end
data/bin/split_csv.rb CHANGED
@@ -9,12 +9,12 @@ end
9
9
  csv_file = ARGV[0]
10
10
  lines = ARGV[1]
11
11
  csv_file_name = File.basename(csv_file)
12
- system "ghead -n 1 #{csv_file} > #{csv_file_name}_header"
13
- system "gtail -n +2 #{csv_file} | gsplit -l #{lines} -a 3 - #{csv_file_name}_"
12
+ system "head -n 1 #{csv_file} > #{csv_file_name}_header"
13
+ system "tail -n +2 #{csv_file} | split -l #{lines} -a 3 - #{csv_file_name}_"
14
14
  files = Dir.entries(".").reject { |f| f =~ %r{^(\.\.?|log)$} }
15
15
  TeamEffort.work(files, 1) do |file|
16
16
  tmp_file = "tmp_#{file}"
17
- do_cmd "gcat #{csv_file_name}_header #{file} >> #{tmp_file}"
17
+ do_cmd "cat #{csv_file_name}_header #{file} >> #{tmp_file}"
18
18
  do_cmd "mv #{tmp_file} #{file}"
19
19
  end
20
20
  do_cmd "rm #{csv_file_name}_header"
@@ -1,3 +1,3 @@
1
1
  module Advance
2
- VERSION = "0.3.10"
2
+ VERSION = "0.3.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - janemacfarlane
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.7.9
129
+ rubygems_version: 2.7.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: A framework for building data transformation pipelines