timecop 0.5.2 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +1 -1
- data/README.markdown +48 -13
- data/Rakefile +10 -4
- data/lib/timecop/time_extensions.rb +128 -54
- data/lib/timecop/time_stack_item.rb +78 -83
- data/lib/timecop/timecop.rb +142 -49
- data/lib/timecop/version.rb +2 -2
- data/lib/timecop.rb +2 -2
- data/test/test_helper.rb +26 -17
- data/test/time_stack_item_test.rb +153 -73
- data/test/timecop_test.rb +247 -41
- data/test/timecop_without_date_but_with_time_test.rb +4 -8
- data/test/timecop_without_date_test.rb +22 -23
- metadata +16 -23
- data/History.rdoc +0 -137
- data/test/run_tests.sh +0 -6
data/History.rdoc
DELETED
@@ -1,137 +0,0 @@
|
|
1
|
-
=== 0.5.2 / 2012-09-20
|
2
|
-
|
3
|
-
* Feature
|
4
|
-
* Timecop#scale, ability to accelerate time by a given scaling factor
|
5
|
-
|
6
|
-
=== 0.5.0 / 2012-09-12
|
7
|
-
|
8
|
-
* Maintenance
|
9
|
-
* Timecop#travel, Timecop#freeze blocks return nil or block value
|
10
|
-
|
11
|
-
=== 0.4.6 / 2012-09-05
|
12
|
-
|
13
|
-
* Maintenance
|
14
|
-
* Fix rounding support for Ruby < 1.9
|
15
|
-
|
16
|
-
=== 0.4.5 / 2012-08-09
|
17
|
-
|
18
|
-
* Maintenance
|
19
|
-
* Subclasses of Time/Date/DateTime now return proper instances
|
20
|
-
|
21
|
-
=== 0.4.4 / 2012-07-29
|
22
|
-
|
23
|
-
* Maintenance
|
24
|
-
* Can now configure Timecop to not use ActiveSupport by setting Timecop.active_support = false
|
25
|
-
|
26
|
-
=== 0.4.3 / 2012-07-27
|
27
|
-
|
28
|
-
* Maintenance
|
29
|
-
* Fix alias of Time#new/Time#now when Time#new given with args
|
30
|
-
|
31
|
-
=== 0.4.2 / 2012-07-27
|
32
|
-
|
33
|
-
* Maintenance
|
34
|
-
* Mock Time#new the same as Time#now since they're synonyms
|
35
|
-
* Set default arg in parsing to 2000
|
36
|
-
* Time.freeze defaults to Time#now
|
37
|
-
* Use Time#parse is available to parse Time's given as strings
|
38
|
-
* Add ActiveSupport Time.zone support
|
39
|
-
* Stop DateTime from losing precision after traveling
|
40
|
-
|
41
|
-
=== 0.3.5 / 2010-06-07
|
42
|
-
|
43
|
-
* Maintenance
|
44
|
-
* Return a cloned time instance in order to support the destructive methods #gmt, #utc and #localtime
|
45
|
-
* Don't use full path requires where unnecessary
|
46
|
-
|
47
|
-
=== 0.3.4 / 2009-12-07
|
48
|
-
|
49
|
-
* Maintenance
|
50
|
-
* Fix various timezone-related issues. Notably, when traveling to a DateTime
|
51
|
-
instance specified in a non-local timezone, convert provided DateTime
|
52
|
-
instance to a local instance and return that from DateTime.now.
|
53
|
-
Code contributed by Michaël Witrant [piglop]
|
54
|
-
* Fix bug that would not allow Timecop to be used when Ruby's 'date'
|
55
|
-
library had not been previously loaded.
|
56
|
-
Code contributed by Tuomas Kareinen [tuomas]
|
57
|
-
* Fix bug when traveling to a DateTime across a DST boundary that
|
58
|
-
resulted in DateTime's being off by an hour.
|
59
|
-
* Migrate argument parsing into Timecop::TimeStackItem to reduce the
|
60
|
-
responsibility of the Timecop class.
|
61
|
-
|
62
|
-
=== 0.3.3 2009-10-30
|
63
|
-
|
64
|
-
* Revoked due to regression.
|
65
|
-
|
66
|
-
=== 0.3.2 / 2009-10-24
|
67
|
-
|
68
|
-
* Revoked due to regression.
|
69
|
-
|
70
|
-
=== 0.3.1 / 2009-09-30
|
71
|
-
|
72
|
-
* Maintenance
|
73
|
-
* DRY up the Timecop class internals.
|
74
|
-
|
75
|
-
=== 0.3.0 / 2009-09-20
|
76
|
-
|
77
|
-
* API
|
78
|
-
* Completely remove Timecop#unset_all (deprecated by Timecop#return in 0.2.0)
|
79
|
-
* Return Time.now from #freeze, #travel and #return -- code contributed by Keith Bennett [keithrbennett]
|
80
|
-
|
81
|
-
* Maintenance
|
82
|
-
* Fix bug that left Time#mock_time set in some instances
|
83
|
-
* Upped build dependency to jeweler ~> 1.2.1
|
84
|
-
* Don't pollute top-level namespace with classes/constants
|
85
|
-
|
86
|
-
* Documentation
|
87
|
-
* Clearer examples in the README, better description in the gemspec
|
88
|
-
* Improve RDoc
|
89
|
-
|
90
|
-
=== 0.2.1 / 2009-03-06
|
91
|
-
* API Changes
|
92
|
-
|
93
|
-
* Introduced a 5th style of arguments to be passed into #travel and #freeze. Now, if you pass in a single integer value,
|
94
|
-
it will be interpreted as a relative offset in seconds from the current Time.now. Previously this was interpreted as
|
95
|
-
only the year, similar to calling Time.local(2008) --> Jan. 1, 2008. This is no longer the case.
|
96
|
-
|
97
|
-
* Documentation
|
98
|
-
|
99
|
-
* Moved to Textile for the README.
|
100
|
-
|
101
|
-
* Added documentation for the new feature, and fixed a few typos.
|
102
|
-
|
103
|
-
=== 0.2.0 / 2008-12-23
|
104
|
-
|
105
|
-
* API Changes
|
106
|
-
|
107
|
-
* Timecop#travel no longer freezes time. Rather, it computes the current offset between the new "now" and the real "now", and
|
108
|
-
returns times as if Time had continued to move forward
|
109
|
-
|
110
|
-
* Timecop#freeze now behaves exactly as the old Timecop#travel behaved. Unless you depended on the actual freezing of time
|
111
|
-
(which I think would be rare), you should be able to continue to use #travel without worry.
|
112
|
-
|
113
|
-
* Timecop#return is now exposed (previously Timecop#unset_all, but not well advertised). It will completely unmock time,
|
114
|
-
and will probably be rarely used outside of the actual implementation of this library.
|
115
|
-
|
116
|
-
* More Test Coverage
|
117
|
-
|
118
|
-
* Tests now explicitly cover the cases when the Date and DateTime objects are not loaded, and ensures proper functionality
|
119
|
-
in their absence and existence.
|
120
|
-
|
121
|
-
* Still haven't done regression testing against anything other than a few version of 1.8.6 (including REE). We should
|
122
|
-
probably try to get this tested on both 1.8.7 and 1.9.1.
|
123
|
-
|
124
|
-
* Documentation
|
125
|
-
|
126
|
-
* Fixed up a lot of the poorly-formatted rdoc syntax. The public API should now be properly published in the rdoc,
|
127
|
-
and the internals are omitted.
|
128
|
-
|
129
|
-
=== 0.1.0 / 2008-11-09
|
130
|
-
|
131
|
-
* Initial Feature Set
|
132
|
-
|
133
|
-
* Temporarily (or permanently if you prefer) change the concept of Time.now, DateTime.now (if defined), and Date.today (if defined)
|
134
|
-
* Timecop#travel api allows an argument to be passed in as one of: 1) Time instance, 2) DateTime instance, 3) Date instance,
|
135
|
-
4) individual arguments (year, month, day, hour, minute, second)
|
136
|
-
* Nested calls to Timecop#travel are supported -- each block will maintain it's interpretation of now.
|
137
|
-
|