Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Dec 20, 2011
  1. Add themes/site-1

    authored
  2. Move hoe to dev bundler group

    authored
  3. Exclude db dump from git

    authored
Commits on Mar 15, 2009
  1. @emk

    multisite: Fix broken article versions

    Spyridon Vasileiadis authored emk committed
    [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.
  2. @davec @emk

    Fix tainted string error when updating comment

    davec authored emk committed
    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.
  3. @davec @emk

    Expire cache on theme change from admin/settings

    davec authored emk committed
    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.
  4. @davec @emk

    Mods for subdir deployment

    davec authored emk committed
    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
  5. @davec @emk

    Pass comment approval status to the template

    davec authored emk committed
    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 %}
  6. @davec @emk

    Force consistent ordering of dates containing NULLs

    davec authored emk committed
    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]
  7. @davec @emk

    Don't depend on database ordering for asset tests

    davec authored emk committed
    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.
  8. @webmat @emk

    Fix the parameter logging filtering...

    webmat authored emk committed
    Call filter_parameter_logging only once with all sensitive field names, rather than once per field to protect.
  9. @danlynn @emk

    Avoid CoreImage failure on attachment_fu uploads

    danlynn authored emk committed
    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.
  10. @danlynn @emk

    Corrected comments to reflect actual behavior.

    danlynn authored emk committed
Commits on Mar 12, 2009
  1. @isaackearse

    Fix Asset.addInput function to work with latest version of prototype

    isaackearse authored
    When adding another file I also clear the file input because there is no reason to upload the same file again.
Commits on Feb 9, 2009
  1. @emk

    filtered_column_code_macro: Word-wrap comment

    emk authored
    I'm trying to keep comments below 80 columns in new code, so I don't
    have to resize my Emacs window.
  2. @emk

    filtered_column_code_macro: Default to 'rake test'

    emk authored
    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.
  3. @danlynn

    Add default codemacro stylesheets for theme usage.

    danlynn authored
    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.
Commits on Feb 2, 2009
  1. @emk

    Fix display of theme homepage links

    emk authored
    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.
  2. @emk

    Require test gems in development environment, not test

    emk authored
    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!
  3. @emk
  4. @emk
Commits on Jan 30, 2009
  1. missing tainted string in cache listing

    Sean O'Brien authored
Commits on Jan 19, 2009
  1. @mat
  2. @mat
  3. @mat
  4. @mat

    Fixed typo.

    mat authored
Commits on Jan 13, 2009
  1. @james2m @emk

    Added some brackets

    james2m authored emk committed
  2. @james2m @emk

    escaped link in _page.html.erb

    james2m authored emk committed
    Signed-off-by: James McCarthy <james2mccarthy@gmail.com>
Commits on Jan 9, 2009
  1. @emk

    Changed user login to send user to admin section on succesful login i…

    Chris Cummer authored emk committed
    …nstead of the blog homepage since users have the ability to post to the blog
  2. @emk
Commits on Dec 31, 2008
  1. @emk

    Fixes 'attempted to output tainted string' error when rendering email…

    Chris Cummer authored emk committed
    … address for mailto
Commits on Dec 27, 2008
  1. @emk

    Allow newer versions of these gems

    emk authored
    There's no reason to lock these to specific versions.
  2. @emk

    Add version numbers to config.gem statements

    emk authored
    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.
Something went wrong with that request. Please try again.