https://github.com/jsdf/ruby_node_task
Run node.js scripts from Ruby with a persistent worker
https://github.com/jsdf/ruby_node_task
Last synced: about 2 months ago
JSON representation
Run node.js scripts from Ruby with a persistent worker
- Host: GitHub
- URL: https://github.com/jsdf/ruby_node_task
- Owner: jsdf
- License: mit
- Created: 2015-06-01T12:55:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-11T00:53:50.000Z (over 9 years ago)
- Last Synced: 2025-03-06T06:40:55.937Z (about 2 months ago)
- Language: Ruby
- Size: 138 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ruby_node_task
Run node.js scripts from Ruby with a persistent worker```js
// a node.js module
var count = 0;
module.exports = function(opts, done) {
count++;
done(null, {count: count});
}
``````ruby
require 'node_task'# run a task
t = NodeTask.new './lib/node_task/example/count'
result = t.run
expect(result[:count]).to be(1)# again
result = t.run
expect(result[:count]).to be(2)
```