Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGaudin committed Nov 12, 2012
0 parents commit 8a10168
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .couchapprc
@@ -0,0 +1,3 @@
{
"env": {}
}
1 change: 1 addition & 0 deletions _id
@@ -0,0 +1 @@
_design/acra-storage
1 change: 1 addition & 0 deletions language
@@ -0,0 +1 @@
javascript
5 changes: 5 additions & 0 deletions validate_doc_upddate.js
@@ -0,0 +1,5 @@
function(newDoc, oldDoc, userCtx) {
if(userCtx.roles.indexOf("reporter") < 0) {
throw({"forbidden": "You may only update documents with reporter role "});
}
}
9 changes: 9 additions & 0 deletions views/recent-items/map.js
@@ -0,0 +1,9 @@
function(doc) {
if (doc.USER_CRASH_DATE) {
emit(new Date(doc.USER_CRASH_DATE), {
user_crash_date: doc.USER_CRASH_DATE,
stack_trace:doc.STACK_TRACE,
android_version : doc.ANDROID_VERSION
});
}
};
8 changes: 8 additions & 0 deletions views/reports-per-day/map.js
@@ -0,0 +1,8 @@
function(doc) {
if(doc.USER_CRASH_DATE) {
var crashDate = new Date(doc.USER_CRASH_DATE);
if(crashDate.getFullYear() > 2000) {
emit([crashDate.getFullYear(), crashDate.getMonth() , crashDate.getDate()], 1);
}
}
}
3 changes: 3 additions & 0 deletions views/reports-per-day/reduce.js
@@ -0,0 +1,3 @@
function(keys, values, rereduce) {
return sum(values);
}

0 comments on commit 8a10168

Please sign in to comment.