-
Maintenance
-
Return a cloned time instance in order to support the destructive methods #gmt, #utc and #localtime
-
Don’t use full path requires where unnecessary
-
-
Maintenance
-
Fix various timezone-related issues. Notably, when traveling to a DateTime instance specified in a non-local timezone, convert provided DateTime instance to a local instance and return that from DateTime.now. Code contributed by Michaël Witrant [piglop]
-
Fix bug that would not allow Timecop to be used when Ruby’s ‘date’ library had not been previously loaded. Code contributed by Tuomas Kareinen [tuomas]
-
Fix bug when traveling to a DateTime across a DST boundary that resulted in DateTime’s being off by an hour.
-
Migrate argument parsing into Timecop::TimeStackItem to reduce the responsibility of the Timecop class.
-
-
Revoked due to regression.
-
Revoked due to regression.
-
Maintenance
-
DRY up the Timecop class internals.
-
-
API
-
Completely remove Timecop#unset_all (deprecated by Timecop#return in 0.2.0)
-
Return Time.now from #freeze, #travel and #return – code contributed by Keith Bennett [keithrbennett]
-
-
Maintenance
-
Fix bug that left Time#mock_time set in some instances
-
Upped build dependency to jeweler ~> 1.2.1
-
Don’t pollute top-level namespace with classes/constants
-
-
Documentation
-
Clearer examples in the README, better description in the gemspec
-
Improve RDoc
-
-
API Changes
-
Introduced a 5th style of arguments to be passed into #travel and #freeze. Now, if you pass in a single integer value, it will be interpreted as a relative offset in seconds from the current Time.now. Previously this was interpreted as only the year, similar to calling Time.local(2008) –> Jan. 1, 2008. This is no longer the case.
-
-
Documentation
-
Moved to Textile for the README.
-
Added documentation for the new feature, and fixed a few typos.
-
-
API Changes
-
Timecop#travel no longer freezes time. Rather, it computes the current offset between the new “now” and the real “now”, and returns times as if Time had continued to move forward
-
Timecop#freeze now behaves exactly as the old Timecop#travel behaved. Unless you depended on the actual freezing of time (which I think would be rare), you should be able to continue to use #travel without worry.
-
Timecop#return is now exposed (previously Timecop#unset_all, but not well advertised). It will completely unmock time, and will probably be rarely used outside of the actual implementation of this library.
-
-
More Test Coverage
-
Tests now explicitly cover the cases when the Date and DateTime objects are not loaded, and ensures proper functionality in their absence and existence.
-
Still haven’t done regression testing against anything other than a few version of 1.8.6 (including REE). We should probably try to get this tested on both 1.8.7 and 1.9.1.
-
-
Documentation
-
Fixed up a lot of the poorly-formatted rdoc syntax. The public API should now be properly published in the rdoc, and the internals are omitted.
-
-
Initial Feature Set
-
Temporarily (or permanently if you prefer) change the concept of Time.now, DateTime.now (if defined), and Date.today (if defined)
-
Timecop#travel api allows an argument to be passed in as one of: 1) Time instance, 2) DateTime instance, 3) Date instance, 4) individual arguments (year, month, day, hour, minute, second)
-
Nested calls to Timecop#travel are supported – each block will maintain it’s interpretation of now.
-