execjs 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/execjs/external_runtime.rb +2 -2
- data/lib/execjs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cff0ab13dcd1bc38d12b1ca38d99773ba123ad75573c8b8f4789232677df308
|
4
|
+
data.tar.gz: a84d80b533fa677491bdb26d28bfedd44443deb5ff772d9eeb7db7e9e0d0ab36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbac63f192c113786e7df0bce663a0e40a241b54534e01f18047d356d7ccb1514e4aeb8a610a336f85271def9b5956404091caccf6f0c984a20a723f67a364ce
|
7
|
+
data.tar.gz: 2f6dfe9ff9154500ea26a0c94a829eacb8b63ac84744791eff8f0b8643182f30118b1f1ed42f08486a4cc05c4e61c0cb8d800df53dcbccdbba5dadb786027b7a
|
data/README.md
CHANGED
@@ -39,6 +39,22 @@ context.call("CoffeeScript.compile", "square = (x) -> x * x", bare: true)
|
|
39
39
|
# => "var square;\nsquare = function(x) {\n return x * x;\n};"
|
40
40
|
```
|
41
41
|
|
42
|
+
# Forcing a specific runtime
|
43
|
+
|
44
|
+
If you'd like to use a specific runtime rather than the autodected one, you can assign `ExecJS.runtime`:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
ExecJS.runtime = ExecJS::Runtimes::Node
|
48
|
+
```
|
49
|
+
|
50
|
+
Alternatively, you can define it via the `EXECJS_RUNTIME` environment variable:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
EXECJS_RUNTIME=Node ruby ...
|
54
|
+
```
|
55
|
+
|
56
|
+
You can find the list of possible runtimes in [`lib/execjs/runtimes.rb`](https://github.com/rails/execjs/blob/master/lib/execjs/runtimes.rb).
|
57
|
+
|
42
58
|
# Installation
|
43
59
|
|
44
60
|
```
|
@@ -194,7 +194,7 @@ module ExecJS
|
|
194
194
|
require 'shellwords'
|
195
195
|
|
196
196
|
def exec_runtime(filename)
|
197
|
-
command = "#{Shellwords.join(binary.split(' ') << filename)}
|
197
|
+
command = "#{Shellwords.join(binary.split(' ') << filename)}"
|
198
198
|
io = IO.popen(command, **@popen_options)
|
199
199
|
output = io.read
|
200
200
|
io.close
|
@@ -207,7 +207,7 @@ module ExecJS
|
|
207
207
|
end
|
208
208
|
else
|
209
209
|
def exec_runtime(filename)
|
210
|
-
io = IO.popen(binary.split(' ') << filename,
|
210
|
+
io = IO.popen(binary.split(' ') << filename, **@popen_options)
|
211
211
|
output = io.read
|
212
212
|
io.close
|
213
213
|
|
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.9.
|
4
|
+
version: 2.9.1
|
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: 2023-09-
|
12
|
+
date: 2023-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.5.0
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - ">="
|