Random test data generation
I'm generating better test data to put into the shane-hackthenorth firebase. I'm using http://json-generator.com. It uses json-like input to generate test data, so I'm going to be posting the inputs here for reference.
https://shane-hackthenorth.firebaseio.com/mentors.json
-
literally every key except name can be
nullor[]
[
'{{repeat(100)}}',
{
image: 'http://lorempixel.com/640/480/{{random("fashion", "nightlife", "business", "sports", "people", "city", "technics")}}/{{random(1,2,3,4,5,6,7,8,9,10)}}',
name: '{{firstName()}} {{surname()}}',
organization: '{{company().toUpperCase()}}',
email: '{{email()}}',
phone: '+1 {{phone()}}',
twitter: '@{{lorem(1, "words")}}{{lorem(1, "words")}}',
github: '@{{lorem(1, "words")}}{{lorem(1, "words")}}',
skills: [
'{{repeat(2, 7)}}',
'{{lorem(1, "words")}}'
],
availability: [
'{{repeat(2,6)}}',
['{{date(new Date(2014, 9, 15), new Date(2014, 9, 16), "YYYY-MM-ddThh:mm:ssZ")}}',
'{{date(new Date(2014, 9, 16), new Date(2014, 9, 17), "YYYY-MM-ddThh:mm:ssZ")}}'
]
]
}
]
https://shane-hackthenorth.firebaseio.com/team.json
- avatar can be null
[
'{{repeat(100,200)}}',
{
avatar: 'http://robohash.org/{{firstName()}}{{surname()}}.png',
name: '{{firstName()}} {{surname()}}',
role: [
'{{repeat(1,3)}}',
'{{random("transportation", "organizer", "queen", "king", "prince", "food", "MC", "host", "owns a car", "moral supporter", "deliverer", "sponsor relations", "clean up", "set up", "organizer\'s assistant")}}'
],
email: '{{email()}}',
phone: '+1 {{phone()}}',
twitter: '@{{lorem(1, "words")}}{{lorem(1, "words")}}'
}
]
https://shane-hackthenorth.firebaseio.com/prizes.json
[
'{{repeat(15, 25)}}',
{
company: '{{company()}}',
prize: [
'{{repeat(1, 5)}}',
'{{lorem(1, "words")}}'
],
description: '{{lorem(1, "sentences")}}',
contact: function (unused) {
var random = Math.floor(2 * Math.random());
if (random === 0) {
return null;
} else {
return 'prize@' + this.company.toLowerCase() + '.com';
}
},
name: function (company) {
return this.company + "'s " + this.prize[0] + " Contest";
}
}
]
Updated prizes
(considering just pushing all this stuff to mobile-backend)
Looks good so far, I've added 2 in-line comments in your post. We can also start moving this to hackthenorth.firebaseio.com as well
Can you change the URLs to https://hackthenorth.firebaseio.com/mobile/*. I can setup a read/write key for you on our prod
That's great actually. You can see in prizes that I'm generating some contact fields that are null, so later tonight I'm thinking about generating null fields in other places too just so we know that things don't break.
Okay, PM me with keys and stuff and I'll change over the android app URL. I'll also let @sitefeng know when to change the URLs as well.
emailed