1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Shift the paths aronud some more

This commit is contained in:
Sam Stephenson 2011-02-07 12:27:00 -06:00
parent cdb4db4780
commit 910ba90fb7
5 changed files with 11 additions and 11 deletions

View file

@ -13,10 +13,10 @@ Gem::Specification.new do |s|
"lib/execjs.rb", "lib/execjs.rb",
"lib/execjs/external_runtime.rb", "lib/execjs/external_runtime.rb",
"lib/execjs/rhino_runtime.rb", "lib/execjs/rhino_runtime.rb",
"lib/execjs/runners",
"lib/execjs/runners/basic.js",
"lib/execjs/runners/node.js",
"lib/execjs/runtimes.rb", "lib/execjs/runtimes.rb",
"lib/execjs/support",
"lib/execjs/support/basic_runner.js",
"lib/execjs/support/node_runner.js",
"lib/execjs/v8_runtime.rb" "lib/execjs/v8_runtime.rb"
] ]

View file

@ -19,4 +19,8 @@ module ExecJS
def self.runtime def self.runtime
@runtime ||= Runtimes.best_available @runtime ||= Runtimes.best_available
end end
def self.root
@root ||= File.expand_path("../execjs", __FILE__)
end
end end

View file

@ -14,10 +14,6 @@ module ExecJS
const_set(name, runtime) const_set(name, runtime)
end end
def self.runner_path(path)
File.expand_path("../runners/#{path}", __FILE__)
end
define_runtime :V8, define_runtime :V8,
:as => V8Runtime :as => V8Runtime
@ -28,18 +24,18 @@ module ExecJS
:command => "v8", :command => "v8",
:test_args => "--help", :test_args => "--help",
:test_match => /--crankshaft/, :test_match => /--crankshaft/,
:runner_path => runner_path("basic.js") :runner_path => ExecJS.root + "/support/basic_runner.js"
define_runtime :Node, define_runtime :Node,
:command => ["nodejs", "node"], :command => ["nodejs", "node"],
:runner_path => runner_path("node.js") :runner_path => ExecJS.root + "/support/node_runner.js"
define_runtime :JSC, define_runtime :JSC,
:command => "/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc", :command => "/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc",
:runner_path => runner_path("basic.js") :runner_path => ExecJS.root + "/support/basic_runner.js"
define_runtime :Spidermonkey, define_runtime :Spidermonkey,
:command => "js", :command => "js",
:runner_path => runner_path("basic.js") :runner_path => ExecJS.root + "/support/basic_runner.js"
end end
end end