https://github.com/terrierscript/hubocator
call hubot only javascript
https://github.com/terrierscript/hubocator
Last synced: 10 months ago
JSON representation
call hubot only javascript
- Host: GitHub
- URL: https://github.com/terrierscript/hubocator
- Owner: terrierscript
- Created: 2013-02-10T23:57:59.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-07T11:39:14.000Z (almost 13 years ago)
- Last Synced: 2025-02-15T04:39:12.746Z (12 months ago)
- Language: JavaScript
- Size: 180 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hubocator
Execute hubot wrapper.
Only javascript (without shell export) and support restarting hubot.
## Installation
```
npm install coffee-script
npm install hubot
npm install hubocator
```
This module process executing wrapper and haven't hubot and coffee-script.
Please install these module.
### scripts
Copy [scripts/hubocator_reset.coffee](https://github.com/suisho/hubocator/blob/master/scripts/hubocator_restart.coffee) to your hubot scripts directory
This script add function restart hubot through hubocator
## Demo
Demo is [here](https://github.com/suisho/hubocator-demo)
```sh
git clone git://github.com/suisho/hubocator-demo.git
cd hubocator-demo
npm install
node example.js
```
- Restarting example
```sh
hubocator_hubot> hubot restart
```
- Confirm example
```sh
hubocator_hubot> hubot show hubocator
```
## usage
```javascript
var hubocator = require("hubocator");
hubocator(); // called hubot
```
#### environment
This value set on process.env
```javascript
var hubocator = require("hubocator");
var env = {
"HUBOT_ENVIRONMENT" : "FOO"
}
hubocator(env);
```
#### args
This value is hubot arguments.
```javascript
var hubocator = require("hubocator");
var env = {
"HUBOT_ENVIRONMENT" : "FOO"
}
var args = [
"-a", "irc"
]
hubocator(env,args);
//or
hubocator(args);
```
`args` can as object if you need
```javascript
var hubocator = require("hubocator");
var env = {
"HUBOT_ENVIRONMENT" : "FOO"
}
var args = {
"-a": "irc"
}
hubocator(env,args);
```
#### options
- coffeePath
- coffee script execute path
- hubotPath
- hubot execute path