View build.js
// Gulp
import gulp from 'gulp';
import plumber from 'gulp-plumber';
import file from 'gulp-file';
import filter from 'gulp-filter';
import rename from 'gulp-rename';
import sourcemaps from 'gulp-sourcemaps';
import uglify from 'gulp-uglify';
// Rollup
import { rollup } from 'rollup';
View EventStream.js
{
eventStream: {
modelChange: function(stream) {
stream.filter(function(val){
return val.model.name == 'receiptModel'
})
.filter(function(val){
return val == val.model.isNew();
})
.onValue(onNewReceipt);
View paPreview.text
POST preapprovalsummaries
{
data: {
type: 'preapprovalsummaries',
attributes: {
expenseReportId: 1,
preApprovalId: 2
}
}
}
View applyExpenseHeader.txt
// GET /preapprovals/1?applyExpenseHeaderId=3 HTTP/1.1
{
"links": {
"self": "/preapprovals/1"
},
"data" : {
"type" : "preapprovals",
"id" : "1",
"attributes" : {
View apply-preapproval-preview.txt
//GET /expensereports/1/relationships/applicablepreapprovals HTTP/1.1
//Content-Type: application/vnd.api+json
//Accept: application/vnd.api+json
{
"links": {
"self" : "/expensereports/1/relationships/applicablepreapprovals",
"related": "/expensereports/1/applicablepreapprovals"
},
"data" : [
View udasJsonApi.txt
PATCH /preapprovallinitems/1
{
"data": {
"type": "preapprovallinitems",
"id": "1",
"attributes": {
"name": "Updated Report"
}
},
"included": [{
View transactionAggregatesAPI.js
// I'm proposing we use the CR version at the bottom with the flexibility
// to later wrap it in the JSON API envelope.
// JSON API
// GET http://chromeriver.com/transactionAggregates
{
"links": {
"self": "http://chromeriver.com/transactionAggregates",
"next": "http://chromeriver.com/transactionAggregates?page[offset]=2",
View transactionGroupsAPI.js
// Retrieving a TransactionGroup
// ------------------------------------------------------
// GET /transactionGroups
// Content-Type: application/vnd.api+json
// Accept: application/vnd.api+json
{
"links": {
"self": "http://chromeriver.com/transactionGroups",
"next": "http://chromeriver.com/transactionGroups?page[offset]=2",
View gist:a5f403039386dc4efebc
// REQUEST
// transactionSets POST
// transactionSets/23 PUT
{
transactionIds: [315, 311]
}
// RESPONSE
View gist:5817410
> Witness@0.1.1-26 start /Users/andrew/witness
> app.js
sh: app.js: command not found
npm ERR! Witness@0.1.1-26 start: `app.js`
npm ERR! `sh "-c" "app.js"` failed with 127
npm ERR!
npm ERR! Failed at the Witness@0.1.1-26 start script.
npm ERR! This is most likely a problem with the Witness package,
npm ERR! not with npm itself.