nodo 1.8.0 → 1.8.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 +17 -1
- data/lib/nodo/core.rb +1 -1
- data/lib/nodo/version.rb +1 -1
- data/lib/nodo.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50f955c1543aab886f5da57ffa11eafcd600d69faa7b783bd947f88982407982
|
4
|
+
data.tar.gz: 2600178935813941c441f72c931cfbd83873bd927d12a1c87128db4ee1f827b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7532dcb62426fe8a8718134256aae2b32c551421c78f45b47a0ab2b57a614cba9999bd6232eeaf0817fbed27b5a25dac8237646bd265b80d577c53ee5521282
|
7
|
+
data.tar.gz: c1d108e0e17b17427dcd4420d34bd8174dbc32e8fd69b3500ab22b1131beaa6de960d88378723a50f3e8d20a3f7099d593a1a5573791e0a9b7e436af2b042be5
|
data/README.md
CHANGED
@@ -28,7 +28,8 @@ gem 'nodo'
|
|
28
28
|
|
29
29
|
Nodo requires a working installation of Node.js.
|
30
30
|
|
31
|
-
If the executable is located in your `PATH`, no configuration is required.
|
31
|
+
If the executable is located in your `PATH`, no configuration is required.
|
32
|
+
Otherwise, the path to the binary can be set using:
|
32
33
|
|
33
34
|
```ruby
|
34
35
|
Nodo.binary = '/usr/local/bin/node'
|
@@ -381,3 +382,18 @@ option:
|
|
381
382
|
```ruby
|
382
383
|
WebMock.disable_net_connect!(allow_localhost: true)
|
383
384
|
```
|
385
|
+
|
386
|
+
## Node process options
|
387
|
+
|
388
|
+
Extra commandline arguments to the `node` binary can be supplied in standard
|
389
|
+
[`Process::spawn` array form](https://docs.ruby-lang.org/en/master/Process.html#method-c-spawn):
|
390
|
+
|
391
|
+
```ruby
|
392
|
+
Nodo.args = %w[--enable-source-maps]
|
393
|
+
```
|
394
|
+
|
395
|
+
Environment variables to be supplied to the `node` process can be set using:
|
396
|
+
|
397
|
+
```ruby
|
398
|
+
Nodo.env = { 'NAME' => 'value' }
|
399
|
+
```
|
data/lib/nodo/core.rb
CHANGED
@@ -211,7 +211,7 @@ module Nodo
|
|
211
211
|
@@tmpdir = Pathname.new(Dir.mktmpdir('nodo'))
|
212
212
|
env = Nodo.env.merge('NODE_PATH' => Nodo.modules_root.to_s)
|
213
213
|
env['NODO_DEBUG'] = '1' if Nodo.debug
|
214
|
-
@@node_pid = Process.spawn(env, Nodo.binary, '-e', self.class.generate_core_code, '--', socket_path.to_s, err: :out)
|
214
|
+
@@node_pid = Process.spawn(env, Nodo.binary, '-e', self.class.generate_core_code, *Nodo.args, '--', socket_path.to_s, err: :out)
|
215
215
|
at_exit do
|
216
216
|
@@exiting = true
|
217
217
|
Process.kill(:SIGTERM, node_pid) rescue Errno::ECHILD
|
data/lib/nodo/version.rb
CHANGED
data/lib/nodo.rb
CHANGED
@@ -9,11 +9,12 @@ require 'forwardable'
|
|
9
9
|
|
10
10
|
module Nodo
|
11
11
|
class << self
|
12
|
-
attr_accessor :modules_root, :env, :binary, :logger, :debug, :timeout
|
12
|
+
attr_accessor :modules_root, :env, :binary, :args, :logger, :debug, :timeout
|
13
13
|
end
|
14
14
|
self.modules_root = './node_modules'
|
15
15
|
self.env = {}
|
16
16
|
self.binary = 'node'
|
17
|
+
self.args = nil
|
17
18
|
self.logger = Logger.new(STDOUT)
|
18
19
|
self.debug = false
|
19
20
|
self.timeout = 60
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nodo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Grosser
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-08-25 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: logger
|