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
require 'logger' | |
$logger = Logger.new(STDOUT) | |
require 'active_support/cache' | |
$cache = ActiveSupport::Cache.lookup_store(:memory_store) | |
$cache.logger = $logger | |
$cache.clear | |
class EtagMiddleware |
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"; | |
import { test, moduleForComponent } from "ember-qunit"; | |
moduleForComponent("show-products"); | |
test('should not show products for the first time', function() { | |
var component = this.subject(); | |
equal(component.get('showingProducts'), 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
backburner = new Backburner( | |
['syc', 'actions', 'destroy'], | |
{ | |
GUID_KEY: GUID_KEY, | |
sync: { | |
before: beginPropertyChanges, | |
after: endPropertyChanges | |
}, | |
defaultQueue: 'actions', | |
onBegin: onBegin, |
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
function onBegin(current) { | |
run.currentRunLoop = current; | |
} | |
function onEnd(current, next) { | |
run.currentRunLoop = next; | |
} |
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
export default run; | |
function run() { | |
return backburner.run.apply(backburner, arguments) | |
} |
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
Ember.run(function() { | |
console.log('true'); | |
}); |
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
function DeferredActionQueues(queueNames, options) { | |
var queues = this.queues = Object.create(null); | |
this.queueNames = queueNames || []; | |
this.options = options; | |
each(queueNames, function(queueName){ | |
queues[queueName] = new Queue(queueName, options[queueName], options); | |
}); | |
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
DeferredActionQueues {queues: Object, queueNames: Array[3], options: Object} | |
// expanded | |
DeferredActionQueues { | |
queues: { | |
"actions": Queue, | |
"sync": Queue, | |
"destroy": Queue | |
}, | |
queueNames: Array[ "actions", "sync", "destroy" ], |
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
function Queue(name, options, globalOptions) { | |
this.name = name; | |
this.globalOptions = globalOptions; | |
this.options = options; | |
this._queue = []; | |
this.targetQueues = Object.create(null); | |
this._queueBeingFlushed = undefined; | |
} |
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
Ember.run.currentRunLoop | |
// undefined | |
Ember.run(function() { | |
console.log(Ember.run.currentRunLoop); | |
}); | |
// DeferredActionQueues {queues: Object, queueNames: Array[6], options: Object, schedule: function, invoke: function…} | |
// You can run that in your browser and have a better look at it. |
OlderNewer