RailsTidy 0.1


RailsTidy project is a plugin for Ruby On Rails. Here are some key features of "RailsTidy": · validate your rhtml templates, · v
Developer:   Damien Merenne
      more software by author →
Price:  0.00
License:   MIT/X Consortium License
File size:   11K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


RailsTidy project is a plugin for Ruby On Rails.

Here are some key features of "RailsTidy":
  • validate your rhtml templates,
  • validate the html output of your functional tests,
  • clean the html generated by rails.

    Requirements:
  • Tidy, the popular HTML validator and
  • RubyTidy, Ruby bindings for Tidy.

    Installation:

    Unpack into the vendor/plugin and that should be it. Ruby bindings for libtidy need to know the path to the file libtidy.so. It is assumed to be found at /usr/lib/libtidy.so . If this is not the case, add

    RailsTidy.tidy_path = "/path/to/your/libtidy.so"

    to your environment file.

    Configuration:

    If the file config/tidy.rc exists, it will use it to configure Tidy. If you want to use another file, put

    RailsTidy.tidy_configuration = "/path/to/a/tidy/configuration/file"

    to your environment file.

    Usage:

    Validating templates

    Simply use

    $ rake test_templates

    By default, the plugin will parse all *.rhtml files in your app/views directory. If you want to validate only one file, use

    $ rake test_templates FILE="path/to/the/file"

    If $FILE is a directory, it will search for all *.rhtml file in it and try to validates them. If $FILE is a regular file it will be validated. If $FILE does not exists it will try with:
    ".rhtml" appended to $FILE,
    the app/view directory prepended to $FILE,
    the app/view directory prepended and ".rhtml" appended to $FILE

    Validating html output

    The plugin adds a new assert_tidy method to the Test::Unit::TestCase class. You can use it in your class by simply call it with no arguments. It will validate the last response returned by a test. For example:

    get :index
    assert_sucess
    assert_tidy

    Cleaning rails html output

    The plugin allows you to clean the html produced by rails. To enable it, use an after filter in your app/controller/application.rb file

    class ApplicationController < ActionController::Base
    after_filter :tidy
    def tidy
    RailsTidy.filter(response)
    end
    end

    WARNING: THIS IS CERTAINLY A RESOURCE HOG. I’m not interrested in this feature so I didn’t benchmarked it but at first sight rendering is at least 2 times slower with the filter enabled.
    tags the plugin  html output  the file  the html  file the  the app  rhtml appended  your app  app view  view directory  assert tidy  output the  directory prepended  

    Download RailsTidy 0.1


     http://www.cosinux.org/~dam/projects/rails-tidy/rails_tidy-0.1.tar.bz2


    Authors software

    RailsTidy 0.1 (by Damien Merenne)
    RailsTidy project is a plugin for Ruby On Rails.

    Here are some key features of "RailsTidy":
    · validate your rhtml templates,
    · v

    Rails History Plugin 0.2 (by Damien Merenne)
    Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e


    Similar software

    RailsTidy 0.1 (by Damien Merenne)
    RailsTidy project is a plugin for Ruby On Rails.

    Here are some key features of "RailsTidy":
    · validate your rhtml templates,
    · v

    FrameMaker::FromHTML 0.03 (by Peter G. Martin The Scribe & Chutney Trust)
    FrameMaker::FromHTML is a Perl class to convert HTML file to FrameMaker MIF.

    SYNOPSIS

    use base 'FrameMaker::FromHTML';

    use s

    Template::Tutorial 2.15 (by Andy Wardley)
    Template::Tutorial are template toolkit tutorials.

    This section includes tutorials on using the Template Toolkit

    ROROX 0.5 (by Elliot Smith)

    TkHTMLtidy 0.50 (by Francois Wendling)
    TkHTMLtidy is a Tcl/Tk front-end for tidy, the W3C utility to clean up and pretty print HTML/XHTML/XML

    Rails Page Cache Test Plugin 0.2 (by canatella)
    Rails Page Cache Test Plugin adds two assertions to the Test::Units::TestCase class of Ruby on Rails to check the caching and expirin

    Rails History Plugin 0.2 (by Damien Merenne)
    Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e

    vim2html 1.45 (by Chip Cuccio)
    vim2html is a small shell program that will export any Vim-editable file into well-formed HTML - simulating a Vim session.

    Fully s

    MathML::Entities 0.13 (by Jacques Distler)
    MathML::Entities is a Perl module that can convert XHTML+MathML Named Entities to Numeric Character References.

    SYNOPSIS

    use M

    Ruby Editor Plugin 0.7.6 (by Robert McKinnon)


    Other software in this category

    Track + Task Tracker 3.0.0 (by Joerg Friedrich)
    Online project management and issue tracking with team collaboration, user management, multiple access levels, tasks, projects, time

    CppUnit - C++ port of JUnit 1.12.0 (by Baptiste Lepilleur)
    CppUnit is a C++ unit testing framework

    MemCheck Deluxe 1.2.2 (by Dakoda)
    MemCheckDeluxe is an enhanced leak finder/memory profiler

    Network Traffic Generator 0.1.3 (by Robert Sandilands)
    This is a traffic generator

    Testitool 1.0 beta 6 (by Byrne Reese)
    Testitool is an application written in PHP that allows it's users to compose and manage QA test plans.

    Here are some key features

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags