Permalink
Browse files

Merge https://github.com/github/hubot-scripts into with-titles

  • Loading branch information...
2 parents 7c91c3a + 068ec13 commit bd21a44464e56d57a1282d031410a9b0c34d65e9 @dedeibel committed Feb 10, 2014
@@ -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)
@@ -8,7 +8,7 @@
# None
#
# Commands:
-# beer me - Grab me a beer
+# hubot beer me - Grab me a beer
#
# Author:
# houndbee
@@ -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
@@ -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) ->
@@ -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
@@ -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"
@@ -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
@@ -44,7 +44,7 @@ module.exports = (robot) ->
else if toUnflip == ''
unflipped = '┬──┬'
else
- unflipped = flip(toUnflip)
+ unflipped = toUnflip
msg.send "#{unflipped} ノ( º _ ºノ)"
@@ -8,7 +8,7 @@
# None
#
# Commands:
-# fml - A random message from fmylife.com
+# hubot fml - A random message from fmylife.com
#
# Author:
# artfuldodger
@@ -1,34 +0,0 @@
-#
-# Description:
-# Get the movie poster and synposis for a given query
-#
-# Dependencies:
-# None
-#
-# Configuration:
-# None
-#
-# Commands:
-# hubot imdb the matrix
-#
-# Author:
-# orderedlist
-
-module.exports = (robot) ->
- robot.respond /(imdb|movie)( me)? (.*)/i, (msg) ->
- query = msg.match[3]
- msg.http("http://mymovieapi.com/")
- .query({
- limit: 1
- type: 'json'
- plot: 'simple'
- q: query
- })
- .get() (err, res, body) ->
- list = JSON.parse(body)
- if movie = list[0]
- msg.send "#{movie.poster.cover}#.png" if movie.poster
- msg.send "#{movie.plot_simple}"
- msg.send "#{movie.imdb_url}"
- else
- msg.send "That's not a movie, yo."
@@ -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

0 comments on commit bd21a44

Please sign in to comment.