= Mercury Mercury is a gem that create a small web application that makes it very easy for you to generate wireframes in your favorite editor. Basically you create a "views" folder and start building your haml files in any kind of structure you would like. Then run rackup in the root folder and you are running a wireframe server on port 9292. == Install sudo gem install mercury == Create a mercury project # Create a new folder for your project mkdir my_wireframes # Create a new file called "config.ru" cd my_wireframes touch config.ru # open this file in a text editor and add the following code require 'mercury' run Mercury # Create a folder called views mkdir views # Create your erb or haml files cd views touch layout.haml === !!! %html{ :xmlns => "http://www.w3.org/1999/xhtml", :lang => "en", 'xml:lang' => "en" } %head %title Mercury - ['reset','text','960','app'].each do |css| %link{ :href => "/stylesheets/#{css}.css", :rel => "stylesheet", :type => "text/css", :media => "screen", :charset => "utf-8" } %body #header .container_12 %small{:style => 'font-style:italic;float:right;'} WireFrame Tool %h1{:style => 'margin:0;padding:0;'} %a{:href => '/', :style => 'color:white;text-decoration:none;'} Mercury #wrap .container_16 = yield .clear #footer .container_12 .grid_4.prefix_8 %p Jack Russell Software Company, LLC - ['jquery-1.4.2.min'].each do |js| %script{:src => "/javascripts/#{js}.js", :type => 'text/javascript'} === touch index.haml === .grid_16 %p Welcome %ul - Dir.glob('views/**/*.haml').each do |f| - unless f =~ /index/ or f =~ /layout/ %li %a{:href => f.gsub(/views/,'').match(/(.*).haml$/)[1]}= f.match(/\/(.*).haml$/)[1] === # then create a wire frame touch test.haml === %h1 Family History %br %input{:type => 'checkbox'} Unable to assess; reason %input{:type => 'text', :style => 'width:240px;'} %hr %table %tr %td{:style => 'vertical-align:top;'} Psyschiatric %td %textarea{:style => 'height:40px; width:490px'} %tr %td{:style => 'vertical-align:top;'} Medical %td %textarea{:style => 'height:40px; width:490px'} === # cd back to the root directory cd .. # run rackup rackup # now navigate to localhost:9292 And you should see you index page with a link to your test.haml form You can create more haml documents, and you can create subfolders and organize your wireframes however you want, and you never have to write a line of code, other than haml. == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2010 Jack Russell Software Company. See LICENSE for details.