Skip to content

Commit

Permalink
Pretty much everything
Browse files Browse the repository at this point in the history
  • Loading branch information
coryallegory committed Jan 23, 2015
1 parent 54d783d commit 2d2ba77
Show file tree
Hide file tree
Showing 7 changed files with 1,244 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
fs = require 'fs'
path = require 'path'

module.exports = (robot, scripts) ->
scriptsPath = path.resolve(__dirname, 'src')
fs.exists scriptsPath, (exists) ->
if exists
for script in fs.readdirSync(scriptsPath)
if scripts? and '*' not in scripts
robot.loadFile(scriptsPath, script) if script in scripts
else
robot.loadFile(scriptsPath, script)
31 changes: 31 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "hubot-cah",
"description": "Hubot-managed Cards Against Humanity.",
"version": "0.0.1",
"author": "Cory Metcalfe <[email protected]>",
"license": "MIT",
"keywords": [
"hubot",
"hubot-scripts"
],
"repository": {
"type": "git",
"url": "git://github.com/coryallegory/hubot-cah"
},
"bugs": {
"url": "https://github.com/coryallegory/hubot-cah/issues"
},
"dependencies": {
"coffee-script": "~1.6"
},
"devDependencies": {
"mocha": "*",
"chai": "*",
"sinon-chai": "*",
"sinon": "*"
},
"main": "index.coffee",
"scripts": {
"test": "script/test"
}
}
18 changes: 18 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Make sure everything is development forever
export NODE_ENV=development

# Load environment specific environment variables
if [ -f .env ]; then
source .env
fi

if [ -f .env.${NODE_ENV} ]; then
source .env.${NODE_ENV}
fi

npm install

# Make sure coffee and mocha are on the path
export PATH="node_modules/.bin:$PATH"
6 changes: 6 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# bootstrap environment
source script/bootstrap

mocha --compilers coffee:coffee-script
Loading

0 comments on commit 2d2ba77

Please sign in to comment.