Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dedeibel committed Feb 10, 2014
2 parents 7c91c3a + 068ec13 commit bd21a44
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 52 deletions.
4 changes: 2 additions & 2 deletions src/scripts/beeradvocate.coffee
Expand Up @@ -11,13 +11,13 @@
# None
#
# Commands:
# hubot beer me - returns the latest beer discussed on beer advocate with picture
# hubot beer advocate me - returns the latest beer discussed on beer advocate with picture
#
# Author:
# whyjustin

module.exports = (robot) ->
robot.respond /beer (a|advocate)?( me)?/i, (msg) ->
robot.respond /beer (a|advocate)( me)?/i, (msg) ->
msg.http("http://beeradvocate.com/beer/")
.get() (err, res, body) ->
if (res.statusCode == 200)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/beerme.coffee
Expand Up @@ -8,7 +8,7 @@
# None
#
# Commands:
# beer me - Grab me a beer
# hubot beer me - Grab me a beer
#
# Author:
# houndbee
Expand Down
14 changes: 6 additions & 8 deletions src/scripts/bitly.coffee
Expand Up @@ -5,8 +5,7 @@
# None
#
# Configuration:
# HUBOT_BITLY_USERNAME
# HUBOT_BITLY_API_KEY
# HUBOT_BITLY_ACCESS_TOKEN
#
# Commands:
# hubot (bitly|shorten) (me) <url> - Shorten the URL using bit.ly
Expand All @@ -15,14 +14,14 @@
# Author:
# sleekslush
# drdamour
# johnwyles

module.exports = (robot) ->
robot.respond /(bitly|shorten)\s?(me)?\s?(.+)$/i, (msg) ->
msg
.http("http://api.bitly.com/v3/shorten")
.http("https://api-ssl.bitly.com/v3/shorten")
.query
login: process.env.HUBOT_BITLY_USERNAME
apiKey: process.env.HUBOT_BITLY_API_KEY
access_token: process.env.HUBOT_BITLY_ACCESS_TOKEN
longUrl: msg.match[3]
format: "json"
.get() (err, res, body) ->
Expand All @@ -32,10 +31,9 @@ module.exports = (robot) ->
#TODO: can we make this list more expansive/dynamically generated?
robot.hear /(https?:\/\/(bit\.ly|yhoo\.it|j\.mp|pep\.si|amzn\.to)\/[0-9a-z\-]+)/ig, (msg) ->
msg
.http("http://api.bitly.com/v3/expand")
.http("https://api-ssl.bitly.com/v3/expand")
.query
login: process.env.HUBOT_BITLY_USERNAME
apiKey: process.env.HUBOT_BITLY_API_KEY
access_token: process.env.HUBOT_BITLY_ACCESS_TOKEN
shortUrl: msg.match
.get() (err, res, body) ->
parsedBody = JSON.parse body
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/celery-man.coffee
Expand Up @@ -44,8 +44,8 @@ module.exports = (robot) ->
robot.hear /yes/i, (msg) ->
if tayne and moretayne
moretayne = false
msg.send "http://imgur.com/h27BPKW"
msg.send "http://i.imgur.com/h27BPKW.png"
robot.hear /tayne/gi, (msg) ->
if tayne and not moretayne
tayne = false
msg.send "http://imgur.com/TrdLwoz"
msg.send "http://i.imgur.com/TrdLwoz.gif"
4 changes: 2 additions & 2 deletions src/scripts/darksky.coffee
Expand Up @@ -52,6 +52,6 @@ darkSkyMe = (msg, lat, lng, cb) ->
return

response = "Currently: #{result.currently.summary} (#{result.currently.temperature}°)"
response += "\nNext hour: #{result.hourly.summary}"
response += "\nToday: #{result.daily.summary}"
response += "\nToday: #{result.hourly.summary}"
response += "\nComing week: #{result.daily.summary}"
cb response
2 changes: 1 addition & 1 deletion src/scripts/flip.coffee
Expand Up @@ -44,7 +44,7 @@ module.exports = (robot) ->
else if toUnflip == ''
unflipped = '┬──┬'
else
unflipped = flip(toUnflip)
unflipped = toUnflip

msg.send "#{unflipped} ノ( º _ ºノ)"

2 changes: 1 addition & 1 deletion src/scripts/fml.coffee
Expand Up @@ -8,7 +8,7 @@
# None
#
# Commands:
# fml - A random message from fmylife.com
# hubot fml - A random message from fmylife.com
#
# Author:
# artfuldodger
Expand Down
34 changes: 0 additions & 34 deletions src/scripts/imdb.coffee

This file was deleted.

2 changes: 1 addition & 1 deletion src/scripts/wunderlist.coffee
Expand Up @@ -7,7 +7,7 @@
# Configuration:
# HUBOT_WUNDERLIST_SMTP_HOST - your smtp host e.g. smtp.gmail.com
# HUBOT_WUNDERLIST_SMTP_PORT - the port to connect to
# HUBOT_WUNDERLIST_SMTP_USESSL - wether you want to connect via SSL
# HUBOT_WUNDERLIST_SMTP_USESSL - whether you want to connect via SSL
# HUBOT_WUNDERLIST_SMTP_SENDDOMAIN - the domain from which to send
# HUBOT_WUNDERLIST_SMTP_USEAUTH - BOOL: authentication required
# HUBOT_WUNDERLIST_SMTP_AUTH_NAME - username for authentication
Expand Down

0 comments on commit bd21a44

Please sign in to comment.