advance 0.4.3 → 0.4.4

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: 341c54201a649459fbd7f7c3e2900f9f27045759560919a0c583d19088e40577
4
- data.tar.gz: 4f62f027c8cf2f5b35f48220a1243cf356274136600390cf8a5a40b9e2a34fa0
3
+ metadata.gz: 5d6824d2bd08741ba6ed16ab23cb41a7dca837d92db6717042818487966a8b5b
4
+ data.tar.gz: fc5f112f2ff89a59d9652d5f6b9550065f97248024c27a1a958389189ef58471
5
5
  SHA512:
6
- metadata.gz: b476fb178dbaaf0ec54a48d7bb3d64ac9a754513f29096e2a4c5528edc2e28491dedf2dc63f983411063ed71f8d48163c32b2aed9e1787d87472fce6f02a5384
7
- data.tar.gz: 57e71827cc95371d9337558a8756497e0f6049e74648464e449ef459990a596b0345fac24841ae472262941ffe19a771f24e64749d917acfde8539f9a24d18db
6
+ metadata.gz: 3d85241eb22e3fa4ef1806e13a4fead076cb199855127788fad7e243e113dd9785618850010d08a22a319de1322e63befb2ad19337779f8e0630566958794a95
7
+ data.tar.gz: a57345fb3b0b3d3f5835731efeb0fdaf49f42434dd2223782fce6a2c8c4be31037fecb7ecc23f974fc1ca6266c0c4b559f6d936b39082bba7a45d6d2ddd25ec3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- advance (0.4.2)
4
+ advance (0.4.4)
5
5
  team_effort
6
6
 
7
7
  GEM
@@ -9,13 +9,15 @@ end
9
9
  csv_file = ARGV[0]
10
10
  lines = ARGV[1]
11
11
  csv_file_name = File.basename(csv_file)
12
- system "head -n 1 #{csv_file} > #{csv_file_name}_header"
12
+ header_file_name = "#{csv_file_name}_header"
13
+ system "head -n 1 #{csv_file} > #{header_file_name}"
13
14
  system "tail -n +2 #{csv_file} | split -l #{lines} -a 3 - #{csv_file_name}_"
14
- files = Dir.entries(".").reject { |f| f =~ %r{^(\.\.?|log)$} }
15
+ files = Dir.entries(".").reject { |f| f.end_with?(header_file_name) || f =~ %r{^(\.\.?|log)$} }
15
16
  TeamEffort.work(files, 1) do |file|
16
17
  tmp_file = "tmp_#{file}"
17
- do_cmd "cat #{csv_file_name}_header #{file} >> #{tmp_file}"
18
+ do_cmd "cat #{header_file_name} #{file} >> #{tmp_file}"
18
19
  do_cmd "mv #{tmp_file} #{file}"
19
20
  end
20
- do_cmd "rm #{csv_file_name}_header"
21
+ do_cmd "rm #{header_file_name}"
22
+ do_cmd "rename 's/^(.*)\.csv_(.*)$/$1_$2.csv/' *csv*"
21
23
  puts ""
@@ -1,3 +1,3 @@
1
1
  module Advance
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - janemacfarlane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: team_effort
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.7.9
124
+ rubygems_version: 3.0.6
126
125
  signing_key:
127
126
  specification_version: 4
128
127
  summary: A framework for building data transformation pipelines