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
// Try to be as sensible as possible about parsing durations | |
function parseDuration(duration) { | |
// .75 | |
if (match = /^\.\d+$/.exec(duration)) { | |
return parseFloat("0" + match[0]) * 3600; | |
// 4 or 11.75 | |
} else if (match = /^\d+(?:\.\d+)?$/.exec(duration)) { | |
return parseFloat(match[0]) * 3600; | |
// 01:34 | |
} else if (match = /^(\d+):(\d+)$/.exec(duration)) { |
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
var zombie = require("zombie"); | |
var assert = require("assert"); | |
zombie.debug = true; | |
var browser = new zombie(); | |
browser.visit("http://google.com/") | |
.then(function(){ | |
assert.equal(browser.statusCode, 401); |
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
var expect = require('expect.js'), | |
Browser = require('zombie'); | |
var browser = new Browser({waitDuration: 1500}); | |
describe('Status Codes', function(){ | |
this.timeout(2000); | |
it('Unauthorized', function(done){ |
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
// Version: v1.0.0-pre.2-291-g4785901 | |
// Last commit: 4785901 (2013-01-05 18:57:16 +0100) | |
(function() { | |
/*global __fail__*/ | |
/** | |
Ember Debug |
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
// Version: v1.0.0-pre.2-291-g4785901 | |
// Last commit: 4785901 (2013-01-05 18:57:16 +0100) | |
(function() { | |
/*global __fail__*/ | |
/** | |
Ember Debug |
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 Model Test', | |
model() { | |
return this.store.findAll('meetup') | |
} | |
}); |
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({ | |
filteredModel: Ember.computed('filterValue', '[email protected]', function() { | |
if(Ember.isEmpty(this.get('filterValue'))) { | |
return this.model; | |
} | |
return this.model.filter((test) => test.get('name') === this.get('filterValue')); |
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.Component.extend({ | |
store: Ember.inject.service(), | |
router: Ember.inject.service(), | |
actions: { | |
createInstance() { | |
let newInstance = this.get('store').createRecord('instance'); | |
this.set('instance', newInstance); | |
}, |
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 DS from 'ember-data'; | |
export default DS.RESTAdapter.extend({ | |
host: 'http://localhost:3000/api' | |
}); |
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({ | |
appData : { | |
"title" : "First Title", | |
"subtitles": [ | |
{ | |
"AMount":"4343" | |
}, | |
{ |
OlderNewer