| 
     
      
      
      From: <jh...@us...> - 2012-04-20 23:22:48
      
     
   | 
Revision: 314
          http://etch.svn.sourceforge.net/etch/?rev=314&view=rev
Author:   jheiss
Date:     2012-04-20 23:22:38 +0000 (Fri, 20 Apr 2012)
Log Message:
-----------
First pass at updating server to Rails 3.
There are still a few unit test errors, but it mostly works.
Modified Paths:
--------------
    trunk/server/Rakefile
    trunk/server/app/controllers/application_controller.rb
    trunk/server/app/controllers/clients_controller.rb
    trunk/server/app/controllers/dashboard_controller.rb
    trunk/server/app/controllers/etch_configs_controller.rb
    trunk/server/app/controllers/facts_controller.rb
    trunk/server/app/controllers/originals_controller.rb
    trunk/server/app/controllers/results_controller.rb
    trunk/server/app/helpers/application_helper.rb
    trunk/server/app/models/client.rb
    trunk/server/app/models/etch_config.rb
    trunk/server/app/models/fact.rb
    trunk/server/app/models/original.rb
    trunk/server/app/models/result.rb
    trunk/server/app/views/clients/index.html.erb
    trunk/server/app/views/clients/show.html.erb
    trunk/server/app/views/dashboard/_client_chart.html.erb
    trunk/server/app/views/dashboard/_status_chart.html.erb
    trunk/server/app/views/etch_configs/index.html.erb
    trunk/server/app/views/facts/index.html.erb
    trunk/server/app/views/layouts/application.html.erb
    trunk/server/app/views/originals/index.html.erb
    trunk/server/app/views/results/index.html.erb
    trunk/server/app/views/results/show.html.erb
    trunk/server/config/boot.rb
    trunk/server/config/database.yml
    trunk/server/config/dbclean
    trunk/server/config/environment.rb
    trunk/server/config/environments/development.rb
    trunk/server/config/environments/production.rb
    trunk/server/config/environments/test.rb
    trunk/server/config/initializers/inflections.rb
    trunk/server/config/routes.rb
    trunk/server/config/unicorn.rb
    trunk/server/lib/etch/server.rb
    trunk/server/lib/etch.rb
    trunk/server/public/404.html
    trunk/server/public/422.html
    trunk/server/public/500.html
    trunk/server/test/test_helper.rb
Added Paths:
-----------
    trunk/server/Gemfile
    trunk/server/Gemfile.lock
    trunk/server/README.rdoc
    trunk/server/app/assets/
    trunk/server/app/assets/images/
    trunk/server/app/assets/images/rails.png
    trunk/server/app/assets/javascripts/
    trunk/server/app/assets/javascripts/application.js
    trunk/server/app/assets/javascripts/swfobject.js
    trunk/server/app/assets/stylesheets/
    trunk/server/app/assets/stylesheets/application.css
    trunk/server/app/assets/stylesheets/design.css
    trunk/server/app/assets/stylesheets/forms.css
    trunk/server/app/mailers/
    trunk/server/config/application.rb
    trunk/server/config/initializers/backtrace_silencers.rb
    trunk/server/config/initializers/secret_token.rb
    trunk/server/config/initializers/session_store.rb
    trunk/server/config/initializers/wrap_parameters.rb
    trunk/server/config/locales/
    trunk/server/config/locales/en.yml
    trunk/server/config.ru
    trunk/server/db/schema.rb
    trunk/server/db/seeds.rb
    trunk/server/lib/assets/
    trunk/server/script/rails
    trunk/server/test/performance/
    trunk/server/test/performance/browsing_test.rb
    trunk/server/vendor/assets/
    trunk/server/vendor/assets/javascripts/
    trunk/server/vendor/assets/stylesheets/
Removed Paths:
-------------
    trunk/server/README
    trunk/server/app/helpers/clients_helper.rb
    trunk/server/app/helpers/dashboard_helper.rb
    trunk/server/app/helpers/etch_configs_helper.rb
    trunk/server/app/helpers/facts_helper.rb
    trunk/server/app/helpers/files_helper.rb
    trunk/server/app/helpers/originals_helper.rb
    trunk/server/app/helpers/results_helper.rb
    trunk/server/public/dispatch.cgi
    trunk/server/public/dispatch.fcgi
    trunk/server/public/dispatch.rb
    trunk/server/public/images/
    trunk/server/public/javascripts/
    trunk/server/public/stylesheets/
    trunk/server/script/about
    trunk/server/script/console
    trunk/server/script/dbconsole
    trunk/server/script/destroy
    trunk/server/script/generate
    trunk/server/script/performance/
    trunk/server/script/plugin
    trunk/server/script/process/
    trunk/server/script/runner
    trunk/server/script/server
    trunk/server/vendor/plugins/exception_notification/
Property Changed:
----------------
    trunk/server/
    trunk/server/db/
    trunk/server/tmp/cache/
    trunk/server/tmp/pids/
    trunk/server/tmp/sessions/
    trunk/server/tmp/sockets/
Property changes on: trunk/server
___________________________________________________________________
Added: svn:ignore
   + .bundle
Added: trunk/server/Gemfile
===================================================================
--- trunk/server/Gemfile	                        (rev 0)
+++ trunk/server/Gemfile	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,44 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.3'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+  gem 'sass-rails',   '~> 3.2.3'
+  gem 'coffee-rails', '~> 3.2.1'
+
+  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+  gem 'therubyracer', :platform => :ruby
+
+  gem 'uglifier', '>= 1.0.3'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# To use Jbuilder templates for JSON
+# gem 'jbuilder'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
+
+gem 'will_paginate', '~> 3.0.0'
+gem 'ransack', '~> 0.6.0'
+gem 'exception_notification', '~> 2.6.0'
+gem 'nokogiri'
+
Added: trunk/server/Gemfile.lock
===================================================================
--- trunk/server/Gemfile.lock	                        (rev 0)
+++ trunk/server/Gemfile.lock	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,129 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    actionmailer (3.2.3)
+      actionpack (= 3.2.3)
+      mail (~> 2.4.4)
+    actionpack (3.2.3)
+      activemodel (= 3.2.3)
+      activesupport (= 3.2.3)
+      builder (~> 3.0.0)
+      erubis (~> 2.7.0)
+      journey (~> 1.0.1)
+      rack (~> 1.4.0)
+      rack-cache (~> 1.2)
+      rack-test (~> 0.6.1)
+      sprockets (~> 2.1.2)
+    activemodel (3.2.3)
+      activesupport (= 3.2.3)
+      builder (~> 3.0.0)
+    activerecord (3.2.3)
+      activemodel (= 3.2.3)
+      activesupport (= 3.2.3)
+      arel (~> 3.0.2)
+      tzinfo (~> 0.3.29)
+    activeresource (3.2.3)
+      activemodel (= 3.2.3)
+      activesupport (= 3.2.3)
+    activesupport (3.2.3)
+      i18n (~> 0.6)
+      multi_json (~> 1.0)
+    arel (3.0.2)
+    builder (3.0.0)
+    coffee-rails (3.2.2)
+      coffee-script (>= 2.2.0)
+      railties (~> 3.2.0)
+    coffee-script (2.2.0)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.3.1)
+    erubis (2.7.0)
+    exception_notification (2.6.0)
+      actionmailer (>= 3.0.4)
+    execjs (1.3.0)
+      multi_json (~> 1.0)
+    hike (1.2.1)
+    i18n (0.6.0)
+    journey (1.0.3)
+    jquery-rails (2.0.2)
+      railties (>= 3.2.0, < 5.0)
+      thor (~> 0.14)
+    json (1.6.6)
+    libv8 (3.3.10.4)
+    mail (2.4.4)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.18)
+    multi_json (1.2.0)
+    nokogiri (1.5.0)
+    polyamorous (0.5.0)
+      activerecord (~> 3.0)
+    polyglot (0.3.3)
+    rack (1.4.1)
+    rack-cache (1.2)
+      rack (>= 0.4)
+    rack-ssl (1.3.2)
+      rack
+    rack-test (0.6.1)
+      rack (>= 1.0)
+    rails (3.2.3)
+      actionmailer (= 3.2.3)
+      actionpack (= 3.2.3)
+      activerecord (= 3.2.3)
+      activeresource (= 3.2.3)
+      activesupport (= 3.2.3)
+      bundler (~> 1.0)
+      railties (= 3.2.3)
+    railties (3.2.3)
+      actionpack (= 3.2.3)
+      activesupport (= 3.2.3)
+      rack-ssl (~> 1.3.2)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (~> 0.14.6)
+    rake (0.9.2.2)
+    ransack (0.6.0)
+      actionpack (~> 3.0)
+      activerecord (~> 3.0)
+      polyamorous (~> 0.5.0)
+    rdoc (3.12)
+      json (~> 1.4)
+    sass (3.1.15)
+    sass-rails (3.2.5)
+      railties (~> 3.2.0)
+      sass (>= 3.1.10)
+      tilt (~> 1.3)
+    sprockets (2.1.2)
+      hike (~> 1.2)
+      rack (~> 1.0)
+      tilt (~> 1.1, != 1.3.0)
+    sqlite3 (1.3.5)
+    therubyracer (0.10.1)
+      libv8 (~> 3.3.10)
+    thor (0.14.6)
+    tilt (1.3.3)
+    treetop (1.4.10)
+      polyglot
+      polyglot (>= 0.3.1)
+    tzinfo (0.3.33)
+    uglifier (1.2.4)
+      execjs (>= 0.3.0)
+      multi_json (>= 1.0.2)
+    will_paginate (3.0.3)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  coffee-rails (~> 3.2.1)
+  exception_notification (~> 2.6.0)
+  jquery-rails
+  nokogiri
+  rails (= 3.2.3)
+  ransack (~> 0.6.0)
+  sass-rails (~> 3.2.3)
+  sqlite3
+  therubyracer
+  uglifier (>= 1.0.3)
+  will_paginate (~> 3.0.0)
Deleted: trunk/server/README
===================================================================
--- trunk/server/README	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/README	2012-04-20 23:22:38 UTC (rev 314)
@@ -1,256 +0,0 @@
-== Welcome to Rails
-
-Rails is a web-application framework that includes everything needed to create 
-database-backed web applications according to the Model-View-Control pattern. 
-
-This pattern splits the view (also called the presentation) into "dumb" templates
-that are primarily responsible for inserting pre-built data in between HTML tags.
-The model contains the "smart" domain objects (such as Account, Product, Person,
-Post) that holds all the business logic and knows how to persist themselves to
-a database. The controller handles the incoming requests (such as Save New Account,
-Update Product, Show Post) by manipulating the model and directing data to the view.
-
-In Rails, the model is handled by what's called an object-relational mapping
-layer entitled Active Record. This layer allows you to present the data from
-database rows as objects and embellish these data objects with business logic
-methods. You can read more about Active Record in
-link:files/vendor/rails/activerecord/README.html.
-
-The controller and view are handled by the Action Pack, which handles both
-layers by its two parts: Action View and Action Controller. These two layers
-are bundled in a single package due to their heavy interdependence. This is
-unlike the relationship between the Active Record and Action Pack that is much
-more separate. Each of these packages can be used independently outside of
-Rails.  You can read more about Action Pack in
-link:files/vendor/rails/actionpack/README.html.
-
-
-== Getting Started
-
-1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
-   and your application name. Ex: rails myapp
-2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
-3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
-4. Follow the guidelines to start developing your application
-
-
-== Web Servers
-
-By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise
-Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server,
-Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures
-that you can always get up and running quickly.
-
-Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
-suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
-getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
-More info at: http://mongrel.rubyforge.org
-
-If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than
-Mongrel and WEBrick and also suited for production use, but requires additional
-installation and currently only works well on OS X/Unix (Windows users are encouraged
-to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from
-http://www.lighttpd.net.
-
-And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby
-web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not
-for production.
-
-But of course its also possible to run Rails on any platform that supports FCGI.
-Apache, LiteSpeed, IIS are just a few. For more information on FCGI,
-please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
-
-
-== Apache .htaccess example
-
-# General Apache options
-AddHandler fastcgi-script .fcgi
-AddHandler cgi-script .cgi
-Options +FollowSymLinks +ExecCGI
-
-# If you don't want Rails to look in certain directories,
-# use the following rewrite rules so that Apache won't rewrite certain requests
-# 
-# Example:
-#   RewriteCond %{REQUEST_URI} ^/notrails.*
-#   RewriteRule .* - [L]
-
-# Redirect all requests not available on the filesystem to Rails
-# By default the cgi dispatcher is used which is very slow
-# 
-# For better performance replace the dispatcher with the fastcgi one
-#
-# Example:
-#   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
-RewriteEngine On
-
-# If your Rails application is accessed via an Alias directive,
-# then you MUST also set the RewriteBase in this htaccess file.
-#
-# Example:
-#   Alias /myrailsapp /path/to/myrailsapp/public
-#   RewriteBase /myrailsapp
-
-RewriteRule ^$ index.html [QSA]
-RewriteRule ^([^.]+)$ $1.html [QSA]
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
-
-# In case Rails experiences terminal errors
-# Instead of displaying this message you can supply a file here which will be rendered instead
-# 
-# Example:
-#   ErrorDocument 500 /500.html
-
-ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
-
-
-== Debugging Rails
-
-Sometimes your application goes wrong.  Fortunately there are a lot of tools that
-will help you debug it and get it back on the rails.
-
-First area to check is the application log files.  Have "tail -f" commands running
-on the server.log and development.log. Rails will automatically display debugging
-and runtime information to these files. Debugging info will also be shown in the
-browser on requests from 127.0.0.1.
-
-You can also log your own messages directly into the log file from your code using
-the Ruby logger class from inside your controllers. Example:
-
-  class WeblogController < ActionController::Base
-    def destroy
-      @weblog = Weblog.find(params[:id])
-      @weblog.destroy
-      logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
-    end
-  end
-
-The result will be a message in your log file along the lines of:
-
-  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
-
-More information on how to use the logger is at http://www.ruby-doc.org/core/
-
-Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
-
-* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
-* Learn to Program: http://pine.fm/LearnToProgram/  (a beginners guide)
-
-These two online (and free) books will bring you up to speed on the Ruby language
-and also on programming in general.
-
-
-== Debugger
-
-Debugger support is available through the debugger command when you start your Mongrel or
-Webrick server with --debugger. This means that you can break out of execution at any point
-in the code, investigate and change the model, AND then resume execution! 
-You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
-Example:
-
-  class WeblogController < ActionController::Base
-    def index
-      @posts = Post.find(:all)
-      debugger
-    end
-  end
-
-So the controller will accept the action, run the first line, then present you
-with a IRB prompt in the server window. Here you can do things like:
-
-  >> @posts.inspect
-  => "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
-       #<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
-  >> @posts.first.title = "hello from a debugger"
-  => "hello from a debugger"
-
-...and even better is that you can examine how your runtime objects actually work:
-
-  >> f = @posts.first
-  => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
-  >> f.
-  Display all 152 possibilities? (y or n)
-
-Finally, when you're ready to resume execution, you enter "cont"
-
-
-== Console
-
-You can interact with the domain model by starting the console through <tt>script/console</tt>.
-Here you'll have all parts of the application configured, just like it is when the
-application is running. You can inspect domain models, change values, and save to the
-database. Starting the script without arguments will launch it in the development environment.
-Passing an argument will specify a different environment, like <tt>script/console production</tt>.
-
-To reload your controllers and models after launching the console run <tt>reload!</tt>
-
-== dbconsole
-
-You can go to the command line of your database directly through <tt>script/dbconsole</tt>.
-You would be connected to the database with the credentials defined in database.yml.
-Starting the script without arguments will connect you to the development database. Passing an
-argument will connect you to a different database, like <tt>script/dbconsole production</tt>.
-Currently works for mysql, postgresql and sqlite.
-
-== Description of Contents
-
-app
-  Holds all the code that's specific to this particular application.
-
-app/controllers
-  Holds controllers that should be named like weblogs_controller.rb for
-  automated URL mapping. All controllers should descend from ApplicationController
-  which itself descends from ActionController::Base.
-
-app/models
-  Holds models that should be named like post.rb.
-  Most models will descend from ActiveRecord::Base.
-
-app/views
-  Holds the template files for the view that should be named like
-  weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby
-  syntax.
-
-app/views/layouts
-  Holds the template files for layouts to be used with views. This models the common
-  header/footer method of wrapping views. In your views, define a layout using the
-  <tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb,
-  call <% yield %> to render the view using this layout.
-
-app/helpers
-  Holds view helpers that should be named like weblogs_helper.rb. These are generated
-  for you automatically when using script/generate for controllers. Helpers can be used to
-  wrap functionality for your views into methods.
-
-config
-  Configuration files for the Rails environment, the routing map, the database, and other dependencies.
-
-db
-  Contains the database schema in schema.rb.  db/migrate contains all
-  the sequence of Migrations for your schema.
-
-doc
-  This directory is where your application documentation will be stored when generated
-  using <tt>rake doc:app</tt>
-
-lib
-  Application specific libraries. Basically, any kind of custom code that doesn't
-  belong under controllers, models, or helpers. This directory is in the load path.
-
-public
-  The directory available for the web server. Contains subdirectories for images, stylesheets,
-  and javascripts. Also contains the dispatchers and the default HTML files. This should be
-  set as the DOCUMENT_ROOT of your web server.
-
-script
-  Helper scripts for automation and generation.
-
-test
-  Unit and functional tests along with fixtures. When using the script/generate scripts, template
-  test files will be generated for you and placed in this directory.
-
-vendor
-  External libraries that the application depends on. Also includes the plugins subdirectory.
-  If the app has frozen rails, those gems also go here, under vendor/rails/.
-  This directory is in the load path.
Added: trunk/server/README.rdoc
===================================================================
--- trunk/server/README.rdoc	                        (rev 0)
+++ trunk/server/README.rdoc	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+       <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
+
+2. Change directory to <tt>myapp</tt> and start the web server:
+       <tt>cd myapp; rails server</tt> (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+       "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+  class WeblogController < ActionController::Base
+    def destroy
+      @weblog = Weblog.find(params[:id])
+      @weblog.destroy
+      logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+    end
+  end
+
+The result will be a message in your log file along the lines of:
+
+  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
+
+  class WeblogController < ActionController::Base
+    def index
+      @posts = Post.all
+      debugger
+    end
+  end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+  >> @posts.inspect
+  => "[#<Post:0x14a6be8
+          @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
+       #<Post:0x14a6620
+          @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+  >> @posts.first.title = "hello from a debugger"
+  => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+  >> f = @posts.first
+  => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+  >> f.
+  Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run <tt>rails console</tt> from the application
+directory.
+
+Options:
+
+* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
+  made to the database.
+* Passing an environment name as an argument will load the corresponding
+  environment. Example: <tt>rails console production</tt>.
+
+To reload your controllers and models after launching the console run
+<tt>reload!</tt>
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>rails
+dbconsole</tt>. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+  |-- app
+  |   |-- assets
+  |       |-- images
+  |       |-- javascripts
+  |       `-- stylesheets
+  |   |-- controllers
+  |   |-- helpers
+  |   |-- mailers
+  |   |-- models
+  |   `-- views
+  |       `-- layouts
+  |-- config
+  |   |-- environments
+  |   |-- initializers
+  |   `-- locales
+  |-- db
+  |-- doc
+  |-- lib
+  |   `-- tasks
+  |-- log
+  |-- public
+  |-- script
+  |-- test
+  |   |-- fixtures
+  |   |-- functional
+  |   |-- integration
+  |   |-- performance
+  |   `-- unit
+  |-- tmp
+  |   |-- cache
+  |   |-- pids
+  |   |-- sessions
+  |   `-- sockets
+  `-- vendor
+      |-- assets
+          `-- stylesheets
+      `-- plugins
+
+app
+  Holds all the code that's specific to this particular application.
+
+app/assets
+  Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+  Holds controllers that should be named like weblogs_controller.rb for
+  automated URL mapping. All controllers should descend from
+  ApplicationController which itself descends from ActionController::Base.
+
+app/models
+  Holds models that should be named like post.rb. Models descend from
+  ActiveRecord::Base by default.
+
+app/views
+  Holds the template files for the view that should be named like
+  weblogs/index.html.erb for the WeblogsController#index action. All views use
+  eRuby syntax by default.
+
+app/views/layouts
+  Holds the template files for layouts to be used with views. This models the
+  common header/footer method of wrapping views. In your views, define a layout
+  using the <tt>layout :default</tt> and create a file named default.html.erb.
+  Inside default.html.erb, call <% yield %> to render the view using this
+  layout.
+
+app/helpers
+  Holds view helpers that should be named like weblogs_helper.rb. These are
+  generated for you automatically when using generators for controllers.
+  Helpers can be used to wrap functionality for your views into methods.
+
+config
+  Configuration files for the Rails environment, the routing map, the database,
+  and other dependencies.
+
+db
+  Contains the database schema in schema.rb. db/migrate contains all the
+  sequence of Migrations for your schema.
+
+doc
+  This directory is where your application documentation will be stored when
+  generated using <tt>rake doc:app</tt>
+
+lib
+  Application specific libraries. Basically, any kind of custom code that
+  doesn't belong under controllers, models, or helpers. This directory is in
+  the load path.
+
+public
+  The directory available for the web server. Also contains the dispatchers and the
+  default HTML files. This should be set as the DOCUMENT_ROOT of your web
+  server.
+
+script
+  Helper scripts for automation and generation.
+
+test
+  Unit and functional tests along with fixtures. When using the rails generate
+  command, template test files will be generated for you and placed in this
+  directory.
+
+vendor
+  External libraries that the application depends on. Also includes the plugins
+  subdirectory. If the app has frozen rails, those gems also go here, under
+  vendor/rails/. This directory is in the load path.
Modified: trunk/server/Rakefile
===================================================================
--- trunk/server/Rakefile	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/Rakefile	2012-04-20 23:22:38 UTC (rev 314)
@@ -1,10 +1,7 @@
+#!/usr/bin/env rake
 # Add your own tasks in files placed in lib/tasks ending in .rake,
 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
 
-require(File.join(File.dirname(__FILE__), 'config', 'boot'))
+require File.expand_path('../config/application', __FILE__)
 
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-require 'tasks/rails'
+Server::Application.load_tasks
Added: trunk/server/app/assets/images/rails.png
===================================================================
(Binary files differ)
Property changes on: trunk/server/app/assets/images/rails.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: trunk/server/app/assets/javascripts/application.js
===================================================================
--- trunk/server/app/assets/javascripts/application.js	                        (rev 0)
+++ trunk/server/app/assets/javascripts/application.js	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,15 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
Copied: trunk/server/app/assets/javascripts/swfobject.js (from rev 313, trunk/server/public/javascripts/swfobject.js)
===================================================================
--- trunk/server/app/assets/javascripts/swfobject.js	                        (rev 0)
+++ trunk/server/app/assets/javascripts/swfobject.js	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,5 @@
+/*	SWFObject v2.0 <http://code.google.com/p/swfobject/>
+	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var Z="undefined",P="object",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",W="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,T=null,S=false,C=false;var a=function(){var l=typeof g.getElementById!=Z&&typeof g.getElementsByTagName!=Z&&typeof g.createElement!=Z&&typeof g.appendChild!=Z&&typeof g.replaceChild!=Z&&typeof g.removeChild!=Z&&typeof g.cloneNode!=Z,t=[0,0,0],n=null;if(typeof N.plugins!=Z&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=Z){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var e=function(){if(!a.w3cdom){return }J(I);if(a.ie&&a.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=c("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);V()}}}}catch(j){}}if(a.webkit&&typeof g.readyState!=Z){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){V()}},10)}if(typeof g.addEventListener!=Z){g.addEventListener("DOMContentLoaded",V,null)}M(V)}();function V(){if(S){return }if(a.ie&&a.win){var m=Y("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return }}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=Z){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=Z){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=Z){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(a.pv[0]>0){var k=c(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(a.webkit&&a.webkit<312){U(k)}X(m,true)}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(a.win||a.mac)){D(H[j])}else{d(k)}}}}else{X(m,true)}}}function U(m){var k=m.getElementsByTagName(P)[0];if(k){var p=Y("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(a.ie&&a.win&&O("8.0.0")){G.attachEvent("onunload",function(){var k=c(i);if(k){for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)}})}}function D(j){C=true;var o=c(j.id);if(o){if(j.altContentId){var l=c(j.altContentId);if(l){L=l;T=j.altContentId}}else{L=b(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=a.ie&&a.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(a.ie&&a.win&&o.readyState!=4){var i=Y("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function d(j){if(a.ie&&a.win&&j.readyState!=4){var i=Y("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(b(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(b(j),j)}}function b(n){var m=Y("div");if(a.win&&a.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=c(q);if(typeof AE.id==Z){AE.id=q}if(a.ie&&a.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=c(AE.id)}else{if(a.webkit&&a.webkit<312){var AA=Y("embed");AA.setAttribute("type",W);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=Y(P);s.setAttribute("type",W);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=Y("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function c(i){return g.getElementById(i)}function Y(i){return g.createElement(i)}function O(k){var j=a.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(a.ie&&a.mac){return }var l=g.getElementsByTagName("head")[0],k=Y("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(a.ie&&a.win)&&typeof g.createTextNode!=Z){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(a.ie&&a.win&&typeof g.styleSheets!=Z&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}function X(k,i){var j=i?"visible":"hidden";if(S){c(k).style.visibility=j}else{A("#"+k,"visibility:"+j)}}return{registerObject:function(l,i,k){if(!a.w3cdom||!l||!i){return }var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;X(l,false)},getObjectById:function(l){var i=null;if(a.w3cdom&&S){var j=c(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=Z)){i=j}else{if(typeof k.SetVariable!=Z){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!a.w3cdom||!n||!u||!r||!t||!j){return }r+="";t+="";if(O(j)){X(u,false);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=Z){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);if(q.id==u){X(u,true)}})}else{if(m&&!C&&O("6.0.65")&&(a.win||a.mac)){X(u,false);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i)})}}},getFlashPlayerVersion:function(){return{major:a.pv[0],minor:a.pv[1],release:a.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(a.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(a.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=c(K);if(i){i.parentNode.replaceChild(L,i);if(T){X(T,true);if(a.ie&&a.win){L.style.display="block"}}L=null;T=null;C=false}}}}}();
\ No newline at end of file
Added: trunk/server/app/assets/stylesheets/application.css
===================================================================
--- trunk/server/app/assets/stylesheets/application.css	                        (rev 0)
+++ trunk/server/app/assets/stylesheets/application.css	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+*/
Copied: trunk/server/app/assets/stylesheets/design.css (from rev 313, trunk/server/public/stylesheets/design.css)
===================================================================
--- trunk/server/app/assets/stylesheets/design.css	                        (rev 0)
+++ trunk/server/app/assets/stylesheets/design.css	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,349 @@
+body
+{
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 90%;
+	margin: 0;
+	padding: 0;
+}
+
+#header
+{
+	color: #fff;
+	height: 30px;
+	background-color: #036;
+}
+
+#header a
+{
+	color: #fff;
+}
+
+#branding
+{
+	margin: 0;
+	padding: 10px 0 0 10px;
+	font-size: 125%;
+	line-height: 10px;
+	text-shadow: black 2px 2px 3px;
+}
+
+#branding a { text-decoration: none; }
+
+#account_links
+{
+	float: right;
+	text-shadow: black 2px 2px 3px;
+	margin: 0 10px 0 0;
+	padding: 0;
+	line-height: 30px;
+}
+
+#sidepanel
+{
+	width: 15em;
+	position: absolute;
+	top: 30px;
+	left: 0;
+	padding: .5em 1em;
+}
+
+#sidepanel h3,
+#dashboard_menu h3
+{
+	color: #000;
+	margin: 0;
+	padding: 0 0 .5em 0;
+}
+
+#sidepanel p,
+#dashboard_menu p
+{
+	margin: 0;
+	padding: 1em 0;
+}
+
+#sidepanel ul,
+#dashboard_menu ul
+{
+	list-style: none;
+	margin: 0 0 1em 0;
+	padding: 0 0 0 .5em;
+}
+
+#sidepanel ul li,
+#dashboard_menu ul li
+{
+	margin: 0 0 .2em 0;
+}
+
+#sidepanel ul li ul,
+#dashboard_menu ul li ul
+{
+	margin: 0;
+}
+
+#content
+{
+	margin: 0 0 0 17em;
+	padding: 1em;
+}
+
+#content h1, 
+#content h2, 
+#content h3, 
+#content h4, 
+#content p { margin-top: 0; }
+
+table.styled
+{
+	border-collapse: collapse;
+	width: 100%;
+	border-color: #666;
+	border-width: 1px;
+	border-style: solid;
+	margin-bottom: 1em;
+}
+
+table.styled th,
+table.styled td { padding: 0.3em 1em; }
+
+table.styled caption
+{
+	font-size: 1.3em;
+	font-weight: bold;
+	text-align: left;
+}
+
+table.styled thead
+{
+	background-color: #999;
+	color: #fff;
+	text-align: left;
+	
+}
+
+table.styled thead a { color: #fff; }
+{
+	color: #fff;
+	background-color: #666;
+}
+
+
+table.styled .even
+{
+	background-color: #eee;
+}
+
+table.styled .odd
+{
+	background-color: #fff;
+}
+
+
+table.styled tbody tr:hover,
+table.styled tbody tr:hover a
+{
+	background-color: #369;
+	color: #fff;
+}
+
+
+
+table.arversions
+{
+	border-collapse: collapse;
+	width: 100%;
+	border-color: #666;
+	border-width: 1px;
+	border-style: solid;
+	margin-bottom: 1em;
+}
+
+table.arversions th,
+table.arversions td { padding: 0.3em 1em; }
+
+table.arversions caption
+{
+	font-size: 1.3em;
+	font-weight: bold;
+	text-align: left;
+}
+
+table.arversions thead
+{
+	background-color: #999;
+	color: #fff;
+	text-align: left;
+	
+}
+
+table.arversions .even
+{
+	background-color: #eee;
+}
+
+table.arversions del
+{
+	color: red;
+}
+
+table.arversions ins
+{
+	color: green;
+	text-decoration: none;
+}
+
+
+table.arattributes th { text-align: right; }
+
+.arversion_date { color: #999; }
+
+
+.record_view
+{
+	background-color: #eee;
+	border-color: #ccc;
+	border-width: 1px 0;
+	border-style: solid;
+	padding: 1em 1em 0 1em;
+	margin-bottom: 1em;
+}
+
+.record_view p { line-height: 130%; }
+
+.record_view .note
+{
+	color: grey;
+	font-weight: normal;
+}
+
+.edit_record_form em
+{
+	color: red;
+	font-style: normal;
+}
+
+.relationship
+{
+	background-color: #FFF4E6;
+	border-color: #FF8A00;
+	border-width: 1px 0;
+	border-style: solid;
+	padding: 1em 1em 0 1em;
+	margin-bottom: 1em;
+}
+
+.smartrelationship
+{
+	background-color: #FFE;
+	border-color: #FF0;
+	border-width: 1px 0 1px 0;
+	border-style: solid;
+	padding: 1em 1em 0 1em;
+	margin-bottom: 1em;
+}
+
+/* Visualization of the racks */
+
+.v_rack
+{
+	margin: 0;
+	padding: .5em;
+	font-size: 12px;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+.v_rack_name
+{
+	font-size: 18px;
+	font-weight: bold;
+}
+
+.v_rack_container
+{
+	background-color: #D3EEFF;
+	padding: 5px;
+	border-color: #036;
+	border-width: 1px 0 1px 0;
+	border-style: solid;
+}
+
+ul.v_rack_node
+{
+	margin: 0;
+	padding: 0;
+	list-style: none;
+}
+
+ul.v_rack_node li a
+{
+	border-color: #000;
+	border-width: 1px;
+	border-style: solid;
+	margin-top: 3px;
+	padding: 4px 5px;
+	display: block;
+	text-decoration: none;
+	color: black;
+	overflow: hidden;
+}
+
+table.network_summary
+{
+	width: 100%;
+	background-color: #D3EEFF;
+	border-color: #036;
+	border-width: 1px;
+	border-style: solid;
+	margin-bottom: 1em;
+}
+table.network_summary td
+{
+	width: 50%;
+}
+
+table.network_summary caption
+{
+	font-size: 1.3em;
+	font-weight: bold;
+	text-align: left;
+}
+
+#dashboard_body { margin-right: 25em; }
+
+#dashboard_menu
+{
+	width: 23em;
+	float: right;
+}
+
+#loginbox
+{
+	background-color: #eee;
+	border-color: #ccc;
+	border-width: 1px 0;
+	border-style: solid;
+	padding: 1em 1em 0 1em;
+	margin: 1em auto 0 auto;
+	width: 300px;
+}
+
+#loginbox p { text-align: right; }
+
+#status_chart
+{
+  /* Center this chart */
+  margin-left: auto;
+  margin-right: auto;
+  /* The chart is defined as 300px wide when created in the dashboard controller */
+  width: 300px;
+}
+#client_chart
+{
+  margin-left: auto;
+  margin-right: auto;
+  width: 500px;
+}
+
+/* Hide all HRs, they are only meant for print, or non CSS browsers */
+hr { display: none; }
\ No newline at end of file
Copied: trunk/server/app/assets/stylesheets/forms.css (from rev 313, trunk/server/public/stylesheets/forms.css)
===================================================================
--- trunk/server/app/assets/stylesheets/forms.css	                        (rev 0)
+++ trunk/server/app/assets/stylesheets/forms.css	2012-04-20 23:22:38 UTC (rev 314)
@@ -0,0 +1,60 @@
+form
+{
+	margin: 0;
+	padding: 0;
+}
+
+#errorExplanation
+{
+	border-color: #c00;
+	border-width: 1px;
+	border-style: solid;
+	width: 90%;
+	margin: 1em auto;
+	font-size: 14px;
+	background-color: #eee;
+}
+
+#errorExplanation p { margin: 1em; }
+
+#errorExplanation h2
+{
+	margin: 0;
+	background-color: #c00;
+	color: #fff;
+	font-size: 14px;
+	letter-spacing: 1px;
+	padding: 5px 10px;
+}
+
+.fieldWithErrors
+{
+	margin: 0;
+	display: inline;
+	border-color: #c00;
+	border-width: 0 3px;
+	border-style: solid;
+	padding: 2px 4px;
+}
+
+#notice
+{
+	background-color: #cfc;
+	border-color: #090;
+	border-width: 1px 0;
+	border-style: solid;
+	padding: 5px 10px;
+	font-size: 14px;
+	margin: 1em 0;
+}
+
+#error
+{
+	background-color: #FCC;
+	border-color: #c00;
+	border-width: 1px 0;
+	border-style: solid;
+	padding: 5px 10px;
+	font-size: 14px;
+	margin: 1em 0;
+}
\ No newline at end of file
Modified: trunk/server/app/controllers/application_controller.rb
===================================================================
--- trunk/server/app/controllers/application_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/application_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -4,17 +4,6 @@
 # Likewise, all the methods added will be available for all controllers.
 
 class ApplicationController < ActionController::Base
-  helper :all # include all helpers, all the time
-
-  # See ActionController::Base for details 
-  # Uncomment this to filter the contents of submitted sensitive data parameters
-  # from your application log (in this case, all fields with names like "password"). 
-  # filter_parameter_logging :password
-
-  # Turn on the exception_notification plugin
-  # See environment.rb for the email address(s) to which exceptions are mailed
-  include ExceptionNotifiable
-
   # Verify that any changes are signed if the administrator has
   # enabled authentication
   before_filter :authenticate, :only => [:create, :update, :destroy]
@@ -46,21 +35,4 @@
       end
     end
   end
-  
-  # find and to_xml take their :include options in different formats
-  # find wants:
-  # :include => { :rack => { :datacenter_rack_assignment => :datacenter } }
-  # or this (which is what we use because it is easier to generate recursively)
-  # :include => { :rack => { :datacenter_rack_assignment => { :datacenter => {} } } }
-  # to_xml wants:
-  # :include => { :rack => { :include => { :datacenter_rack_assignment => { :include => { :datacenter => {} } } } } }
-  # This method takes the find format and returns the to_xml format
-  def convert_includes(includes)
-    includes.each do |key, value|
-      unless (value.nil? || value.blank?)
-        includes[key] = { :include => convert_includes(value) }
-      end
-    end
-    includes
-  end
 end
Modified: trunk/server/app/controllers/clients_controller.rb
===================================================================
--- trunk/server/app/controllers/clients_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/clients_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -3,79 +3,37 @@
 class ClientsController < ApplicationController
   # GET /clients
   def index
-    includes = {}
-
-    sort = case params[:sort]
-           when 'client'              then 'clients.name'
-           when 'client_reverse'      then 'clients.name DESC'
-           when 'status'              then 'clients.status'
-           when 'status_reverse'      then 'clients.status DESC'
-           when 'updated_at'          then 'clients.updated_at'
-           when 'updated_at_reverse'  then 'clients.updated_at DESC'
-           end
-    # If a sort was not defined we'll make one default
-    if sort.nil?
-      params[:sort] = 'client'
-      sort = 'clients.name'
+    # The dashboard has some custom search links for various health
+    # categories.  If the user selected one then use the appropriate scope as
+    # the starting point for further filtering rather than all clients.
+    scope = nil
+    case params['health']
+    when 'healthy'
+      scope = Client.healthy
+    when 'broken'
+      scope = Client.broken
+    when 'disabled'
+      scope = Client.disabled
+    when 'stale'
+      scope = Client.stale
+    else
+      scope = Client
     end
     
-    # Parse all other params as search query args
-    allowed_queries = ['name', 'status', 'updated_at']
-    conditions_query = []
-    conditions_values = []
-    params.each_pair do |key, value|
-      next if key == 'action'
-      next if key == 'controller'
-      next if key == 'format'
-      next if key == 'page'
-      next if key == 'sort'
-      
-      if key == 'health'
-        if value == 'healthy'
-          conditions_query << "status = 0 AND updated_at > ?"
-          conditions_values << 24.hours.ago
-        elsif value == 'broken'
-          conditions_query << "status != 0 AND status != 200 AND updated_at > ?"
-          conditions_values << 24.hours.ago
-        elsif value == 'disabled'
-          conditions_query << "status = 200 AND updated_at > ?"
-          conditions_values << 24.hours.ago
-        elsif value == 'stale'
-          conditions_query << "updated_at <= ?"
-          conditions_values << 24.hours.ago
-        end
-      elsif key == 'name_substring'
-        conditions_query << "name LIKE ?"
-        conditions_values << '%' + value + '%'
-      elsif key == 'updated_since'
-        conditions_query << "updated_at >= ?"
-        conditions_values << value.to_i.hours.ago
-      elsif key == 'not_updated_since'
-        conditions_query << "updated_at < ?"
-        conditions_values << value.to_i.hours.ago
-      elsif allowed_queries.include?(key)
-        conditions_query << "#{key} = ?"
-        conditions_values << value
-      end
+    # Clients requesting XML get no pagination (all entries)
+    per_page = Client.per_page # will_paginate's default value
+    respond_to do |format|
+      format.html {}
+      format.xml { per_page = Integer::MAX }
     end
-    conditions_string = conditions_query.join(' AND ')
     
-    per_page = Client.per_page # will_paginate's default value
-    # Client's requesting XML get all entries
-    respond_to { |format| format.html {}; format.xml { per_page = Integer::MAX } }
+    @q = scope.search(params[:q])
+    @clients = @q.result.paginate(:page => params[:page], :per_page => per_page)
     
-    @clients = Client.paginate(:all,
-                               :include => includes,
-                               :conditions => [ conditions_string, *conditions_values ],
-                               :order => sort,
-                               :page => params[:page],
-                               :per_page => per_page)
-    
     respond_to do |format|
       format.html # index.html.erb
       format.xml do
-        render :xml => @clients.to_xml(:include => convert_includes(includes),
-                                       :dasherize => false)
+        render :xml => @clients.to_xml(:dasherize => false)
       end
     end
   end
@@ -90,8 +48,7 @@
     @client = Client.find(params[:id])
     respond_to do |format|
       format.html # show.html.erb
-      format.xml  { render :xml => @client.to_xml(:include => convert_includes(includes),
-                                                  :dasherize => false) }
+      format.xml  { render :xml => @client.to_xml(:dasherize => false) }
     end
   end
   
Modified: trunk/server/app/controllers/dashboard_controller.rb
===================================================================
--- trunk/server/app/controllers/dashboard_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/dashboard_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -3,14 +3,14 @@
 class DashboardController < ApplicationController
   def set_counts
     @total_count    = Client.count
-    @healthy_count  = Client.count(:conditions => ["status = 0 AND updated_at > ?", 24.hours.ago])
-    @broken_count   = Client.count(:conditions => ["status != 0 AND status != 200 AND updated_at > ?", 24.hours.ago])
-    @disabled_count = Client.count(:conditions => ["status = 200 AND updated_at > ?", 24.hours.ago])
-    @stale_count    = Client.count(:conditions => ["updated_at <= ?", 24.hours.ago])
+    @healthy_count  = Client.healthy.count
+    @broken_count   = Client.broken.count
+    @disabled_count = Client.disabled.count
+    @stale_count    = Client.stale.count
   end
   def set_charts
-    @status_chart = open_flash_chart_object(300, 300, url_for( :action => 'chart', :chart => 'status', :format => :json ))
-    @client_chart = open_flash_chart_object(500, 300, url_for( :action => 'chart', :chart => 'client', :format => :json ))
+    @status_chart = open_flash_chart_object(300, 300, url_for( :action => 'chart', :chart => 'status', :format => :json )).html_safe
+    @client_chart = open_flash_chart_object(500, 300, url_for( :action => 'chart', :chart => 'client', :format => :json )).html_safe
   end
   
   def index
@@ -55,8 +55,8 @@
           
           chart.x_axis = nil
           
-          render :text => chart, :layout => false
-          return
+          debug chart.render
+          render :text => chart.render and return
         when 'client'
           clients = []
           months = []
@@ -104,8 +104,7 @@
           
           chart.add_element(line_dot)
           
-          render :text => chart.to_s
-          return
+          render :text => chart.render and return
         end
       }
     end
Modified: trunk/server/app/controllers/etch_configs_controller.rb
===================================================================
--- trunk/server/app/controllers/etch_configs_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/etch_configs_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -10,8 +10,8 @@
       format.xml { per_page = Integer::MAX }
     end
     
-    @search = EtchConfig.search(params[:search])
-    @etch_configs = @search.paginate(:page => params[:page], :per_page => per_page)
+    @q = EtchConfig.search(params[:q])
+    @etch_configs = @q.result.paginate(:page => params[:page], :per_page => per_page)
     
     respond_to do |format|
       format.html # index.html.erb
Modified: trunk/server/app/controllers/facts_controller.rb
===================================================================
--- trunk/server/app/controllers/facts_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/facts_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -10,8 +10,8 @@
       format.xml { per_page = Integer::MAX }
     end
     
-    @search = Fact.search(params[:search])
-    @facts = @search.paginate(:page => params[:page], :per_page => per_page)
+    @q = Fact.search(params[:q])
+    @facts = @q.result.paginate(:page => params[:page], :per_page => per_page)
     
     respond_to do |format|
       format.html # index.html.erb
Modified: trunk/server/app/controllers/originals_controller.rb
===================================================================
--- trunk/server/app/controllers/originals_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/originals_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -10,8 +10,8 @@
       format.xml { per_page = Integer::MAX }
     end
     
-    @search = Original.search(params[:search])
-    @originals = @search.paginate(:page => params[:page], :per_page => per_page)
+    @q = Original.search(params[:q])
+    @originals = @q.result.paginate(:page => params[:page], :per_page => per_page)
     
     respond_to do |format|
       format.html # index.html.erb
Modified: trunk/server/app/controllers/results_controller.rb
===================================================================
--- trunk/server/app/controllers/results_controller.rb	2012-03-21 23:30:16 UTC (rev 313)
+++ trunk/server/app/controllers/results_controller.rb	2012-04-20 23:22:38 UTC (rev 314)
@@ -3,83 +3,27 @@
 class ResultsController < ApplicationController
   # GET /results
   def index
-    includes = {}
+    @combined = params[:combined]
+    @query_string = request.query_string
     
-    # The index page uses clients.name, so always include it in the includes.
-    # Otherwise there's a SQL lookup for each row
-    includes[:client] = {}
-    
-    sort = case params[:sort]
-           when 'client'                then includes[:client] = {}; 'clients.name'
-           when 'client_reverse'        then includes[:client] = {}; 'clients.name DESC'
-           when 'file'                  then 'results.file'
-           when 'file_reverse'          then 'results.file DESC'
-           when 'created_at'            then 'results.created_at'
-           when 'created_at_reverse'    then 'results.created_at DESC'
-           when 'success'               then 'results.success'
-           wh...
 
[truncated message content] |