Fixed incorrect tag name behaviour.
Fixed post preview feature.
The posts preview feature was broken by the advent of Rails 4 strong params. This commit restores the feature back to working order. Updated specs.
Tag names can now only contain alphanumeric, underscore, space, dot and dash characters. Other characters will be filtered out, ampersands will be expanded to 'and'. This limitation has been enforced to avoid complications with routing where tag names are involved. Updated specs accordingly.
Tags can now be viewed in HTML and Atom format regardless of whether the tag name contains a dot character or not. The regular expression that matches tag names currently allows upper/lower case letters, numbers, dots, dashes, underscores and spaces (URL encoded or not). Updated relevant specs. Moved routing specs into posts_routing_spec.rb as this seems like a more fitting place for them.
When a tag name contains a dot character, Rails interprets this as the separator for a formatted route and splits the tag name into the section before the dot which is interpreted as the expected :tag parameter, and the section after the dot which is interpreted as an unexpected :format parameter. This commit restores correct behaviour in the event that a tag name contains a dot character and includes spec coverage. Fixes #93.
Applied fix for logging in via OpenID to the admin area.
Rails now contains code that resets the session if the CSRF request forgery check fails. This was happening on the OpenID callback when logging in to the Enki admin area, which broke OpenID login. This commit disables the CSRF check only for OpenID callbacks when logging in to the Enki admin area. Fixes #91.
Whitelisting parameters required for successful display of posts.
Added factory_girl factories for use with update specs on: admin/comments_controller_spec.rb admin/posts_controller_spec.rb
Start making use of the comment_params method in admin/comments_controller.rb. Removed author_url and author_email from the params whitelist in comments_controller.rb as according to the spec, these should not be able to be set from the front end anyway.
The move to Rails 4 and strong parameters necessitates whitelisting of parameters being processed by the controller. The exclusion of the :tag_list, :published_at_natural and :slug parameters from the whitelist means that these data are not being saved to the db and hence no new post will be displayed on the front end, no new tags will be saved and the post slug cannot be updated after initial creation. This commit fixes these issues.
Changed SQL function call ifnull() to coalesce().
The SQL function ifnull() is not recognised by PostgreSQL and causes an error when Enki is used with PostgreSQL as the backend data store. Changing the call to coalesce() seems to work for both MySQL and PostgreSQL.
Support Ruby 2
* Bump to Rails 3.2.13 (known to support Ruby 2) * Remove Psych engine code * Fix tests related to YAML.load
Add Travis Status Badge [ci skip]
Test against Ruby 2.0
New textile manual link
Fix addressing the issue where HTML is too eagerly escaped with relation to comments, pages and posts.
relation to comments, pages and posts.
Removed superfluous equals signs from ERB syntax.
Allow running Enki under a URL path prefix
When reviewing my pull request, xaviershay requested these changes: * Use ActionController::Base.config.relative_url_root instead of ENV['RAILS_RELATIVE_URL_ROOT'] in the UrlHelper and rackup.ru * Mention the feature in the README, because it won't be found in config/application.rb Implement these, but use Rails.configuration instead of ActionController::Base.config, as it seems like the current Rails best practice.
Allow draft posts by special-casing blank published_at_natural