script-runner 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/script-runner/main.rb +7 -2
- data/lib/script-runner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4ccdd0bfb2424e55fe11f826fda04d61d38db04
|
4
|
+
data.tar.gz: 1f030b5880415acaefb2a22f8fc6d6354478d342
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8e3e16899803cd30a2abcf7e874aa1a7cf0ea6a0e28261669ba887fe14d9185923b84c395f64a0c070740bcc3674502a1a1572e82f82bcbd9940a2089371e0e
|
7
|
+
data.tar.gz: 5e4a3458687747e5e94c435f6d4fde640e21cd8d9730f146fcb0c313ebc86aca52f88e51f1af73c2bf29959b613a1f94a7ad182079dd2f89b6e21fa012e5936d
|
data/README.md
CHANGED
data/lib/script-runner/main.rb
CHANGED
@@ -19,13 +19,18 @@ module ScriptRunner
|
|
19
19
|
# @block - a block to handle the output of the script if non is given it is sent to the console
|
20
20
|
def run( paths, env_vars, error_handler = nil, &block)
|
21
21
|
|
22
|
-
set_env(env_vars)
|
23
22
|
all_paths = all_files(paths).select{ |p| File.file? p }
|
23
|
+
|
24
24
|
@logger.debug all_paths
|
25
|
+
|
25
26
|
runnable = all_paths.select{ |p| File.executable? p }
|
27
|
+
|
28
|
+
set_env(env_vars) if runnable.length > 0
|
29
|
+
|
26
30
|
non_runnable = all_paths - runnable
|
27
|
-
|
31
|
+
|
28
32
|
@logger.debug "runnable: #{runnable}"
|
33
|
+
|
29
34
|
non_runnable.each{ |nr|
|
30
35
|
@logger.warn "#{nr} is not runnable - skipping"
|
31
36
|
}
|