Permalink
Switch branches/tags
Nothing to show
Commits on Dec 20, 2011
  1. Add themes/site-1

    committed Dec 20, 2011
  2. Move hoe to dev bundler group

    committed Dec 20, 2011
  3. Exclude db dump from git

    committed Dec 20, 2011
Commits on Mar 15, 2009
  1. multisite: Fix broken article versions

    [This is an edited version of the author's blog post at
    http://inormalized.com/2009/2/19/how-to-fix-broken-article-versions-in-emk-mephisto-edge-post-0-8-1. -Eric]
    
    Currently in mephisto edge, article versions are broken. More precisely,
    the bug comes up ONLY when the installation operates in multisite mode
    (or even more precisely, when there are at least two articles belonging
    to two different sites).
    
    The problem is how acts_as_versioned is being used. An acts_as_versioned
    record has among others an “id” column (the default id that ActiveRecord
    requires) and a “version” column.
    
    Currently Mephisto falsely does the following inside
    \app\controllers\admin\articles_controller.rb on line 38 (edit
    action)...
    
      @version = params[:version] ? @article.versions.find(params[:version]) : @article or raise(ActiveRecord::RecordNotFound)
    
    the whole problem is the find(params[:version]) . What happens here is,
    that we lookup an article’s version by searching for its id instead of
    for its version column (even though we do use the correct :version
    parameter.)
    
    So this has to change to find_by_version(params[:version]) and thus
    become..
    
      @version = params[:version] ? @article.versions.find_by_version(params[:version]) : @article or raise(ActiveRecord::RecordNotFound)
    
    Notice though that this doesn’t break in a single-site installation,
    because in this case id and version bot get the same (concurrent)
    increment. That is because all articles belong the same one and only
    Site instance.
    Spyridon Vasileiadis committed with emk Mar 15, 2009
  2. Fix tainted string error when updating comment

    When updating a comment, a tainted string error was being thrown due to
    the lack of a h() escape on the article title in the comment partial.
    A deprecation warning from truncate() in the comment partial has also
    been resolved.
    
    A functional test (test_should_update_comment) for the admin comments
    controller is also included.
    davec committed with emk Mar 6, 2009
  3. Expire cache on theme change from admin/settings

    Force cache expiration when changing the theme from the Admin::Settings
    controller as is done when changing the theme from the Admin::Themes
    controller so that the behavior after a change of theme is consistent,
    regardless of where the change is made.
    davec committed with emk Mar 3, 2009
  4. Mods for subdir deployment

    Changes required for deployment to a subdirectory:
    
    1. CSS URL paths should be relative, not absolute
    
    2. ActionController::AbstractRequest.relative_url_root is
       ActionController::Base.relative_url_root in Rails 2.2
    davec committed with emk Mar 1, 2009
  5. Pass comment approval status to the template

    By passing the comment's approval setting to the __thanks_for_comment
    template, the template can provide additional feedback such as "Your
    comment is awaiting moderator approval", "Sorry, we threw your comment
    away", or similar if the comment was not automatically approved.  For
    example, __thanks_for_comment.liquid could look like the following:
    
      Thanks for the comment.
      {% unless approved %}It is awaiting moderation.{% endunless %}
    davec committed with emk Feb 27, 2009
  6. Force consistent ordering of dates containing NULLs

    Because database servers differ on how they sort NULL values, the sort
    order for articles was changed, via COALESCE, so that a NULL date will
    be treated as being less than (i.e., older than) any non-NULL date.
    This fixes test_should_search_article_by_section so that it passes with
    MySQL, SQLite, and PostgreSQL.
    
    [I'm merging this patch because I'm quite fond of PostgreSQL, and
    because it has been tested with most of the other databases we support.
    If this breaks your database, please let me know. -Eric]
    davec committed with emk Feb 27, 2009
  7. Don't depend on database ordering for asset tests

    test_should_edit_asset and test_should_update_asset were depending on
    database-specific ordering of the newly added assets. Although these
    tests worked with MySQL, they failed with PostgreSQL because an
    unordered find does not necessarily return the first of the three
    uploaded assets.
    
    Instead, Asset.find was changed to Asset.find_by_filename to
    specifically return the desired asset file. Asset.find_by_filename is
    used instead of Asset.find(:order => :id) so that there is no dependence
    on the order in which the three versions of the asset file are added.
    davec committed with emk Feb 27, 2009
  8. Fix the parameter logging filtering...

    Call filter_parameter_logging only once with all sensitive field names, rather than once per field to protect.
    webmat committed with emk Mar 12, 2009
  9. Avoid CoreImage failure on attachment_fu uploads

    This initializer avoids failures wen uploading images via attachment_fu
    when there is no external image library to use other than CoreImage.
    This works by removing "CoreImage" from the list of default processors
    that attachment_fu iterates over. This avoidance is only required when
    the rails process is ran under a forked process such as that which
    occurs with apache + Passenger + CoreImage under OSX since the Core
    Image APIs are not safe to call from a forked process and will fail. A
    helpful message is written to the production.log during startup to
    indicate that image resizing and thumbnailing will not be performed
    unless one of the other image libs is available.
    danlynn committed with emk Mar 3, 2009
Commits on Mar 12, 2009
  1. Fix Asset.addInput function to work with latest version of prototype

    When adding another file I also clear the file input because there is no reason to upload the same file again.
    isaackearse committed Mar 12, 2009
Commits on Feb 9, 2009
  1. filtered_column_code_macro: Word-wrap comment

    I'm trying to keep comments below 80 columns in new code, so I don't
    have to resize my Emacs window.
    emk committed Feb 9, 2009
  2. filtered_column_code_macro: Default to 'rake test'

    In general, Rails applications seem to reserve a bare rake command for
    running 'rake test'.  So I'm going ahead and making that the default
    here, for better or for worse.
    emk committed Feb 9, 2009
  3. Add default codemacro stylesheets for theme usage.

    Updated main README with instructions on how to 
    link to these stylesheets.  A codemacro Rakefile 
    was added with tasks to test the plugin and 
    generate a new default_coderay.css stylesheet.  
    The codemacro plugin now wraps all code listings 
    in a <div> enabling horizontal scrolling and 
    dynamic width.
    danlynn committed Feb 9, 2009
Commits on Feb 2, 2009
  1. Fix display of theme homepage links

    Many thanks to Gustavo Sales (aka vatsu) for pointing out this bug and
    proposing a fix:
    
    http://github.com/vatsu/mephisto/commit/e7b0ecaaca4457dd7d542ac218baf979e1b7a190
    http://github.com/vatsu/mephisto/commit/fbe32e923ad6dfb963a8311053214b3395aeb37b
    
    In order to minimize code duplication in the *.erb files, I've rewritten
    this code as a helper method.
    emk committed Feb 2, 2009
  2. Require test gems in development environment, not test

    After experimenting a bit, this looks like a simpler approach.  It
    allows developers to run:
    
      rake gems:install
    
    ...and it allows users to run:
    
      export RAILS_ENV=production
      rake gems:install
    
    Thank you to mat for his work on this!
    emk committed Feb 2, 2009
Commits on Jan 30, 2009
  1. missing tainted string in cache listing

    Sean O'Brien committed Jan 30, 2009
Commits on Jan 19, 2009
  1. Fixed typo.

    mat committed Jan 19, 2009
Commits on Jan 13, 2009
  1. Added some brackets

    james2m committed with emk Dec 20, 2008
  2. escaped link in _page.html.erb

    Signed-off-by: James McCarthy <james2mccarthy@gmail.com>
    james2m committed with emk Jan 12, 2009
Commits on Jan 9, 2009
  1. Changed user login to send user to admin section on succesful login i…

    …nstead of the blog homepage since users have the ability to post to the blog
    Chris Cummer committed with emk Jan 4, 2009
Commits on Dec 31, 2008
  1. Fixes 'attempted to output tainted string' error when rendering email…

    … address for mailto
    Chris Cummer committed with emk Dec 30, 2008
Commits on Dec 27, 2008
  1. Allow newer versions of these gems

    There's no reason to lock these to specific versions.
    emk committed Dec 27, 2008
  2. Add version numbers to config.gem statements

    Let's just go ahead and require the minimum version of each gem that we
    actually know works.  We also split out the test-specific gems into
    their own section.
    emk committed Dec 27, 2008