time_until_break 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/time_until_break/version.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/time_until_break_spec.rb +11 -3
- data/time_until_break.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7232db33a1f572441ef8bd2b621e59bb60b3845
|
4
|
+
data.tar.gz: d3cc6d73932af1d78df5b40f611b7d553b94ffe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12355ca1005c2020a5c945d0d69a9be2cd63303d90ac492d789a3e16ba1d807fed61cd1827d5c8eb0ec73865ff46ca371ec219313bbeac7dc19e4831144b5063
|
7
|
+
data.tar.gz: 8caf9a3297eff90c64904373066bba1757d47a17c66534a873eb04cc33dbd61ca737bf8ded5bf0264de1f24bbe5a4a7face57d045784b41dd7f0b1191fa15ea3
|
data/spec/spec_helper.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
require 'time_until_break'
|
1
|
+
require 'time_until_break'
|
2
|
+
require 'delorean'
|
@@ -17,12 +17,20 @@ describe TimeUntilBreak do
|
|
17
17
|
expect(time_two.break_time.strftime("%H:%M:%S")).to eq "14:30:00"
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
it 'knows if the break has been missed' do
|
21
|
+
Delorean.time_travel_to(Time.utc(2014,11,17,22,45))
|
22
|
+
expect(time.has_break_been?).to eq true
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'knows if the break has not been missed' do
|
26
|
+
Delorean.time_travel_to(Time.utc(2014,11,17,10,34))
|
21
27
|
expect(time.has_break_been?).to eq false
|
22
28
|
end
|
23
29
|
|
24
|
-
|
25
|
-
|
30
|
+
it 'can calculate how long until the next break in hours and minutes' do
|
31
|
+
Delorean.time_travel_to(Time.utc(2014,11,17,10,36))
|
32
|
+
expect(time).to receive(:`).with('say "6 hours, 9 minutes"')
|
33
|
+
time.message
|
26
34
|
end
|
27
35
|
|
28
36
|
end
|
data/time_until_break.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_until_break
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Giles
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: delorean
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: This is my second gem which will be available in the command line and
|
56
70
|
which will tell Makers Academy students how long it is until the Mandatory Break
|
57
71
|
at 4:45pm.
|