public
Description: A gem providing “time travel” and “time freezing” capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
Homepage: http://www.smartlogicsolutions.com/open-source-projects
Clone URL: git://github.com/jtrupiano/timecop.git
timecop / History.txt
100644 80 lines (53 sloc) 3.291 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
=== 0.3.2 / 2009-10-24
 
* 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]
    
=== 0.3.1 / 2009-09-30
 
* Maintenance
  * DRY up the Timecop class internals.
 
=== 0.3.0 / 2009-09-20
 
* 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
 
=== 0.2.1 / 2009-03-06
* 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.
 
=== 0.2.0 / 2008-12-23
 
* 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.
    
=== 0.1.0 / 2008-11-09
 
* 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.