timetoday 0.1.5 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/timetoday.rb +5 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f96f86333f7715b31d8929c2debef84c07d61192
|
4
|
+
data.tar.gz: c4e7574d5dcdc949765573ea8aceef698174820a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 315380504ab6b22483cec7ca08d1108ce22127b93e15f9a9d72535b5cf55c2043042a4ec283a70ec1c03a943ed9579e7dc37913145c9864ffadd74fd1a64835d
|
7
|
+
data.tar.gz: 0f4af4e8c7627b5b7d97ea7837a189db2a68f781104037948dcbe16b34b3209866c9e570971051bfbb2b8b9b2f9c328b3679534f17f03d014e535fbba9acabb3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/timetoday.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
require 'date'
|
6
6
|
require 'time'
|
7
|
+
require 'chronic_duration'
|
7
8
|
|
8
9
|
class TimeToday
|
9
10
|
|
@@ -26,4 +27,8 @@ class TimeToday
|
|
26
27
|
time_remaining = ((Time.now.to_date + 1).to_time - 1) - t
|
27
28
|
t + rand(time_remaining)
|
28
29
|
end
|
30
|
+
|
31
|
+
def self.within(duration)
|
32
|
+
Time.now + rand(ChronicDuration.parse(duration))
|
33
|
+
end
|
29
34
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|