Violating Content Security Policy directive after ember-cli 0.0.47 upgrade

After reading some docs at http://content-security-policy.com/ and https://github.com/rwjblue/ember-cli-content-security-policy, I added some policies to my config/environment.js file like so: module.exports = function(environment) { var ENV = { contentSecurityPolicy: { ‘default-src’: “‘none'”, ‘script-src’: “‘self’ ‘unsafe-inline’ ‘unsafe-eval’ use.typekit.net connect.facebook.net maps.googleapis.com maps.gstatic.com”, ‘font-src’: “‘self’ data: use.typekit.net”, ‘connect-src’: “‘self'”, ‘img-src’: “‘self’ www.facebook.com p.typekit.net”, ‘style-src’: “‘self’ ‘unsafe-inline’ use.typekit.net”, ‘frame-src’: “s-static.ak.facebook.com static.ak.facebook.com … Read more

How and when to use Ember.Application register and inject methods?

Ember by default does dependency injection when it boots your application using mostly conventions, for example if you use ember-data then an instance of the store class is injected in every route and controller in your application, so you can later get a reference by simply doing this.get(‘store’) inside any route or controller. For example … Read more

What is Ember RunLoop and how does it work?

Update 10/9/2013: Check out this interactive visualization of the run loop: https://machty.s3.amazonaws.com/ember-run-loop-visual/index.html Update 5/9/2013: all the basic concepts below are still up to date, but as of this commit, the Ember Run Loop implementation has been split off into a separate library called backburner.js, with some very minor API differences. First off, read these: http://blog.sproutcore.com/the-run-loop-part-1/ … Read more

Ember.js or Backbone.js for Restful backend [closed]

Contrary to popular opinion Ember.js isn’t a ‘more heavy weight approach’ to Backbone.js. They’re different kinds of tools that target totally different end products. Ember’s sweet spot is applications where the user will keep the application open for long periods of time, perhaps all day, and interactions with the application’s views or underlying data trigger … Read more

How to architect an Ember.js application

Mike Grassotti’s Minimum Viable Ember.js QuickStart Guide This quickstart guide should get you from zero to slightly-more-than-zero in a couple of minutes. When done, you should feel somewhat confident that ember.js actually works and hopefully will be interested enough to learn more. WARNING: Don’t just try this guide then think ember-sucks cause “I could write … Read more

What is the difference between a route and resource in New Router API?

Please Note that from 1.11.0 onwards, this.route is only used instead of this.resource. Source: http://guides.emberjs.com/v1.11.0/routing/defining-your-routes/* Have a look at this post for a detailed explanation. This is a rough summary of this post (i have modified a bit): Ever since the change to resource and route a lot of people are confused about the meaning … Read more

ember-cli-code-coverage mocha showing 0% coverage when there are tests

Few well integrated tools to establish accurate code coverage for ember-cli apps exist. (something like Istanbul for everything in app/) We ended up avoiding ember-cli-blanket and writing a rudimentary istanbul 78 integration with testem. Basically, it calls the istanbul cli against the single JS file output by ember build. Imprecise but consistent. We’ve used in … Read more