advance 0.3.4 → 0.3.7

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: f48f7f4d8486419b770c7b1e76f3f6b8186bd31d3f21503f8e8c65b29ec748ee
4
- data.tar.gz: b5d0d902388a22d2813d6f261f31f0596d2c09e96d9536241c868e04b8e84c59
3
+ metadata.gz: 9c5496bca9b51cb9542bd848c072639c02d74c1221e67d4d9470a57741b9f32c
4
+ data.tar.gz: 36e0ad35fcdfe2b3df7fbac361d3b27593a3d507a8d93e797e37cc86bec7663c
5
5
  SHA512:
6
- metadata.gz: 99f79946945bb30f660125c5d615a060fbd9cb32e2d994c5912076fc7f0e5bb01ee3df0cb3a9d874d0dd4f6980db527df2666fe07d4b547e4d5421841cf0d37e
7
- data.tar.gz: 955ce588e7a118f4709783898faab44789a7d37355e82bf793fc812dcb8f711d6c3ea463d384ce7fc118ed9d1af4e39cf7fc85043f088d11b826a27bb0e30e43
6
+ metadata.gz: 0ddc9590d16dc210f52d07b4959abaf2a8000449354fbdfbb02bff010ae5fa4c557902bc4b73dd95774215256c305106d9487fd87afb7055d550463933024c30
7
+ data.tar.gz: 1a2b1a5a73f069d71cf75f265a96f7f0c763d269bab41c3dbe04975ca2224e137ed2845be7da9837185d2c0e05e2b71c5bcdc61b77d34059d483317cd0547f26
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- advance (0.3.4)
4
+ advance (0.3.7)
5
5
  team_effort
6
6
 
7
7
  GEM
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require "csv"
3
- require_relative "../lib/path_for_new_file"
3
+ require_relative "../lib/file_path_generator"
4
4
 
5
5
  def columns_changed?(previous_row, row, change_columns)
6
6
  changed = false
data/lib/advance.rb CHANGED
@@ -30,6 +30,8 @@ module Advance
30
30
  end
31
31
  last_run_number = meta["last_run_number"] ||= -1
32
32
  $run_number = last_run_number + 1
33
+ $cores=`sysctl -n hw.ncpu`.to_i
34
+ puts "Multi steps will use #{$cores} cores"
33
35
  end
34
36
 
35
37
  def update_meta(step_number, processing_mode, label, command, start_time, duration, file_count)
@@ -153,7 +155,6 @@ module Advance
153
155
  input_file_path = previous_file_path(previous_dir_path)
154
156
  basename = File.basename(input_file_path)
155
157
  root_file_name = basename.gsub(%r(\.[^.]+$), '')
156
-
157
158
  command.gsub!("{input_dir}", previous_dir_path)
158
159
  command.gsub!("{input_file}", input_file_path)
159
160
  command.gsub!("{file_name}", basename)
@@ -200,14 +201,14 @@ module Advance
200
201
 
201
202
  def work_in_sub_dir(dir_name)
202
203
  starting_dir = FileUtils.pwd
203
- stripped_dir_name = strip_extensions(dir_name)
204
+ stripped_dir_name = File.join(*(strip_extensions(dir_name).split("/").uniq))
204
205
  if $redo_mode == :checking && Dir.exist?(stripped_dir_name)
205
206
  return
206
207
  end
207
208
 
208
209
  $redo_mode = :replacing
209
210
 
210
- dirs = File.split(stripped_dir_name)
211
+ dirs = stripped_dir_name.split("/")
211
212
  dirs[-1] = "tmp_#{dirs[-1]}"
212
213
  tmp_dir = File.join(dirs)
213
214
  FileUtils.rm_rf tmp_dir
@@ -1,3 +1,3 @@
1
1
  module Advance
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.7"
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.4
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - janemacfarlane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-03 00:00:00.000000000 Z
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: team_effort
@@ -104,7 +104,7 @@ files:
104
104
  - bin/split_csv.rb
105
105
  - lib/advance.rb
106
106
  - lib/advance/version.rb
107
- - lib/path_for_new_file.rb
107
+ - lib/file_path_generator.rb
108
108
  homepage: https://github.com/doctorjane/advance
109
109
  licenses:
110
110
  - MIT