fix(update): updates node modules and various fixes

This commit is contained in:
vladikoff 2015-10-02 15:18:32 -04:00
Родитель 30a5207636
Коммит bb3836d8fd
36 изменённых файлов: 165 добавлений и 206 удалений

Просмотреть файл

@ -18,6 +18,7 @@ indent_style = space
indent_size = 2
[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2
@ -29,5 +30,5 @@ indent_size = 2
indent_style = space
indent_size = 2
[*.md]
[*.{diff,md}]
trim_trailing_whitespace = false

45
.gitignore поставляемый
Просмотреть файл

@ -1,34 +1,17 @@
# Logs
logs
*.log
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Runtime data
pids
*.pid
*.seed
# compiled output
/dist
/tmp
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# dependencies
/node_modules
/bower_components
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
# Bower Components
bower_components
# Users Environment Variables
.lock-wscript
dist
tmp
# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log

Просмотреть файл

@ -16,10 +16,5 @@
"requireSpacesInConditionalExpression": true,
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateQuoteMarks": true,
"validateJSDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
}
"validateQuoteMarks": true
}

Просмотреть файл

@ -4,8 +4,8 @@
"window",
"-Promise"
],
"browser" : true,
"boss" : true,
"browser": true,
"boss": true,
"curly": true,
"debug": false,
"devel": true,

Просмотреть файл

@ -1,7 +1,9 @@
language: node_js
addons:
firefox: "32.0"
firefox: "39.0"
sudo: false
before_install:
- "export DISPLAY=:99.0"
@ -9,6 +11,8 @@ before_install:
node_js:
- '0.10'
- '0.12'
- '4'
script:
- npm i

3
.watchmanconfig Normal file
Просмотреть файл

@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp"]
}

Просмотреть файл

@ -1,23 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
module.exports = app.toTree();

Просмотреть файл

@ -7,9 +7,11 @@ import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';
var App;
Ember.MODEL_FACTORY_INJECTIONS = true;
var App = Ember.Application.extend({
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver

Просмотреть файл

@ -11,11 +11,15 @@
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/fxa-oauth-console.css">
{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}
<script src="assets/vendor.js"></script>
<script src="assets/fxa-oauth-console.js"></script>
{{content-for 'body-footer'}}
</body>
</html>

Просмотреть файл

@ -3,13 +3,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend({
export default Ember.Route.extend(AuthenticatedRouteMixin, {
actions: {
remove: function (id) {
remove: function (model) {
console.log(model);
var self = this;
return this.store.find('client', id).then(function (client) {
return this.store.find('client', model.id).then(function (client) {
client.destroyRecord().then(function() {
self.transitionTo('clients');
});

Просмотреть файл

@ -1,18 +1,19 @@
<fieldset>
<legend>Are you sure you want to delete <em>{{name}}</em>?</legend>
<legend>Are you sure you want to delete <em>{{model.name}}</em>?</legend>
<table class="table">
<tbody>
<tr>
<th>Client ID:</th>
<td>{{id}}</td>
<td>{{model.id}}</td>
</tr>
<tr>
<th>Redirect URI</th>
<td>{{redirect_uri}}</td>
<td>{{model.redirect_uri}}</td>
</tr>
</tbody>
</table>
<button class="small button alert" {{action 'remove' id}}>Confirm</button>
<button class="small button alert" {{action 'remove' this}}>Confirm</button>
</fieldset>
{{outlet}}

Просмотреть файл

@ -28,10 +28,10 @@
"redirect_uri": "{{model.redirect_uri}}",
"oauth_uri": "{{oauth_uri}}",
"profile_uri": "{{profile_uri}}",
"scopes": "< ADD OAUTH SCOPES HERE>"
"scopes": "ADD OAUTH SCOPES HERE"
}
</pre>
<div class="btn-group">
<button class="button" {{action 'registerDone' this}}>< Back to Clients</button>
<button class="button" {{action 'registerDone' this}}>Back to Clients</button>
</div>
{{/if}}

Просмотреть файл

@ -22,7 +22,7 @@
<div class="medium-6 columns">
<ul class="inline-list ">
<li>
{{#link-to 'clients' classNames="small button success"}}< Back to Clients{{/link-to}}
{{#link-to 'clients' classNames="small button success"}}Back to Clients{{/link-to}}
</li>
</ul>
</div>

Просмотреть файл

@ -6,11 +6,12 @@
<legend>New Client</legend>
{{/if}}
{{partial 'client/form'}}
<div class="form-group">
<label for="trusted">Trusted Mozilla Client: {{view Ember.Checkbox name=model.trusted checked=model.trusted id="trusted"}}</label>
</div>
{{partial 'client/form'}}
</fieldset>
</form>
{{#unless model.secret}}

Просмотреть файл

@ -1,27 +1,26 @@
{
"name": "fxa-oauth-console",
"dependencies": {
"handlebars": "~1.3.0",
"jquery": "^1.11.1",
"ember": "1.7.0",
"ember-data": "1.0.0-beta.10",
"ember-resolver": "0.1.7",
"loader.js": "stefanpenner/loader.js#1.0.1",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.4",
"qunit": "1.15.0",
"foundation": "zurb/bower-foundation#~5.4.5",
"handlebars": "1.3.0",
"foundation": "zurb/bower-foundation#5.4.5",
"ember-simple-auth": "0.6.7",
"blanket": "1.1.5"
},
"resolutions": {
"jquery": ">= 1.7.0 < 2.2.0"
"blanket": "1.1.5",
"ember": "1.13.7",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
"ember-qunit": "0.4.9",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "0.1.18",
"jquery": "1.11.3",
"loader.js": "ember-cli/loader.js#3.2.1",
"qunit": "1.18.0"
},
"devDependencies": {
"blanket": "~1.1.5",
"fxa-js-client": "~0.1.27"
"fxa-js-client": "0.1.30"
},
"resolutions": {
"jquery": "1.11.3"
}
}

26
ember-cli-build.js Normal file
Просмотреть файл

@ -0,0 +1,26 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
var app = new EmberApp(defaults, {
// Add options here
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
return app.toTree();
};

Просмотреть файл

@ -14,7 +14,7 @@ var requestToken = require('./lib/oauth').requestToken;
var config = require('../config');
var baseUrl = config.get('base_url');
var fxaOAuthConfig = config.get('fxaOAuth');
var log = require('mozlog')('server.ver.json');
var log = require('mozlog')('server.oauth');
// oauth flows are stored in memory
var oauthFlows = { };

Просмотреть файл

@ -18,40 +18,49 @@
"homepage": "https://github.com/mozilla/fxa-oauth-console",
"bugs": "https://github.com/mozilla/fxa-oauth-console/issues",
"author": "Mozilla (https://mozilla.org/)",
"license": "MPL 2.0",
"license": "MPL-2.0",
"dependencies": {
"bluebird": "2.3.11",
"body-parser": "1.10.0",
"bower": "1.3.12",
"broccoli-asset-rev": "2.0.0",
"body-parser": "1.14.1",
"bower": "1.5.3",
"broccoli-asset-rev": "^2.1.2",
"broccoli-ember-hbs-template-compiler": "1.7.0",
"broccoli-sass": "0.3.3",
"broccoli-sass": "0.6.7",
"client-sessions": "0.7.0",
"convict": "0.4.2",
"cookie-parser": "1.3.3",
"ember-cli": "0.1.4",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli": "1.13.8",
"ember-cli-app-version": "0.5.0",
"ember-cli-babel": "5.1.3",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "1.0.1",
"ember-cli-htmlbars": "0.7.9",
"ember-cli-htmlbars-inline-precompile": "0.2.0",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "1.3.1",
"ember-cli-simple-auth": "0.7.2",
"ember-data": "1.0.0-beta.12",
"ember-export-application-global": "1.0.1",
"express": "4.10.6",
"ember-data": "1.13.8",
"ember-disable-proxy-controllers": "1.0.0",
"ember-export-application-global": "1.0.3",
"express": "4.13.3",
"glob": "4.3.1",
"mozlog": "1.0.1",
"mozlog": "2.0.2",
"request": "2.51.0"
},
"devDependencies": {
"ember-cli": "0.1.4",
"ember-cli-blanket": "^0.2.2",
"ember-cli-qunit": "0.1.1",
"ember-cli": "1.13.8",
"ember-cli-qunit": "1.0.0",
"ember-cli-release": "0.2.3",
"ember-cli-sri": "1.0.3",
"ember-cli-uglify": "1.2.0",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-jshint": "0.11.3",
"grunt-copyright": "^0.1.0",
"grunt-jscs": "^1.0.0",
"grunt-jscs": "2.1.0",
"intern": "^2.2.2",
"load-grunt-tasks": "^1.0.0",
"load-grunt-tasks": "3.3.0",
"nodemon": "^1.2.1",
"opn": "^1.0.0",
"selenium-standalone": "^2.44.0-1",

Просмотреть файл

@ -1,6 +1,7 @@
{
"framework": "qunit",
"test_page": "tests/index.html",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"Firefox"
],

Просмотреть файл

@ -6,29 +6,8 @@
"setTimeout",
"$",
"-Promise",
"QUnit",
"define",
"console",
"equal",
"notEqual",
"notStrictEqual",
"test",
"asyncTest",
"testBoth",
"testWithDefault",
"raises",
"throws",
"deepEqual",
"start",
"stop",
"ok",
"strictEqual",
"module",
"moduleFor",
"moduleForComponent",
"moduleForModel",
"process",
"expect",
"visit",
"exists",
"fillIn",
@ -39,8 +18,6 @@
"findWithAssert",
"wait",
"DS",
"isolatedContainer",
"startApp",
"andThen",
"currentURL",
"currentPath",
@ -49,7 +26,7 @@
"node": false,
"browser": false,
"boss": true,
"curly": false,
"curly": true,
"debug": false,
"devel": false,
"eqeqeq": true,
@ -70,5 +47,6 @@
"strict": false,
"white": false,
"eqnull": true,
"esnext": true
"esnext": true,
"unused": true
}

Просмотреть файл

@ -1,25 +1,18 @@
import Ember from 'ember';
import Application from '../../app';
import Router from '../../router';
import config from '../../config/environment';
export default function startApp(attrs) {
var App;
var application;
var attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
Router.reopen({
location: 'none'
});
Ember.run(function() {
App = Application.create(attributes);
App.setupForTesting();
App.injectTestHelpers();
application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
});
App.reset(); // this shouldn't be needed, i want to be able to "start an app at a specific URL"
return App;
return application;
}

Просмотреть файл

@ -13,35 +13,21 @@
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/fxa-oauth-console.css">
<link rel="stylesheet" href="assets/test-support.css">
<style>
#ember-testing-container {
position: absolute;
background: white;
bottom: 0;
right: 0;
width: 640px;
height: 384px;
overflow: auto;
z-index: 9999;
border: 1px solid #ccc;
}
#ember-testing {
zoom: 50%;
}
</style>
{{content-for 'head-footer'}}
{{content-for 'test-head-footer'}}
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
{{content-for 'body'}}
{{content-for 'test-body'}}
<script src="assets/vendor.js"></script>
<script src="assets/test-support.js"></script>
<script src="assets/fxa-oauth-console.js"></script>
<script src="assets/blanket-options.js"></script>
<script src="assets/blanket-loader.js"></script>
<script src="testem.js"></script>
<script src="assets/test-loader.js"></script>
{{content-for 'body-footer'}}
{{content-for 'test-body-footer'}}
</body>
</html>

Просмотреть файл

@ -4,9 +4,3 @@ import {
} from 'ember-qunit';
setResolver(resolver);
document.write('<div id="ember-testing-container"><div id="ember-testing"></div></div>');
QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});
var containerVisibility = QUnit.urlParams.nocontainer ? 'hidden' : 'visible';
document.getElementById('ember-testing-container').style.visibility = containerVisibility;

Просмотреть файл

@ -9,7 +9,7 @@ moduleFor('controller:client/register', 'ClientRegisterController', {
});
// Replace this with your real tests.
test('it exists', function() {
test('it exists', function(assert) {
var controller = this.subject();
ok(controller);
assert.ok(controller);
});

Просмотреть файл

@ -9,7 +9,7 @@ moduleFor('controller:clients', 'ClientsController', {
});
// Replace this with your real tests.
test('it exists', function() {
test('it exists', function(assert) {
var controller = this.subject();
ok(controller);
assert.ok(controller);
});

Просмотреть файл

@ -9,7 +9,7 @@ moduleFor('controller:login', 'LoginController', {
});
// Replace this with your real tests.
test('it exists', function() {
test('it exists', function(assert) {
var controller = this.subject();
ok(controller);
assert.ok(controller);
});

Просмотреть файл

@ -1,5 +1,6 @@
import Ember from 'ember';
import { initialize } from 'fxa-oauth-console/initializers/application';
import { module, test } from 'qunit';
var container, application;
@ -14,10 +15,9 @@ module('ApplicationInitializer', {
});
// Replace this with your real tests.
test('it works', function() {
test('it works', function(assert) {
initialize(container, application);
// you would normally confirm the results of the initializer here
ok(true);
assert.ok(true);
});

Просмотреть файл

@ -8,8 +8,8 @@ moduleForModel('client', 'Client', {
needs: []
});
test('it exists', function() {
test('it exists', function(assert) {
var model = this.subject();
// var store = this.store();
ok(!!model);
assert.ok(!!model);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:client/delete', 'ClientDeleteRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:client/index', 'ClientIndexRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:client/register', 'ClientRegisterRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:client/update', 'ClientUpdateRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:clients', 'ClientsRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:clients/token', 'ClientsTokenRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:index', 'IndexRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});

Просмотреть файл

@ -8,7 +8,7 @@ moduleFor('route:login', 'LoginRoute', {
// needs: ['controller:foo']
});
test('it exists', function() {
test('it exists', function(assert) {
var route = this.subject();
ok(route);
assert.ok(route);
});