Commit Graph

146 Commits

Author SHA1 Message Date
Harry Wolff
e76d23cb19 Make it possible to require ghost as a module. fixes #1326 2013-11-22 22:59:14 -05:00
Hannah Wolfe
7a1503cf52 Merge pull request #1415 from sebgie/import-transaction
Add transactions for import
2013-11-22 14:14:34 -08:00
Hannah Wolfe
216dd75b2c Merge pull request #1524 from jgillich/rss
Set RSS link title to blog title
2013-11-22 02:34:33 -08:00
Hannah Wolfe
6406eefae7 Merge pull request #1531 from jamesbloomer/issue-974
Allow newline when quotes are used at start of a sentence
2013-11-22 02:32:58 -08:00
Hannah Wolfe
cdf268e1d5 Merge pull request #1444 from hswolff/ghostjs-cleanup
Reduce size of server.js, moving code to their related files
2013-11-22 02:26:16 -08:00
Hannah Wolfe
c6f31ec8fd Merge pull request #1482 from jgable/appProxy
Pass proxy Ghost interface to Apps
2013-11-21 14:45:30 -08:00
jamesbloomer
b2ffc2e326 Allow newline when quotes are used at start of a sentence
closes #974
2013-11-21 13:56:43 +00:00
Sebastian Gierlinger
77ed7f8ac6 Add transactions for import
closes #837
- added transaction handling for import
- added transactions to model functions
- added simple tests for failing imports
2013-11-20 21:36:02 +01:00
Jakob Gillich
0c02161db7 Set RSS link title to blog title 2013-11-20 17:42:37 +01:00
Harry Wolff
985a23f446 Move server middleware configuration to related file 2013-11-19 21:05:57 -05:00
Sebastian Gierlinger
639c0d0627 Add schema.js
closes #1398
closes #1399
closes #1400
- added schema.js with database version '000'
- refactored migration to use schema.js
- if new table is added to schema.js and databaseVersion is increased, table will be added
- if new table is deleted to schema.js and databaseVersion is increased, table will be deleted
- alter table from issue #1400 is delayed until knex supports column modification
- changed import pre checks to work again (will be refactored separately)
- added basic PostgreSQL support (Attention: not supported/tested)
- changed error handling in server.js
2013-11-18 15:21:15 +01:00
Jacob Gable
ef9f5dc33f Pass proxy Ghost interface to Apps
Closes #1478

- Create new proxy.js that exposes createProxy method
- Pass proxy to App activate/install in lieu of Ghost instance
2013-11-14 20:36:27 -06:00
Hannah Wolfe
cd12210b0b Further grunt & test cleanup 2013-11-11 21:38:52 +00:00
Hannah Wolfe
15da975c06 image upload controller refactor
issue #635

- upload controller shouldn't assume fs
- filesystem module proxies all the fs work
- proxies and exposes middleware for serving images
- creating a date based path and unique filename is a base object util
- unit tests updated
2013-11-11 16:10:57 +00:00
Hannah Wolfe
b0c61720d9 Test file cleanup on accoutn of OCD 2013-11-11 10:37:09 +00:00
Harry Wolff
901d189bf0 Move middleware functions into middleware module and create associated tests
Note: this only moves middleware functions that have associated tests.
2013-11-07 23:05:51 -05:00
Sebastian Gierlinger
e2cee5be66 Move API tests to /integration/
closes #1396
- moved core/test/unit/api* to core/test/integration/api/
- moved core/test/integration/model* to core/test/integration/model/
- moved core/test/unit/utils to core/test/utils
- moved core/test/unit/fixtures to core/test/utils/fixtures/
- changed gruntfile.js to execute api tests with target 'integration'
2013-11-07 14:26:47 +01:00
Sebastian Gierlinger
8574813660 Bugfixes for tests 2013-11-05 15:02:12 +00:00
Fabian Becker
0908ecf6b7 Run tests on MySQL and use travis-$DB environments.
refs #921
fixes #1385
2013-11-05 15:01:10 +00:00
Hannah Wolfe
5e8f3d927f Remove timeouts on tests 2013-11-04 12:26:11 +00:00
Sebastian Gierlinger
bb17e1c0e9 Add API tests
closes #1189
- added tests
- added request module
- added status codes to API calls
- fixed return values of API calls
- fixed that drafts caused an error when being deleted
- fixed X-Invalidate-Cache headers
- moved testUtils.js to utils/index.js
2013-11-03 18:13:19 +01:00
jamesbloomer
f42e977fa7 Tidy up the local file storage for images 2013-11-01 13:08:27 +00:00
Fabian Becker
933a8c764a Separate model tests to separate tasks/directory.
refs #921
2013-11-01 09:38:42 +00:00
Hannah Wolfe
5df0acf37d Merge pull request #1361 from halfdan/update-should
Update should.js and fix tests.
2013-11-01 02:00:01 -07:00
Hannah Wolfe
2983e657a6 Unit test fixes
issue #635
2013-10-31 08:25:24 +00:00
jamesbloomer
6e44280b96 Moving file system storage to a module
issue #635

- refactored file system storage into module
- convert save to return a promise
- convert admin controller to use storage module
2013-10-31 08:25:24 +00:00
Fabian Becker
297d853ddb Update should.js and fix tests.
fixes #1360
2013-10-31 00:28:53 +00:00
cobbspur
b316e2fd70 improve layout of code to jslint standards in helpers unit tests 2013-10-29 20:16:59 +00:00
Jacob Gable
507174a00b Plugin API Refactor: Filter and Theme Helpers
issue #769

- Refactor doFilter to allow returning a promise from a filter handler
  and to also return a promise itself
- Move the logic out of the registerThemeHelper calls and into their own methods so
  we could test them in isolation.
- Assign the server to the ghost instance so the initPlugins method can
  get access to it.
2013-10-29 11:27:52 +00:00
Hannah Wolfe
68f78c9cc4 Merge pull request #1315 from cobbspur/suffix
added suffix to tag helper
2013-10-28 15:24:11 -07:00
Fabian Becker
798e5b1a4e Allow user to mark a post as static page
- Increased post-settings width to properly display "Static Page"
- Changed templates to display "Static Page" if set
- Added unit test for body_class helper

fixes #969
2013-10-28 22:01:03 +00:00
cobbspur
d605100709 added suffix to tag helper
closes #607

- added suffix as optional parameter to tag helper
2013-10-28 21:38:36 +00:00
Zach Geis
1f15df41ef Avoid filtering markdown code blocks
closes #1045
- Fixed markdown code block format issue.
- Added test case to verify fix.
2013-10-26 12:16:47 -05:00
Hannah Wolfe
5c33a707e9 Merge pull request #1164 from halfdan/1162-unpublished-posts
Unpublished Post should not be accessible
2013-10-25 13:18:39 -07:00
Fabian Becker
0997eae716 Remove .txt from blacklist.
fixes #1263
2013-10-25 00:15:39 +00:00
Fabian Becker
aa5c0cc620 Unpublished Post should not be accessible
fixes #1162
2013-10-24 21:29:10 +00:00
Sebastian Gierlinger
6505986f6b Move /api to /ghost/api
closes #1249
- changed routes
- changed apiRoots
2013-10-24 14:50:17 +02:00
Hannah Wolfe
80bbcf7205 Merge pull request #1239 from cobbspur/tagsprefix
adds prefix option to tag helper
2013-10-23 08:11:22 -07:00
cobbspur
b85e5b6196 adds prefix option to tag helper
closes #607

 - added prefix attributetor tags helper
 - will add prefix only if tags are present
 - adds unit tests for prefix
2013-10-22 22:57:31 +01:00
Hannah Wolfe
2d1e28335c Merge pull request #1197 from halfdan/994-image-uploads
Show proper error message when image upload fails
2013-10-22 14:40:47 -07:00
Fabian Becker
27e66f75f3 Show proper error message when image upload fails
fixes #994
2013-10-22 21:08:26 +00:00
Hannah Wolfe
15a2eacaac Merge pull request #1141 from halfdan/246-helper-tests
Improved test coverage of theme helpers.
2013-10-22 12:45:07 -07:00
Hannah Wolfe
e2cf362395 Merge pull request #1117 from halfdan/featured-posts
Add featured class when post is featured
2013-10-22 12:38:33 -07:00
Hannah Wolfe
5d169610ce Merge pull request #1133 from gotdibbs/Issue1124
Fixed intermittent test errors
2013-10-22 07:59:50 -07:00
Pascal Borreli
14c420c8d1 Fixed typos 2013-10-20 20:33:51 +00:00
Hannah Wolfe
accf525061 Temporarily removing API test 2013-10-20 11:02:06 +01:00
Hannah Wolfe
65dcb17117 Merge branch '0.3.3-wip'
Conflicts:
	core/client/views/blog.js
	core/server/api.js
	core/server/views/default.hbs
	package.json
2013-10-20 10:09:39 +01:00
Hannah Wolfe
491651da59 Merge pull request #2 from ErisDS/bookshelf-knex-update
Updating to bookshelf 0.5.7 & knex 0.4.11
2013-10-17 10:49:28 -07:00
Tim Griesser
13639ad8d1 Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
Sebastian Gierlinger
90176e1f40 Security improvements
no issue
- added CSRF protection
- changed session handling to express.session
- changed session handling to change session id
- added config property useCookieSession
- added file extension check for /ghost/upload
- removed /ghost/debug/db/reset
2013-10-17 15:28:28 +02:00