timecop 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timecop/time_extensions.rb +2 -2
- data/lib/timecop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20cb6846c9eed771ecb4652d95a568e0fe53066a
|
4
|
+
data.tar.gz: 887873c54cc4dc84fc1b01c0da708289d67e8c76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde686bc5c574e8901c82ce9b66cd45649b03da6a55fedb6cab3dc71a730d0f42bcf23f1da70a410222f8fe2cfc39c23f4ce72bd8a535dce3f3b7bb3feb8a0b7
|
7
|
+
data.tar.gz: 78fef5abf78c22bec175382563eb4fc3d92d87fbb107de4d1a24ece25c85b40bcb52d1dad7d174b59a15493abf128af0ac53e9cab820f4f4abfd26d540fa43bc
|
@@ -66,7 +66,7 @@ class Date #:nodoc:
|
|
66
66
|
|
67
67
|
def parse_with_mock_date(*args)
|
68
68
|
str = args.first
|
69
|
-
if WEEKDAYS.keys.include?(str.downcase)
|
69
|
+
if str && WEEKDAYS.keys.include?(str.downcase)
|
70
70
|
offset = WEEKDAYS[str.downcase] - Date.today.wday
|
71
71
|
|
72
72
|
Date.today + offset
|
@@ -98,7 +98,7 @@ class DateTime #:nodoc:
|
|
98
98
|
|
99
99
|
def parse_with_mock_date(*args)
|
100
100
|
str = args.first
|
101
|
-
if Date::WEEKDAYS.keys.include?(str.downcase)
|
101
|
+
if str && Date::WEEKDAYS.keys.include?(str.downcase)
|
102
102
|
offset = Date::WEEKDAYS[str.downcase] - DateTime.now.wday
|
103
103
|
|
104
104
|
parsed_weekday =(DateTime.now + offset)
|
data/lib/timecop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timecop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Jeffery
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-31 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
|