Ghost/core/test/utils/fixtures
Katharina Irrgang 1f37ff6053 🎨 refactor the importer (#8473)
refs #5422

- we can support null titles after this PR if we want
- user model: fix getAuthorRole
- user model: support adding roles by name
- we support this for roles as well, this makes it easier when importing related user roles (because usually roles already exists in the database and the related id's are wrong e.g. roles_users)
- base model: support for null created_at or updated_at values
- post or tag slugs are always safe strings
- enable an import of a null slug, no need to crash or to cover this on import layer
- add new DataImporter logic
    - uses a class inheritance mechanism to achieve an easier readability and maintenance
    - schema validation (happens on model layer) was ignored
    - allow to import unknown user id's (see https://github.com/TryGhost/Ghost/issues/8365)
    - most of the duplication handling happens on model layer (we can use the power of unique fields and errors from the database)
- the import is splitted into three steps:
  - beforeImport
    --> prepares the data to import, sorts out relations (roles, tags), detects fields (for LTS)
  - doImport
    --> does the actual import
  - afterImport
    --> updates the data after successful import e.g. update all user reference fields e.g. published_by (compares the imported data with the current state of the database)
- import images: markdown can be null
- show error message when json handler can't parse file
- do not request gravatar if email is null
- return problems/warnings after successful import
- optimise warnings in importer
- do not return warnings for role duplications, no helpful information
- error handler: return context information of error
- we show the affected json entries as one line in the UI
- show warning for: detected duplicated tag
- schema validation: fix valueMustBeBoolean translation
- remove context property from json parse error
2017-05-23 17:18:13 +01:00
..
app Cleanup indentation now JSCS can see it 2016-06-11 20:25:15 +01:00
config 🎨 config optimisations (#7921) 2017-02-02 12:46:30 +00:00
csv 🎨 Use GhostAuth name and example emails (#7475) 2016-10-03 15:11:43 +01:00
data feature: define redirects in a custom file (#7719) (#7945) 2017-02-06 15:32:40 +01:00
export 🎨 refactor the importer (#8473) 2017-05-23 17:18:13 +01:00
filter-param 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
images 🎨 Blog icon improvements (#8260) 2017-04-11 13:40:17 +02:00
import 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
theme/partials Move API tests to /integration/ 2013-11-07 14:26:47 +01:00
themes Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
data-generator.js replace custom showdown fork with markdown-it (#8451) 2017-05-15 18:48:14 +02:00
example.js Add jscs task to grunt file and clean up files to adhere to jscs rules. 2014-09-17 21:44:29 -04:00
test.hbs Move API tests to /integration/ 2013-11-07 14:26:47 +01:00