Commit Graph

1328 Commits

Author SHA1 Message Date
Hannah Wolfe
6af7d8fa3f Merge pull request #2205 from ErisDS/theme-debug
A first step towards theme debugging
2014-02-19 18:49:50 +00:00
Sebastian Gierlinger
ea6c601b01 Improvements for models
#closes #1655
- removed models as parameter for bookshelf-session
- changed to read permittedAttributes from schema.js
- changed updateTags to be executed at saved event
- added validate to execute after saving event
- added test for published_at = null (see #2015)
- fixed typo in general.hbs
2014-02-19 14:57:26 +01:00
Hannah Wolfe
e81924282c Merge pull request #2190 from sebgie/issue#2171
Make session expiry less arsey
2014-02-18 22:05:44 +00:00
Hannah Wolfe
1eac0bd25d Merge pull request #2189 from halfdan/2112-tag-helpers
Helper updates for Tag Pages
2014-02-18 21:14:51 +00:00
Hannah Wolfe
6992e990dc Merge pull request #2185 from hswolff/tag-pages
Adds tag pages
2014-02-18 20:59:10 +00:00
Harry Wolff
9ab4b7d4d5 Adds tag pages
fixes #2111

- modified Post model to support a tag query
  param that will filter the desired post collection
  to only include posts that contain the requested tag

- in the updated Post model it includes the Tag model
  under a nested object called 'aspects'

- added tests for updated Post model, updating
  test utils to add more posts_tags relations

- adds two new routes to frontend,
  one for initial tag page,
  another to page that tag page

- for tag pages the array of posts
  is exposed to the view similarly
  to the homepeage

- on the tag view page the information
  for the tag is also accessible
  for further theme usage

- the tag view page supports a hierarchy of
  views, it'll first attempt to use a tag.hbs
  file if it exists, otherwise fall back
  to the default index.hbs file

- modified pageUrl and pagination helper
  to have it be compatible with tag paging

- added unit tests for frontend controller

- added unit tests for handlebar helper modifications

- add functional tests for new tag routes
2014-02-18 15:10:02 -05:00
Paul Adam Davis
572dc0c2d6 Fix input:focus border issues from #2088 2014-02-18 16:59:01 +00:00
Hannah Wolfe
4349cb3018 Merge pull request #2210 from halfdan/use-lodash-extend
Remove unneeded extend implementation.
2014-02-18 15:47:09 +00:00
Hannah Wolfe
679f65c50a Fix incorrect test name 2014-02-17 23:00:35 +00:00
Fabian Becker
6083cfcd85 Remove unneeded extend implementation.
refs #2179, #2156
- Replace extend with _.extend
2014-02-17 16:34:24 +00:00
Hannah Wolfe
173e60caba Merge pull request #2173 from halfdan/2103-connect-logging
Add logging config option
2014-02-16 19:59:32 +00:00
Hannah Wolfe
8e78f79f9e A first step towards theme debugging
issue #2204
- allow handlebars log helper to output to console in dev mode
2014-02-15 20:46:44 +00:00
Sebastian Gierlinger
d3c641ea31 Make session expiry less arsey
closes #2171
- added authentication middleware
- removed authentication from routes
- moved authentication before CSRF validation
- moved caching rules before authentication
- changed/added test
2014-02-14 11:00:11 +01:00
Gabor Javorszky
212711d896 Added package.js support for themes (and plugins)
Closes #2081
* Amended require-tree to populate availableThemes and availablePlugins to use full file names (`basename.ext`) as keys instead of just basename. This way `image.jpg`, `image.png`, `image.gif` won't overwrite the `image` key.
* Amended require-tree to allow package.json file parsing to return the contents of the file as json on the `package.json` key.
* settings api populates theme data `package` if it exists. Otherwise it assigns `false` to it
* `general.hbs` (salute) was reworked to if there is the package key on the theme is not false, it will use the `name` and `version` keys of that. You can break it by not having a `name` or `version` in the package.json file.
* Added error and warning messages for package.json file parse errors and misses
2014-02-13 23:57:58 +00:00
Fabian Becker
1124d9e4c0 Helper updates for Tag Pages
fixes #2112
refs #1833

- modified config.urlFor to handle tag pages

- modified {{#tags}} handlebars helper to autolink to
  tag pages. Additional autolink="false" parameter can
  be used to deactivate autolinking

- modified url handlebars helper to handle tags

- added isTag function to schema

- added unit test for additional urlFor functionality

- added unit test for {{#tags}} helper modifications

- added unit test for url handlebards helper
2014-02-13 18:32:08 +01:00
Fabian Becker
691e9e773b Add logging config option
closes #2103
- Deactivate logging for testing environments
- Override logging with settings from config
2014-02-10 21:07:11 +00:00
Hannah Wolfe
d790a504a3 Ensure filters get default priority if priority is null
- null priority should be set to the default
- second part to 86619cb087
2014-02-10 18:14:47 +00:00
Hannah Wolfe
b04c0bb83c Merge pull request #2116 from hswolff/permalink-upgrade
Adds support for additional permalink structures
2014-02-10 18:05:43 +00:00
Harry Wolff
b066e732dd Adds support for additional permalink structures
fixes #2057

- uses express’ Route object to create RegExp’s
 that we use to check the incoming path
- refactored structure of fronted controller single
 tests to be easier to read
- amend regex to incorporate new allowed permalink
 structure
2014-02-10 12:07:43 -05:00
Fabian Becker
3993b676b6 Rename unregisterFilter to deregisterFilter
fixes #2167
- Rename functions
- Adjust tests
2014-02-10 12:44:07 +00:00
Fabian Becker
3950c8b30a Fix for broken filters where this context was lost.
fixes #2157
- Change tests to only check for existance
- Properly bind helpers/filters to their instance
2014-02-10 01:45:24 +01:00
Hannah Wolfe
3c5b931432 Merge pull request #2099 from jgable/appDependencies
Install App Dependencies
2014-02-09 12:47:46 +00:00
Jacob Gable
e3affff713 Install App Dependencies
- Spawns an npm install command from the App root
- Has some special OS checks for windows command spawning
2014-02-08 16:58:13 -06:00
Hannah Wolfe
d28d65bf5e Merge pull request #1818 from hswolff/config-file-option
Adds ability to pass in configFile path when loading ghost as a npm module
2014-02-08 22:37:09 +00:00
Hannah Wolfe
4a6d90c949 Merge pull request #2147 from gmurphey/master
Tweaking slug logic in post settings.
2014-02-08 22:13:03 +00:00
Fabian Becker
f468b464a6 Allow HTML inside tag prefix/suffix
closes #2123
- Return hbs.Safestring
- Manually escape joined tags
- Added test
2014-02-08 22:27:36 +01:00
Harry Wolff
9dd543231b Adds ability to pass in configFile path when loading
ghost as a npm module

- modifies main script file to allow it to
take in an options object that currently
supports an express instance or a config file path

- added tests
2014-02-08 10:41:15 -05:00
Hannah Wolfe
2beba7f1d7 Merge pull request #2097 from zacgeis/publishbutton-fix
Disable publish button until deffered is resolved
2014-02-08 15:28:13 +00:00
Hannah Wolfe
1783a895de Merge pull request #2137 from jgillich/patch-1
Don't require mail.options to be set
2014-02-08 15:22:50 +00:00
Aia Patag
4e5c624d9f Updated downsize to 0.0.5
closes #2106
- downsize 0.0.5 contains the fix to accept single quote found inside a double-quote string or vice-versa
- created unit tests to properly check this scenario
2014-02-08 15:13:33 +00:00
Hannah Wolfe
37b7907c09 Merge pull request #1858 from hswolff/improve-bootstrap-flow
Improve bootstrap flow of a Ghost application
2014-02-08 14:36:29 +00:00
Garrett Murphey
89aa7c6f81 Tweaking slug logic in post settings.
Closes #2136.
- sets slug to placeholder text if slug is blank
2014-02-07 21:59:33 -05:00
Harry Wolff
f16dc290b7 Improve bootstrap flow of a Ghost application
addresses #1789, #1364

- Moves ./core/server/loader -> ./core/bootstrap.
The bootstrap file is only accessed once during startup,
and it’s sole job is to ensure a config.js file exists
(creating one if it doesn’t) and then validates
the contents of the config file.

Since this is directly related to the initializing 
the application is is appropriate to have 
it in the ./core folder, named bootstrap as that
is what it does.

This also improves the dependency graph, as now
the bootstrap file require’s the ./core/server/config
module and is responsible for passing in the validated
config file.

Whereas before we had ./core/server/config
require’ing ./core/server/loader and running its
init code and then passing that value back to itself,
the flow is now more straight forward of
./core/bootstrap handling initialization and then
instatiation of config module

- Merges ./core/server/config/paths into 
./core/server/config
This flow was always confusing me to that some config
options were on the config object, and some were on
the paths object.

This change now incorporates all of the variables
previously defined in config/paths directly
into the config module, and in extension,
the config.js file.

This means that you now have the option of deciding
at startup where the content directory for ghost
should reside.

- broke out loader tests in config_spec to bootstrap_spec

- updated all relevant files to now use config().paths

- moved urlFor and urlForPost function into 
 ./server/config/url.js
2014-02-07 17:34:21 -05:00
Hannah Wolfe
0dc0a9bb7c Merge pull request #2126 from aiampogi/issue-2114-rssFeeds
Removed author tag inside channel tag in RSS
2014-02-07 11:52:41 +00:00
Hannah Wolfe
160bdf0c8c Merge pull request #2094 from xuduo35/master
Tag needs escaping. Wrongly call showSuggestions.
2014-02-07 10:50:32 +00:00
Hannah Wolfe
d165217aad Merge pull request #2063 from JohnONolan/robots
Introduce default robots.txt
2014-02-07 10:43:25 +00:00
Jakob Gillich
5e4db70fd0 Don't require mail.options to be set 2014-02-07 11:17:22 +01:00
Fabian Becker
bb4e48bf50 Removed mailto auto-linking.
fixes #1617
- Removed test
- Removed auto-linking from showdown gfm extension
2014-02-06 15:34:13 +00:00
John-David Dalton
6eab7b3f92 Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
Hannah Wolfe
ca01b732b2 Fixing App unit test on Windows
- switched test from exact string to regex to match both types of paths
2014-02-06 11:58:58 +00:00
balduv
eadbf7dffb Removed author tag inside channel tag in RSS
closes #2114
- instead of putting author in feedOptions of node-rss, it was moved to itemOptions
- supplying author: user ? user.name : null in itemOptions will still result to creating a dc:creator tag inside item tags so the info needed to have the author is still there like before
- node-rss should however still fix this quirk to not have that nasty author tag in channel tag when you supply author in feedOptions
2014-02-05 13:59:07 +08:00
Jacob Gable
c7713c1d27 Load Apps Sandboxed
- Based on suggestions from hswolff loading with a Module class approach
- Loads relative modules in child sandboxes
2014-02-04 15:46:31 -06:00
Xie JinBin
bcc57b677a Tag needs escaping. Wrongly call showSuggestions.
close #2087, fix #2089
- escape tag.
- do not call showSuggestions when key is UP/DOWN. or the selected tag will
  always be clear.
2014-02-04 23:31:50 +08:00
Zach Geis
d7e46f4aee Disable publish button until deffered is resolved
closes #2040
- save post disables the publish button
- publish button remains disabled until deffered object is resolved
2014-02-01 16:38:40 -06:00
John O'Nolan
79e1356b66 Override border on login input:focus
Fixes #2088
2014-01-31 18:30:14 +07:00
John O'Nolan
51fd62c118 Spit & Polish 2014-01-30 23:53:07 +07:00
Hannah Wolfe
5491f296ac Merge branch '0.4-maintenance' 2014-01-30 13:17:58 +00:00
Sebastian Gierlinger
d28bf3de4c Improve password reset token
no issue
- added check that a combination of email + expires is rejected after
10 attempts
- changed comparison to time independent method

Thanks to @chiiph for reporting this issue!
2014-01-30 13:00:30 +00:00
Hannah Wolfe
47c5e5aca4 Post settings published_at date improvements & fixes
closes #1866, fixes #2067, fixes #2068

- Upgrade client side moment to 2.4.0 to match the server side script.
- Add a guard to pub date to fix #2067
- Add new format to close #1866
2014-01-29 22:33:43 +00:00
Hannah Wolfe
c2bb793c36 Merge pull request #2052 from Borkason/patch-1
Fix dash-to-triple-hyphen replacement in generateSlug function.
2014-01-28 12:38:20 -08:00