diff --git a/hubot-scripts.json b/hubot-scripts.json deleted file mode 100644 index a8c0628..0000000 --- a/hubot-scripts.json +++ /dev/null @@ -1 +0,0 @@ -["redis-brain.coffee", "shipit.coffee"] diff --git a/package.json b/package.json index ad34e9f..691d864 100644 --- a/package.json +++ b/package.json @@ -23,13 +23,13 @@ }, "dependencies": { "aws-sdk": "^2.0.23", - "chart.js": "^1.0.1-beta.2", - "cheerio": "^0.18.0", + "chart.js": "^2.2.2", + "cheerio": "^0.22.0", "githubot": "^1.0.0-beta2", "hubot": ">= 2.6.0 < 3.0.0", "hubot-scripts": ">= 2.5.0 < 3.0.0", - "phantomjs": "^1.9.12", - "sugar": "^1.4.1" + "phantomjs-prebuilt": "^2.1.12", + "sugar": "^2.0.1" }, "main": "main.coffee", "engines": { @@ -42,12 +42,12 @@ }, "devDependencies": { "blanket": "^1.1.6", - "chai": "^1.9.2", - "coffee-script": "^1.6.3", + "chai": "^3.5.0", + "coffee-script": "^1.10.0", "coveralls": "^2.11.2", "hubot-mock-adapter": "^1.0.0", - "mocha": "^2.0.1", - "mocha-lcov-reporter": "0.0.1" + "mocha": "^3.0.2", + "mocha-lcov-reporter": "1.2.0" }, "config": { "blanket": { @@ -58,5 +58,5 @@ "loader": "./node-loaders/coffee-script", "data-cover-never": "node_modules" } - } + } } diff --git a/scripts/chart.coffee b/scripts/chart.coffee index 9b4c369..6014922 100644 --- a/scripts/chart.coffee +++ b/scripts/chart.coffee @@ -1,10 +1,6 @@ # Description: # Generate a chart image # -# Dependencies: -# "chart.js": "^1.0.1-beta.2" -# "phantomjs": "^1.9.12" -# # Commands: # hubot chart -- Generate a chart image (cf. Chart.js) # diff --git a/scripts/lgtm.coffee b/scripts/lgtm.coffee index 0491e25..ee91029 100644 --- a/scripts/lgtm.coffee +++ b/scripts/lgtm.coffee @@ -1,9 +1,6 @@ # Description: # LGTM! # -# Dependencies: -# "cheerio": "0.17.0" -# # Commands: # hubot reply -- Respond an image from tiqav.com # @@ -16,14 +13,17 @@ module.exports = (robot) -> # Looks good to me! robot.hear /lgtm/i, (msg) -> - msg.http("http://www.lgtm.in/g") + robot.http("http://www.lgtm.in/g") .get() (err, res, body) -> - $ = cheerio.load(body) - msg.send $('#imageUrl').attr('value') + if res.statusCode is 302 + robot.http(res.headers.location) + .get() (err, res, body) -> + $ = cheerio.load(body) + msg.send $('#imageUrl').attr('value') # GET an image from tiqav robot.respond /reply\s+(.+)?/i, (msg) -> - msg.http("http://api.tiqav.com/search/random.json") + robot.http("http://api.tiqav.com/search/random.json") .query(q: msg.match[1]) .get() (err, res, body) -> if err