Commit Graph

411 Commits

Author SHA1 Message Date
Harry Wolff
c8c02a65fa Remove ghost.js
fixes #1575
- Moves most code that was in ghost.js into ./core/server/index.js
- Creates ./core/server/config/theme.js to hold all theme configurations 
(which previously lived on ghost.blogGlobals())
- Removed ghost.server, passing it in as an argument where needed 
and allowing middleware to hold onto a reference for lazy use.
2013-12-07 10:10:02 -05:00
Sebastian Gierlinger
078f464197 remove ghost.settings and ghost.notifications
covers 90% of #755
- moved ghost.settings to api.settings
- moved ghost.notifications to api.notifications
- split up api/index.js to notifications.js, posts.js, settings.js,
tags.js and users.js
- added instance.globals as temp workaround for blogglobals (Known
issue: blog title and blog description are updated after restart only)
- added webroot to config() to remove `var root = ...`
- changed `e` and `url` helper to async
- updated tests
2013-12-06 09:51:35 +01:00
Hannah Wolfe
696cfe7018 Swap url.resolve for slash handling 2013-12-04 21:20:24 +00:00
Hannah Wolfe
d2d9db3067 Add url.resolve for password reset email url
fixes #1604
2013-12-01 17:46:10 +00:00
Hannah Wolfe
d69e87b625 Merge pull request #1594 from halfdan/1591-excerpt-helper
Fix excerpt/content helpers
2013-11-30 10:16:26 -08:00
Hannah Wolfe
7c3031507d Merge pull request #1593 from ErisDS/app-proxy-update
Direct api access for app proxy
2013-11-30 10:15:20 -08:00
Hannah Wolfe
4765ca2cce Merge pull request #1589 from javorszky/iss499
Adds login limiter
2013-11-30 10:14:55 -08:00
Fabian Becker
5c1091af10 Fix excerpt/content helpers
fixes #1591
- Convert quoted strings to numbers
- Update code examples
- Update helper tests
2013-11-29 18:58:58 +00:00
Hannah Wolfe
ed6455f5a4 Direct api access for app proxy
- proxy doesn't need a ghost object :)
2013-11-29 16:26:56 +00:00
Gabor Javorszky
c515e20ea3 Adds login limiter
Closes #499
* On wrong passwords, statuses: `active` -> `warn-1` -> `warn-2` -> `warn-3` -> `locked`
* On login check, if user's status is `locked`, login automatically fails and user is encouraged to reset password. Does not even bother to check for passwords.
* login attempts tell user how many attempts she has remaining in notification box
* successful login will reset status to `active`
* resetting password with forgotten password emailed token resets status to `active`
* complete with a test suite
2013-11-29 01:24:25 +00:00
Jakob Gillich
30861fbab8 Permalinks live reloading support
issue #1395
2013-11-28 21:24:31 +01:00
Hannah Wolfe
dedc5d9239 Update activeTheme path on theme switch
fixes #1583

- the active theme path wasn't getting updated when we were switching theme
2013-11-28 16:10:34 +00:00
Harry Wolff
37b2fd93d8 This commit removes a lot of code from ghost.js, including:
Move helper functions registerThemeHelper and registerAsyncThemeHelper
to the helpers module.
Also update the app proxy object to reflect this new code location,
and the tests to reflect that as well

Create ./sore/server/filters which houses all filter related behavior.
Was previously on the ghost singleton.
Also create the filters_spec file for testing
and update all code and tests to use new code location.

Create ./sore/server/helpers/template which houses all template related behavior.
Was previously on the ghost singleton.
Also create the helpers_template_spec file for testing
and update all code and tests to use new code location.

Move ghost.mail instance onto the mail module directly
and update related code and tests to use new location

Move Polyglot instance onto require module directly

Move ghost.availablePlugins to plugins module directly
2013-11-28 09:21:53 -05:00
enahs
dddf2ec5b2 More verbose error message for invalid JSON in config.js
if you enter an invalid json object such as:
```
{
server: "http://foo.com"
host: "0.0.0.0"
}
```
while configuring, you get errors but are still able to run forever and the message previously was not as indicative of other potential configuration problems.
2013-11-28 13:58:28 +00:00
rektide
42dc8b4a8f Accept a config filename as an optional parameter to Ghost start-up.
Closes #1110.
- Promotes config-loader from a validator, to the central place where configuration state is held
- Allow config-loader two means to be told of config file to be used:
  - A preferred first argument passed into Ghost
  - A secondary GHOST_CONFIG environmental variable
- Failing to see either of the above passed in, config-loader will continue to use "config.js"
- Config-loader validates the target configuration (unchanged) & then copies that object into it's own exports
- Components needing to read configuration now require config-loader to retrieve the configuration state
- Config file continues to be loaded via require(): this is assumed to be a static json file
2013-11-28 13:47:00 +00:00
Hannah Wolfe
7b2bf5b98c Merge pull request #1577 from halfdan/527-subdir-admin
Fix Admin interface with sub directories
2013-11-28 05:14:23 -08:00
Hannah Wolfe
6bb92b4394 Swapping url.resolve back out 2013-11-28 13:03:05 +00:00
Hannah Wolfe
76f3730427 Bug fixes for paths / windows & tests
- removed path.join used for urls
- made sure async tests fail/timeout correctly
2013-11-28 11:21:49 +00:00
Harry Wolff
89154ad997 Restore support for using ghost as a npm module fixes #1326 2013-11-27 17:39:14 +00:00
Micheil Smith
3167a9b52c Fix several redirects in frontend and admin
refs #527
2013-11-27 09:57:44 +00:00
Fabian Becker
dcd3b192c1 Subdir support for admin interface
refs #527
2013-11-27 09:57:38 +00:00
Tim Griesser
726014f59a bumping to knex 0.5 and bookshelf 0.6.1 2013-11-26 23:10:31 +00:00
Fabian Becker
0169f47752 Fix failing migration.reset for Postgres.
refs #1333
2013-11-26 23:10:31 +00:00
Sebastian Gierlinger
e95b592028 Remove cookie from Frontend
closes #1437
closes #1472

- changed cookie to path:'/ghost'
- added conditional CSRF middleware
- added redirects for signup, signin, signout to /ghost/sign*/
2013-11-26 10:38:54 +01:00
Hannah Wolfe
330722efdc Merge pull request #1535 from hswolff/create-config-module
Create config module to standardise getting paths and abs URLs
2013-11-25 14:03:29 -08:00
Hannah Wolfe
b7a8ea5945 Merge pull request #1565 from ErisDS/redirect-fixes
Putting back relative redirects
2013-11-25 13:57:07 -08:00
Harry Wolff
b920662790 Create the config module, initially used
to standardise getting paths and absolute URLs.  Easy
to extend for other configurations we may need.
2013-11-25 16:35:16 -05:00
Hannah Wolfe
5ad2d6178b Putting back relative redirects
issue #1523

- also added some comments to indicate the difference between the two custom middleware files.
2013-11-25 21:00:27 +00:00
ali
7946431b8d Issue #1556 - Fix meta_title is undefined
Closes #1556 and #1530

This should also fix meta_description in #1530 as well as the other bug that is not
filed for body_class
2013-11-25 13:47:56 +00:00
Fabian Becker
e210e75e97 Install in sub-directory support.
refs #527
2013-11-24 21:11:34 +00:00
Hannah Wolfe
53af625c49 Merge pull request #1247 from sebgie/bookshelf-session
Replace cookieSession with session
2013-11-24 10:43:26 -08:00
Sebastian Gierlinger
3f2258e95b Replace cookieSession with session
- changed cookieSession to session
- added session.regenerate for login and logout
- added bookshelf session store
- added session table to database
- added import for databaseVersion 001
- added grunt task test-api
- cleanup of gruntfile to start express when needed only
- moved api tests to functional tests
2013-11-24 15:29:36 +01:00
Hannah Wolfe
80eb56edd2 Merge pull request #1539 from niedbalski/master
[Feature Request] Theme API: add has_tag helper to coreHelpers.
2013-11-24 06:19:18 -08:00
danschumann
4eaf544ad7 Update base.js
No longer need `|| 'development'`, since it is defaulted in the top index.   If we did need `|| 'development'` here, we'd need it on the next line too, otherwise it breaks.
2013-11-23 22:29:08 -08:00
Hannah Wolfe
7db5481f92 Merge pull request #1533 from jgillich/permalinks
Add Customisable Permalinks
2013-11-23 14:29:02 -08:00
Hannah Wolfe
2701f3e664 Merge pull request #1534 from jgable/passwordReset
Improved Password Reset Tool
2013-11-23 08:44:08 -08:00
Jakob Gillich
83d047c0ba Add Customisable Permalinks 2013-11-23 17:02:17 +01:00
Hannah Wolfe
7a1503cf52 Merge pull request #1415 from sebgie/import-transaction
Add transactions for import
2013-11-22 14:14:34 -08:00
Jacob Gable
34e453039b Improved Password Reset Tool
Closes #1471

- add api and User model methods for generating and validating tokens
- add routes and handlers for reset password pages
- add client styles and views for reset password form
- some basic integration tests for User model methods
2013-11-22 10:46:19 -06:00
Jorge Niedbalski
3782e26516 Added has_tag helper to coreHelpers, added has_tag unit tests. passing OK 2013-11-22 11:19:26 -03: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
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
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
Harry Wolff
ea8d12a607 Reduce size of ghost.js by moving related Routing code to their own files 2013-11-19 21:05:09 -05:00
Hannah Wolfe
1c5a811760 Merge pull request #1449 from sebgie/issue#1398
Add schema.js
2013-11-19 11:45:53 -08:00
Hannah Wolfe
ae233f01d8 Merge pull request #1505 from halfdan/1498-lower-email
Lowercase email address.
2013-11-19 03:10:41 -08:00
Hannah Wolfe
315ca052a9 Merge pull request #1489 from sebgie/issue#1466
Fix wrong error message
2013-11-19 03:00:04 -08:00