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

Commit 271569f

Browse files
Move deprecation logic to hubot core
1 parent 94ecbf9 commit 271569f

23 files changed

+0
-132
lines changed

src/hubot-scripts.coffee

-32
This file was deleted.

src/scripts/9gag.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
# Contributors:
1818
# dedeibel (gif support)
1919

20-
Path = require("path")
21-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
22-
2320
Select = require( "soupselect" ).select
2421
HTMLParser = require "htmlparser"
2522

2623
module.exports = (robot)->
27-
HubotScripts.deprecate(robot, __filename)
2824

2925
robot.respond /9gag( me)?/i, (message)->
3026
send_meme message, false, (title, src)->

src/scripts/ambush.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@
1313
# Author:
1414
# jmoses
1515

16-
Path = require("path")
17-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
18-
1916
appendAmbush = (data, toUser, fromUser, message) ->
2017
data[toUser.name] or= []
2118

2219
data[toUser.name].push [fromUser.name, message]
2320

2421
module.exports = (robot) ->
25-
HubotScripts.deprecate(robot, __filename)
2622

2723
robot.brain.on 'loaded', =>
2824
robot.brain.data.ambushes ||= {}

src/scripts/asana.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
# abh1nav
2424
# rajiv
2525

26-
Path = require("path")
27-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
28-
2926
url = 'https://app.asana.com/api/1.0'
3027

3128
workspace = process.env.HUBOT_ASANA_WORKSPACE_ID
@@ -66,7 +63,6 @@ addTask = (msg, taskName, path, params, userAcct) ->
6663
msg.send "Error creating task."
6764

6865
module.exports = (robot) ->
69-
HubotScripts.deprecate(robot, __filename)
7066
# Add a task
7167
robot.hear /^(todo|task):\s?(@\w+)?(.*)/i, (msg) ->
7268
taskName = msg.match[3]

src/scripts/ascii.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
#
1313
# Author:
1414
# atmos
15-
Path = require("path")
16-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
17-
1815
module.exports = (robot) ->
19-
HubotScripts.deprecate(robot, __filename)
2016
robot.respond /ascii( me)? (.+)/i, (msg) ->
2117
msg
2218
.http("http://asciime.herokuapp.com/generate_ascii")

src/scripts/auth.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@
2424
# Author:
2525
# alexwilliamsca
2626

27-
Path = require("path")
28-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
29-
3027
module.exports = (robot) ->
31-
HubotScripts.deprecate(robot, __filename)
3228

3329
admin = process.env.HUBOT_AUTH_ADMIN
3430

src/scripts/darksky.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
#
1919
# Author:
2020
# kyleslattery
21-
Path = require("path")
22-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
23-
2421
module.exports = (robot) ->
25-
HubotScripts.deprecate(robot, __filename)
2622

2723
robot.respond /weather ?(.+)?/i, (msg) ->
2824
location = msg.match[1] || process.env.HUBOT_DARK_SKY_DEFAULT_LOCATION

src/scripts/factoid.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
# Author:
2323
# arthurkalm
2424

25-
Path = require("path")
26-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
27-
2825
class Factoids
2926
constructor: (@robot) ->
3027
@robot.brain.on 'loaded', =>
@@ -93,8 +90,6 @@ class Factoids
9390
this.niceGet match[1]
9491

9592
module.exports = (robot) ->
96-
HubotScripts.deprecate(robot, __filename)
97-
9893
factoids = new Factoids robot
9994

10095
robot.hear /^~(.+)/i, (msg) ->

src/scripts/gitlab.coffee

-3
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@
2525
# Author:
2626
# omribahumi
2727

28-
path = require("path")
29-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
3028
url = require 'url'
3129
querystring = require 'querystring'
3230

3331
module.exports = (robot) ->
34-
HubotScripts.deprecate(robot, __filename)
3532

3633
gitlabChannel = process.env.GITLAB_CHANNEL or "#gitlab"
3734
debug = process.env.GITLAB_DEBUG?

src/scripts/google.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
# Author:
1414
# searls
1515

16-
Path = require("path")
17-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
18-
1916
module.exports = (robot) ->
20-
HubotScripts.deprecate(robot, __filename)
21-
2217
robot.respond /(google)( me)? (.*)/i, (msg) ->
2318
googleMe msg, msg.match[3], (url) ->
2419
msg.send url

src/scripts/isup.coffee

-6
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@
1313
# Author:
1414
# jmhobbs
1515

16-
Path = require("path")
17-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
18-
19-
2016
module.exports = (robot) ->
21-
HubotScripts.deprecate(robot, __filename)
22-
2317
robot.respond /is (?:http\:\/\/)?(.*?) (up|down)(\?)?/i, (msg) ->
2418
isUp msg, msg.match[1], (domain) ->
2519
msg.send domain

src/scripts/jenkins.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
# Author:
2323
# dougcole
2424

25-
Path = require("path")
26-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
2725
querystring = require 'querystring'
2826

2927
# Holds a list of jobs, so we can trigger them with a number
@@ -218,8 +216,6 @@ jenkinsList = (msg) ->
218216
msg.send error
219217

220218
module.exports = (robot) ->
221-
HubotScripts.deprecate(robot, __filename)
222-
223219
robot.respond /j(?:enkins)? build ([\w\.\-_ ]+)(, (.+))?/i, (msg) ->
224220
jenkinsBuild(msg, false)
225221

src/scripts/jira-issues.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
# Author:
1919
# stuartf
2020

21-
Path = require("path")
22-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
23-
2421
module.exports = (robot) ->
25-
HubotScripts.deprecate(robot, __filename)
2622
cache = []
2723

2824
# In case someone upgrades form the previous version, we'll default to the

src/scripts/karma.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
# Author:
1919
# stuartf
2020

21-
Path = require("path")
22-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
23-
2421
class Karma
2522

2623
constructor: (@robot) ->
@@ -84,8 +81,6 @@ class Karma
8481
sorted.slice(-n).reverse()
8582

8683
module.exports = (robot) ->
87-
HubotScripts.deprecate(robot, __filename)
88-
8984
karma = new Karma robot
9085
allow_self = process.env.KARMA_ALLOW_SELF or "true"
9186

src/scripts/meme_captain.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@
3232
# Author:
3333
# bobanj, ericjsilva
3434

35-
Path = require("path")
36-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
37-
3835
module.exports = (robot) ->
39-
HubotScripts.deprecate(robot, __filename)
40-
4136
robot.respond /Y U NO (.+)/i, (msg) ->
4237
memeGenerator msg, 'NryNmg', 'Y U NO', msg.match[1], (url) ->
4338
msg.send url

src/scripts/pagerduty.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
# Jesse Newland, Josh Nicols, Jacob Bednarz, Chris Lundquist, Chris Streeter, Joseph Pierri, Greg Hoin
4545
#
4646

47-
Path = require("path")
48-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
49-
5047
inspect = require('util').inspect
5148

5249
moment = require('moment')
@@ -61,8 +58,6 @@ pagerRoom = process.env.HUBOT_PAGERDUTY_ROOM
6158
pagerEndpoint = process.env.HUBOT_PAGERDUTY_ENDPOINT || "/hook"
6259

6360
module.exports = (robot) ->
64-
HubotScripts.deprecate(robot, __filename)
65-
6661
robot.respond /pager( me)?$/i, (msg) ->
6762
if missingEnvironmentForApi(msg)
6863
return

src/scripts/plusplus.coffee

-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
# Author:
1818
# ajacksified
1919

20-
Path = require("path")
21-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
22-
2320
_ = require("underscore")
2421
clark = require("clark").clark
2522

@@ -105,7 +102,6 @@ class ScoreKeeper
105102
all.sort((a,b) -> b.score - a.score).reverse().slice(0,amount)
106103

107104
module.exports = (robot) ->
108-
HubotScripts.deprecate(robot, __filename)
109105
scoreKeeper = new ScoreKeeper(robot)
110106

111107
robot.hear /([\w\S]+)([\W\s]*)?(\+\+)$/i, (msg) ->

src/scripts/resumator.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
# hubot job list - Returns the current list of jobs from The Resumator
66
# hubot job applicants - Returns the current list of applicants in the pipeline of the Resumator
77

8-
Path = require("path")
9-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
10-
118
module.exports = (robot) ->
12-
HubotScripts.deprecate(robot, __filename)
13-
149
robot.respond /job list$/i, (msg) ->
1510
robot.http("https://api.resumatorapi.com/v1/jobs?apikey=#{process.env.RESUMATOR_APIKEY}")
1611
.get() (err, res, body) ->

src/scripts/shipit.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#
1616
# Author:
1717
# maddox
18-
Path = require("path")
19-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
20-
2118
squirrels = [
2219
"http://images.cheezburger.com/completestore/2011/11/2/aa83c0c4-2123-4bd3-8097-966c9461b30c.jpg",
2320
"http://images.cheezburger.com/completestore/2011/11/2/46e81db3-bead-4e2e-a157-8edd0339192f.jpg",
@@ -35,8 +32,6 @@ squirrels = [
3532
]
3633

3734
module.exports = (robot) ->
38-
HubotScripts.deprecate(robot, __filename)
39-
4035
# Enable a looser regex if environment variable is set
4136
if process.env.HUBOT_SHIP_EXTRA_SQUIRRELS
4237
regex = /ship(ping|z|s|ped)?\s*it/i

src/scripts/tell.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
#
1616
# Author:
1717
# christianchristensen, lorenzhs, xhochy
18-
Path = require("path")
19-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
20-
2118
module.exports = (robot) ->
22-
HubotScripts.deprecate(robot, __filename)
23-
2419
localstorage = {}
2520
robot.respond /tell ([\w.-]*):? (.*)/i, (msg) ->
2621
datetime = new Date()

src/scripts/wolfram.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@
1515
#
1616
# Author:
1717
# dhorrigan
18-
19-
Path = require("path")
20-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
21-
2218
Wolfram = require('wolfram').createClient(process.env.HUBOT_WOLFRAM_APPID)
2319

2420
module.exports = (robot) ->
25-
HubotScripts.deprecate(robot, __filename)
2621
robot.respond /(question|wfa) (.*)$/i, (msg) ->
2722
console.log msg.match
2823
Wolfram.query msg.match[2], (e, result) ->

src/scripts/xkcd.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
# Author:
1616
# twe4ked
1717
# Hemanth (fixed the max issue)
18-
Path = require("path")
19-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
20-
2118
module.exports = (robot) ->
22-
HubotScripts.deprecate(robot, __filename)
23-
2419
robot.respond /xkcd(\s+latest)?$/i, (msg) ->
2520
msg.http("http://xkcd.com/info.0.json")
2621
.get() (err, res, body) ->

src/scripts/youtube-info.coffee

-5
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@
1515
#
1616
# Author:
1717
# mmb
18-
Path = require("path")
19-
HubotScripts = require(Path.resolve(__dirname, "..", "hubot-scripts"))
20-
2118
querystring = require 'querystring'
2219
url = require 'url'
2320

2421
module.exports = (robot) ->
25-
HubotScripts.deprecate(robot, __filename)
26-
2722
robot.hear /(https?:\/\/www\.youtube\.com\/watch\?.+?)(?:\s|$)/i, (msg) ->
2823
url_parsed = url.parse(msg.match[1])
2924
query_parsed = querystring.parse(url_parsed.query)

0 commit comments

Comments
 (0)