Commit Graph

711 Commits

Author SHA1 Message Date
Greenkeeper
867cce09e3 Update ghost-ignition to version 2.8.4 🚀 (#7953)
* chore(package): update ghost-ignition to version 2.8.4

https://greenkeeper.io/

* chore: yarn.lock
2017-02-07 19:41:41 +01:00
kirrg001
f9986c4bcd Version bump to 1.0.0-alpha.11 2017-02-04 17:33:12 +01:00
Greenkeeper
e9a9963fa3 Update ghost-editor to version 0.1.6 🚀 (#7903)
* chore(package): update ghost-editor to version 0.1.6

https://greenkeeper.io/

* chore: yarn.lock
2017-02-04 15:03:44 +01:00
Greenkeeper
35199a1bce Update knex-migrator to version 2.0.5 🚀 (#7939)
* chore(package): update knex-migrator to version 2.0.5

https://greenkeeper.io/

* chore: yarn.lock
2017-02-04 13:30:21 +01:00
Kevin Ansfield
dd3de4c957 Version bump to 1.0.0-alpha.10 2017-01-26 18:08:41 +00:00
Aileen Nowak
5c94151e14 Blog icon validations (#7893)
refs #7688

Adds an `uploads/icon/` endpoint to the api route to get a seperate entry point for blog icon validations. The blog icon validation will specifically check for images which have icon extensions (`.ico` & `.png`) and throw errors if:

- the icon file size is too big (>100kb)
- the icon is not a squaer
- the icon size is smaller than 32px
- the icon size is larger than 1000px
- the icon is not `.ico` or `.png` extension

TODOs for this PR:
- [X] get image dimensions
- [X] validate for image
	- [X] size
	- [X] form (must be square)
	- [X] type
	- [X] dimenstion (min 32px and max 1,000px)
- [X] return appropriate error messages
- [X] write tests

--------------------

TODOs for #7688:
- [X] Figure out, which favicon should be used (uploaded or default) -> #7713
- [ ] Serve and redirect the favicon for any browser requests, incl. redirects -> #7700 [WIP]
- [X] Upload favicon via `general/settings` and implement basic admin validations -> TryGhost/Ghost-Admin#397
- [X] Build server side validations -> this PR
2017-01-26 10:01:52 +01:00
Greenkeeper
ca4f827945 Update knex-migrator to version 2.0.4 🚀 (#7902)
* chore(package): update knex-migrator to version 2.0.4

https://greenkeeper.io/

* chore: yarn.lock
2017-01-26 00:46:59 +01:00
Greenkeeper
ee3033cde5 Update knex-migrator to version 2.0.3 🚀 (#7897)
* chore(package): update knex-migrator to version 2.0.3

https://greenkeeper.io/

* chore: yarn.lock
2017-01-25 20:11:45 +01:00
Greenkeeper
5f3b5a1c93 Update ghost-ignition to version 2.8.3 🚀 (#7895)
* chore(package): update ghost-ignition to version 2.8.3

https://greenkeeper.io/

* chore: yarn.lock
2017-01-25 19:27:24 +01:00
Greenkeeper
cce3194983 Update knex-migrator to version 2.0.1 🚀 (#7883)
* chore(package): update knex-migrator to version 2.0.1

https://greenkeeper.io/

* chore: yarn.lock
2017-01-24 23:56:37 +01:00
Katharina Irrgang
c796e9f61f Revert "Update knex-migrator to version 2.0.0 🚀" (#7881) 2017-01-24 17:32:15 +01:00
Greenkeeper
6f08e2de26 chore(package): update knex-migrator to version 2.0.0 (#7880)
https://greenkeeper.io/
2017-01-24 17:02:49 +01:00
Greenkeeper
94ba209be7 chore(package): update knex-migrator to version 1.1.1 (#7878)
https://greenkeeper.io/
2017-01-24 14:21:01 +01:00
Katharina Irrgang
89ef60fdba 🛠 knex-migrator 1.0.0 (#7873)
refs #7489 

Most important change is the naming of the knex-migrator config file.
2017-01-23 12:32:17 +01:00
Katharina Irrgang
78eacb19e9 🛠 use Ignition for logging/errors (#7869)
no issue

- we started implementing logging and error handling in Ghost
- later we outsourced both into a module
- use the module now in Ghost
- this commit basically just removes the logging and error implementation and uses Ignition
2017-01-23 11:04:01 +00:00
Katharina Irrgang
857ad4f1a7 Update bookshelf to version 0.10.3 🚀 (#7871) 2017-01-22 22:46:26 +01:00
Katharina Irrgang
ebb2156284 🛠 mysql latest and do not ignore mysql for GK updates (#7868)
refs #5945
2017-01-22 11:31:53 +00:00
Austin Burdine
8d29095fa8 🔥 Drop support for Node.js v0.12 (#7820)
no issue

- Node.js v0.12 will be EOL on 31st December
- This removes official support from Ghost
2017-01-16 19:21:45 +01:00
Greenkeeper
c46db8d72f chore(package): update ghost-gql to version 0.0.6 (#7844)
https://greenkeeper.io/
2017-01-12 11:53:20 +01:00
Greenkeeper
259cc3de62 chore(package): update rss to version 1.2.2 (#7841)
https://greenkeeper.io/
2017-01-11 20:42:13 +01:00
Greenkeeper
e110ac1851 chore(package): update express-hbs to version 1.0.4 (#7840)
https://greenkeeper.io/
2017-01-11 20:40:39 +01:00
Greenkeeper
996f62ff31 chore(package): update superagent to version 3.3.2 (#7838)
https://greenkeeper.io/
2017-01-11 20:38:38 +01:00
Aileen Nowak
7cd13e6122 🔑 Update Validator to 6.2.1 (#7823)
no issue

Uses new version of [validator](https://github.com/chriso/validator.js) which checks also for in URL embedded script tags.
2017-01-10 13:05:25 +01:00
Greenkeeper
2d0e4ac770 chore(package): update oauth2orize to version 1.7.0 (#7825)
https://greenkeeper.io/
2017-01-09 15:10:16 +01:00
Greenkeeper
0fabbf8a22 chore(package): update mobiledoc-html-renderer to version 0.3.1 (#7720)
https://greenkeeper.io/
2017-01-06 09:19:28 +01:00
Marc Bachmann
353330bb8a chore(package): update uuid to version 3.0.0 (#7742) 2017-01-04 17:10:29 +01:00
Greenkeeper
56062804d1 chore(package): update html-to-text to version 3.0.0 (#7781)
https://greenkeeper.io/
2017-01-04 16:26:50 +01:00
Greenkeeper
abf976c7d8 chore(package): update sinon to version 1.17.7 (#7811)
https://greenkeeper.io/
2017-01-04 15:00:00 +01:00
Greenkeeper
ea341a3de6 chore(package): update lodash to version 4.17.4 (#7814)
https://greenkeeper.io/
2017-01-04 14:50:54 +01:00
Greenkeeper
e40ccada85 chore(package): update image-size to version 0.5.1 (#7805)
https://greenkeeper.io/
2017-01-04 14:45:26 +01:00
Greenkeeper
a3576e5934 chore(package): update debug to version 2.6.0 (#7809)
https://greenkeeper.io/
2017-01-04 14:17:03 +01:00
Greenkeeper
2e00707f86 chore(package): update multer to version 1.2.1 (#7798)
https://greenkeeper.io/
2017-01-04 14:12:57 +01:00
Greenkeeper
153bcba481 chore(package): update bluebird to version 3.4.7 (#7797)
https://greenkeeper.io/
2017-01-04 14:11:00 +01:00
Greenkeeper
56ca9b2798 chore(package): update superagent to version 3.3.1 (#7787)
https://greenkeeper.io/
2017-01-04 14:03:24 +01:00
Greenkeeper
eba907c025 chore(package): update gulp-util to version 3.0.8 (#7807)
https://greenkeeper.io/
2017-01-04 14:00:15 +01:00
Greenkeeper
2a2f676261 chore(package): update gulp-jsonlint to version 1.2.0 (#7794)
https://greenkeeper.io/
2017-01-04 13:59:55 +01:00
Greenkeeper
494c0f5c02 chore(package): update oauth2orize to version 1.6.0 (#7786)
https://greenkeeper.io/
2017-01-04 13:57:11 +01:00
Greenkeeper
e744238f95 chore(package): update archiver to version 1.3.0 (#7782)
https://greenkeeper.io/
2017-01-04 13:54:41 +01:00
Greenkeeper
c6d9a95489 chore(package): update should to version 11.1.2 (#7771)
https://greenkeeper.io/
2017-01-04 12:44:42 +01:00
Greenkeeper
1d2d861a98 chore(package): update moment to version 2.17.1 (#7764)
https://greenkeeper.io/
2017-01-04 12:42:51 +01:00
Greenkeeper
d194c69400 chore(package): update prettyjson to version 1.2.1 (#7758)
https://greenkeeper.io/
2017-01-04 12:40:50 +01:00
Greenkeeper
790ef14ac7 chore(package): update jsonpath to version 0.2.9 (#7743)
https://greenkeeper.io/
2017-01-04 12:34:44 +01:00
Greenkeeper
7ea9356f99 chore(package): update tmp to version 0.0.31 (#7736)
https://greenkeeper.io/
2017-01-04 12:30:17 +01:00
Greenkeeper
378e09e59c chore(package): update mocha to version 3.2.0 (#7747)
https://greenkeeper.io/
2016-12-25 20:07:43 +00:00
Greenkeeper
1bc617174d chore(package): update gscan to version 0.2.0 (#7791)
https://greenkeeper.io/
2016-12-20 12:30:12 +01:00
Greenkeeper
dc60558083 chore(package): update passport-ghost to version 2.2.0 (#7763)
https://greenkeeper.io/
2016-12-03 14:26:48 +07:00
Greenkeeper
5b6a29764c chore(package): update moment to version 2.17.0 (#7740)
https://greenkeeper.io/
2016-11-26 16:12:54 -07:00
Greenkeeper
8d3a560178 chore(package): update passport-ghost to version 2.0.0 (#7737)
https://greenkeeper.io/
2016-11-21 18:06:05 +01:00
Kevin Ansfield
4525145fed Version bump to 1.0.0-alpha.9 2016-11-17 20:15:19 +00:00
Katharina Irrgang
7eb316b786 replace auto increment id's by object id (#7495)
* 🛠  bookshelf tarball, bson-objectid

* 🎨  schema changes

- change increment type to string
- add a default fallback for string length 191 (to avoid adding this logic to every single column which uses an ID)
- remove uuid, because ID now represents a global resource identifier
- keep uuid for post, because we are using this as preview id
- keep uuid for clients for now - we are using this param for Ghost-Auth

*   base model: generate ObjectId on creating event

- each new resource get's a auto generate ObjectId
- this logic won't work for attached models, this commit comes later

* 🎨  centralised attach method

When attaching models there are two things important two know

1. To be able to attach an ObjectId, we need to register the `onCreating` event the fetched model!This is caused by the Bookshelf design in general. On this target model we are attaching the new model.
2. We need to manually fetch the target model, because Bookshelf has a weird behaviour (which is known as a bug, see see https://github.com/tgriesser/bookshelf/issues/629). The most important property when attaching a model is `parentFk`, which is the foreign key. This can be null when fetching the model with the option `withRelated`. To ensure quality and consistency, the custom attach wrapper always fetches the target model manual. By fetching the target model (again) is a little performance decrease, but it also has advantages: we can register the event, and directly unregister the event again. So very clean code.

Important: please only use the custom attach wrapper in the future.

* 🎨  token model had overriden the onCreating function because of the created_at field

- we need to ensure that the base onCreating hook get's triggered for ALL models
- if not, they don't get an ObjectId assigned
- in this case: be smart and check if the target model has a created_at field

* 🎨  we don't have a uuid field anymore, remove the usages

- no default uuid creation in models
- i am pretty sure we have some more definitions in our tests (for example in the export json files), but that is too much work to delete them all

* 🎨  do not parse ID to Number

- we had various occurances of parsing all ID's to numbers
- we don't need this behaviour anymore
- ID is string
- i will adapt the ID validation in the next commit

* 🎨  change ID regex for validation

- we only allow: ID as ObjectId, ID as 1 and ID as me
- we need to keep ID 1, because our whole software relies on ID 1 (permissions etc)

* 🎨  owner fixture

- roles: [4] does not work anymore
- 4 means -> static id 4
- this worked in an auto increment system (not even in a system with distributed writes)
- with ObjectId we generate each ID automatically (for static and dynamic resources)
- it is possible to define all id's for static resources still, but that means we need to know which ID is already used and for consistency we have to define ObjectId's for these static resources
- so no static id's anymore, except of: id 1 for owner and id 0 for external usage (because this is required from our permission system)
- NOTE: please read through the comment in the user model


* 🎨  tests: DataGenerator and test utils

First of all: we need to ensure using ObjectId's in the tests. When don't, we can't ensure that ObjectId's work properly.
This commit brings lot's of dynamic into all the static defined id's.
In one of the next commits, i will adapt all the tests.

* 🚨  remove counter in Notification API

- no need to add a counter
- we simply generate ObjectId's (they are auto incremental as well)
- our id validator does only allow ObjectId as id,1 and me

* 🎨  extend contextUser in Base Model

- remove isNumber check, because id's are no longer numbers, except of id 0/1
- use existing isExternalUser
- support id 0/1 as string or number

*   Ghost Owner has id 1

- ensure we define this id in the fixtures.json
- doesn't matter if number or string

* 🎨  functional tests adaptions

- use dynamic id's

* 🎨  fix unit tests

* 🎨  integration tests adaptions

* 🎨  change importer utils

- all our export examples (test/fixtures/exports) contain id's as numbers
- fact: but we ignore them anyway when inserting into the database, see https://github.com/TryGhost/Ghost/blob/master/core/server/data/import/utils.js#L249
- in 0e6ed957cd (diff-70f514a06347c048648be464819503c4L67) i removed parsing id's to integers
- i realised that this ^ check just existed, because the userIdToMap was an object key and object keys are always strings!
- i think this logic is a little bit complicated, but i don't want to refactor this now
- this commit ensures when trying to find the user, the id comparison works again
- i've added more documentation to understand this logic ;)
- plus i renamed an attribute to improve readability

* 🎨  Data-Generator: add more defaults to createUser

- if i use the function DataGenerator.forKnex.createUser i would like to get a full set of defaults

* 🎨  test utils: change/extend function set for functional tests

- functional tests work a bit different
- they boot Ghost and seed the database
- some functional tests have mis-used the test setup
- the test setup needs two sections: integration/unit and functional tests
- any functional test is allowed to either add more data or change data in the existing Ghost db
- but what it should not do is: add test fixtures like roles or users from our DataGenerator and cross fingers it will work
- this commit adds a clean method for functional tests to add extra users

* 🎨  functional tests adaptions

- use last commit to insert users for functional tests clean
- tidy up usage of testUtils.setup or testUtils.doAuth

* 🐛  test utils: reset database before init

- ensure we don't have any left data from other tests in the database when starting ghost

* 🐛  fix test (unrelated to this PR)

- fixes a random failure
- return statement was missing

* 🎨  make changes for invites
2016-11-17 09:09:11 +00:00