Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

upgrade hubot to 2.1.4.1

  • Loading branch information...
commit 7bd01cee428a6777b7aa2b4b30b50c8c4c46be73 1 parent 79c6e94
@stuartf stuartf authored
View
2  Procfile
@@ -1 +1 @@
-app: bin/hubot -a irc -n sakai-bot
+web: bin/hubot -a irc -n sakai-bot
View
2  README.md
@@ -128,7 +128,7 @@ If you would like to deploy to either a UNIX operating system or Windows.
Please check out the [deploying hubot onto UNIX][deploy-unix] and
[deploying hubot onto Windows][deploy-windows] wiki pages.
-[heroku-node-docs]: http://devcenter.heroku/com/articles/node-js
+[heroku-node-docs]: http://devcenter.heroku.com/articles/node-js
[deploy-heroku]: https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Heroku
[deploy-unix]: https://github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX
[deploy-windows]: https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows
View
0  bin/hubot 100755 → 100644
File mode changed
View
6 package.json
@@ -1,6 +1,6 @@
{
"name": "hosted-hubot",
- "version": "0.2.0",
+ "version": "2.1.4",
"author": "GitHub Inc.",
"keywords": "github hubot campfire bot",
"description": "A simple helpful Robot for your Company",
@@ -15,8 +15,8 @@
},
"dependencies": {
- "hubot-irc": ">= 0.0.1",
- "hubot": "2.1.3",
+ "hubot-irc": ">= 0.0.8",
+ "hubot": "2.1.4",
"hubot-scripts": ">=2.0.4",
"optparse": "1.0.3"
}
View
2  scripts/google-images.coffee
@@ -29,7 +29,7 @@ module.exports = (robot) ->
imageMe = (msg, query, cb) ->
msg.http('http://ajax.googleapis.com/ajax/services/search/images')
- .query(v: "1.0", rsz: '8', q: query)
+ .query(v: "1.0", rsz: '8', q: query, safe: 'active')
.get() (err, res, body) ->
images = JSON.parse(body)
images = images.responseData.results
View
6 scripts/help.coffee
@@ -10,5 +10,7 @@ module.exports = (robot) ->
cmds = robot.helpCommands()
if msg.match[1]
cmds = cmds.filter (cmd) -> cmd.match(new RegExp(msg.match[1]))
- msg.send cmds.join("\n")
-
+ emit = cmds.join("\n")
+ unless robot.name is 'Hubot'
+ emit = emit.replace(/(H|h)ubot/g, robot.name)
+ msg.send emit
View
4 scripts/httpd.coffee
@@ -2,12 +2,16 @@
spawn = require('child_process').spawn
module.exports = (robot) ->
+
robot.router.get "/hubot/version", (req, res) ->
res.end robot.version
+
robot.router.post "/hubot/ping", (req, res) ->
res.end "PONG"
+
robot.router.get "/hubot/time", (req, res) ->
res.end "Server time is: #{new Date()}"
+
robot.router.get "/hubot/info", (req, res) ->
child = spawn('/bin/sh', ['-c', "echo I\\'m $LOGNAME@$(hostname):$(pwd) \\($(git rev-parse HEAD)\\)"])
View
8 scripts/roles.coffee
@@ -35,10 +35,10 @@ module.exports = (robot) ->
msg.send "#{name}? Never heard of 'em"
robot.respond /@?([\w .-_]+) is (["'\w: -_]+)[.!]*$/i, (msg) ->
- name = msg.match[1]
+ name = msg.match[1].trim()
newRole = msg.match[2].trim()
- unless name in ['who', 'what', 'where', 'when', 'why']
+ unless name in ['', 'who', 'what', 'where', 'when', 'why']
unless newRole.match(/^not\s+/i)
users = robot.usersForFuzzyName(name)
if users.length is 1
@@ -59,10 +59,10 @@ module.exports = (robot) ->
msg.send "I don't know anything about #{name}."
robot.respond /@?([\w .-_]+) is not (["'\w: -_]+)[.!]*$/i, (msg) ->
- name = msg.match[1]
+ name = msg.match[1].trim()
newRole = msg.match[2].trim()
- unless name in ['who', 'what', 'where', 'when', 'why']
+ unless name in ['', 'who', 'what', 'where', 'when', 'why']
users = robot.usersForFuzzyName(name)
if users.length is 1
user = users[0]
Please sign in to comment.
Something went wrong with that request. Please try again.