execjs 2.5.2 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/execjs/external_runtime.rb +17 -12
- data/lib/execjs/runtimes.rb +2 -2
- data/lib/execjs/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcd62eb19c4e6aea5d447da64320e784832ee043
|
4
|
+
data.tar.gz: 687511bf72f60e9bc628beb0ff96b5ee0b69cee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc7750f0aa82f25d94eec847a4316c3a2ede069e26dd9dc312fceae32661ca44ca71e6f84f7db51e3bd0036d4d6b6d30700c115f56f2a92483506664617a929
|
7
|
+
data.tar.gz: 6a8890a15c433afc9f5de23b70852e0947b0bd694b8c195c6f2e573bcd57832b628f97a5e68ecf818a4972e438969e7fec1d0d826e3ae342d3805b0c9a7a750c
|
@@ -120,20 +120,25 @@ module ExecJS
|
|
120
120
|
@binary ||= which(@command)
|
121
121
|
end
|
122
122
|
|
123
|
-
def locate_executable(
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
if File.executable? cmd
|
129
|
-
cmd
|
130
|
-
else
|
131
|
-
path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |p|
|
132
|
-
full_path = File.join(p, cmd)
|
133
|
-
File.executable?(full_path) && File.file?(full_path)
|
123
|
+
def locate_executable(command)
|
124
|
+
commands = Array(command)
|
125
|
+
if ExecJS.windows? && File.extname(command) == ""
|
126
|
+
ENV['PATHEXT'].split(File::PATH_SEPARATOR).each { |p|
|
127
|
+
commands << (command + p)
|
134
128
|
}
|
135
|
-
path && File.expand_path(cmd, path)
|
136
129
|
end
|
130
|
+
|
131
|
+
commands.find { |cmd|
|
132
|
+
if File.executable? cmd
|
133
|
+
cmd
|
134
|
+
else
|
135
|
+
path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |p|
|
136
|
+
full_path = File.join(p, cmd)
|
137
|
+
File.executable?(full_path) && File.file?(full_path)
|
138
|
+
}
|
139
|
+
path && File.expand_path(cmd, path)
|
140
|
+
end
|
141
|
+
}
|
137
142
|
end
|
138
143
|
|
139
144
|
protected
|
data/lib/execjs/runtimes.rb
CHANGED
@@ -57,7 +57,7 @@ module ExecJS
|
|
57
57
|
if name = ENV["EXECJS_RUNTIME"]
|
58
58
|
raise RuntimeUnavailable, "#{name} runtime is not defined" unless const_defined?(name)
|
59
59
|
runtime = const_get(name)
|
60
|
-
|
60
|
+
|
61
61
|
raise RuntimeUnavailable, "#{runtime.name} runtime is not available on this system" unless runtime.available?
|
62
62
|
runtime
|
63
63
|
end
|
@@ -72,8 +72,8 @@ module ExecJS
|
|
72
72
|
RubyRacer,
|
73
73
|
RubyRhino,
|
74
74
|
Duktape,
|
75
|
-
JavaScriptCore,
|
76
75
|
Node,
|
76
|
+
JavaScriptCore,
|
77
77
|
SpiderMonkey,
|
78
78
|
JScript
|
79
79
|
]
|
data/lib/execjs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: execjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stephenson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -71,8 +71,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.4.
|
74
|
+
rubygems_version: 2.4.7
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Run JavaScript code from Ruby
|
78
78
|
test_files: []
|
79
|
+
has_rdoc:
|