node-runner 1.1.0 → 1.2.0
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/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/bin/rake +29 -0
- data/bridgetown.automation.rb +1 -1
- data/lib/node_runner.js +4 -2
- data/lib/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a733bf42b17f92ee1c91bf8a7c4ca2eff92cfbc597616194484eeacff633a3e8
|
|
4
|
+
data.tar.gz: '0839ed6d6df8a18edd76bffb58d91f895037dbd6919320c2385013fbcf1231fd'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92f31ae689bc4f5d8404e4a756a13428ec099f4a8ae0abd9e2cd43a1070192c5a5abbaa5739ee2ef1d8fe137f99cba8f14edb8d55c87bafcaef854ec85c8b43d
|
|
7
|
+
data.tar.gz: 31a2e69aebf9983b44bdf23e66905fbc471d0abd955035c57cc36f4079becfc07b3c77d6ad167ccbe60efc4662783f2939bd207a8c88cd16914f3ae84de2f417
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -12,10 +12,10 @@ Run this command to add this plugin to your project's Gemfile:
|
|
|
12
12
|
$ bundle add node-runner
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
For [Bridgetown](https://www.bridgetownrb.com) websites
|
|
15
|
+
For [Bridgetown](https://www.bridgetownrb.com) websites, you can run an automation to install NodeRunner and set up a builder plugin for further customization.
|
|
16
16
|
|
|
17
17
|
```shell
|
|
18
|
-
|
|
18
|
+
bin/bridgetown apply https://github.com/bridgetownrb/node-runner
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
@@ -91,7 +91,7 @@ Node Runner would be via a background job, or during a build process like when u
|
|
|
91
91
|
|
|
92
92
|
## Testing
|
|
93
93
|
|
|
94
|
-
* Run `
|
|
94
|
+
* Run `bin/rake` to run the test suite.
|
|
95
95
|
|
|
96
96
|
## Contributing
|
|
97
97
|
|
data/bin/rake
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "pathname"
|
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
13
|
+
Pathname.new(__FILE__).realpath)
|
|
14
|
+
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
require "rubygems"
|
|
27
|
+
require "bundler/setup"
|
|
28
|
+
|
|
29
|
+
load Gem.bin_path("rake", "rake")
|
data/bridgetown.automation.rb
CHANGED
data/lib/node_runner.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
const args = #{args}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Promise.resolve(#{func}(...args)).then(result => {
|
|
6
|
+
const output = JSON.stringify(['ok', result, []])
|
|
7
|
+
process.stdout.write(output)
|
|
8
|
+
})
|
|
7
9
|
} catch (err) {
|
|
8
10
|
process.stdout.write(JSON.stringify(['err', '' + err, err.stack]))
|
|
9
11
|
}
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: node-runner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bridgetown Team
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description:
|
|
13
|
+
description:
|
|
14
14
|
email: maintainers@bridgetownrb.com
|
|
15
15
|
executables: []
|
|
16
16
|
extensions: []
|
|
@@ -22,6 +22,7 @@ files:
|
|
|
22
22
|
- LICENSE.txt
|
|
23
23
|
- README.md
|
|
24
24
|
- Rakefile
|
|
25
|
+
- bin/rake
|
|
25
26
|
- bridgetown.automation.rb
|
|
26
27
|
- lib/node-runner.rb
|
|
27
28
|
- lib/node_runner.js
|
|
@@ -31,7 +32,7 @@ homepage: https://github.com/bridgetownrb/node-runner
|
|
|
31
32
|
licenses:
|
|
32
33
|
- MIT
|
|
33
34
|
metadata: {}
|
|
34
|
-
post_install_message:
|
|
35
|
+
post_install_message:
|
|
35
36
|
rdoc_options: []
|
|
36
37
|
require_paths:
|
|
37
38
|
- lib
|
|
@@ -46,8 +47,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
46
47
|
- !ruby/object:Gem::Version
|
|
47
48
|
version: '0'
|
|
48
49
|
requirements: []
|
|
49
|
-
rubygems_version: 3.
|
|
50
|
-
signing_key:
|
|
50
|
+
rubygems_version: 3.5.3
|
|
51
|
+
signing_key:
|
|
51
52
|
specification_version: 4
|
|
52
53
|
summary: A simple way to execute Javascript in a Ruby context via Node
|
|
53
54
|
test_files: []
|