From cf44f33f39b1fbc58a888f027574d56cf8096652 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 8 Jun 2015 14:12:36 -0800 Subject: [PATCH] Drop nprogress --- .jshintrc | 3 +-- Brocfile.js | 4 ---- app/pods/application/route.js | 9 +-------- app/pods/loading/template.hbs | 4 ++++ bower.json | 1 - config/environment.js | 15 --------------- tests/unit/pods/loading/route-test.js | 11 +++++++++++ 7 files changed, 17 insertions(+), 30 deletions(-) create mode 100644 app/pods/loading/template.hbs create mode 100644 tests/unit/pods/loading/route-test.js diff --git a/.jshintrc b/.jshintrc index b01ef77..08096ef 100644 --- a/.jshintrc +++ b/.jshintrc @@ -2,8 +2,7 @@ "predef": [ "document", "window", - "-Promise", - "/* global nprogress */" + "-Promise" ], "browser": true, "boss": true, diff --git a/Brocfile.js b/Brocfile.js index 644f168..2d61bbc 100644 --- a/Brocfile.js +++ b/Brocfile.js @@ -8,8 +8,6 @@ var app = new EmberApp(); // flakes (and deps) app.import('bower_components/flakes/css/all.css'); app.import('bower_components/gridforms/gridforms/gridforms.css'); -// nprogress -app.import('bower_components/nprogress/nprogress.css'); // LIBS //////////////////////////////////////////////////////////////////////// // flakes (and deps) @@ -17,8 +15,6 @@ app.import('bower_components/snapjs/snap.js'); app.import('bower_components/responsive-elements/responsive-elements.js'); app.import('bower_components/gridforms/gridforms/gridforms.js'); app.import('bower_components/flakes/js/base.js'); -// nprogress -app.import('bower_components/nprogress/nprogress.js'); // moment app.import('bower_components/moment/moment.js'); diff --git a/app/pods/application/route.js b/app/pods/application/route.js index 6d268cc..016ebd4 100644 --- a/app/pods/application/route.js +++ b/app/pods/application/route.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin'; -/* global NProgress */ export default Ember.Route.extend(ApplicationRouteMixin, { actions: { @@ -8,13 +7,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, { this.get('session').invalidate(); }, loading: function() { - NProgress.start(); - this.router.one('didTransition', function() { - return setTimeout((function() { - return NProgress.done(); - }), 50); - }); return true; - } + }, } }); diff --git a/app/pods/loading/template.hbs b/app/pods/loading/template.hbs new file mode 100644 index 0000000..cf8513a --- /dev/null +++ b/app/pods/loading/template.hbs @@ -0,0 +1,4 @@ +
+
+
+
diff --git a/bower.json b/bower.json index 9538af7..bb963a8 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,6 @@ "qunit": "~1.17.1", "flakes": "~1.0.0", "ember-simple-auth": "~0.8.0-beta.3", - "nprogress": "~0.1.6", "moment": "~2.9.0" } } diff --git a/config/environment.js b/config/environment.js index 95ffa79..5e7d5c8 100644 --- a/config/environment.js +++ b/config/environment.js @@ -38,11 +38,6 @@ module.exports = function(environment) { tokenPropertyName: 'token', authorizationPrefix: 'Bearer ', authorizationHeaderName: 'Authorization', - refreshAccessTokens: true, - serverTokenRefreshEndpoint: '/api/authenticate', - tokenExpireName: 'exp', - refreshLeeway: 300, - timeFactor: 1 } ENV.apiURL = 'http://127.0.0.1:4200'; ENV.contentSecurityPolicy = { @@ -69,11 +64,6 @@ module.exports = function(environment) { tokenPropertyName: 'token', authorizationPrefix: 'Bearer ', authorizationHeaderName: 'Authorization', - refreshAccessTokens: true, - serverTokenRefreshEndpoint: 'https://bactdb-test.herokuapp.com/api/authenticate', - tokenExpireName: 'exp', - refreshLeeway: 300, - timeFactor: 1 } ENV.apiURL = 'https://bactdb-test.herokuapp.com'; ENV.contentSecurityPolicy = { @@ -104,11 +94,6 @@ module.exports = function(environment) { tokenPropertyName: 'token', authorizationPrefix: 'Bearer ', authorizationHeaderName: 'Authorization', - refreshAccessTokens: true, - serverTokenRefreshEndpoint: 'https://bactdb.herokuapp.com/api/authenticate', - tokenExpireName: 'exp', - refreshLeeway: 300, - timeFactor: 1 } ENV.apiURL = 'https://bactdb.herokuapp.com'; ENV.contentSecurityPolicy = { diff --git a/tests/unit/pods/loading/route-test.js b/tests/unit/pods/loading/route-test.js new file mode 100644 index 0000000..e81a0d4 --- /dev/null +++ b/tests/unit/pods/loading/route-test.js @@ -0,0 +1,11 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:loading', 'Unit | Route | loading', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + var route = this.subject(); + assert.ok(route); +});