I hereby claim:
- I am joefiorini on github.
- I am joefiorini (https://keybase.io/joefiorini) on keybase.
- I have a public key whose fingerprint is 7427 4C38 7E7A FF20 EA9B 52FA B877 0C41 8A12 B9A0
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Basically, it's a minimal Rails-API app (based loosely on this gist) embedded in an api folder in the root. Then the rest of it is a stock ember-cli setup. I don't know yet exactly how to make Rails look elsewhere for initializers, environments & locales, going to look into it.
api/ *.rb
controllers/
models/
initializers/
environments/
locales/
config.rb
routes.rb
# Your keymap | |
# | |
'.workspace': | |
'cmd-shift-t': 'reopen-closed-item' | |
'ctrl-w v': 'pane:split-right' | |
'ctrl-w s': 'pane:split-down' | |
'ctrl-w w': 'window:focus-next-pane' | |
'ctrl-w l': 'window:focus-pane-on-right' |
$.ajaxPrefilter(function(options, originalOptions, jqXHR) { | |
var token; | |
if (!options.crossDomain) { | |
token = $('meta[name="csrf-token"]').attr('content'); | |
if (token) { | |
return jqXHR.setRequestHeader('X-CSRF-Token', token); | |
} | |
} | |
}); |
Ember.Test.registerHelper('httpRespond', function(app, verb, url, body, status) { | |
function tryResponding() { | |
console.log("matching against url: ", url); | |
var found = fakehr.match(verb.toUpperCase(), url) | |
if (found) { | |
Ember.run(function() { | |
found.respond(status || 200, {'content-type': 'application/json'}, body); | |
}); |
RSVP.Promise.prototype.returnStatus = function() { | |
this.then(function() { | |
return 0; | |
}).catch(function() { | |
return 1; | |
}); | |
return this; | |
} |
// who what where when why how | |
// possible behaviors: | |
// - visited page | |
// - clicked link | |
// - submitted form | |
// - completed task | |
// - | |
// - selected value | |
{ | |
"behavior": { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.jsbin.jsbin</string> | |
<key>WorkingDirectory</key> | |
<string>/var/srv/jsbin</string> | |
<key>ProgramArguments</key> | |
<array> |
import {default as DashboardRoute} from "dashboard/route"; | |
export default DashboardRoute.extend({ | |
model: function(){ | |
var history = this.container.lookup("model:queue-history"); | |
// Ensure both promises complete before continuing the router | |
return Ember.RSVP.hash({ | |
history: history.find(this.store), | |
queues: this.store.find("queue") | |
}); |
{ | |
"name": "ember-app-kit", | |
"dependencies": { | |
"ember": "http://builds.emberjs.com/canary/ember.js", | |
"ember-prod": "http://builds.emberjs.com/canary/ember.prod.js", | |
"handlebars": "1.0.0", | |
"jquery": "~1.9.1", | |
"lodash": "~1.3.1", | |
"ember-cpm": "git://github.com/jamesarosen/ember-cpm#master", | |
"ember-data": "http://builds.emberjs.com/beta/ember-data.js", |