mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-08-05 01:50:47 +02:00
feat(config): upgrade to angular 1.5
Update bower dependencies to more recent versions. Resolved hard-coded dependency by updating file upload PhantomJs to 2.x series for tests (@usta) Fix assertion in tests for compatibility with MongoDB 3.2 (@rhutchison) Improve coding style tests to avoid type errors (@ilanbiala) Fix refresh showing flash of scrollbar in menu Remove deprecated angular-ui-utils Fixes #1124
This commit is contained in:
22
bower.json
22
bower.json
@@ -4,19 +4,15 @@
|
||||
"homepage": "http://meanjs.org/",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"angular": "~1.3",
|
||||
"angular-animate": "~1.3",
|
||||
"angular-bootstrap": "~1.0",
|
||||
"angular-file-upload": "1.1.5",
|
||||
"angular-messages": "~1.3.17",
|
||||
"angular-mocks": "~1.3",
|
||||
"angular-resource": "~1.3",
|
||||
"angular-ui-router": "~0.2",
|
||||
"angular-ui-utils": "bower",
|
||||
"bootstrap": "~3",
|
||||
"angular": "~1.5.0",
|
||||
"angular-animate": "~1.5.0",
|
||||
"angular-bootstrap": "~1.2.1",
|
||||
"angular-file-upload": "~2.2.0",
|
||||
"angular-messages": "~1.5.0",
|
||||
"angular-mocks": "~1.5.0",
|
||||
"angular-resource": "~1.5.0",
|
||||
"angular-ui-router": "~0.2.18",
|
||||
"bootstrap": "~3.3.6",
|
||||
"owasp-password-strength-test": "~1.3.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"angular": "~1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,8 @@ module.exports = {
|
||||
'public/lib/angular-animate/angular-animate.js',
|
||||
'public/lib/angular-messages/angular-messages.js',
|
||||
'public/lib/angular-ui-router/release/angular-ui-router.js',
|
||||
'public/lib/angular-ui-utils/ui-utils.js',
|
||||
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
|
||||
'public/lib/angular-file-upload/angular-file-upload.js',
|
||||
'public/lib/angular-file-upload/dist/angular-file-upload.js',
|
||||
'public/lib/owasp-password-strength-test/owasp-password-strength-test.js'
|
||||
],
|
||||
tests: ['public/lib/angular-mocks/angular-mocks.js']
|
||||
|
||||
@@ -13,9 +13,8 @@ module.exports = {
|
||||
'public/lib/angular-animate/angular-animate.min.js',
|
||||
'public/lib/angular-messages/angular-messages.min.js',
|
||||
'public/lib/angular-ui-router/release/angular-ui-router.min.js',
|
||||
'public/lib/angular-ui-utils/ui-utils.min.js',
|
||||
'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',
|
||||
'public/lib/angular-file-upload/angular-file-upload.min.js',
|
||||
'public/lib/angular-file-upload/dist/angular-file-upload.min.js',
|
||||
'public/lib/owasp-password-strength-test/owasp-password-strength-test.js'
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var ApplicationConfiguration = (function () {
|
||||
// Init module configuration options
|
||||
var applicationModuleName = 'mean';
|
||||
var applicationModuleVendorDependencies = ['ngResource', 'ngAnimate', 'ngMessages', 'ui.router', 'ui.bootstrap', 'ui.utils', 'angularFileUpload'];
|
||||
var applicationModuleVendorDependencies = ['ngResource', 'ngAnimate', 'ngMessages', 'ui.router', 'ui.bootstrap', 'angularFileUpload'];
|
||||
|
||||
// Add a new vertical module
|
||||
var registerModule = function (moduleName, dependencies) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</button>
|
||||
<a ui-sref="home" class="navbar-brand">MEAN.JS</a>
|
||||
</div>
|
||||
<nav class="collapse navbar-collapse" uib-collapse="!isCollapsed" role="navigation">
|
||||
<nav class="navbar-collapse" uib-collapse="!isCollapsed" role="navigation">
|
||||
<ul class="nav navbar-nav" ng-if="menu.shouldRender(authentication.user);">
|
||||
<li ng-repeat="item in menu.items | orderBy: 'position'" ng-if="item.shouldRender(authentication.user);" ng-switch="item.type" ng-class="{ active: $state.includes(item.state), dropdown: item.type === 'dropdown' }" class="{{item.class}}" uib-dropdown="item.type === 'dropdown'">
|
||||
<a ng-switch-when="dropdown" class="dropdown-toggle" uib-dropdown-toggle role="button">{{::item.title}} <span class="caret"></span></a>
|
||||
|
||||
@@ -5,20 +5,39 @@
|
||||
* Functionality of the service is tested through
|
||||
* the chat controller tests.
|
||||
*/
|
||||
window.io = function() {
|
||||
this.cbs = {};
|
||||
this.on = function(msg, cb) {
|
||||
this.cbs[msg] = cb;
|
||||
|
||||
var ngInjector = angular.injector(['ng']),
|
||||
$window = ngInjector.get('$window');
|
||||
|
||||
var mock = function () {
|
||||
var io = {
|
||||
cbs: {},
|
||||
connect: connect,
|
||||
emit: emit,
|
||||
on: on,
|
||||
removeListener: removeListener
|
||||
};
|
||||
this.emit = function(msg, data) {
|
||||
this.cbs[msg](data);
|
||||
};
|
||||
this.removeListener = function(msg) {
|
||||
delete this.cbs[msg];
|
||||
};
|
||||
this.connect = function() {
|
||||
this.socket = {};
|
||||
};
|
||||
return this;
|
||||
|
||||
connect();
|
||||
|
||||
return io;
|
||||
|
||||
function connect() {
|
||||
io.socket = {};
|
||||
}
|
||||
|
||||
function emit(msg, data) {
|
||||
io.cbs[msg](data);
|
||||
}
|
||||
|
||||
function on(msg, cb) {
|
||||
io.cbs[msg] = cb;
|
||||
}
|
||||
|
||||
function removeListener(msg) {
|
||||
delete io.cbs[msg];
|
||||
}
|
||||
};
|
||||
|
||||
$window.io = mock;
|
||||
})();
|
||||
|
||||
@@ -742,7 +742,10 @@ describe('User CRUD tests', function () {
|
||||
}
|
||||
|
||||
// Call the assertion callback
|
||||
userInfoRes.body.message.should.equal('Username already exists');
|
||||
// MongoDB changed document validation output in version 3.2:
|
||||
// >= 3.2 11000 duplicate key error collection: mean-test.users index: username already exists
|
||||
// < 3.2 Username already exists
|
||||
userInfoRes.body.message.toLowerCase().should.containEql('username already exists');
|
||||
|
||||
return done();
|
||||
});
|
||||
@@ -794,7 +797,10 @@ describe('User CRUD tests', function () {
|
||||
}
|
||||
|
||||
// Call the assertion callback
|
||||
userInfoRes.body.message.should.equal('Email already exists');
|
||||
// MongoDB changed document validation output in version 3.2:
|
||||
// >= 3.2 11000 duplicate key error collection: mean-test.users index: email already exists
|
||||
// < 3.2 Email already exists
|
||||
userInfoRes.body.message.toLowerCase().should.containEql('email already exists');
|
||||
|
||||
return done();
|
||||
});
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
"passport-local": "~1.0.0",
|
||||
"passport-paypal-openidconnect": "~0.1.1",
|
||||
"passport-twitter": "~1.0.4",
|
||||
"phantomjs": "~1.9.19",
|
||||
"phantomjs-prebuilt": "~2.1.4",
|
||||
"serve-favicon": "~2.3.0",
|
||||
"socket.io": "~1.3.7",
|
||||
"swig": "~1.4.2",
|
||||
@@ -116,7 +116,7 @@
|
||||
"karma-firefox-launcher": "~0.1.7",
|
||||
"karma-jasmine": "~0.3.7",
|
||||
"karma-ng-html2js-preprocessor": "~0.2.1",
|
||||
"karma-phantomjs-launcher": "~0.2.3",
|
||||
"karma-phantomjs-launcher": "~1.0.0",
|
||||
"load-grunt-tasks": "~3.2.0",
|
||||
"mock-fs": "~3.7.0",
|
||||
"run-sequence": "~1.1.5",
|
||||
|
||||
Reference in New Issue
Block a user