canzea 0.1.155 → 0.1.156
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/canzea/version.rb +1 -1
- data/lib/helper-run-class.rb +10 -6
- 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: c169d1616a109996c39ad8ec2c10b93a132a8e78
|
4
|
+
data.tar.gz: 237dec1aa027803c1a669bafb28eeda824c03acb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d0e0dcbf88d670c555eb6b547aef1e6e3ff0ff31709655fc871ecfa80c25a37a9c68ba0d7452be57392ed6c8569290f0d275db5ccc02dd9f6a7dc9338a8e776
|
7
|
+
data.tar.gz: cb159fd86ac0254146b4b3430c838a5ec49f399ee1144e469b3cde2c7c17d405811c53c98900af2d0152e20d200ea89a7ae8a2ea979647a8cd26f153126cccbf
|
data/lib/canzea/version.rb
CHANGED
data/lib/helper-run-class.rb
CHANGED
@@ -38,15 +38,19 @@ class HelperRun
|
|
38
38
|
envPush = PrepareEnvironment.new @raw
|
39
39
|
|
40
40
|
begin
|
41
|
-
|
41
|
+
root = "#{@basePath}/helpers/#{solution}"
|
42
|
+
if File.exist?("#{@basePath}/blocks/#{solution}/#{action}")
|
43
|
+
root = "#{@basePath}/blocks/#{solution}/#{action}"
|
44
|
+
end
|
45
|
+
envScript = "#{root}/environment.json"
|
42
46
|
if File.exist?(envScript)
|
43
47
|
@log.info("Adding environment variables...")
|
44
48
|
envPush.addToEnv "#{envScript}"
|
45
49
|
end
|
46
50
|
|
47
|
-
if File.exist?("#{
|
51
|
+
if File.exist?("#{root}/#{action}.sh")
|
48
52
|
type = "shell"
|
49
|
-
elsif File.exist?("#{
|
53
|
+
elsif File.exist?("#{root}/#{action}.py")
|
50
54
|
type = "python"
|
51
55
|
end
|
52
56
|
|
@@ -60,9 +64,9 @@ class HelperRun
|
|
60
64
|
parameters = Template.new.processString(parameters, {})
|
61
65
|
|
62
66
|
if (type == "ruby")
|
63
|
-
cmd = "ruby #{
|
67
|
+
cmd = "ruby #{root}/#{action}.rb '#{parameters}'"
|
64
68
|
elsif (type == "python")
|
65
|
-
cmd = "python #{
|
69
|
+
cmd = "python #{root}/#{action}.py '#{parameters}'"
|
66
70
|
else
|
67
71
|
argList = []
|
68
72
|
args = JSON.parse(parameters)
|
@@ -71,7 +75,7 @@ class HelperRun
|
|
71
75
|
argList.push('"' + k[1] + '"')
|
72
76
|
end
|
73
77
|
|
74
|
-
cmd = "#{
|
78
|
+
cmd = "#{root}/#{action}.sh #{argList.join(' ')}"
|
75
79
|
end
|
76
80
|
r.run cmd, 1, 1, status
|
77
81
|
|