gradesfirst 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
data/gradesfirst.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.platform = Gem::Platform::RUBY
|
3
3
|
s.name = "gradesfirst"
|
4
|
-
s.version = "0.6.
|
4
|
+
s.version = "0.6.5"
|
5
5
|
s.summary = "GradesFirst command line utility for developers."
|
6
6
|
s.description = "This utility will help manage the various tasks developers need to do on their workstation such as database updates."
|
7
7
|
s.license = "MIT"
|
@@ -75,7 +75,7 @@ module GradesFirst
|
|
75
75
|
@next_talk_date = today
|
76
76
|
end
|
77
77
|
|
78
|
-
until @next_talk_date.
|
78
|
+
until @next_talk_date.thursday?
|
79
79
|
@next_talk_date = @next_talk_date.next_day
|
80
80
|
end
|
81
81
|
|
@@ -84,7 +84,7 @@ module GradesFirst
|
|
84
84
|
|
85
85
|
def talk_count
|
86
86
|
talk_range.reduce(0) do |count, date|
|
87
|
-
count += 1 if date.
|
87
|
+
count += 1 if date.thursday?
|
88
88
|
count
|
89
89
|
end
|
90
90
|
end
|
@@ -40,9 +40,9 @@ describe GradesFirst::CodeTalkCommand do
|
|
40
40
|
specify '#talk_count counts talks correctly' do
|
41
41
|
assert_talk_count("2014-3-10", 0, 'Zero day should not count any talks')
|
42
42
|
assert_talk_count("2014-3-11", 0, 'Tuesday should not be counted')
|
43
|
-
assert_talk_count("2014-3-12",
|
44
|
-
assert_talk_count("2014-3-13",
|
45
|
-
assert_talk_count("2014-3-14",
|
46
|
-
assert_talk_count("2014-3-25",
|
43
|
+
assert_talk_count("2014-3-12", 0, 'Wednesday should not be counted')
|
44
|
+
assert_talk_count("2014-3-13", 0, 'Thursday should not be counted')
|
45
|
+
assert_talk_count("2014-3-14", 1, 'Thursday should be counted on Friday')
|
46
|
+
assert_talk_count("2014-3-25", 2, 'Test date count is wrong')
|
47
47
|
end
|
48
48
|
end
|
data/test/fixtures/code_talk.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
03/
|
2
|
-
03/
|
3
|
-
04/
|
4
|
-
04/
|
5
|
-
04/
|
6
|
-
|
1
|
+
03/27/2014 Thu - Mickey Mouse
|
2
|
+
04/03/2014 Thu - Minnie Mouse
|
3
|
+
04/10/2014 Thu - Superman
|
4
|
+
04/17/2014 Thu - Wonder Woman
|
5
|
+
04/24/2014 Thu - Cat Woman
|
6
|
+
05/01/2014 Thu - Ironman
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gradesfirst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|