Commit Graph

7303 Commits

Author SHA1 Message Date
Katharina Irrgang
64d2a94073 🐛 fix image size timeout (#8283)
closes #8041

- destroy socket is required, see https://nodejs.org/api/http.html#http_server_settimeout_msecs_callback
- optimise error messages in general
- make timeouts configureable
2017-04-05 21:58:26 +01:00
Katharina Irrgang
1bcd25fdbf 🎨 delete all content: do not delete subscribers (#8282)
closes #7875
2017-04-05 21:57:41 +01:00
Hannah Wolfe
1b5ac28faf Updated Ghost-Admin: last_login -> last_seen 2017-04-05 20:47:27 +01:00
Katharina Irrgang
13fb0c68b4 🛠 grunt master (#8251)
refs #8235

- add a new grunt command `dev-master`
- this command will bring back your working directory to latest master
- plus it will update your dependencies and checks your database health
- it won't build the client (!)

* 🛠    grunt dev-master
* fix jscs 💣
* change to grunt master
2017-04-05 20:46:22 +01:00
Katharina Irrgang
587ff6f026 🎨 change last_login to last_seen (#8259)
refs #8258

* 🎨  change last_login to last_seen

- rename the column
- a change in Ghost-Admin is required as well

* test utils: revert export examples

* revert line breaks
2017-04-05 20:45:55 +01:00
Hannah Wolfe
9b3c3943ef Add new plaintext field (#8276)
refs #8275

- this PR only adds the field for now, so we can merge this along with other DB changes
2017-04-05 21:28:13 +02:00
Hannah Wolfe
4b49f39e55 📖 Change the welcome to ghost fixture to be mobiledoc (#8277)
refs #8275

- this switches over the fixture to be mobiledoc based. Most of the content was to do with markdown so it has been replaced with placeholder text
- content will be replaced via #8275
2017-04-05 21:16:28 +02:00
Katharina Irrgang
8f7ee82122 🐛 fix grunt test (#8266)
no issue

- it was not possible to run a single test in core/server/apps/.../tests
2017-04-05 20:20:00 +02:00
Greenkeeper
9d020c93fc Update icojs to version 0.7.2 🚀 (#8278)
* chore(package): update icojs to version 0.7.2

https://greenkeeper.io/

* chore: yarn.lock
2017-04-05 19:11:09 +02:00
Aileen Nowak
581ff67499 🐛 correct favicon redirects with subdirectory (#8274)
refs #7688, #8221 

Use our url util `urlFor` to ensure, the redirect includes the subdirectory, if set up.
2017-04-05 15:28:52 +01:00
Katharina Irrgang
817b8d09ca 😱 🎨 Refactor storage adapter (#8229)
refs #7687

There are four main changes in this PR:

we have outsourced the base storage adapter to npm, because for storage developers it's annoying to inherit from a script within Ghost
we hacked theme storage handling into the default local storage adapter - this was reverted, instead we have added a static theme storage here
use classes instead of prototyping
optimise the storage adapter in general - everything is explained in each commit

----

* rename local-file-store to LocalFileStorage

I would like to keep the name pattern i have used for scheduling.
If a file is a class, the file name reflects the class name.
We can discuss this, if concerns are raised.

* Transform LocalFileStorage to class and inherit from new base

- inherit from npm ghost-storage-base
- rewrite to class
- no further refactoring, happens later

* Rename core/test/unit/storage/local-file-store_spec.js -> core/test/unit/storage/LocalFileStorage_spec.js

* Fix wrong require in core/test/unit/storage/LocalFileStorage_spec.js

* remove base storage and test

- see https://github.com/kirrg001/Ghost-Storage-Base
- the test has moved to this repo as well

* Use npm ghost-storage-base in storage/index.js

* remove the concept of getStorage('themes')

This concept was added when we added themes as a feature.
Back then, we have changed the local storage adapter to support images and themes.
This has added some hacks into the local storage adapters.
We want to revert this change and add a simple static theme storage.

Will adapt the api/themes layer in the next commits.

* Revert LocalFileStorage

- revert serve
- revert delete

* add storagePath as property to LocalFileStorage

- define one property which holds the storage path
- could be considered to pass from outside, but found that not helpful, as other storage adapters do not need this property
- IMPORTANT: save has no longer a targetDir option, because this was used to pass the alternative theme storage path
- IMPORTANT: exists has now an alternative targetDir, this makes sense, because
  - you can either ask the storage exists('my-file') and it will look in the base storage path
  - or you pass a specific path where to look exists('my-file', /path/to/dir)

* LocalFileStorage: get rid of store pattern

- getUniqueFileName(THIS)
- this doesn't make sense, instances always have access to this by default

* Add static theme storage

- inherits from the local file storage, because they both operate on the file system
- IMPORTANT: added a TODO to consider a merge of themes/loader and themes/storage
- but will be definitely not part of this PR

* Use new static theme storage in api/themes

- storage functions are simplified!

* Add https://github.com/kirrg001/Ghost-Storage-Base as dependency

- tarball for now, as i am still testing
- will release if PR review get's accepted

* Adapt tests and jscs/jshint

* 🐛  fix storage.read in favicon utility

- wrong implementation of error handling

* 🎨  optimise error messages for custom storage adapter errors

* little renaming in the storage utlity

- purpose is to have access to the custom storage instance and to the custom storage class
- see next commit why

* optimise instanceof base storage

- instanceof is always tricky in javascript
- if multiple modules exist, it can happen that instanceof is false

* fix getTargetDir

- the importer uses the `targetDir` option to ensure that images land in the correct folder

* ghost-storage-base@0.0.1 package.json dependency
2017-04-05 15:10:34 +01:00
Greenkeeper
b9563ab6af Update moment-timezone to version 0.5.13 🚀 (#8272)
* chore(package): update moment-timezone to version 0.5.13

https://greenkeeper.io/

* chore: yarn.lock
2017-04-05 09:56:39 +02:00
Hannah Wolfe
243b387063 Helper Proxy & single express-hbs instance (#8225)
refs #8126, #8221, #8223

 New 'Proxy' for all helper requires
- this is not currently enforced, but could be, much like apps
- the proxy object is HUGE
- changed date to use SafeString, this should have been there anyway
- use the proxy for all helpers, including those in apps 😁

 🎨 Single instance of hbs for theme + for errors
- we now have theme/engine instead of requiring express-hbs everywhere
- only error-handler still also requires express-hbs, this is so that we can render errors without extra crud
- TODO: remove the asset helper after #8126 IF it is not needed, or else remove the TODO

🎨 Cleanup visibility utils
🎨 Clean up the proxy a little bit
🚨 Unskip test as it now works!
🎨 Minor amends as per comments
2017-04-04 18:07:35 +02:00
Katharina Irrgang
d4836af18a 🐛 fix owner user slug (#8263)
closes #8067

- this is only a bug present for remote authentication
- right now the remote service does not return the name of the user
- depends on an internal PR
- force regenerating the slug on setup
- override name for signin or invite if needed
2017-04-04 14:56:04 +01:00
kirrg001
9b73949e35 bump yarn.lock sub-dependencies
no issue

- run `yarn upgrade` to bump sub-dependencies
2017-04-04 14:13:26 +02:00
Kevin Ansfield
f43a8e4315 Version bump to 1.0.0-alpha.18 2017-04-04 12:45:14 +01:00
Kevin Ansfield
07f4453918 Updated Ghost-Admin to 1.0.0-alpha.18 2017-04-04 12:45:14 +01:00
Kevin Ansfield
489eea77db Updated Ghost-Admin: switch to yarn 2017-04-04 11:59:01 +01:00
Katharina Irrgang
fd75fcdd36 🎨 change default auth strategy for development mode (#8252)
no issue

- we would like to switch to password strategy when developing
- this can be overridden by a custom development configuration
2017-04-04 11:55:05 +01:00
Katharina Irrgang
a42b233b04 Revert: Update sinon to version 2.1.0 (#8262)
no issue

- https://greenkeeper.io/
- revert because sinon has changed their API obviously and it shows lots of depreaction warnings right now
- as sinon is "just" a testing dependency, i wouldn't spend this time right now and add sinon to the ignore list

* Revert: Update sinon to version 2.1.0
* yarn update
2017-04-04 11:54:48 +01:00
Kevin Ansfield
1cb1ea105c 🛠 switch to using yarn in our Grunt tasks (#8261)
no issue

- use `yarn install` instead of `npm install` in grunt tasks
- remove `grunt deps` and `grunt shell:{shrinkwrap/prune/dedupe}` tasks as they are not needed when using `yarn`
- set `options.npmPath` to `yarn` for subgrunt so it doesn't use `npm install` automatically
- don't remove client contributors files in `grunt clean` - those files are now manually created and should be kept

* 🛠 switch to using yarn in our Grunt tasks
* 🛠 use yarn for `npm run init`, update README
2017-04-04 11:47:12 +01:00
Aileen Nowak
e06547ae78 Split css server templates (#8234)
closes #8126

* Remove default template dependency on client side CSS

See Issue #8126

Adds these files under /shared
- normalizer.css
- error.css
- extracted.css (for subscribers.css and private.css)

Also makes these files available as public static content

* Remove default template dependency on client CSS

closes #8126
needs e3acd3c

This is a replacement PR of #8217 (thanks @TienSFU25 for the whole work 🤗), because these changes are needed urgently and blocking other work.

Adds a new `ghost.css` file in `/core/shared/` to be used for server side template rendering (`error.hbs`, `subscribe.hbs` and `private.hbs`).
2017-04-04 10:06:38 +01:00
Greenkeeper
e348303337 Update bluebird to version 3.5.0 🚀 (#8096)
* chore(package): update bluebird to version 3.5.0

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:48:39 +02:00
Greenkeeper
a78ee40f63 Update should to version 11.2.1 🚀 (#8117)
* chore(package): update should to version 11.2.1

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:48:05 +02:00
Greenkeeper
f0abb25611 Update debug to version 2.6.3 🚀 (#8151)
* chore(package): update debug to version 2.6.3

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:28:37 +02:00
Greenkeeper
68efdfa4e7 Update moment to version 2.18.1 🚀 (#8207)
* chore(package): update moment to version 2.18.1

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:27:57 +02:00
Greenkeeper
c1a67df9e1 Update superagent to version 3.5.2 🚀 (#8208)
* chore(package): update superagent to version 3.5.2

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:19:42 +02:00
Greenkeeper
d689559975 Update ghost-ignition to version 2.8.10 🚀 (#8177)
* chore(package): update ghost-ignition to version 2.8.10

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:13:19 +02:00
Greenkeeper
ea2afd1823 Update should-http to version 0.1.1 🚀 (#8209)
* chore(package): update should-http to version 0.1.1

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 10:12:37 +02:00
Greenkeeper
157d48588d Update fs-extra to version 2.1.2 🚀 (#8181)
* chore(package): update fs-extra to version 2.1.2

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:49:58 +02:00
Greenkeeper
e2b7aead2f Update simple-html-tokenizer to version 0.4.1 🚀 (#8232)
* chore(package): update simple-html-tokenizer to version 0.4.1

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:47:57 +02:00
Greenkeeper
c25eff732d Update knex to version 0.12.9 🚀 (#8224)
* chore(package): update knex to version 0.12.9

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:47:09 +02:00
Greenkeeper
11afbbaf41 Update nock to version 9.0.11 🚀 (#8239)
* chore(package): update nock to version 9.0.11

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:46:16 +02:00
Greenkeeper
faecc485da Update cors to version 2.8.3 🚀 (#8240)
* chore(package): update cors to version 2.8.3

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:45:42 +02:00
Greenkeeper
373865a641 Update moment-timezone to version 0.5.12 🚀 (#8247)
* chore(package): update moment-timezone to version 0.5.12

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:37:25 +02:00
Greenkeeper
230da89e66 Update sinon to version 2.1.0 🚀 (#8198)
* chore(package): update sinon to version 2.1.0

https://greenkeeper.io/

* chore: yarn.lock
2017-04-04 09:01:26 +02:00
Katharina Irrgang
e9438c650d 🐛 fix get helper: public api labs (#8255)
no issue
2017-04-03 17:42:50 +01:00
Katharina Irrgang
be977a55cf 🎨 🚑 do not use testurl.com in tests (#8254)
no issue

- if we are using any random domain in our tests, it could be that the test behaviour changes over time
- in this case: the ghost_head_spec triggers a request for image diminsions (cover image, author image, blog logo)
- if the target blog url/domain can't be reached (connecting....), the timeout would be reached - but the test is not setup to handle longer waiting times
- even with https://github.com/TryGhost/Ghost/pull/8210/files, the default timeout would be 5s, which is not acceptable for a unit test
- that's why, we need to choose a blog url, which definitely is "down" - any long localhost port
2017-04-03 16:29:36 +01:00
Katharina Irrgang
6e24f0504d 🎨 hide npm error log if running npm run init (#8250)
refs #8235
- users share the general npm error log, which won't help
- so it's better to hide this log
2017-04-03 13:52:52 +01:00
Hannah Wolfe
0fff91c860 🐛 Fix the config for compression (#8226)
refs #7488

- This has always been documented as top-level "compress", and yet the code references server.compress
- Should be top level
2017-04-03 10:58:07 +02:00
Kevin Ansfield
5710e2f60e add --server/client options to grunt dev (#8241)
refs #8235

- adds `grunt dev --server` which will start the express server and restart on server changes but will not rebuild or watch any client files (if client files are missing or out of date you can run `grunt build` first)
- adds `grunt dev --client` which will only start the client server and rebuilding/livereload - useful if you are experiencing issues with one or the other crashing because you can run server/client in separate tabs
2017-03-30 14:51:22 +01:00
Kevin Ansfield
c9e0c252f0 grunt dev admin livereload (#8176)
refs https://github.com/TryGhost/Ghost/issues/8161, requires https://github.com/TryGhost/Ghost-Admin/pull/590
- adds a development-only route to the admin app that redirects to ember-cli's livereload script
- updates Gruntfile `watch` task to pass the `live-reload-base-url` param with subdirectory support
- updates Gruntfile `bgShell:client` task to filter potentially confusing output from `ember serve`
  - removes `Livereload server on http://localhost:49153`
  - removes `Serving on http://localhost:4200/`

With this and the required Ghost-Admin PR, when using `grunt dev` the admin screen will refresh any time a file is changed. It will also allow client tests to be run simultaneously by visiting http://localhost:4200/tests
2017-03-30 13:27:07 +01:00
Greenkeeper
b8e46137c8 Update icojs to version 0.7.1 🚀 (#8233)
* chore(package): update icojs to version 0.7.1

https://greenkeeper.io/

* chore: yarn.lock
2017-03-26 20:08:24 +02:00
Kevin Ansfield
b6d3490d8b Updated Ghost-Admin: renamed mobliedoc cards 2017-03-24 10:05:14 +00:00
Ryan McCarvill
d0dc7c5ee1 📦 Card-Rename (#8218)
no issue
- Renames Cards so they comply with the `card-{{name}}` convention rather than `{{name}}-card`
- Adds an unkonwnCardHandler to the editor.
2017-03-24 10:03:33 +00:00
Hannah Wolfe
3cea203459 🔥 🎨 Cleanup & simplify theme helpers (#8223)
no issue

🔥 Remove adminHbs concept from tests
🔥 Get rid of unnecessary helper test utils
🔥 Remove helper missing code
- this hasn't been registered / used for ages 😱
- gscan no longer allows us to activate themes that have missing helpers, so this wouldn't be used anyway
TODO: consider whether we should make a way to override this?

🎨 Reduce coupling inside of /helpers
🎨 Use settingsCache in ghost_foot
 Labs util for enabling helpers
🎨 Move loadCoreHelpers to blog
- This needs a proper home, but at the very least it doesn't belong
in server/app.js!

🎨 Use settingsCache in ghost_head
2017-03-23 20:00:58 +01:00
Hannah Wolfe
5b161a2856 🐛 Ensure that admin templates are on npm
fixes #8216

- Admin templates are now html files, we need to not ignore them
2017-03-23 11:05:50 -05:00
Katharina Irrgang
76fd1264a8 📖 Update README installation instructions (#8175)
- add contributing workflow link already
- i would suggest we merge this PR if the workflow guide was reviewed
2017-03-23 16:02:21 +00:00
Hannah Wolfe
c9500b11ea 🐛 Set timezone in time related tests (#8214)
closes #8017

- set the timezone, and use moment.tz to get the time now
2017-03-23 13:58:50 +01:00
Greenkeeper
a7d5682d16 Update icojs to version 0.7.0 🚀 (#8178)
* chore(package): update icojs to version 0.7.0

https://greenkeeper.io/

* chore: yarn.lock
2017-03-23 11:19:18 +01:00