Fixed the long standing issue where tags that are only related to unpublished posts are still shown in navigation by way of the NavigationHelper#category_links_for_navigation helper method. Now making use of the cached_tag_list attribute on the Post model in order to reduce the number of database queries generated by the NavigationHelper#category_links_for_navigation helper method. Removed NavigationHelper#class_for_tab helper method as it does not appear to be used anywhere. Fixed/updated specs and reverted back to previous behaviour where a request for an unpublished tag will result in an ActiveRecord::RecordNotFound exception. Also minor code clean up for consistency/readability.
The open_id_authentication gem is no longer used. This commit includes a migration that removes the two tables used by the open_id_authentication gem (i.e. the open_id_authentication_nonces and open_id_authentication_associations tables). Enki now supports Google OpenID Connect (OAuth 2.0 for Login) and OpenID 2.0 by default. But further OmniAuth strategies can be added if desired. Closes #97.
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.
Added factory_girl factories for use with update specs on: admin/comments_controller_spec.rb admin/posts_controller_spec.rb
When reviewing my pull request, xaviershay requested these changes: * Add hint to published_at field on admin post edit form * Favor '&&' over 'and' * Stop stubbing Chronic.parse unnecessarily Implement these changes.
I like to revise a post a couple of times before publishing it. Sometimes there are glitches to work out in the presentation, like linking to files that are attached to the post or refining a stylesheet to accomodate a post with intricate presentational components. Also, I like to write the post right in the admin UI rather than locally in a text editor so I can see a faithful preview. And I often don't write a post all in one sitting. Currently, there is no way to save a post with a nil published_at date. The default published_at_natural is 'now', and so when that is parsed, the published_at date is always filled-in. As an author, the best I can do is set a published_at into the future... but then I have a deadline that I don't want! The front-end code already seems to support nil published_at to mean a draft post. Add handling of nil published_at on the admin side, and just a bit on the public side: * Default published_at_natural to '', meaning nil published_at * Accomodate a nil published_at in various places in the admin UI * Sort the admin posts index by updated_at if published_at is null * Add the ability to set a published_at directly without setting published_at_natural * Handle the nil published_at in several places of the UI, including preview, dashboard, and post editing * Push checks for published_at into a link_to_post helper Preserve the error message when an invalid published_at_natural is entered.
The Gemfile allowed me to install incompatible verisons of lesstile and coderay (1.0.1 and 1.0.5, respectively). The result was this exception when formatting a post: NoMethodError: undefined method `div' for #<String:0x00000103b7daf0> The incompatibility is fixed in lesstile 1.1.0. Request the fixed version in the Gemfile, and pair it with a version of coderay that is known to be compatible. Add an integration spec to ensure future compatability.
earlier version of Rails and is no longer required.
…s OpenID identities.
… admin layout. Closes #7.
…updated or destroyed. Includes accompanying specs.
provided, so update the code accordingly. Thanks mirlord. Closes #17.