Skip to content

Instantly share code, notes, and snippets.

View jherdman's full-sized avatar

James Herdman jherdman

View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
cheetos: null
});
// Task function body
let continuePolling = true;
while (continuePolling) {
yield this.get('ajax').raw(url, headers).then(() => {
if (somethingBoring) {
return timeout(pollingInterval);
} else {
continuePolling = false;
}
Error: [eval("(function(undefined) {window.jasmine && (JSTestingReporterSL = (function(undefined) {\n\n return function() {\n return {\n failedCount: jasmine.currentEnv_.currentRunner_.results().failedCount\n };\n }\n\n})());\n\nwindow.mocha && (JSTestingReporterSL = (function(undefined) {\n\n function hasArray(obj, nameArray) {\n return obj && obj[nameArray] && obj[nameArray].length > 0;\n }\n\n function hasSuite(obj) {\n return hasArray(obj, \"suites\");\n }\n\n function hasSpec(obj){\n return hasArray(obj, \"tests\");\n }\n\n function reporterSpec(test) {\n var isPassed = test.state === \"passed\";\n return {\n description : test.title,\n durationSec : test.duration/1000,\n passed : isPassed,\n passedCount : isPassed ? 1 : 0,\n failedCount : isPassed ? 0 : 1,\n totalCount : 1\n };\n }\n\n function emptyReporter() {\n return {\n description : \"\",\n durationSec : 0,\n passed : true,\n totalCount : 0\n
actions : {
login: function(id) {
this.store.find('profile', { orderBy: 'profileId', equalTo: id }).then(profile => {
profile = profile.get('firstObject');
this.get('session').set('currentProfile', profile);
return this.store.find('conversation', { orderBy: 'me', equalTo: profile.get('id') }).then(conversations => {
let other = conversations.get('firstObject.other');
this.transitionTo('conversation', other.get('profileId'));
});
test('visiting / and make the login with first profile', function(assert) {
visit('/');
let list;
andThen(function() {
assert.equal(currentURL(), '/', 'URL of login');
list = find('.profile-list');
assert.ok(list.length > 0, 'We have profiles');
class AcuityParameterFixer
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
if request.path == '/acuity/webhook' && request.params['action']
request.update_param('acuity_action', request.params['action'])
@jherdman
jherdman / application.controller.js
Created October 27, 2015 18:16
array-holes-ignored
import Ember from 'ember';
const on = Ember.on;
export default Ember.Controller.extend({
appName:'Ember Twiddle',
setMyNumbers: on('init', function() {
let array = new Array(7);
@jherdman
jherdman / application.controller.js
Created October 23, 2015 19:27
stupid action problem
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
myFlag: false
});
@jherdman
jherdman / application.controller.js
Last active October 13, 2015 20:38
ugh-loading
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});