advance 0.3.13 → 0.3.14
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/lib/advance.rb +14 -0
- data/lib/advance/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d89342bfa466899cc94506d428562dcc2071399f6f2b215057eb88c09e4a013
|
4
|
+
data.tar.gz: 4312c02690a8b16f138ad79b3d28d5e1822076783de64b061a810d79f79ef8b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a5886ebbfa87bfece25658afd8051434c4acd85242cb848719544d7e9e81f54bdc5e902804de17cf7c83f53ed1bcebeec6f14d5507985aac6e9a5d56770db31
|
7
|
+
data.tar.gz: 79ead1a715c20af21fb43603c6c395aca5a5b8b67e2080151e38ee4ef8f552fafef3701c5ddad53e3d4117c3a6c69029ca8faba46c7f06b7c732edf1d49435a0
|
data/Gemfile.lock
CHANGED
data/lib/advance.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "csv"
|
1
2
|
require "fileutils"
|
2
3
|
require "find"
|
3
4
|
require "json"
|
@@ -73,6 +74,19 @@ module Advance
|
|
73
74
|
File.write(".meta", JSON.pretty_generate(meta))
|
74
75
|
end
|
75
76
|
|
77
|
+
def capture_column_names_from_csv
|
78
|
+
if $step.nil?
|
79
|
+
raise "capture_column_names_from_csv cannot be the first step"
|
80
|
+
end
|
81
|
+
|
82
|
+
previous_dir_path = get_previous_dir_path
|
83
|
+
input_file_path = previous_file_path(previous_dir_path)
|
84
|
+
CSV.foreach(input_file_path, :headers => true) do |row|
|
85
|
+
$column_names = row.headers
|
86
|
+
break
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
76
90
|
def advance(processing_mode, label, command)
|
77
91
|
$redo_mode ||= :checking
|
78
92
|
$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.14
|
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-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: team_effort
|
@@ -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.
|
129
|
+
rubygems_version: 2.7.9
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: A framework for building data transformation pipelines
|