advance 0.3.16 → 0.3.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/remove_logs_and_sub_dirs +4 -0
- data/lib/advance.rb +17 -0
- data/lib/advance/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e0ac05e79a457d37a7bf18aae36c8276ecb029493bbc19a03c6410d9774dd3e
|
4
|
+
data.tar.gz: b915a139b4d433be5c3751c3b9cb980bd6d4a0352d6f2fe7900d459dda962080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd189c4214a299871a06704bd4424dc6b0e6ef8b41acf8bfdac5e02400af80d916909b88e80d1c3e44688292282ad549090fc8f432ab0b79cbd743e13b28f4ff
|
7
|
+
data.tar.gz: 4f8e340937f6801a90a02f9d700fbab7502e8e021dc6138b6b54fb544cc662d79fba449d82bc8eaeb7ed47c6cb2ed3c88ee486f4d345f92d3178c1288895696c
|
data/Gemfile.lock
CHANGED
data/lib/advance.rb
CHANGED
@@ -79,6 +79,11 @@ module Advance
|
|
79
79
|
raise "capture_column_names_from_csv cannot be the first step"
|
80
80
|
end
|
81
81
|
|
82
|
+
if File.exist?(".meta")
|
83
|
+
read_column_names_from_meta
|
84
|
+
return
|
85
|
+
end
|
86
|
+
|
82
87
|
previous_dir_path = get_previous_dir_path
|
83
88
|
input_file_path = previous_file_path(previous_dir_path)
|
84
89
|
CSV.foreach(input_file_path, :headers => true) do |row|
|
@@ -87,6 +92,18 @@ module Advance
|
|
87
92
|
end
|
88
93
|
end
|
89
94
|
|
95
|
+
def read_column_names_from_meta
|
96
|
+
meta = JSON.parse(File.read(".meta"))
|
97
|
+
meta["runs"].each do |run|
|
98
|
+
run.each do |step|
|
99
|
+
if step["columns"]
|
100
|
+
$column_names = step["columns"].map(&:to_sym)
|
101
|
+
return
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
90
107
|
def advance(processing_mode, label, command)
|
91
108
|
$redo_mode ||= :checking
|
92
109
|
$step ||= 0
|
data/lib/advance/version.rb
CHANGED
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.3.
|
4
|
+
version: 0.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- janemacfarlane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04
|
11
|
+
date: 2019-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: team_effort
|
@@ -81,6 +81,7 @@ executables:
|
|
81
81
|
- csv_select.rb
|
82
82
|
- csv_select_nh.rb
|
83
83
|
- csv_split_on_change_nh.rb
|
84
|
+
- remove_logs_and_sub_dirs
|
84
85
|
- setup
|
85
86
|
- split_csv.rb
|
86
87
|
extensions: []
|
@@ -100,6 +101,7 @@ files:
|
|
100
101
|
- bin/csv_select.rb
|
101
102
|
- bin/csv_select_nh.rb
|
102
103
|
- bin/csv_split_on_change_nh.rb
|
104
|
+
- bin/remove_logs_and_sub_dirs
|
103
105
|
- bin/setup
|
104
106
|
- bin/split_csv.rb
|
105
107
|
- lib/advance.rb
|