0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/test/unit
Hannah Wolfe e060a4f811 🎨 🐛 Improve theme lib, middleware & error handling (#8145)
no issue

🎨 simplify loader - use loadOneTheme for init
- use loadOneTheme for init
- move updateThemeList to the one place that it is used
- this just reduces the surface area of the loader

🎨 Move init up to index temporarily
- need to figure out what stuff goes in here as well as loading themes
- will move it again later once I've got it figured out

🎨 Reorder & cleanup theme middleware
- move the order in blog/app.js so that theme middleware isn't called for shared assets
- add comments & cleanup in the middleware itself, for clarity

🎨 Simplify the logic in themes middleware
- Separate out config dependent on settings changing and config dependent on request
- Move blogApp.set('views') - no reason why this isn't in the theme activation method as
  it's actually simpler if it is there, we already know the active theme exists & can remove the if-guard

🎨 Improve error handling for missing theme
- ensure we display a warning
- don't have complex logic for handling errors
- move loading of an empty hbs object into the error-handler as this will support more cases

🐛 Fix assetHash clearing bug on theme switch
- asset hash wasn't correctly being set on theme switch

🎨 Remove themes.read & test loader instead
- Previously, we've simplified loader & improved error handling
- We are now able to completely remove theme.read as it's nothing more than a wrapper for package.read
- This also means we can change our tests from testing the theme reader to loader
2017-03-13 17:30:35 +01:00
..
api 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
apps/subscribers/lib 🐛 subscriber: sanitize email (#8078) 2017-03-03 15:44:07 +01:00
auth suspend user feature (#8114) 2017-03-13 12:03:26 +00:00
config 🔥 remove imageRelPath (#7927) 2017-02-03 14:42:05 +00:00
controllers/frontend 🔥 No more availableThemes (#8085) 2017-03-02 17:53:48 +01:00
mail 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
metadata 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
middleware 🎨 🐛 Improve theme lib, middleware & error handling (#8145) 2017-03-13 17:30:35 +01:00
models/base improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
models_plugins change default order of posts (#7096) 2016-07-15 11:04:10 +01:00
scheduling Error creation (#7477) 2016-10-06 13:27:35 +01:00
server_helpers 🔥 No more availableThemes (#8085) 2017-03-02 17:53:48 +01:00
sitemap 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
storage add read method to local file storage 2016-11-09 11:31:56 +01:00
utils 🎨 Collect & simplify package utils (#8080) 2017-03-01 14:09:31 +01:00
api_utils_spec.js replace auto increment id's by object id (#7495) 2016-11-17 09:09:11 +00:00
apps_filters_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
apps_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
errors_spec.js 🛠 use Ignition for logging/errors (#7869) 2017-01-23 11:04:01 +00:00
exporter_spec.js 🐛 export database read settings from database (#8103) 2017-03-08 10:26:57 +00:00
filters_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
ghost_url_spec.js 🔥 remove forceAdminSSL and urlSSL, add admin url (#7937) 2017-02-03 18:13:22 +00:00
importer_spec.js feature: upload validation middleware (#7208) 2016-08-18 20:25:51 +01:00
migration_fixture_utils_spec.js Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
migration_spec.js Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
permissions_spec.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
rss_spec.js 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
server_helpers_index_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_helpers_template_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_utils_spec.js 🎨 Collect & simplify package utils (#8080) 2017-03-01 14:09:31 +01:00
showdown_client_integrated_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
slack_spec.js 🔥 remove forceAdminSSL and urlSSL, add admin url (#7937) 2017-02-03 18:13:22 +00:00
social-urls_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
themes_spec.js 🎨 🐛 Improve theme lib, middleware & error handling (#8145) 2017-03-13 17:30:35 +01:00
utils_pipeline_spec.js Update mocha to version 3.0.2 🚀 (#7165) 2016-08-11 08:51:19 +01:00
validation_spec.js 🔥 🎨 Themes & settings misc cleanup (#8061) 2017-02-27 23:30:49 +01:00
xmlrpc_spec.js 🎨 😎 config env usages (#7929) 2017-02-03 18:25:39 +00:00