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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da2c45ae95e5db0d2b37d8467be294faf165334f
4
- data.tar.gz: 6648ca56344418873cc163be099ef7d99dccee0e
3
+ metadata.gz: 20cb6846c9eed771ecb4652d95a568e0fe53066a
4
+ data.tar.gz: 887873c54cc4dc84fc1b01c0da708289d67e8c76
5
5
  SHA512:
6
- metadata.gz: 74a8f41e10d1dcd912fee6875528d4e7d6fef6ff50751c599e9c018331f16beb16b624b996eee2d9101f13845434ddd3b9a0c8c25bfbd01568d064a7b8a1e73c
7
- data.tar.gz: b6bb77bf3a3123568eb4fa97ff6aaccf16ba0af4d92212b850ef4993c31a8abdac5ec1bbf29bdc12001d067f6248f7ceed8ac9dbab3486759347658c5492555c
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)
@@ -1,3 +1,3 @@
1
1
  class Timecop
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
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.3
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-02-19 00:00:00.000000000 Z
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