Skip to content

Commit

Permalink
moved helpers to a stand alone module
Browse files Browse the repository at this point in the history
  • Loading branch information
arnorhs committed Jan 2, 2014
1 parent 31daf8e commit 7b4ae45
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 213 deletions.
2 changes: 1 addition & 1 deletion endpoints/bus/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var request = require('request'),
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');

app.post('/bus/search', function(req, res) {
Expand Down
2 changes: 1 addition & 1 deletion endpoints/bus/realtime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var h = require('../../lib/helpers.js'),
var h = require('apis-helpers'),
request = require('request'),
app = require('../../server'),
isn2wgs = require('isn2wgs');
Expand Down
2 changes: 1 addition & 1 deletion endpoints/car/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var request = require('request'),
$ = require('jquery'),
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');


Expand Down
2 changes: 1 addition & 1 deletion endpoints/company/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var request = require('request'),
$ = require('jquery'),
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');

$.fn.cleanHtml = function() {
Expand Down
2 changes: 1 addition & 1 deletion endpoints/currency/arion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var request = require('request'),
moment = require('moment'),
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');

app.get('/currency/arion', function(req, res){
Expand Down
2 changes: 1 addition & 1 deletion endpoints/currency/m5.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var request = require('request'),
$ = require('jquery'),
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');

app.get('/currency/m5', function (req, res) {
Expand Down
2 changes: 1 addition & 1 deletion endpoints/declension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// dependencies
var app = require('../../server'),
request = require('request'),
helper = require('../../lib/helpers.js'),
helper = require('apis-helpers'),
cheerio = require('cheerio'),
_ = require('underscore');

Expand Down
2 changes: 1 addition & 1 deletion endpoints/earthquake/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var request = require('request'),
cheerio = require('cheerio'),
browser = require('../../lib/helpers.js').browser,
browser = require('apis-helpers').browser,
app = require('../../server');

app.get('/earthquake/is', function (req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion endpoints/flight/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var request = require('request'),
$ = require('jquery'),
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');

app.get('/flight', function(req, res){
Expand Down
2 changes: 1 addition & 1 deletion endpoints/tv/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var request = require('request'),
moment = require('moment'),
parseString = require('xml2js').parseString,
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server');

var schedStruct = {
Expand Down
2 changes: 1 addition & 1 deletion endpoints/weather/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var request, parseString, h, app, cheerio, Q, xregexp, validTypes, measurements,
/** Requires **/
request = require('request'),
parseString = require('xml2js').parseString,
h = require('../../lib/helpers.js'),
h = require('apis-helpers'),
app = require('../../server'),
cheerio = require('cheerio'),
xregexp = require('xregexp').XRegExp;
Expand Down
130 changes: 0 additions & 130 deletions lib/helpers.js

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"xregexp": "~2.0.0",
"cheerio": "~0.12.4",
"mocha": "~1.15.1",
"express": "~3.4.7"
"express": "~3.4.7",
"apis-helpers": "0.0.1"
},
"scripts": {
"test": "node_modules/mocha/bin/mocha test/integration",
Expand Down
71 changes: 0 additions & 71 deletions test/unit/helpers.js

This file was deleted.

0 comments on commit 7b4ae45

Please sign in to comment.