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 # None
# #
# Commands: # 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: # Author:
# whyjustin # whyjustin


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


module.exports = (robot) -> module.exports = (robot) ->
robot.respond /(bitly|shorten)\s?(me)?\s?(.+)$/i, (msg) -> robot.respond /(bitly|shorten)\s?(me)?\s?(.+)$/i, (msg) ->
msg msg
.http("http://api.bitly.com/v3/shorten") .http("https://api-ssl.bitly.com/v3/shorten")
.query .query
login: process.env.HUBOT_BITLY_USERNAME access_token: process.env.HUBOT_BITLY_ACCESS_TOKEN
apiKey: process.env.HUBOT_BITLY_API_KEY
longUrl: msg.match[3] longUrl: msg.match[3]
format: "json" format: "json"
.get() (err, res, body) -> .get() (err, res, body) ->
Expand All @@ -32,10 +31,9 @@ module.exports = (robot) ->
#TODO: can we make this list more expansive/dynamically generated? #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) -> robot.hear /(https?:\/\/(bit\.ly|yhoo\.it|j\.mp|pep\.si|amzn\.to)\/[0-9a-z\-]+)/ig, (msg) ->
msg msg
.http("http://api.bitly.com/v3/expand") .http("https://api-ssl.bitly.com/v3/expand")
.query .query
login: process.env.HUBOT_BITLY_USERNAME access_token: process.env.HUBOT_BITLY_ACCESS_TOKEN
apiKey: process.env.HUBOT_BITLY_API_KEY
shortUrl: msg.match shortUrl: msg.match
.get() (err, res, body) -> .get() (err, res, body) ->
parsedBody = JSON.parse 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) -> robot.hear /yes/i, (msg) ->
if tayne and moretayne if tayne and moretayne
moretayne = false moretayne = false
msg.send "http://imgur.com/h27BPKW" msg.send "http://i.imgur.com/h27BPKW.png"
robot.hear /tayne/gi, (msg) -> robot.hear /tayne/gi, (msg) ->
if tayne and not moretayne if tayne and not moretayne
tayne = false 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 return


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


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


2 changes: 1 addition & 1 deletion src/scripts/fml.coffee
Expand Up @@ -8,7 +8,7 @@
# None # None
# #
# Commands: # Commands:
# fml - A random message from fmylife.com # hubot fml - A random message from fmylife.com
# #
# Author: # Author:
# artfuldodger # 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: # Configuration:
# HUBOT_WUNDERLIST_SMTP_HOST - your smtp host e.g. smtp.gmail.com # HUBOT_WUNDERLIST_SMTP_HOST - your smtp host e.g. smtp.gmail.com
# HUBOT_WUNDERLIST_SMTP_PORT - the port to connect to # 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_SENDDOMAIN - the domain from which to send
# HUBOT_WUNDERLIST_SMTP_USEAUTH - BOOL: authentication required # HUBOT_WUNDERLIST_SMTP_USEAUTH - BOOL: authentication required
# HUBOT_WUNDERLIST_SMTP_AUTH_NAME - username for authentication # HUBOT_WUNDERLIST_SMTP_AUTH_NAME - username for authentication
Expand Down

0 comments on commit bd21a44

Please sign in to comment.