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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c2accb4cdb32b6038232521c8b9913bdc12e1bc40f8c3c8b55ce8e6d9fde1bf
4
- data.tar.gz: 9b07559d315463fbabb73a0bb7822dbb616e622c05c476c1a723fc2d97efacfb
3
+ metadata.gz: 7d89342bfa466899cc94506d428562dcc2071399f6f2b215057eb88c09e4a013
4
+ data.tar.gz: 4312c02690a8b16f138ad79b3d28d5e1822076783de64b061a810d79f79ef8b2
5
5
  SHA512:
6
- metadata.gz: a98648fe897101210763f71729b32dc29b8d9f87f6b01c7abc9d4c02d19eb3ede14031ccb4e45bb4e8f68b99dfc61e23a38dd69b18bcad0583aa5e8262b4397b
7
- data.tar.gz: 7aa4b22b710f7ee24cebd81e1a729ded39e318bea95e1a00486b853c935a5d055f977bdac1781ad3bc08dac3fff8320f9b7eec5c85d08649225ec729f43cfa52
6
+ metadata.gz: 3a5886ebbfa87bfece25658afd8051434c4acd85242cb848719544d7e9e81f54bdc5e902804de17cf7c83f53ed1bcebeec6f14d5507985aac6e9a5d56770db31
7
+ data.tar.gz: 79ead1a715c20af21fb43603c6c395aca5a5b8b67e2080151e38ee4ef8f552fafef3701c5ddad53e3d4117c3a6c69029ca8faba46c7f06b7c732edf1d49435a0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- advance (0.3.13)
4
+ advance (0.3.14)
5
5
  team_effort
6
6
 
7
7
  GEM
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
@@ -1,3 +1,3 @@
1
1
  module Advance
2
- VERSION = "0.3.13"
2
+ VERSION = "0.3.14"
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.3.13
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-24 00:00:00.000000000 Z
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.8
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