Last active
August 29, 2015 14:04
-
-
Save daviddias/f5c9c95fd5805215f8ad to your computer and use it in GitHub Desktop.
error from dulcimer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✘ ⮀ ⭠ master± ⮀ ~/Documents/Code/node-core/api.triage ⮀ | |
» node testDB.js ◉ ◼◼◼◼◼◼◼◼◼◻ | |
/Users/david/Documents/Code/node-core/api.triage/node_modules/verymodel/lib/model.js:159 | |
model.__defineGetter__(field, function () { | |
^ | |
RangeError: Maximum call stack size exceeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dulcimer = require('dulcimer'); | |
var verymodel = require('verymodel'); | |
// var bcrypt = require('bcrypt'); | |
// var crypto = require('crypto'); | |
// var async = require('async'); | |
// var type = verymodel.VeryType; | |
var Issue = new dulcimer.Model( | |
{ | |
url: { | |
type: 'string' | |
}, | |
htmlUrl: { | |
type: 'string' | |
}, | |
number: { | |
type: 'string', | |
// unique: true, | |
index: true | |
}, // issue ID number | |
state: { | |
type: 'string' | |
}, | |
title: { | |
type: 'string' | |
}, | |
body: { | |
type: 'string' | |
}, | |
user: { }, // object | |
labels: { | |
type: 'array' | |
}, // array | |
assignee: { }, // object | |
milestone: { }, // object | |
comments: { | |
type: 'integer' | |
}, | |
pullRequest: { }, // object | |
closedAt: { | |
type: 'string', | |
derive: function (model) { | |
return new Date(model.closedAt); | |
} | |
}, // date | |
createdAt: { | |
type: 'string', | |
derive: function (model) { | |
return new Date(model.createdAt); | |
} | |
}, // date | |
updatedAt: { | |
type: 'string', | |
derive: function (model) { | |
return new Date(model.updatedAt); | |
} | |
} // date | |
}, | |
{ | |
name: 'issue', | |
includeKey: false, | |
savePrivate: true | |
}); | |
// User.findByUserName = function (username, callback) { | |
// User.findByIndex('username', username, callback); | |
// }; | |
// User.removeAll = function (cb) { | |
// User.all(function (err, dbUsers) { | |
// async.each(dbUsers, deleteUser, function done(err) { | |
// cb(err); | |
// }); | |
// function deleteUser(user) { | |
// user.delete(function (err) { | |
// if (err) { | |
// throw err; | |
// } | |
// }); | |
// } | |
// }); | |
// }; | |
module.exports = Issue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = require('config'); | |
require('./store'); | |
var Issue = require('./store/models/Issue.js'); | |
var issue = Issue.create({ | |
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", | |
"html_url": "https://github.com/octocat/Hello-World/issues/1347", | |
"number": 1347, | |
"state": "open", | |
"title": "Found a bug", | |
"body": "I'm having a problem with this.", | |
"user": { | |
"login": "octocat", | |
"id": 1, | |
"avatar_url": "https://github.com/images/error/octocat_happy.gif", | |
"gravatar_id": "somehexcode", | |
"url": "https://api.github.com/users/octocat", | |
"html_url": "https://github.com/octocat", | |
"followers_url": "https://api.github.com/users/octocat/followers", | |
"following_url": "https://api.github.com/users/octocat/following{/other_user}", | |
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", | |
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", | |
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions", | |
"organizations_url": "https://api.github.com/users/octocat/orgs", | |
"repos_url": "https://api.github.com/users/octocat/repos", | |
"events_url": "https://api.github.com/users/octocat/events{/privacy}", | |
"received_events_url": "https://api.github.com/users/octocat/received_events", | |
"type": "User", | |
"site_admin": false | |
}, | |
"labels": [ | |
{ | |
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", | |
"name": "bug", | |
"color": "f29513" | |
} | |
], | |
"assignee": { | |
"login": "octocat", | |
"id": 1, | |
"avatar_url": "https://github.com/images/error/octocat_happy.gif", | |
"gravatar_id": "somehexcode", | |
"url": "https://api.github.com/users/octocat", | |
"html_url": "https://github.com/octocat", | |
"followers_url": "https://api.github.com/users/octocat/followers", | |
"following_url": "https://api.github.com/users/octocat/following{/other_user}", | |
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", | |
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", | |
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions", | |
"organizations_url": "https://api.github.com/users/octocat/orgs", | |
"repos_url": "https://api.github.com/users/octocat/repos", | |
"events_url": "https://api.github.com/users/octocat/events{/privacy}", | |
"received_events_url": "https://api.github.com/users/octocat/received_events", | |
"type": "User", | |
"site_admin": false | |
}, | |
"milestone": { | |
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", | |
"number": 1, | |
"state": "open", | |
"title": "v1.0", | |
"description": "", | |
"creator": { | |
"login": "octocat", | |
"id": 1, | |
"avatar_url": "https://github.com/images/error/octocat_happy.gif", | |
"gravatar_id": "somehexcode", | |
"url": "https://api.github.com/users/octocat", | |
"html_url": "https://github.com/octocat", | |
"followers_url": "https://api.github.com/users/octocat/followers", | |
"following_url": "https://api.github.com/users/octocat/following{/other_user}", | |
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", | |
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", | |
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions", | |
"organizations_url": "https://api.github.com/users/octocat/orgs", | |
"repos_url": "https://api.github.com/users/octocat/repos", | |
"events_url": "https://api.github.com/users/octocat/events{/privacy}", | |
"received_events_url": "https://api.github.com/users/octocat/received_events", | |
"type": "User", | |
"site_admin": false | |
}, | |
"open_issues": 4, | |
"closed_issues": 8, | |
"created_at": "2011-04-10T20:09:31Z", | |
"updated_at": "2014-03-03T18:58:10Z", | |
"due_on": null | |
}, | |
"comments": 0, | |
"pull_request": { | |
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", | |
"html_url": "https://github.com/octocat/Hello-World/pull/1347", | |
"diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", | |
"patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch" | |
}, | |
"closed_at": null, | |
"created_at": "2011-04-22T13:33:48Z", | |
"updated_at": "2011-04-22T13:33:48Z" | |
}); | |
issue.save(function (err) { | |
console.log("Issue saved as:", issue.key); | |
}); | |
// var person = Person.create({ | |
// firstName: 'Nathan', | |
// lastName: 'Fritz', | |
// }); | |
// person.save(function (err) { | |
// console.log("Person saved as:", person.key); | |
// }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment