From 4f38faf3c2af13efae15ce1029c046c3e51e59e0 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 10 Feb 2015 09:43:54 +0100 Subject: [PATCH] Use travis location --- app/initializers/location.coffee | 11 +++++++++++ app/router.coffee | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 app/initializers/location.coffee diff --git a/app/initializers/location.coffee b/app/initializers/location.coffee new file mode 100644 index 00000000..1177e5dd --- /dev/null +++ b/app/initializers/location.coffee @@ -0,0 +1,11 @@ +`import TravisLocation from 'travis/utils/location'` + +initialize = (container, application) -> + application.register 'location:travis', TravisLocation + +Initializer = + name: 'location' + initialize: initialize + +`export { initialize }` +`export default Initializer` diff --git a/app/router.coffee b/app/router.coffee index 938e571b..e57388a1 100644 --- a/app/router.coffee +++ b/app/router.coffee @@ -4,7 +4,7 @@ Router = Ember.Router.extend # TODO: we should use TravisLocation here - location: if Ember.testing then 'none' else 'history' + location: if Ember.testing then 'none' else 'travis' handleURL: (url) -> url = url.replace(/#.*?$/, '')