timecop 0.9.1 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 73784bb387b1ff9addf9f0ea04a14e28d679a577
4
- data.tar.gz: 18fbfbd85ceae5b1a23111267b7b39287911b080
2
+ SHA256:
3
+ metadata.gz: 681f52d846b808b06ff833f3fbfc21e3c7c4c1bf426baa03f101c0a2c3b79ce8
4
+ data.tar.gz: b95b6d4a3c357e7f11f046d82dad3badd81d4903c96ef2b8e77762f241eeb66e
5
5
  SHA512:
6
- metadata.gz: 39552bdc1d0278558f91802906da230656323690b3a4663c6c054e2f8ad379df9f593e65265faa6d0ee6769423b0d73d3ab3a1e16c8ac0ee80896cd88e5661ba
7
- data.tar.gz: 669823d9cd754f2fa5ec195012aa43f43a070e61e3be41dda3ada13eceaffa06733cb6302bbdf88b0764da28d6a3860d74d4505ba3fa4a75be88ef96c03d0ad1
6
+ metadata.gz: e62e48939fb924a78d59199222688ae7692a2f6649c16daac296375ac1e537fa1c85e6a34d1a5cbd64b209e643ffa08d180ce3d933905f91284ce4c819873c1e
7
+ data.tar.gz: f6f5ef32ee1bfadfd43a5a8899bb521873d61eafd2f242942df6e80a3ed11f80a170d074ada23a61eb3b92009eeaf3a1046b126c802dc9a1c014c77d32acb3ab
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2012 — Travis Jeffery, John Trupiano
3
+ Copyright (c) 2019 — Travis Jeffery, John Trupiano
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.markdown CHANGED
@@ -1,6 +1,7 @@
1
1
  # timecop
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/travisjeffery/timecop.svg)](http://travis-ci.org/travisjeffery/timecop)
3
+ [![Gem Version](https://badge.fury.io/rb/timecop.svg)](https://rubygems.org/gems/timecop)
4
+ [![Build Status](https://github.com/travisjeffery/timecop/workflows/CI/badge.svg)](https://github.com/travisjeffery/timecop/actions?query=workflow%3ACI)
4
5
 
5
6
  ## DESCRIPTION
6
7
 
@@ -22,6 +22,8 @@ class Time #:nodoc:
22
22
  args.size <= 0 ? now : new_without_mock_time(*args)
23
23
  end
24
24
 
25
+ ruby2_keywords :new_with_mock_time if Module.private_method_defined?(:ruby2_keywords)
26
+
25
27
  alias_method :new, :new_with_mock_time
26
28
  end
27
29
  end
@@ -48,7 +50,32 @@ class Date #:nodoc:
48
50
  "supports Date::ITALY for the start argument."
49
51
  end
50
52
 
51
- Time.strptime(str, fmt).to_date
53
+ #If date is not valid the following line raises
54
+ Date.strptime_without_mock_date(str, fmt)
55
+
56
+ d = Date._strptime(str, fmt)
57
+ now = Time.now.to_date
58
+ year = d[:year] || now.year
59
+ mon = d[:mon] || now.mon
60
+ if d.keys == [:year]
61
+ Date.new(year)
62
+ elsif d[:mday]
63
+ Date.new(year, mon, d[:mday])
64
+ elsif d[:wday]
65
+ Date.new(year, mon, now.mday) + (d[:wday] - now.wday)
66
+ elsif d[:yday]
67
+ Date.new(year).next_day(d[:yday] - 1)
68
+ elsif d[:cwyear] && d[:cweek]
69
+ if d[:cwday]
70
+ Date.commercial(d[:cwyear], d[:cweek], d[:cwday])
71
+ else
72
+ Date.commercial(d[:cwyear], d[:cweek])
73
+ end
74
+ elsif d[:seconds]
75
+ Time.at(d[:seconds]).to_date
76
+ else
77
+ Date.new(year, mon)
78
+ end
52
79
  end
53
80
 
54
81
  alias_method :strptime, :strptime_with_mock_date
@@ -63,6 +90,8 @@ class Date #:nodoc:
63
90
  parsed_date
64
91
  when date_hash[:mon] && date_hash[:mday]
65
92
  Date.new(mocked_time_stack_item.year, date_hash[:mon], date_hash[:mday])
93
+ when date_hash[:mday]
94
+ Date.new(mocked_time_stack_item.year, mocked_time_stack_item.month, date_hash[:mday])
66
95
  when date_hash[:wday]
67
96
  closest_wday(date_hash[:wday])
68
97
  else
@@ -111,6 +140,8 @@ class DateTime #:nodoc:
111
140
  parsed_date
112
141
  when date_hash[:mon] && date_hash[:mday]
113
142
  DateTime.new(mocked_time_stack_item.year, date_hash[:mon], date_hash[:mday])
143
+ when date_hash[:mday]
144
+ DateTime.new(mocked_time_stack_item.year, mocked_time_stack_item.month, date_hash[:mday])
114
145
  when date_hash[:wday]
115
146
  Date.closest_wday(date_hash[:wday]).to_datetime
116
147
  else
@@ -1,140 +1,140 @@
1
1
  class Timecop
2
- # A data class for carrying around "time movement" objects. Makes it easy to keep track of the time
3
- # movements on a simple stack.
4
- class TimeStackItem #:nodoc:
5
- attr_reader :mock_type
6
-
7
- def initialize(mock_type, *args)
8
- raise "Unknown mock_type #{mock_type}" unless [:freeze, :travel, :scale].include?(mock_type)
9
- @travel_offset = @scaling_factor = nil
10
- @scaling_factor = args.shift if mock_type == :scale
11
- @mock_type = mock_type
12
- @time = parse_time(*args)
13
- @time_was = Time.now_without_mock_time
14
- @travel_offset = compute_travel_offset
15
- end
16
-
17
- def year
18
- time.year
19
- end
2
+ # A data class for carrying around "time movement" objects. Makes it easy to keep track of the time
3
+ # movements on a simple stack.
4
+ class TimeStackItem #:nodoc:
5
+ attr_reader :mock_type
6
+
7
+ def initialize(mock_type, *args)
8
+ raise "Unknown mock_type #{mock_type}" unless [:freeze, :travel, :scale].include?(mock_type)
9
+ @travel_offset = @scaling_factor = nil
10
+ @scaling_factor = args.shift if mock_type == :scale
11
+ @mock_type = mock_type
12
+ @time = parse_time(*args)
13
+ @time_was = Time.now_without_mock_time
14
+ @travel_offset = compute_travel_offset
15
+ end
20
16
 
21
- def month
22
- time.month
23
- end
17
+ def year
18
+ time.year
19
+ end
24
20
 
25
- def day
26
- time.day
27
- end
21
+ def month
22
+ time.month
23
+ end
28
24
 
29
- def hour
30
- time.hour
31
- end
25
+ def day
26
+ time.day
27
+ end
32
28
 
33
- def min
34
- time.min
35
- end
29
+ def hour
30
+ time.hour
31
+ end
36
32
 
37
- def sec
38
- time.sec
39
- end
33
+ def min
34
+ time.min
35
+ end
40
36
 
41
- def utc_offset
42
- time.utc_offset
43
- end
37
+ def sec
38
+ time.sec
39
+ end
44
40
 
45
- def travel_offset
46
- @travel_offset unless mock_type == :freeze
47
- end
41
+ def utc_offset
42
+ time.utc_offset
43
+ end
48
44
 
49
- def travel_offset_days
50
- (@travel_offset / 60 / 60 / 24).round
51
- end
45
+ def travel_offset
46
+ @travel_offset unless mock_type == :freeze
47
+ end
52
48
 
53
- def scaling_factor
54
- @scaling_factor
55
- end
49
+ def travel_offset_days
50
+ (@travel_offset / 60 / 60 / 24).round
51
+ end
56
52
 
57
- def time(time_klass = Time) #:nodoc:
58
- if @time.respond_to?(:in_time_zone)
59
- time = time_klass.at(@time.dup.localtime)
60
- else
61
- time = time_klass.at(@time)
62
- end
53
+ def scaling_factor
54
+ @scaling_factor
55
+ end
63
56
 
64
- if travel_offset.nil?
65
- time
66
- elsif scaling_factor.nil?
67
- time_klass.at(Time.now_without_mock_time + travel_offset)
68
- else
69
- time_klass.at(scaled_time)
70
- end
57
+ def time(time_klass = Time) #:nodoc:
58
+ if @time.respond_to?(:in_time_zone)
59
+ time = time_klass.at(@time.dup.localtime)
60
+ else
61
+ time = time_klass.at(@time)
71
62
  end
72
63
 
73
- def scaled_time
74
- (@time + (Time.now_without_mock_time - @time_was) * scaling_factor).to_f
64
+ if travel_offset.nil?
65
+ time
66
+ elsif scaling_factor.nil?
67
+ time_klass.at(Time.now_without_mock_time + travel_offset)
68
+ else
69
+ time_klass.at(scaled_time)
75
70
  end
71
+ end
76
72
 
77
- def date(date_klass = Date)
78
- date_klass.jd(time.__send__(:to_date).jd)
79
- end
73
+ def scaled_time
74
+ (@time + (Time.now_without_mock_time - @time_was) * scaling_factor).to_f
75
+ end
80
76
 
81
- def datetime(datetime_klass = DateTime)
82
- if Float.method_defined?(:to_r)
83
- fractions_of_a_second = time.to_f % 1
84
- datetime_klass.new(year, month, day, hour, min, (fractions_of_a_second + sec), utc_offset_to_rational(utc_offset))
85
- else
86
- datetime_klass.new(year, month, day, hour, min, sec, utc_offset_to_rational(utc_offset))
87
- end
77
+ def date(date_klass = Date)
78
+ date_klass.jd(time.__send__(:to_date).jd)
79
+ end
80
+
81
+ def datetime(datetime_klass = DateTime)
82
+ if Float.method_defined?(:to_r)
83
+ fractions_of_a_second = time.to_f % 1
84
+ datetime_klass.new(year, month, day, hour, min, (fractions_of_a_second + sec), utc_offset_to_rational(utc_offset))
85
+ else
86
+ datetime_klass.new(year, month, day, hour, min, sec, utc_offset_to_rational(utc_offset))
88
87
  end
88
+ end
89
89
 
90
- private
90
+ private
91
91
 
92
- def rational_to_utc_offset(rational)
93
- ((24.0 / rational.denominator) * rational.numerator) * (60 * 60)
94
- end
92
+ def rational_to_utc_offset(rational)
93
+ ((24.0 / rational.denominator) * rational.numerator) * (60 * 60)
94
+ end
95
95
 
96
- def utc_offset_to_rational(utc_offset)
97
- Rational(utc_offset, 24 * 60 * 60)
98
- end
96
+ def utc_offset_to_rational(utc_offset)
97
+ Rational(utc_offset, 24 * 60 * 60)
98
+ end
99
99
 
100
- def parse_time(*args)
101
- arg = args.shift
102
- if arg.is_a?(Time)
103
- arg
104
- elsif Object.const_defined?(:DateTime) && arg.is_a?(DateTime)
105
- time_klass.at(arg.to_time.to_f).getlocal
106
- elsif Object.const_defined?(:Date) && arg.is_a?(Date)
107
- time_klass.local(arg.year, arg.month, arg.day, 0, 0, 0)
108
- elsif args.empty? && (arg.kind_of?(Integer) || arg.kind_of?(Float))
109
- time_klass.now + arg
110
- elsif arg.nil?
111
- time_klass.now
100
+ def parse_time(*args)
101
+ arg = args.shift
102
+ if arg.is_a?(Time)
103
+ arg
104
+ elsif Object.const_defined?(:DateTime) && arg.is_a?(DateTime)
105
+ time_klass.at(arg.to_time.to_f).getlocal
106
+ elsif Object.const_defined?(:Date) && arg.is_a?(Date)
107
+ time_klass.local(arg.year, arg.month, arg.day, 0, 0, 0)
108
+ elsif args.empty? && (arg.kind_of?(Integer) || arg.kind_of?(Float))
109
+ time_klass.now + arg
110
+ elsif arg.nil?
111
+ time_klass.now
112
+ else
113
+ if arg.is_a?(String) && Time.respond_to?(:parse)
114
+ time_klass.parse(arg)
112
115
  else
113
- if arg.is_a?(String) && Time.respond_to?(:parse)
114
- time_klass.parse(arg)
115
- else
116
- # we'll just assume it's a list of y/m/d/h/m/s
117
- year = arg || 2000
118
- month = args.shift || 1
119
- day = args.shift || 1
120
- hour = args.shift || 0
121
- minute = args.shift || 0
122
- second = args.shift || 0
123
- time_klass.local(year, month, day, hour, minute, second)
124
- end
116
+ # we'll just assume it's a list of y/m/d/h/m/s
117
+ year = arg || 2000
118
+ month = args.shift || 1
119
+ day = args.shift || 1
120
+ hour = args.shift || 0
121
+ minute = args.shift || 0
122
+ second = args.shift || 0
123
+ time_klass.local(year, month, day, hour, minute, second)
125
124
  end
126
125
  end
126
+ end
127
127
 
128
- def compute_travel_offset
129
- time - Time.now_without_mock_time
130
- end
128
+ def compute_travel_offset
129
+ time - Time.now_without_mock_time
130
+ end
131
131
 
132
- def times_are_equal_within_epsilon t1, t2, epsilon_in_seconds
133
- (t1 - t2).abs < epsilon_in_seconds
134
- end
132
+ def times_are_equal_within_epsilon t1, t2, epsilon_in_seconds
133
+ (t1 - t2).abs < epsilon_in_seconds
134
+ end
135
135
 
136
- def time_klass
137
- Time.respond_to?(:zone) && Time.zone ? Time.zone : Time
138
- end
136
+ def time_klass
137
+ Time.respond_to?(:zone) && Time.zone ? Time.zone : Time
139
138
  end
139
+ end
140
140
  end
@@ -1,5 +1,4 @@
1
1
  require 'singleton'
2
- require File.join(File.dirname(__FILE__), "time_extensions")
3
2
  require File.join(File.dirname(__FILE__), "time_stack_item")
4
3
 
5
4
  # Timecop
@@ -14,6 +13,8 @@ class Timecop
14
13
  include Singleton
15
14
 
16
15
  class << self
16
+ private :instance
17
+
17
18
  # Allows you to run a block of code and "fake" a time throughout the execution of that block.
18
19
  # This is particularly useful for writing test methods where the passage of time is critical to the business
19
20
  # logic being tested. For example:
@@ -75,11 +76,11 @@ class Timecop
75
76
  end
76
77
 
77
78
  def baseline
78
- instance.send(:baseline)
79
+ instance.baseline
79
80
  end
80
81
 
81
82
  def baseline=(baseline)
82
- instance.send(:baseline=, baseline)
83
+ instance.baseline = baseline
83
84
  end
84
85
 
85
86
  # Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when
@@ -87,20 +88,21 @@ class Timecop
87
88
  # the given block.
88
89
  def return(&block)
89
90
  if block_given?
90
- instance.send(:return, &block)
91
+ instance.return(&block)
91
92
  else
92
- instance.send(:unmock!)
93
+ instance.unmock!
93
94
  nil
94
95
  end
95
96
  end
97
+ alias :unfreeze :return
96
98
 
97
99
  def return_to_baseline
98
- instance.send(:return_to_baseline)
100
+ instance.return_to_baseline
99
101
  Time.now
100
102
  end
101
103
 
102
104
  def top_stack_item #:nodoc:
103
- instance.send(:stack).last
105
+ instance.stack.last
104
106
  end
105
107
 
106
108
  def safe_mode=(safe)
@@ -112,27 +114,25 @@ class Timecop
112
114
  end
113
115
 
114
116
  def thread_safe=(t)
115
- instance.send(:thread_safe=, t)
117
+ instance.thread_safe = t
116
118
  end
117
119
 
118
120
  def thread_safe
119
- instance.send(:thread_safe)
121
+ instance.thread_safe
120
122
  end
121
123
 
122
124
  # Returns whether or not Timecop is currently frozen/travelled
123
125
  def frozen?
124
- !instance.send(:stack).empty?
126
+ !instance.stack.empty?
125
127
  end
126
128
 
127
129
  private
128
130
  def send_travel(mock_type, *args, &block)
129
- val = instance.send(:travel, mock_type, *args, &block)
131
+ val = instance.travel(mock_type, *args, &block)
130
132
  block_given? ? val : Time.now
131
133
  end
132
134
  end
133
135
 
134
- private
135
-
136
136
  def baseline=(b)
137
137
  set_baseline(b)
138
138
  stack << TimeStackItem.new(:travel, b)
@@ -200,7 +200,7 @@ class Timecop
200
200
  begin
201
201
  yield stack_item.time
202
202
  ensure
203
- @stack.replace stack_backup
203
+ stack.replace stack_backup
204
204
  @safe = safe_backup
205
205
  end
206
206
  end
@@ -235,3 +235,6 @@ class Timecop
235
235
  end
236
236
  end
237
237
  end
238
+
239
+ # This must be done after TimeCop is available
240
+ require File.join(File.dirname(__FILE__), "time_extensions")
@@ -1,3 +1,3 @@
1
1
  class Timecop
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.5"
3
3
  end
data/test/test_helper.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  require 'bundler/setup'
2
2
  require 'minitest/autorun'
3
3
  require 'minitest/rg'
4
+ require 'pry'
4
5
 
5
6
  $VERBOSE = true # enable ruby warnings
6
7
 
7
- require 'mocha/setup'
8
+ require 'mocha/minitest'
8
9
 
9
10
  class Minitest::Test
10
11
  private
@@ -28,7 +29,7 @@ class Minitest::Test
28
29
  Time.at(time.to_i).to_datetime.offset
29
30
  end
30
31
 
31
- TIMEZONES = ["Europe/Paris", "UTC", "America/Chicago"]
32
+ TIMEZONES = ["Pacific/Midway", "Europe/Paris", "UTC", "America/Chicago"]
32
33
 
33
34
  def each_timezone
34
35
  old_tz = ENV["TZ"]
@@ -181,7 +181,7 @@ class TestTimeStackItem < Minitest::Test
181
181
  t = Time.local(2009, 10, 1, 0, 0, 30)
182
182
  tsi = Timecop::TimeStackItem.new(:freeze, t)
183
183
 
184
- assert_equal nil, tsi.send(:travel_offset)
184
+ assert_nil tsi.send(:travel_offset)
185
185
  end
186
186
 
187
187
  def test_timezones
@@ -206,7 +206,7 @@ class TestTimeStackItem < Minitest::Test
206
206
  time = Time.zone.local(2013,1,3)
207
207
 
208
208
  Timecop.freeze(time) do
209
- assert_equal time.to_date, Time.now.to_date
209
+ assert_equal time.to_date, Time.zone.now.to_date
210
210
  end
211
211
  end
212
212
 
data/test/timecop_test.rb CHANGED
@@ -37,6 +37,12 @@ class TestTimecop < Minitest::Test
37
37
  assert_nil Time.send(:mock_time)
38
38
  end
39
39
 
40
+ def test_freeze_then_unfreeze_unsets_mock_time
41
+ Timecop.freeze(1)
42
+ Timecop.unfreeze
43
+ assert_nil Time.send(:mock_time)
44
+ end
45
+
40
46
  def test_travel_then_return_unsets_mock_time
41
47
  Timecop.travel(1)
42
48
  Timecop.return
@@ -283,6 +289,17 @@ class TestTimecop < Minitest::Test
283
289
  t = Time.local(2008, 10, 10, 10, 10, 10)
284
290
  assert_times_effectively_equal t, Timecop.scale(4, t)
285
291
  end
292
+
293
+ def test_scaling_returns_now_if_nil_supplied
294
+ assert_times_effectively_equal Time.now, Timecop.scale(nil)
295
+ end
296
+
297
+ def test_scaling_raises_when_empty_string_supplied
298
+ err = assert_raises(TypeError) do
299
+ Timecop.scale("")
300
+ end
301
+ assert_match /String can't be coerced into Float/, err.message
302
+ end
286
303
 
287
304
  def test_freeze_with_utc_time
288
305
  each_timezone do
@@ -388,6 +405,10 @@ class TestTimecop < Minitest::Test
388
405
  end
389
406
  assert_times_effectively_equal(time_after_travel, Time.now)
390
407
  end
408
+
409
+ def test_travel_returns_now_if_nil_supplied
410
+ assert_times_effectively_equal Time.now, Timecop.travel(nil)
411
+ end
391
412
 
392
413
  def test_travel_time_with_block_returns_the_value_of_the_block
393
414
  t_future = Time.local(2030, 10, 10, 10, 10, 10)
@@ -396,6 +417,13 @@ class TestTimecop < Minitest::Test
396
417
 
397
418
  assert_equal expected, actual
398
419
  end
420
+
421
+ def test_travel_raises_when_empty_string_supplied
422
+ err = assert_raises(ArgumentError) do
423
+ Timecop.travel("")
424
+ end
425
+ assert_match /no time information in \"\"/, err.message
426
+ end
399
427
 
400
428
  def test_freeze_time_returns_now_if_no_block_given
401
429
  t_future = Time.local(2030, 10, 10, 10, 10, 10)
@@ -422,6 +450,17 @@ class TestTimecop < Minitest::Test
422
450
  end
423
451
  end
424
452
  end
453
+
454
+ def test_freeze_returns_now_if_nil_supplied
455
+ assert_times_effectively_equal Time.now, Timecop.freeze(nil)
456
+ end
457
+
458
+ def test_freeze_raises_when_empty_string_supplied
459
+ err = assert_raises(ArgumentError) do
460
+ Timecop.freeze("")
461
+ end
462
+ assert_match /no time information in \"\"/, err.message
463
+ end
425
464
 
426
465
  def test_freeze_with_new_date
427
466
  date = Date.new(2012, 6, 9)
@@ -527,18 +566,6 @@ class TestTimecop < Minitest::Test
527
566
  end
528
567
  end
529
568
 
530
- def test_date_strptime_without_year
531
- Timecop.freeze(Time.new(1984,2,28)) do
532
- assert_equal Date.strptime('04-14', '%m-%d'), Date.new(1984, 4, 14)
533
- end
534
- end
535
-
536
- def test_date_strptime_without_specifying_format
537
- Timecop.freeze(Time.new(1984,2,28)) do
538
- assert_equal Date.strptime('1999-04-14'), Date.new(1999, 4, 14)
539
- end
540
- end
541
-
542
569
  def test_frozen_after_freeze
543
570
  Timecop.freeze
544
571
  assert Timecop.frozen?
@@ -556,7 +583,7 @@ class TestTimecop < Minitest::Test
556
583
  assert !Timecop.frozen?
557
584
  end
558
585
 
559
- def test_thread_safe_timecop
586
+ def test_thread_safe_timecop_in_parallel
560
587
  Timecop.thread_safe = true
561
588
  date = Time.local(2011, 01, 02)
562
589
  thread = Thread.new do
@@ -573,6 +600,16 @@ class TestTimecop < Minitest::Test
573
600
  Timecop.thread_safe = false
574
601
  end
575
602
 
603
+ def test_thread_safe_timecop_returns_after_block
604
+ Timecop.thread_safe = true
605
+ date = Time.local(2017, 10, 8)
606
+
607
+ Timecop.freeze(date) { }
608
+ assert Time.now != date
609
+ ensure
610
+ Timecop.thread_safe = false
611
+ end
612
+
576
613
  private
577
614
 
578
615
  def with_safe_mode(enabled=true)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timecop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Jeffery
8
8
  - John Trupiano
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-05 00:00:00.000000000 Z
12
+ date: 2022-03-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A gem providing "time travel" and "time freezing" capabilities, making
15
15
  it dead simple to test time-dependent code. It provides a unified method to mock
@@ -38,7 +38,7 @@ homepage: https://github.com/travisjeffery/timecop
38
38
  licenses:
39
39
  - MIT
40
40
  metadata: {}
41
- post_install_message:
41
+ post_install_message:
42
42
  rdoc_options:
43
43
  - "--charset=UTF-8"
44
44
  require_paths:
@@ -54,9 +54,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubyforge_project: timecop
58
- rubygems_version: 2.4.5
59
- signing_key:
57
+ rubygems_version: 3.2.22
58
+ signing_key:
60
59
  specification_version: 3
61
60
  summary: A gem providing "time travel" and "time freezing" capabilities, making it
62
61
  dead simple to test time-dependent code. It provides a unified method to mock Time.now,
@@ -67,4 +66,3 @@ test_files:
67
66
  - test/timecop_test.rb
68
67
  - test/timecop_without_date_test.rb
69
68
  - test/timecop_without_date_but_with_time_test.rb
70
- has_rdoc: