execjs 2.9.0 → 2.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62270ddc7b87cd04ea4c4c652a0a58a22b067051a07e31c2f48b05246566bfbc
4
- data.tar.gz: b5ba2f65f36600db563faeb4e526e67f01927879d239e16e96e4861fa83121da
3
+ metadata.gz: 2cff0ab13dcd1bc38d12b1ca38d99773ba123ad75573c8b8f4789232677df308
4
+ data.tar.gz: a84d80b533fa677491bdb26d28bfedd44443deb5ff772d9eeb7db7e9e0d0ab36
5
5
  SHA512:
6
- metadata.gz: 79e1992e371a9e182eed6aaa4b0efef15db4909f44cd981a701c83f954a9e0b7a59fb1459e5a9b332d2cd3f0f8aa3f9273789badfefe89fe5f3bcfc918d02c50
7
- data.tar.gz: aec6e50425979484e5913f5c64c3acb1417a1ac2c72659f01defec23704bee3a0be558800fd486df1bb8eb575b0daa7b86cd15bcbfd04c1242b400fe37f70667
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)} 2>&1"
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, **(@popen_options.merge({err: [:child, :out]})))
210
+ io = IO.popen(binary.split(' ') << filename, **@popen_options)
211
211
  output = io.read
212
212
  io.close
213
213
 
@@ -1,3 +1,3 @@
1
1
  module ExecJS
2
- VERSION = "2.9.0"
2
+ VERSION = "2.9.1"
3
3
  end
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.0
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-11 00:00:00.000000000 Z
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: 1.9.3
68
+ version: 2.5.0
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - ">="