Project

anytime

0.0
No commit activity in last 3 years
No release in over 3 years
Fix to support Rails 4
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.6.0
 Project Readme

Anytime

If you test on a date/time sensitive applications, modifying system date/time or doing something temporary on background is not flexible or convenient enough. Anytime is a simple date setter for quality assurance of Ruby on Rails applications.

gem install anytime

Or install it with bundler:

gem 'anytime', '~>0.1.1'

Anytime needs its own routes to get request from its client server widget and an initializer for configuration. Simply run:

rails g anytime:install

Anytime's helper provides a mini widget to be put in any of your views files. Normally, people place it in layouts like application.html.erb:

#application.html.erb
<%= anytime_tag %>

Anytime inserts an initializer into your config/initializers folder as:

Anytime.setup do |config|
  #Configure the returning of Time.now and Date.now
  #Options: :utc and :local
  config.time_mode = :utc

  #Configure the supported environments
  #[:development] and [:development, :staging] are recommended
  config.environments = [:development]
end

Anytime comes with a very raw user interface drawn by its helper, you can have a look at the page source code and make it up.

Anytime is released under the MIT license. See [LICENSE][] for details. [license]: https://github.com/aquajach/anytime/blob/master/LICENSE.md