Skip to content

Instantly share code, notes, and snippets.

View halfdan's full-sized avatar
🇩🇪

Fabian Becker halfdan

🇩🇪
View GitHub Profile
{ '0':
{ attributes:
{ name: 'Fabian Becker',
email: '[email protected]',
password: '$2a$10$zAyXxi2NU4Iol6hTpCPpd.q7pyMfej/yRdk1BYwg7rMkj4khYgPF2',
uuid: '4d12d295-1162-443c-95d2-9ce56a8f668c',
updated_at: Tue Nov 26 2013 02:14:55 GMT+0000 (UTC),
created_at: Tue Nov 26 2013 02:14:55 GMT+0000 (UTC),
created_by: 1,
location: '',
null value in column "slug" violates not-null constraint, sql: insert into "users" ("bio", "created_at", "created_by", "email", "image", "location", "name", "password", "updated_at", "updated_by", "uuid", "website") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) returning "id", bindings: ,2013-11-26T01:33:27.304+00:00,1,[email protected],http://www.gravatar.com/avatar/2174875fdee25e314d90b3382a123cf5?d=404,,Fabian Becker,$2a$10$3MnXVm9.3xZy.tQ5nWx6Fe6nRVjxVrM92P/cbuNQ3MqXCjkKz5Utm,2013-11-26T01:33:27.304+00:00,1,347041f5-6e5f-4287-b29f-d681d6a5909f,
1) Import 000 imports data from 001:
Error: The table must be defined for the dropTableIfExists method.
at Object.knex.schema.(anonymous function) [as dropTableIfExists] (/home/vagrant/code/Ghost/node_modules/knex/knex.js:81:33)
at deleteTable (/home/vagrant/code/Ghost/core/server/data/migration/index.js:112:24)
at /home/vagrant/code/Ghost/core/server/data/migration/index.js:120:24
at /home/vagrant/code/Ghost/node_modules/when/sequence.js:34:22
at /home/vagrant/code/Ghost/node_modules/when/when.js:746:14
at NearFulfilledProxy.when (/home/vagrant/code/Ghost/node_modules/when/when.js:487:43)
at Object._message (/home/vagrant/code/Ghost/node_modules/when/when.js:412:25)
at deliver (/home/vagrant/code/Ghost/node_modules/when/when.js:305:7)
> var salt = bc.genSaltSync()
undefined
> salt
'$2a$10$R7g.rr7p/U6cVd4U.5a6dO'
> var pw = 'foobar123'
undefined
'$2a$10$kFUl2jiadWSwZRXsC0X7QumtNs2TzG1sUY6o2b92sOoElnAznVFkO'
> bc.hashSync(pw, salt)
'$2a$10$R7g.rr7p/U6cVd4U.5a6dOSiocf9ZgSRTdB2afCkOVdVcHBIsY3RK'
> bc.hashSync(pw, salt)
var when = require('when'),
knex = require('../../models/base').knex,
up,
down,
constraints = {
posts: {
id: {maxlength: 0, nullable: false},
uuid: {maxlength: 36, nullable: false},
title: {maxlength: 150, nullable: false},
slug: {maxlength: 150, nullable: false},
1) Post API can retrieve all posts:
Uncaught AssertionError: expected response code of 200 'OK', but got 401 'Unauthorized'
at Object.Assertion.status (/home/vagrant/code/Ghost/node_modules/should/lib/should.js:892:10)
at Request._callback (/home/vagrant/code/Ghost/core/test/unit/api_posts_spec.js:54:34)
at Request.self.callback (/home/vagrant/code/Ghost/node_modules/request/request.js:129:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (/home/vagrant/code/Ghost/node_modules/request/request.js:873:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/vagrant/code/Ghost/node_modules/request/request.js:824:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
Post API
◦ can retrieve all posts: 127.0.0.1 - - [Mon, 04 Nov 2013 13:06:24 GMT] "GET /ghost/signin/ HTTP/1.1" 200 2670 "-" "-"
127.0.0.1 - - [Mon, 04 Nov 2013 13:06:24 GMT] "POST /ghost/signin/ HTTP/1.1" 200 22 "-" "-"
127.0.0.1 - - [Mon, 04 Nov 2013 13:06:25 GMT] "GET /ghost/api/v0.1/posts/ HTTP/1.1" 200 6632 "-" "-"
1) can retrieve all posts
◦ can retrieve a post: 127.0.0.1 - - [Mon, 04 Nov 2013 13:06:26 GMT] "GET /ghost/signin/ HTTP/1.1" 302 41 "-" "-"
127.0.0.1 - - [Mon, 04 Nov 2013 13:06:27 GMT] "GET /ghost/ HTTP/1.1" 200 5443 "-" "-"
127.0.0.1 - - [Mon, 04 Nov 2013 13:06:27 GMT] "POST /ghost/signin/ HTTP/1.1" 200 22 "-" "-"
✓ can retrieve a post
127.0.0.1 - - [Mon, 04 Nov 2013 13:06:27 GMT] "GET /ghost/api/v0.1/posts/1/ HTTP/1.1" 200 6580 "-" "-"
server {
server_name apileofblog.com;
root /var/www/apileofblog.com;
include conf.d/cache-static.conf;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
Node.js v0.11.x:
{ page: 1,
limit: 15,
where: { page: 'all', [__proto__]: {} },
status: 'all',
orderBy: [ 'updated_at', 'DESC' ] }
{ page: 1,
limit: 15,
where: { [__proto__]: {} },
!wp-content/
wp-content/*
!wp-content/themes/
wp-content/themes/**/node_modules/
wp-content/themes/**/.sass-cache/