Skip to content

Commit 1313ae2

Browse files
authored
Merge pull request #11 from EnsembleLab/dev
Dev
2 parents 4f5128d + 138536d commit 1313ae2

File tree

6 files changed

+67
-27
lines changed

6 files changed

+67
-27
lines changed

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
language: node_js
22
node_js:
3-
- "7"
4-
- "6"
5-
- "4"
3+
- '7'
4+
- '6'
65
before_script:
7-
- npm install -g gulp mocha gulp-cli codecov istanbul
6+
- npm install -g gulp mocha gulp-cli codecov istanbul [email protected]
7+
- dredd ./apiary.apib http://127.0.0.1:8080 --dry-run
88
install:
99
- npm install
10-
script:
11-
- istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && codecov
10+
script:
11+
- >-
12+
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec
13+
&& codecov

apiary.apib

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ Note: Do html redirect to the password reset successful page and kill the active
12961296
Authorization: dd3343ae567c8f8a0b9e8f
12971297

12981298
+ Parameters
1299-
+ booking_id (Number) - ID of the booking
1299+
+ booking_id: "10" (Number) - ID of the booking
13001300

13011301
+ Response 200 (application/json)
13021302

@@ -2471,7 +2471,7 @@ Check if the Worker matches some tags on the booking and worker is not assigned
24712471
+ Parameters
24722472
+ limit: "10" (Number) - Number of records to return
24732473
+ skip: "0" (Number) - Number of records to skip
2474-
+ booking_id (Number) - ID of the booking
2474+
+ booking_id: "10" (Number) - ID of the booking
24752475

24762476
+ Response 200 (application/json)
24772477

@@ -2545,7 +2545,7 @@ Check if the Worker matches some tags on the booking and worker is not assigned
25452545
Authorization: dd3343ae567c8f8a0b9e8f
25462546

25472547
+ Parameters
2548-
+ booking_id (Number) - ID of the booking
2548+
+ booking_id: "10" (Number) - ID of the booking
25492549

25502550
+ Response 200 (application/json)
25512551

@@ -2607,9 +2607,9 @@ Check if the Worker matches some tags on the booking and worker is not assigned
26072607
Authorization: dd3343ae567c8f8a0b9e8f
26082608

26092609
+ Parameters
2610-
+ booking_id (Number) - ID of the booking
2611-
+ skip (Number) - Number of records to skip
2612-
+ limit (Number) - Number of records to return
2610+
+ booking_id: "10" (Number) - ID of the booking
2611+
+ skip: "10" (Number) - Number of records to skip
2612+
+ limit: "10" (Number) - Number of records to return
26132613

26142614
+ Response 200 (application/json)
26152615

@@ -2684,7 +2684,7 @@ Add the rating and review to each worker assigned to the project
26842684
Authorization: dd3343ae567c8f8a0b9e8f
26852685

26862686
+ Parameters
2687-
+ booking_id (Number) - ID of the booking
2687+
+ booking_id: "10" (Number) - ID of the booking
26882688

26892689
+ Request (application/json)
26902690

@@ -2747,7 +2747,7 @@ Add the rating and review to each worker assigned to the project
27472747
Authorization: dd3343ae567c8f8a0b9e8f
27482748

27492749
+ Parameters
2750-
+ booking_id (Number) - ID of the booking
2750+
+ booking_id: "10" (Number) - ID of the booking
27512751

27522752
+ Response 200 (application/json)
27532753

@@ -2873,7 +2873,7 @@ Remember to requery the transaction to confirm the true state from the processor
28732873
Authorization: dd3343ae567c8f8a0b9e8f
28742874

28752875
+ Parameters
2876-
+ payment_id (Number) - ID of the payment
2876+
+ payment_id: "10" (Number) - ID of the payment
28772877

28782878
+ Request (application/json)
28792879

@@ -2941,7 +2941,7 @@ Remember to requery the transaction to confirm the true state from the processor
29412941
Authorization: dd3343ae567c8f8a0b9e8f
29422942

29432943
+ Parameters
2944-
+ user_id (Number) - ID of the user
2944+
+ user_id: "10" (Number) - ID of the user
29452945
+ limit: "10" (Number) - Number of records to return
29462946
+ skip: "0" (Number) - Number of records to skip
29472947
+ status: "completed" (String) - Status of a booking
@@ -3921,8 +3921,8 @@ If user_id is not provided, get current users wallet balance
39213921
Authorization: dd3343ae567c8f8a0b9e8f
39223922

39233923
+ Parameters
3924-
+ skip (Number) - Number of records to skip
3925-
+ limit (Number) - Number of records to return
3924+
+ skip: "10" (Number) - Number of records to skip
3925+
+ limit: "10" (Number) - Number of records to return
39263926

39273927
+ Response 200 (application/json)
39283928

@@ -3989,9 +3989,9 @@ If user_id is not provided, get current users wallet balance
39893989
Authorization: dd3343ae567c8f8a0b9e8f
39903990

39913991
+ Parameters
3992-
+ skip (Number) - Number of records to skip
3993-
+ limit (Number) - Number of records to return
3994-
+ user_id (String) - Id of the user we want to get a statement for
3992+
+ skip: "10" (Number) - Number of records to skip
3993+
+ limit: "10" (Number) - Number of records to return
3994+
+ user_id: "10" (String) - Id of the user we want to get a statement for
39953995

39963996
+ Response 200 (application/json)
39973997

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ if (cluster.isMaster && config.env === 'production') {
2323
} else {
2424
var express = require('express');
2525
var app = express();
26-
var router = require('./routes');
26+
// var router = require('./routes');
2727

2828
if(config.trustProxy === 'yes'){
2929
app.enable('trust proxy');
3030
}
3131

32-
app.use('/',router);
32+
// app.use('/',router);
3333

3434
if(config.env === 'production'){
3535
log.info('Worker %d running!', cluster.worker.id);

config/development.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"use strict";
22
module.exports = {
33
env: process.env.NODE_ENV || 'development',
4-
port: process.env.PORT || 3000,
4+
port: process.env.PORT || 8080,
55
trustProxy: process.env.TRUST_PROXY || 'no',
66
bugsnagKey: process.env.BUGSNAG_KEY || false,
77
secureMode: process.env.SECURE_MODE || false,
8-
secret: process.env.SECRET || 'lakikihdgdfdjjjdgd67264664vdjhjdyncmxuei8336%%^#%gdvdhj????jjhdghduue'
8+
secret: process.env.SECRET || 'lakikihdgdfdjjjdgd67264664vdjhjdyncmxuei8336%%^#%gdvdhj????jjhdghduue',
9+
mongoURL: process.env.MONGOLAB_URL || 'mongodb://192.168.99.100/snipe'
910
};

config/production.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"use strict";
22
module.exports = {
33
env: process.env.NODE_ENV || 'production',
4-
port: process.env.PORT || 3000,
4+
port: process.env.PORT || 80,
55
trustProxy: process.env.TRUST_PROXY || 'no',
66
bugsnagKey: process.env.BUGSNAG_KEY || false,
77
secureMode: process.env.SECURE_MODE || true,
8-
secret: process.env.SECRET || 'lakikihdgdfdjjjdgd67264660okjnbgtrdxswerfgytg373745ei8336%%^#%gdvdhj????jjhdghduue'
8+
secret: process.env.SECRET || 'lakikihdgdfdjjjdgd67264660okjnbgtrdxswerfgytg373745ei8336%%^#%gdvdhj????jjhdghduue',
9+
mongoURL: process.env.MONGOLAB_URL || 'mongodb://192.168.99.100/snipe'
910
};

dredd.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
dry-run: null
2+
hookfiles: null
3+
language: nodejs
4+
sandbox: false
5+
server: node app.js
6+
server-wait: 3
7+
init: false
8+
custom:
9+
apiaryApiKey: 0b50190a4bec8e35a0572c94d583b499
10+
apiaryApiName: sniper1
11+
names: false
12+
only: []
13+
reporter: apiary
14+
output: []
15+
header: []
16+
sorted: false
17+
user: null
18+
inline-errors: false
19+
details: false
20+
method: []
21+
color: true
22+
level: info
23+
timestamp: false
24+
silent: false
25+
path: []
26+
hooks-worker-timeout: 5000
27+
hooks-worker-connect-timeout: 1500
28+
hooks-worker-connect-retry: 500
29+
hooks-worker-after-connect-wait: 100
30+
hooks-worker-term-timeout: 5000
31+
hooks-worker-term-retry: 500
32+
hooks-worker-handler-host: 127.0.0.1
33+
hooks-worker-handler-port: 61321
34+
config: ./dredd.yml
35+
blueprint: apiary.apib
36+
endpoint: 'http://127.0.0.1:8080'

0 commit comments

Comments
 (0)