Commits on Feb 2, 2009
  1. Fix display of theme homepage links

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

    emk committed Feb 2, 2009
    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!
Commits on Jan 30, 2009
  1. missing tainted string in cache listing

    Sean O'Brien
    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 authored and emk committed Dec 20, 2008
  2. escaped link in _page.html.erb

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

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

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

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

    emk committed Dec 27, 2008
    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.
  3. Upgrade to interim release of Webrat from github

    emk committed Dec 27, 2008
    This should let us experiment with Webrat::Selenium support.
  4. Add integration test for "reset password"

    emk committed Dec 27, 2008
    Note that we actually extract the activation URL from the e-mail and
    pass it directly to 'visit'.
  5. Write login integration tests using Webrat

    emk committed Dec 27, 2008
    Why do we need integration tests? We've been suffering a lot of
    regressions in the Mephisto UI, because our functional tests don't reach
    high enough up towards the browser, and whole classes of bugs manage to
    slip through.
    What is Webrat? Webrat is a "browser simulator" written in Ruby.  It
    generates a DOM and allows us to fill in forms as though an actual user
    were interacting with the site.
    Why Webrat, and not Selenium, Watir, etc?  Webrat is recommended by the
    Cucumber project as the default way to write user stories; it's very
    fast; and it has a reasonable API.  Plus, Webrat actively maintained,
    and very recent versions of Webrat can be used as a front-end to
    Why Rails integration tests, and not Cucumber stories?  Since the people
    contributing to Mephisto will largely be programmers, I decided to write
    integration tests using a Ruby-based DSL.  Cucumber stories look really
    interesting, but with no actual clients in the loop, the text-based format
    is slightly less useful and has a steeper learning curve for programmers.
    Since we're switching to a new integration testing tool, I moved a bunch of
    code out of test_helper.rb and put it into our only existing integration
    test, caching_test.rb.  I also switched blueprints.rb to set up user
    passwords using 'password' and 'password_confirm' (instead of crypted and
    salted values) to make it easier for tests to override
Commits on Dec 26, 2008
  1. Remove RSpec StoryRunner files

    emk committed Dec 26, 2008
    RSpec's StoryRunner has apparently been deprecated by the RSpec project
    in favor of Cucumber.  And we're not using it anyway.
  2. JavaScript: Fix authenticity_token problems

    emk committed Dec 26, 2008
    One of these should be a GET; the other needed a token.
  3. JavaScript: Fix asset search

    emk committed Dec 26, 2008
    We desperately need some kind of unit testing framework for our
    JavaScript code, preferably with full support for integration testing
    against our application.
    I removed a 'page' parameter here that didn't seem to be doing anything.
Commits on Dec 25, 2008
  1. Begin updating to latest Prototype

    emk committed Dec 25, 2008
    Our version of Prototype is really old, and no longer compatible with
    current versions of RJS.  This breaks quite a bit of our admin interace
    in subtle ways.
    The patch upgrades our bundled version of Prototype to the version
    included with Rails 2.2.2.  We also remove some obsolete bits of
    application.js and make a few minor fixes so that it loads without
    I've only tested the JavaScript support on the articles page and the
    assets page.  Quite a bit of formerly broken stuff now seems to work,
    including updates to the list of attached files and updates to the
    contents of the bucket.  But there's still more to test and fix.
Commits on Dec 24, 2008
  1. Added some notes about fixing JavaScript

    emk committed Dec 24, 2008
    Our copy of Prototype is so old that it won't work correctly with the
    code generated by *.rjs.  But some of the stuff in application.js is
    incompatible with newer versions of Prototype.
    Fixing this is going to require testing all the JavaScript-enabled
    controllers by hand.
  2. Modernize rjs: admin/articles

    emk committed Dec 24, 2008
    I'm going to try to rename all the *.rjs files to *.js.rjs.  This is
    trickier than the other renamings, because our unit test coverage isn't
    perfect, and I'm trying to test everything by hand when possible.  So
    I'm going to do this one directory at a time.
    Other changes:
      - The live_preview and _preview stuff wasn't being used.
      - We didn't have a test case for the 'label' action.
  3. Rename *.rxml files to *.xml.builder

    emk committed Dec 24, 2008
    This also requires adding respond_to blocks to some of our actions.
  4. Rename *.rhtml files to *.html.erb

    emk committed Dec 24, 2008
    Let's go for the new-school approach here.
Commits on Dec 23, 2008
  1. Change default user article filter to Textile

    emk committed Dec 23, 2008
    A poll on #mephisto got several votes for Textile as the default, and no
    votes for Markdown.  Done.
  2. Change default comment filter to Textile

    emk committed Dec 23, 2008
    "Plain HTML" is not a very reasonable comment format for end-users, who
    probably want simple paragraph breaks to do the right thing.  So I'm
    defaulting this to Textile for new sites.
    I also considered defaulting comments to Markdown, but I didn't like the
    way that Markdown handled underscores_in_identifiers or * versus _.  For
    very simple stuff, Textile seems very slightly more intuitive than
    Markdown, though neither is perfect.
Commits on Dec 22, 2008
  1. Fix theme controller bugs

    emk committed Dec 22, 2008
    J.C. Zhu reported an InvalidAuthenticityToken error when trying to
    change themes.  This was one of several bugs in the theme switching
    code left over from the Rails 2.2 porting process and the security
    We needed to convince Ajax.Request to use a GET request when displaying
    the theme tools, and we needed to properly escape some text in the
    _tools template.
    I've also added a test case to make sure we actually render the _tools
    view successfully.
  2. Unbundle tzinfo gem

    emk committed Dec 22, 2008
    Sadly, unpacking tzinfo into vendor gems breaks Rails' time zone
    support and gives the following error when trying to access
      uninitialized constant TZInfo::Timezone::TimezoneProxy
    So we're going to instruct the user to install this gem using 'sudo
    rake gems:install' for now.
Commits on Dec 20, 2008
  1. Update to emk-safe_erb 0.1.2

    emk committed Dec 20, 2008
    This fixes script/generate and the standard Rails error page.
  2. Test for safe_erb in ActionView::Template, not in ERB

    emk committed Dec 20, 2008
    We've been installing safe_erb in all ERB templates, which breaks
    script/generate and lots of other important stuff.  But before we can
    fix this bug in our custom-hacked safe_erb, we need to narrow our
    Mephisto unit tests down so that they only test ActionView::Template.
    A safe_erb update will be along shortly.