= timecop-console * http://github.com/jtrupiano/timecop-console == Description timecop-console exposes controllers/routes for manipulating Time.now (using the Timecop gem) from your app. This is especially useful during development and QA, as you can very easily simulate the movement of time. Just as timecop gives you this ability within your tests, you can now easily make this available to your dev and QA team through a debug console. I have plans to build out rails-caddy, a debug console that will pull in timecop-console (and a few others that I'm thinking about) to truly give you a powerful QA tool. == Install sudo gem install timecop-console (latest stable release) sudo gem install jtrupiano-timecop-console (head of repository) == Requirements * Timecop ~> 0.2.1 == How to Use You'll want to hook in the functionality in the specific environments that you want this to load in (probably only development, staging, and qa). In the specific environment file (e.g. config/environments/staging.rb), include the following snippet: config.after_initialize do require 'timecop_console' end By requiring this file, you will open up ActionController::Base and inject an around_filter that will manage Time.now and friends for you. Additionally, it will add lib/timecop-console/controllers/timecop_controller.rb to the load path along with its routes. The two routes are: map.update_time '/timecop/update', :controller => 'timecop', :action => 'update' map.reset_time '/timecop/reset', :controller => 'timecop', :action => 'reset' Then, to take advantage of this, you'll want to add a snippet of code to the bottom of your application's layout file, e.g.: <% if ["development", "staging", "qa"].include?(RAILS_ENV) -%>