Skip to content

Commit

Permalink
Merge Ghost v2.27.0 to azure branch
Browse files Browse the repository at this point in the history
  • Loading branch information
chadly committed Aug 7, 2019
2 parents d4d4a3f + 70a137c commit dcc9e0e
Show file tree
Hide file tree
Showing 524 changed files with 28,766 additions and 46,353 deletions.
112 changes: 22 additions & 90 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
require('./core/server/overrides');

const config = require('./core/server/config');
const urlService = require('./core/server/services/url');
const urlService = require('./core/frontend/services/url');
const _ = require('lodash');
const chalk = require('chalk');
const fs = require('fs-extra');
Expand Down Expand Up @@ -70,21 +70,23 @@ const configureGrunt = function (grunt) {
'content/themes/casper/assets/js/*.js'
],
options: {
livereload: true
livereload: true,
interval: 500
}
},
express: {
files: [
'core/ghost-server.js',
'core/server/**/*.js',
'!core/server/lib/members/static/auth/**/*.js',
'core/frontend/**/*.js',
'config.*.json',
'!config.testing.json'
],
tasks: ['express:dev'],
options: {
spawn: false,
livereload: true
livereload: true,
interval: 500
}
}
},
Expand Down Expand Up @@ -140,38 +142,6 @@ const configureGrunt = function (grunt) {
single: {}
},

// ### grunt-mocha-istanbul
// Configuration for the mocha test coverage generator
// `grunt coverage`.
mocha_istanbul: {
coverage: {
// they can also have coverage generated for them & the order doesn't matter
src: [
'core/test/unit'
],
options: {
mask: '**/*_spec.js',
coverageFolder: 'core/test/coverage/unit',
mochaOptions: ['--timeout=15000', '--require', 'core/server/overrides', '--exit'],
excludes: ['core/client', 'core/server/built']
}
},
coverage_all: {
src: [
'core/test/acceptance',
'core/test/regression',
'core/test/unit'
],
options: {
coverageFolder: 'core/test/coverage/all',
mask: '**/*_spec.js',
mochaOptions: ['--timeout=15000', '--require', 'core/server/overrides', '--exit'],
excludes: ['core/client', 'core/server/built']
}

}
},

bgShell: {
client: {
cmd: function () {
Expand All @@ -193,17 +163,11 @@ const configureGrunt = function (grunt) {
grunt.log.write(chunk);
}

if (chunk.indexOf('Build successful') !== -1) {
if (chunk.indexOf('Slowest Nodes') !== -1) {
hasBuiltClient = true;
}
},
stderr: function (chunk) {
// ember-data 3.6.0-3.7.0 outputs a "Circular dependency" warning which we want to ignore
// TODO: remove after upgrading to ember-data 3.8.0 which already filters the output
if (chunk.indexOf('Circular dependency') > -1) {
return;
}

hasBuiltClient = true;
grunt.log.error(chunk);
}
Expand Down Expand Up @@ -320,8 +284,7 @@ const configureGrunt = function (grunt) {
npmInstall: true
},
projects: {
'core/client': 'init',
'core/server/lib/members/static/auth': 'init'
'core/client': 'init'
}
},

Expand All @@ -330,14 +293,12 @@ const configureGrunt = function (grunt) {
},

prod: {
'core/client': 'shell:ember:prod',
'core/server/lib/members/static/auth': 'shell:preact:prod'
'core/client': 'shell:ember:prod'
},

watch: {
projects: {
'core/client': ['shell:ember:watch', '--live-reload-base-url="' + urlService.utils.getSubdir() + '/ghost/"'],
'core/server/lib/members/static/auth': ['shell:preact:dev']
'core/client': ['shell:ember:watch', '--live-reload-base-url="' + urlService.utils.getSubdir() + '/ghost/"']
}
}
},
Expand Down Expand Up @@ -372,7 +333,7 @@ const configureGrunt = function (grunt) {
// * [Building assets](#building%20assets):
// `grunt init`, `grunt` & `grunt prod` or live reload with `grunt dev`
// * [Testing](#testing):
// `grunt validate`, the `grunt test-*` sub-tasks or generate a coverage report with `grunt coverage`.
// `grunt validate`, the `grunt test-*` sub-tasks.

// ### Help
// Run `grunt help` on the commandline to get a print out of the available tasks and details of
Expand All @@ -383,27 +344,6 @@ const configureGrunt = function (grunt) {
grunt.log.writeln('Type `grunt --help` to get the details of available grunt tasks.');
});

// ### Documentation
// Run `grunt docs` to generate annotated source code using the documentation described in the code comments.
grunt.registerTask('docs', 'Generate Docs', ['docker']);

// Run `grunt watch-docs` to setup livereload & watch whilst you're editing the docs
grunt.registerTask('watch-docs', function () {
grunt.config.merge({
watch: {
docs: {
files: ['core/server/**/*', 'index.js', 'Gruntfile.js'],
tasks: ['docker'],
options: {
livereload: true
}
}
}
});

grunt.task.run('watch:docs');
});

// ## Testing

// Ghost has an extensive set of test suites. The following section documents the various types of tests
Expand Down Expand Up @@ -473,12 +413,8 @@ const configureGrunt = function (grunt) {
// **Main testing task**
//
// `grunt validate` will either run all tests or run linting
// `grunt validate` is called by `npm test` and is used by Travis.
grunt.registerTask('validate', 'Run tests or lint code', function () {
if (process.env.TEST_SUITE === 'lint') {
return grunt.task.run(['lint']);
}

// `grunt validate` is called by `yarn test` and is used by Travis.
grunt.registerTask('validate', 'Run tests', function () {
grunt.task.run(['test-acceptance', 'test-unit']);
});

Expand Down Expand Up @@ -512,7 +448,6 @@ const configureGrunt = function (grunt) {
// Unit tests are run with [mocha](http://mochajs.org/) using
// [should](https://github.com/visionmedia/should.js) to describe the tests in a highly readable style.
// Unit tests do **not** touch the database.
// A coverage report can be generated for these tests using the `grunt test-coverage` task.
grunt.registerTask('test-unit', 'Run unit tests (mocha)',
['test-setup', 'mochacli:unit']
);
Expand All @@ -525,16 +460,6 @@ const configureGrunt = function (grunt) {
['test-setup', 'mochacli:acceptance']
);

// ### Coverage
// `grunt coverage` will generate a report for the code coverage.
grunt.registerTask('coverage', 'Generate unit tests coverage report',
['test-setup', 'mocha_istanbul:coverage']
);

grunt.registerTask('coverage-all', 'Generate full coverage report',
['test-setup', 'mocha_istanbul:coverage_all']
);

// #### Master Warning *(Utility Task)*
// Warns git users not ot use the `master` branch in production.
// `master` is an unstable branch and shouldn't be used in production as you run the risk of ending up with a
Expand Down Expand Up @@ -643,6 +568,7 @@ const configureGrunt = function (grunt) {
grunt.registerTask('release',
'Release task - creates a final built zip\n' +
' - Do our standard build steps \n' +
' - Run all tests(acceptance + regression + unit) \n' +
' - Copy files to release-folder/#/#{version} directory\n' +
' - Clean out unnecessary files (travis, .git*, etc)\n' +
' - Zip files in release-folder to dist-folder/#{version} directory',
Expand All @@ -666,8 +592,14 @@ const configureGrunt = function (grunt) {
dest: 'core/server/web/admin/views/default.html'
}]
});

grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
if (!grunt.option('skip-tests')) {
grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'test-all', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
} else {
grunt.log.writeln(chalk.red(
chalk.bold('Skipping tests...')
));
grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
}
}
);
};
Expand Down
6 changes: 3 additions & 3 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a plain English summary of all of the components within Ghost which may affect your privacy in some way. Please keep in mind that if you use third party Themes or Apps with Ghost, there may be additional things not listed here.

Each of the items listed in this document can be disabled via Ghost's `config.[env].json` file. Check out the [configuration guide](https://docs.ghost.org/docs/config#section-privacy) for details.
Each of the items listed in this document can be disabled via Ghost's `config.[env].json` file. Check out the [configuration guide](https://ghost.org/docs/concepts/config/#privacy) for details.

## Official Services

Expand All @@ -11,9 +11,9 @@ Some official services for Ghost are enabled by default. These services connect

### Automatic Update Checks

When a new session is started, Ghost pings a Ghost.org service to check if the current version of Ghost is the latest version of Ghost. If an update is available, a notification on the About Page appears to let you know.
When a new session is started, Ghost pings a Ghost.org service to check if the current version of Ghost is the latest version of Ghost. If an update is available, a notification on the About Page appears to let you know.

Ghost will collect basic anonymised usage statistics from your blog before sending the request to the service. You can disable collecting statistics using the [privacy configuration](https://docs.ghost.org/docs/config#section-update-check). You will still receive notifications from the service.
Ghost will collect basic anonymised usage statistics from your blog before sending the request to the service. You can disable collecting statistics using the [privacy configuration](https://ghost.org/docs/concepts/config/). You will still receive notifications from the service.

All of the information and code related to this service is available in the [update-check.js](https://github.com/TryGhost/Ghost/blob/master/core/server/update-check.js) file.

Expand Down
4 changes: 2 additions & 2 deletions content/adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ This default adapter can be found in `core/server/adapters/scheduling/Scheduling
To override any of the default adapters, you have to add a folder (`content/adapters/storage` or `content/adapters/scheduling`) and copy your adapter to it.

Please follow our detailed guides:
https://docs.ghost.org/v1/docs/using-a-custom-storage-module
https://docs.ghost.org/v1/docs/using-a-custom-scheduling-module
https://ghost.org/docs/concepts/storage-adapters/
https://ghost.org/docs/concepts/custom-schedulers/
3 changes: 0 additions & 3 deletions content/apps/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion content/settings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### routes.yaml

<!-- TODO: make a better description here and link to the docs -->
To find out more about `routes.yaml` configuration and how to use it visit [documentation](https://ghost.org/docs/api/handlebars-themes/routing/).

This is how the default `routes.yaml` file looks like:

Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the la

Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes.

We've documented our default theme pretty heavily so that it should be fairly easy to work out what's going on just by reading the code and the comments. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://themes.ghost.org) which explains every possible Handlebars helper and template.
We've documented our default theme pretty heavily so that it should be fairly easy to work out what's going on just by reading the code and the comments. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/api/handlebars-themes/) which explains every possible Handlebars helper and template.

**The main files are:**

Expand Down
Loading

0 comments on commit dcc9e0e

Please sign in to comment.