timecop 0.7.2 → 0.7.3

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: f776ac9891fa370f63fc78ad33aa01866e84a298
4
- data.tar.gz: 5ebcc9bd5855f97e79d4dd62b7694d99b7449783
3
+ metadata.gz: da2c45ae95e5db0d2b37d8467be294faf165334f
4
+ data.tar.gz: 6648ca56344418873cc163be099ef7d99dccee0e
5
5
  SHA512:
6
- metadata.gz: 5ca661e7b650a72e902e429c473fb338d3756866d453126f4330a541ca2ba3965566e8ed4a30888948eab9b6d58cd2ddda3640ec4284ef58548ed877013882ee
7
- data.tar.gz: 1c678be19de2c126f053908349fb17c1a57ce48f305a0dc079b34257e76f2a9f4d73b83142c0ceecda03288b938f40808095688566058289faa33d1e34d4210e
6
+ metadata.gz: 74a8f41e10d1dcd912fee6875528d4e7d6fef6ff50751c599e9c018331f16beb16b624b996eee2d9101f13845434ddd3b9a0c8c25bfbd01568d064a7b8a1e73c
7
+ data.tar.gz: b6bb77bf3a3123568eb4fa97ff6aaccf16ba0af4d92212b850ef4993c31a8abdac5ec1bbf29bdc12001d067f6248f7ceed8ac9dbab3486759347658c5492555c
@@ -64,13 +64,14 @@ class Date #:nodoc:
64
64
 
65
65
  alias_method :strptime, :strptime_with_mock_date
66
66
 
67
- def parse_with_mock_date(str)
67
+ def parse_with_mock_date(*args)
68
+ str = args.first
68
69
  if WEEKDAYS.keys.include?(str.downcase)
69
70
  offset = WEEKDAYS[str.downcase] - Date.today.wday
70
71
 
71
72
  Date.today + offset
72
73
  else
73
- parse_without_mock_date(str)
74
+ parse_without_mock_date(*args)
74
75
  end
75
76
  end
76
77
 
@@ -95,7 +96,8 @@ class DateTime #:nodoc:
95
96
 
96
97
  alias_method :now, :now_with_mock_time
97
98
 
98
- def parse_with_mock_date(str)
99
+ def parse_with_mock_date(*args)
100
+ str = args.first
99
101
  if Date::WEEKDAYS.keys.include?(str.downcase)
100
102
  offset = Date::WEEKDAYS[str.downcase] - DateTime.now.wday
101
103
 
@@ -103,7 +105,7 @@ class DateTime #:nodoc:
103
105
 
104
106
  DateTime.new(parsed_weekday.year, parsed_weekday.month, parsed_weekday.day, 0, 0, 0, 0)
105
107
  else
106
- parse_without_mock_date(str)
108
+ parse_without_mock_date(*args)
107
109
  end
108
110
  end
109
111
 
@@ -1,3 +1,3 @@
1
1
  class Timecop
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
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.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Jeffery