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
DEBUG jane : Message received: {"type":"error","subtype":"data","content":{"data":null,"message":null}} | |
DEBUG jane : Response sent: {:type=>:error, :subtype=>:system, :content=>{:data=>nil, :message=>"NoMethodError: Georgos can't handle: error"}} | |
.DEBUG jane : Message received: {"type":"error","subtype":"data","content":{"data":null,"message":null}} | |
DEBUG jane : Response sent: {:type=>:error, :subtype=>:system, :content=>{:data=>nil, :message=>"NoMethodError: Georgos can't handle: error"}} | |
.DEBUG jane : Message received: {"type":"ride","subtype":"new","meta":{"fleets":[],"priority":null,"hail_protocol":null},"content":{"id":null,"notes":null,"passenger":{"id":null,"name":null,"phone":null,"email":null},"pickup_location":{"address_1":null,"address_2":null,"city":null,"state":null,"postal_code":null,"country":null,"latitude":null,"longitude":null},"drop_off_location":{"address_1":null,"address_2":null,"city":null,"state":null,"postal_code":null,"country":null,"latitude":null,"longitude":null},"requirements |
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
function updatePaymentMethod (req, res, next, log, externalResources) { | |
apptokens.validateTokenHelper(req, res, next, req.params.authToken, function() { | |
spacelyHost = externalResources.spacely; | |
reqOptions = { | |
method: 'PUT', | |
url: spacelyHost + '/passengers/' + req.params.passenger_id + '/payment_methods/' + req.params.id, | |
json: req.params | |
}; |
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
we got a payload from Elroy: {"type":"ride","subtype":"new","meta":{"fleets":[],"hail_protocol":"","priority":""},"content":{"id":"","passenger":{"id":"e74e133f-b6cc-43bd-9da7-b9956afee24b","name":"Jared"},"pickup_location":{"address_1":"816 Hamilton St","address_2":"","city":"Redwood City","state":"CA","country":"USA","postal_code":94063,"latitude":37.5,"longitude":-122.25},"drop_off_location":{"address_1":"816 Hamilton St","address_2":"","city":"Redwood City","state":"CA","country":"USA","postal_code":94063,"latitude":37.5,"longitude":-122.25},"requirements":{"party_size":"","mobility":"","preferred_fleets":[],"preferred_drivers":[]},"notes":""}} | |
DEBUG astro : Processing message: {:type=>"ride", :subtype=>"new", :meta=>{:fleets=>[], :hail_protocol=>"", :priority=>""}, :content=>{:id=>"", :passenger=>{:id=>"e74e133f-b6cc-43bd-9da7-b9956afee24b", :name=>"Jared"}, :pickup_location=>{:address_1=>"816 Hamilton St", :address_2=>"", :city=>"Redwood City", :state=>"CA", :country=>"USA", :postal_code=>94063, :lati |
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
- install RabbitMQ: http://www.rabbitmq.com/download.html | |
- install Riak: http://docs.basho.com/riak/latest/tutorials/installation/Installing-on-Mac-OS-X/ | |
- install Postgres: http://www.postgresql.org/download/macosx/ | |
$ rabbitmq-server -detached | |
$ riak start | |
- ensure latest revision of: astro, jane, spacely, elroy, uniblab, flywheel, devops | |
- ensure rvm gem sets, current bundle, current npm install for elroy | |
- create and migrate the spacely PSQL db |
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
define([ | |
'jquery', 'underscore', 'backbone', | |
'collections/passengers/collection', | |
'text!templates/passenger/list.html' | |
], function ($, _, Backbone, Passengers, passengerTemplate) { | |
PassengerView = Backbone.View.extend({ | |
el: $('#passengers'), | |
initialize: function () { | |
var self = this; | |
this.collection = new Passengers(); |
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
define([ | |
'jquery', 'underscore', 'backbone', | |
'models/passenger/model' | |
], function ($, _, Backbone, Passenger) { | |
Passengers = Backbone.Collection.extend({ | |
model: Passenger | |
}); | |
return Passengers; | |
}); |
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
Local POST to /rides | |
{"level":"info","message":"Started POST /rides for 127.0.0.1","timestamp":"2012-11-07T19:57:41.584Z"} | |
{"auth_token":"3zhjRGRaLrwE1WkYOZVvhSJ9eXvTPh3N2/3G/vKq5bgDpVq8svks40ZPelKcRfpZi+aB758V6x6YEhuKIwYnEEYm3Cj8A5McsqOct+HgpTRnX9d259NvuSjOc7SQ5jqd0yMsv9q6Hpsgz7eV2+hlWw==","content":{"id":"12345","passenger":{"id":"956c434c-e3d3-41c4-a7e7-27cdf1c4d326","name":"Grover"},"pickup_location":{"latitude":43.027622,"longitude":-108.383045,"address_1":"622 E Park Ave","city":"Riverton","state":"WY","postal_code":"82501","country":"USA"},"notes":"hello, world!"},"requirements":{"party_size":2},"level":"info","message":"Creating ride for user 956c434c-e3d3-41c4-a7e7-27cdf1c4d326","timestamp":"2012-11-07T19:57:41.584Z"} | |
{"type":"ride","subtype":"information","id":7,"meta":{"fleets":[],"priority":null,"hail_protocol":null},"content":{"id":"1091178232201162869","notes":null,"status":"in_process","passenger":{"id":"956c434c-e3d3-41c4-a7e7-27cdf1c4d326","name":null,"phone":null,"email":null,"device_type": |
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 flags = ["attribute1", "attribute2", "attribute3"]; | |
var flagString = MongoDB.get("currentRecord"); | |
flags.forEach(function (flag) { | |
if flagString.contains(flag) { | |
getCheckBoxByName(flag).setChecked(true); | |
} | |
} | |
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
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { Observable } from 'rxjs' | |
import 'rxjs/add/observable/combineLatest' | |
import firebase from 'firebase' | |
// Don't tell anyone my secrets | |
firebase.initializeApp({ | |
apiKey: "AIzaSyDMOIq693Xaj6Ieo10kJCo_uY30fY6lT-8", | |
authDomain: "lambda-front-end-f3a17.firebaseapp.com", |
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
const jwt = require('jsonwebtoken') | |
const passport = require('passport') | |
const LocalStrategy = require('passport-local').Strategy | |
const JwtStrategy = require('passport-jwt').Strategy | |
const { ExtractJwt } = require('passport-jwt') | |
const User = require('./user') | |
const secret = 'squirrel' | |
const makeToken = (user) => { |