climer 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/climer/timer.rb +1 -1
- data/lib/climer/version.rb +1 -1
- data/spec/timer_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 650df75cf71f47ca799d5211055a3b1841bc8dbf
|
4
|
+
data.tar.gz: c9bc5ef756ad5ca7fb6fa63dd8566e1a08df5ed3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 082fee7dc9a4e1f9df9c35f9375f1945a555700c0496a441d2ffd42fe15659cfe711e2977cf0444ab9ec436f1c4378435064e09f1d479793514b689759345e63
|
7
|
+
data.tar.gz: d94b41de1b2a23096d08101e309bee488a1277b78d99925a42fd5896c6f649221406eded8ddb08cd261bccac1466fa25c03705ca2dddf8003b10b6700ff78965
|
data/lib/climer/timer.rb
CHANGED
@@ -27,7 +27,7 @@ class Timer
|
|
27
27
|
CARRIAGE_RETURN = "\r"
|
28
28
|
def initialize(duration)
|
29
29
|
@alert_time = Time.now + duration
|
30
|
-
puts "Alert set to activate at #{@alert_time.
|
30
|
+
puts "Alert set to activate at #{@alert_time.strftime('%l:%M %p on %B %e, %Y')}"
|
31
31
|
print countdown_string
|
32
32
|
|
33
33
|
countdown_update_interval = '1 second'
|
data/lib/climer/version.rb
CHANGED
data/spec/timer_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe 'Climer::Timer' do
|
|
9
9
|
Timecop.freeze Time.new(0)
|
10
10
|
time_at_alert = Time.new(0) + 60*60
|
11
11
|
-> { Climer::Timer.alert_in('1 hour') }.must_output(
|
12
|
-
"Alert set to activate at #{time_at_alert.
|
12
|
+
"Alert set to activate at #{time_at_alert.strftime('%l:%M %p on %B %e, %Y')}\n" <<
|
13
13
|
"1:00:00"
|
14
14
|
)
|
15
15
|
end
|