advance 0.1.7 → 0.1.8
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/README.md +0 -9
- data/lib/advance/version.rb +1 -1
- data/lib/advance.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7b1b12dbeb531d66a40b83bfffeaa3397575901
|
4
|
+
data.tar.gz: ea187e16e67de40ecdb17568e13a31e4da72b281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6af8adf8ea0c2ffae6c73d0ad1e36761f1877ea1916a7dff7b994d2ae8b5ec6eac4f4f5c04ed66a56658a71a74643375e232f93465011d134dd92f2f2416ea8
|
7
|
+
data.tar.gz: 4ce3b33cc80446665a4e823d5feca4a2b3f8f6e20038da63d945f9bc41b124141517467517f2bf0d9f5260e96c6d53879edc42350a78a129b3a86317a7e5a88f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -139,15 +139,6 @@ When running your pipeline, it is helpful to have a directory with the single, i
|
|
139
139
|
1. Move to your data directory with your single initial file.
|
140
140
|
2. invoke your script from there.
|
141
141
|
|
142
|
-
## Questions / Answers
|
143
|
-
|
144
|
-
* Q: **My script fails with `undefined local variable or method 'label' for main:Object`**
|
145
|
-
|
146
|
-
A: This indicates a ruby script is running that does not have access to a ruby gem.
|
147
|
-
First, make sure your script is using the expected ruby by adding to the beginning of your
|
148
|
-
script `puts RUBY_VERSION`. Make sure the gem is installed by listing installed gems with
|
149
|
-
`$ gem list`. Finally, check that the script requires the library with `require 'my-library'`
|
150
|
-
|
151
142
|
## Contributing
|
152
143
|
|
153
144
|
We ♥️ contributions!
|
data/lib/advance/version.rb
CHANGED
data/lib/advance.rb
CHANGED
@@ -107,7 +107,14 @@ module Advance
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def work_in_sub_dir(dir_name, existing_message = nil)
|
110
|
-
|
110
|
+
if $redo_mode == :checking && Dir.exist?(dir_name)
|
111
|
+
return :checking
|
112
|
+
end
|
113
|
+
|
114
|
+
if Dir.exist? dir_name
|
115
|
+
puts "reprocessing #{dir_name}"
|
116
|
+
FileUtils.rm_rf dir_name
|
117
|
+
end
|
111
118
|
|
112
119
|
tmp_dir_name = "tmp_#{dir_name}"
|
113
120
|
FileUtils.rm_rf tmp_dir_name
|
@@ -118,6 +125,7 @@ module Advance
|
|
118
125
|
|
119
126
|
FileUtils.cd ".."
|
120
127
|
FileUtils.mv tmp_dir_name, dir_name
|
128
|
+
:replacing
|
121
129
|
end
|
122
130
|
|
123
131
|
def step_dir_prefix(step_no)
|
@@ -125,13 +133,14 @@ module Advance
|
|
125
133
|
end
|
126
134
|
|
127
135
|
def step(label)
|
136
|
+
$redo_mode ||= :checking
|
128
137
|
$step ||= 0
|
129
138
|
$step += 1
|
130
139
|
dir_name = "#{step_dir_prefix($step)}_#{label}"
|
131
140
|
$previous_dir = File.join(FileUtils.pwd, dir_name)
|
132
141
|
puts "#{CYAN}step #{$step} #{label}#{WHITE}... #{RESET}"
|
133
142
|
|
134
|
-
work_in_sub_dir(dir_name, "#{GREEN}OK#{RESET}") do
|
143
|
+
$redo_mode = work_in_sub_dir(dir_name, "#{GREEN}OK#{RESET}") do
|
135
144
|
yield
|
136
145
|
end
|
137
146
|
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.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- janemacfarlane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: team_effort
|