turbot-runner 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/turbot_runner/runner.rb +12 -1
- data/lib/turbot_runner/version.rb +1 -1
- metadata +2 -2
data/lib/turbot_runner/runner.rb
CHANGED
@@ -33,6 +33,17 @@ module TurbotRunner
|
|
33
33
|
end
|
34
34
|
|
35
35
|
private
|
36
|
+
def full_interpreter_path
|
37
|
+
if language == "ruby"
|
38
|
+
# Ensure we use the same ruby as the current interpreter when
|
39
|
+
# creating a subshell. Necessary for OSX packaged version.
|
40
|
+
RbConfig.ruby
|
41
|
+
else
|
42
|
+
# Assume the first python in PATH
|
43
|
+
language
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
36
47
|
def load_config(directory)
|
37
48
|
manifest_path = File.join(directory, 'manifest.json')
|
38
49
|
raise "Could not find #{manifest_path}" unless File.exist?(manifest_path)
|
@@ -77,7 +88,7 @@ module TurbotRunner
|
|
77
88
|
def build_command(script, input_file=nil)
|
78
89
|
raise "Could not run #{script} with #{language}" unless script_extension == File.extname(script)
|
79
90
|
path_to_script = File.join(@directory, script)
|
80
|
-
command = "#{
|
91
|
+
command = "#{full_interpreter_path} #{additional_args} #{path_to_script} >#{output_file(script)}"
|
81
92
|
command << " 2>#{output_file(script, '.err')}" if @log_to_file
|
82
93
|
command << " <#{input_file}" unless input_file.nil?
|
83
94
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbot-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json-schema
|