mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
deps: ember/ember-data@2.2.0
This commit is contained in:
parent
c884e67090
commit
366e2fe3da
15 changed files with 24 additions and 58 deletions
|
@ -55,6 +55,7 @@ export default RESTAdapter.extend({
|
|||
if (status === 401) {
|
||||
if (this.get('session.isAuthenticated')) {
|
||||
this.get('session').invalidate();
|
||||
return; // prevent error from bubbling because invalidate is async
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Ember from 'ember';
|
||||
import Resolver from 'ember/resolver';
|
||||
import Resolver from 'ember-resolver';
|
||||
import loadInitializers from 'ember/load-initializers';
|
||||
import 'ghost/utils/link-component';
|
||||
import 'ghost/utils/text-field';
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const {Helper, get} = Ember;
|
||||
|
||||
export function readPath(params) {
|
||||
let [obj, path] = params;
|
||||
|
||||
return get(obj, path);
|
||||
}
|
||||
|
||||
export default Helper.helper(function (params) {
|
||||
return readPath(params);
|
||||
});
|
|
@ -11,7 +11,7 @@ let trailingHistory = HistoryLocation.extend({
|
|||
export default {
|
||||
name: 'registerTrailingLocationHistory',
|
||||
|
||||
initialize(registry, application) {
|
||||
initialize(application) {
|
||||
application.register('location:trailing-history', trailingHistory);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@ export default {
|
|||
after: 'ember-simple-auth',
|
||||
|
||||
initialize(application) {
|
||||
let session = application.container.lookup('service:session');
|
||||
let session = application.lookup('service:session');
|
||||
|
||||
Ember.$.ajaxPrefilter(function (options) {
|
||||
session.authorize('authorizer:oauth2', function (headerName, headerValue) {
|
||||
|
|
|
@ -113,9 +113,7 @@ export default Mixin.create({
|
|||
* You can supply options to be passed into the `validate` method, since the ED `save` method takes no options.
|
||||
*/
|
||||
save(options) {
|
||||
// this is a hack, but needed for async _super calls.
|
||||
// ref: https://github.com/emberjs/ember.js/pull/4301
|
||||
let _super = this.__nextSuper;
|
||||
let {_super} = this;
|
||||
|
||||
options = options || {};
|
||||
options.wasSave = true;
|
||||
|
|
|
@ -4,9 +4,6 @@ import DS from 'ember-data';
|
|||
const {RESTSerializer} = DS;
|
||||
|
||||
export default RESTSerializer.extend({
|
||||
|
||||
isNewSerializerAPI: true,
|
||||
|
||||
serializeIntoHash(hash, type, record, options) {
|
||||
// Our API expects an id on the posted object
|
||||
options = options || {};
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
{{/if}}
|
||||
|
||||
{{#each content as |item|}}
|
||||
<option value="{{read-path item optionValuePath}}"
|
||||
<option value="{{get item optionValuePath}}"
|
||||
selected={{is-equal item selection}}>
|
||||
{{read-path item optionLabelPath}}
|
||||
{{get item optionLabelPath}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
|
|
|
@ -16,7 +16,7 @@ export default function () {
|
|||
// defined.
|
||||
title: null,
|
||||
|
||||
_actions: {
|
||||
actions: {
|
||||
collectTitleTokens(tokens) {
|
||||
let {titleToken} = this;
|
||||
let finalTitle;
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
"blueimp-md5": "1.1.0",
|
||||
"codemirror": "5.2.0",
|
||||
"devicejs": "0.2.7",
|
||||
"ember": "1.13.10",
|
||||
"ember-cli-shims": "0.0.6",
|
||||
"ember": "2.2.0",
|
||||
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.6",
|
||||
"ember-cli-test-loader": "0.2.1",
|
||||
"ember-data": "1.13.13",
|
||||
"ember-data": "2.2.1",
|
||||
"ember-mocha": "0.8.6",
|
||||
"ember-load-initializers": "0.1.7",
|
||||
"ember-resolver": "0.1.20",
|
||||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
|
||||
"es5-shim": "4.2.0",
|
||||
"Faker": "3.0.1",
|
||||
"fastclick": "1.0.6",
|
||||
|
@ -23,8 +22,8 @@
|
|||
"jqueryui-touch-punch": "furf/jquery-ui-touch-punch#4bc009145202d9c7483ba85f3a236a8f3470354d",
|
||||
"jquery.simulate.drag-sortable": "0.1.0",
|
||||
"keymaster": "1.6.3",
|
||||
"loader.js": "ember-cli/loader.js#3.4.0",
|
||||
"lodash": "~3.7.0",
|
||||
"loader.js": "3.4.0",
|
||||
"lodash": "3.7.0",
|
||||
"moment": "2.10.3",
|
||||
"normalize.css": "3.0.3",
|
||||
"password-generator": "git://github.com/bermi/password-generator#49accd739f60dfd0770d4af231f38311f482e308",
|
||||
|
|
|
@ -30,21 +30,22 @@
|
|||
"ember-cli-htmlbars": "1.0.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "0.3.1",
|
||||
"ember-cli-ic-ajax": "0.2.4",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-mirage": "0.1.9",
|
||||
"ember-cli-mocha": "0.9.3",
|
||||
"ember-cli-pretender": "0.5.0",
|
||||
"ember-cli-release": "0.2.8",
|
||||
"ember-cli-selectize": "0.4.0",
|
||||
"ember-cli-selectize": "0.4.3",
|
||||
"ember-cli-sri": "1.2.0",
|
||||
"ember-cli-uglify": "^1.2.0",
|
||||
"ember-data": "1.13.13",
|
||||
"ember-cli-uglify": "1.2.0",
|
||||
"ember-data": "2.2.1",
|
||||
"ember-data-filter": "1.13.0",
|
||||
"ember-disable-proxy-controllers": "1.0.1",
|
||||
"ember-export-application-global": "1.0.4",
|
||||
"ember-export-application-global": "1.0.5",
|
||||
"ember-myth": "0.1.1",
|
||||
"ember-resize": "0.0.10",
|
||||
"ember-resolver": "2.0.3",
|
||||
"ember-simple-auth": "1.0.0",
|
||||
"ember-sinon": "0.2.1",
|
||||
"ember-sinon": "0.3.0",
|
||||
"ember-suave": "1.2.2",
|
||||
"ember-watson": "0.7.0",
|
||||
"fs-extra": "0.16.3",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Resolver from 'ember/resolver';
|
||||
import Resolver from 'ember-resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
let resolver = Resolver.create();
|
||||
|
|
|
@ -100,7 +100,7 @@ describeModule(
|
|||
done();
|
||||
}).catch(function failedValidation() {
|
||||
let navItems = ctrl.get('navigationItems');
|
||||
expect(navItems[0].get('errors')).to.be.empty;
|
||||
expect(navItems[0].get('errors').toArray()).to.be.empty;
|
||||
expect(navItems[1].get('errors.firstObject.attribute')).to.equal('label');
|
||||
expect(navItems[2].get('errors.firstObject.attribute')).to.equal('url');
|
||||
done();
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/* jshint expr:true */
|
||||
import {expect} from 'chai';
|
||||
import {
|
||||
describe,
|
||||
it
|
||||
} from 'mocha';
|
||||
import {readPath} from 'ghost/helpers/read-path';
|
||||
import Ember from 'ember';
|
||||
|
||||
describe('Unit: Helper: read-path', function () {
|
||||
// Replace this with your real tests.
|
||||
it('works', function () {
|
||||
let result = readPath([Ember.Object.create({hi: 'there'}), 'hi']);
|
||||
|
||||
expect(result).to.equal('there');
|
||||
});
|
||||
});
|
|
@ -10,7 +10,7 @@ describeModel(
|
|||
'user',
|
||||
'Unit: Model: user',
|
||||
{
|
||||
needs: ['model:role']
|
||||
needs: ['model:role', 'serializer:application', 'serializer:user']
|
||||
},
|
||||
|
||||
function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue