From eafd963882f1da89fbb5ac70be08c7d3a987d298 Mon Sep 17 00:00:00 2001 From: Karim Baaba Date: Sun, 17 Jan 2016 23:57:59 -0700 Subject: [PATCH 1/2] fix(deprecations) Use getOwner polyfill for lookup*s --- addon/event_dispatcher.js | 3 ++- addon/services/-gestures.js | 5 +++-- app/instance-initializers/ember-gestures.js | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/addon/event_dispatcher.js b/addon/event_dispatcher.js index 29dfb4f..8b3bf51 100644 --- a/addon/event_dispatcher.js +++ b/addon/event_dispatcher.js @@ -3,6 +3,7 @@ import defaultHammerEvents from './hammer-events'; import dasherizedToCamel from 'ember-allpurpose/string/dasherized-to-camel'; import jQuery from 'jquery'; import mobileDetection from './utils/is-mobile'; +import getOwner from 'ember-getowner-polyfill'; let ROOT_ELEMENT_CLASS = 'ember-application'; let ROOT_ELEMENT_SELECTOR = '.' + ROOT_ELEMENT_CLASS; @@ -47,7 +48,7 @@ export default EventDispatcher.extend({ const events = assign({}, defaultHammerEvents); list.forEach((name) => { - const recognizer = this.container.lookupFactory('ember-gesture:recognizers/' + name); + const recognizer = getOwner(this)._lookupFactory('ember-gesture:recognizers/' + name); if (recognizer) { addEvent(events, recognizer.recognizer, recognizer.eventName || name); diff --git a/addon/services/-gestures.js b/addon/services/-gestures.js index f2764b3..beb5a0c 100644 --- a/addon/services/-gestures.js +++ b/addon/services/-gestures.js @@ -2,6 +2,7 @@ import Ember from 'ember'; import camelize from 'ember-allpurpose/string/dasherized-to-camel'; import capitalize from 'ember-allpurpose/string/capitalize-word'; +import getOwner from 'ember-getowner-polyfill'; const { Service, @@ -82,7 +83,7 @@ export default Service.extend({ } const path = `ember-gesture:recognizers/${name}`; - const details = this.container.lookupFactory(path); + const details = getOwner(this)._lookupFactory(path); if (details) { return this.setupRecognizer(name, details); @@ -101,7 +102,7 @@ export default Service.extend({ } const path = `ember-gesture:recognizers/${name}`; - const details = this.container.lookupFactory(path); + const details = getOwner(this)._lookupFactory(path); if (details) { return this.setupRecognizer(name, details); diff --git a/app/instance-initializers/ember-gestures.js b/app/instance-initializers/ember-gestures.js index b8baf45..929728e 100644 --- a/app/instance-initializers/ember-gestures.js +++ b/app/instance-initializers/ember-gestures.js @@ -1,3 +1,5 @@ +import getOwner from 'ember-getowner-polyfill'; + export default { name: 'ember-gestures', @@ -6,7 +8,7 @@ export default { instance.lookup('service:-gestures'); } else { // This can be removed when we no-longer support ember 1.12 and 1.13 - instance.container.lookup('service:-gestures'); + getOwner(instance).lookup('service:-gestures'); } } From d2598cbe1b853486bb677067c6de64d7955e3845 Mon Sep 17 00:00:00 2001 From: Karim Baaba Date: Mon, 18 Jan 2016 09:43:01 -0700 Subject: [PATCH 2/2] fix(breaking) Set fixed jQuery version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 9ecbd68..7b648db 100644 --- a/bower.json +++ b/bower.json @@ -7,7 +7,7 @@ "ember-load-initializers": "~0.1.7", "ember-qunit": "~0.4.18", "ember-qunit-notifications": "~0.1.0", - "jquery": "^1.11.3", + "jquery": "1.11.3", "loader.js": "~3.5.0", "qunit": "~1.20.0", "marked": "~0.3.5"