Skip to content

Commit

Permalink
chore(browserify): remove require-directory as a dependency for tests
Browse files Browse the repository at this point in the history
- update testing method to remove reliance on `require-directory`
- require-directory is now a `devDependency`
  • Loading branch information
Ahmad Nassri committed Aug 26, 2015
1 parent e7b77d2 commit 00e0b37
Show file tree
Hide file tree
Showing 64 changed files with 177 additions and 194 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"glob": "^5.0.14",
"istanbul": "^0.3.17",
"mocha": "^2.2.5",
"require-directory": "^2.1.1",
"should": "^7.0.2",
"standard": "^5.0.0"
},
Expand All @@ -81,7 +82,6 @@
"debug": "^2.2.0",
"event-stream": "^3.3.1",
"form-data": "^1.0.0-rc3",
"har-validator": "^1.8.0",
"require-directory": "^2.1.1"
"har-validator": "^1.8.0"
}
}
11 changes: 10 additions & 1 deletion src/targets/c/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'c',
title: 'C',
extname: '.c',
default: 'libcurl'
},

libcurl: require('./libcurl')
}
8 changes: 0 additions & 8 deletions src/targets/c/info.js

This file was deleted.

11 changes: 10 additions & 1 deletion src/targets/csharp/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'csharp',
title: 'C#',
extname: '.cs',
default: 'restsharp'
},

restsharp: require('./restsharp')
}
8 changes: 0 additions & 8 deletions src/targets/csharp/info.js

This file was deleted.

11 changes: 10 additions & 1 deletion src/targets/go/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'go',
title: 'Go',
extname: '.go',
default: 'native'
},

native: require('./native')
}
8 changes: 0 additions & 8 deletions src/targets/go/info.js

This file was deleted.

16 changes: 15 additions & 1 deletion src/targets/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
'use strict'

module.exports = require('require-directory')(module, { exclude: /helpers\.js$/ })
module.exports = {
c: require('./c'),
csharp: require('./csharp'),
go: require('./go'),
java: require('./java'),
javascript: require('./javascript'),
node: require('./node'),
objc: require('./objc'),
ocaml: require('./ocaml'),
php: require('./php'),
python: require('./python'),
ruby: require('./ruby'),
shell: require('./shell'),
swift: require('./swift')
}
12 changes: 11 additions & 1 deletion src/targets/java/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'java',
title: 'Java',
extname: '.java',
default: 'unirest'
},

okhttp: require('./okhttp'),
unirest: require('./unirest')
}
8 changes: 0 additions & 8 deletions src/targets/java/info.js

This file was deleted.

12 changes: 11 additions & 1 deletion src/targets/javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'javascript',
title: 'JavaScript',
extname: '.js',
default: 'xhr'
},

jquery: require('./jquery'),
xhr: require('./xhr')
}
8 changes: 0 additions & 8 deletions src/targets/javascript/info.js

This file was deleted.

13 changes: 12 additions & 1 deletion src/targets/node/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'node',
title: 'Node.js',
extname: '.js',
default: 'native'
},

native: require('./native'),
request: require('./request'),
unirest: require('./unirest')
}
8 changes: 0 additions & 8 deletions src/targets/node/info.js

This file was deleted.

11 changes: 10 additions & 1 deletion src/targets/objc/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'objc',
title: 'Objective-C',
extname: '.m',
default: 'nsurlsession'
},

nsurlsession: require('./nsurlsession')
}
8 changes: 0 additions & 8 deletions src/targets/objc/info.js

This file was deleted.

11 changes: 10 additions & 1 deletion src/targets/ocaml/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'ocaml',
title: 'OCaml',
extname: '.ml',
default: 'cohttp'
},

cohttp: require('./cohttp')
}
8 changes: 0 additions & 8 deletions src/targets/ocaml/info.js

This file was deleted.

13 changes: 12 additions & 1 deletion src/targets/php/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'php',
title: 'PHP',
extname: '.php',
default: 'curl'
},

curl: require('./curl'),
http1: require('./http1'),
http2: require('./http2')
}
8 changes: 0 additions & 8 deletions src/targets/php/info.js

This file was deleted.

12 changes: 11 additions & 1 deletion src/targets/python/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'python',
title: 'Python',
extname: '.py',
default: 'python3'
},

python3: require('./python3'),
requests: require('./requests')
}
8 changes: 0 additions & 8 deletions src/targets/python/info.js

This file was deleted.

11 changes: 10 additions & 1 deletion src/targets/ruby/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'ruby',
title: 'Ruby',
extname: '.rb',
default: 'native'
},

native: require('./native')
}
8 changes: 0 additions & 8 deletions src/targets/ruby/info.js

This file was deleted.

13 changes: 12 additions & 1 deletion src/targets/shell/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'shell',
title: 'Shell',
extname: '.sh',
default: 'curl'
},

curl: require('./curl'),
httpie: require('./httpie'),
wget: require('./wget')
}
8 changes: 0 additions & 8 deletions src/targets/shell/info.js

This file was deleted.

11 changes: 10 additions & 1 deletion src/targets/swift/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
'use strict'

module.exports = require('require-directory')(module)
module.exports = {
info: {
key: 'swift',
title: 'Swift',
extname: '.swift',
default: 'nsurlsession'
},

nsurlsession: require('./nsurlsession')
}
8 changes: 0 additions & 8 deletions src/targets/swift/info.js

This file was deleted.

Loading

0 comments on commit 00e0b37

Please sign in to comment.