This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
cheetos: null | |
}); |
This file contains 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
// Task function body | |
let continuePolling = true; | |
while (continuePolling) { | |
yield this.get('ajax').raw(url, headers).then(() => { | |
if (somethingBoring) { | |
return timeout(pollingInterval); | |
} else { | |
continuePolling = false; | |
} |
This file contains 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
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 |
This file contains 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
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')); | |
}); |
This file contains 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
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'); |
This file contains 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
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']) |
This file contains 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 Ember from 'ember'; | |
const on = Ember.on; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
setMyNumbers: on('init', function() { | |
let array = new Array(7); | |
This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
myFlag: false | |
}); |
This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |