duckworth 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/duckworth.rb +0 -12
- data/lib/toolbag.rb +1 -31
- data/spec/duckworth_spec.rb +2 -2
- metadata +3 -3
data/lib/duckworth.rb
CHANGED
@@ -117,18 +117,6 @@ class Duckworth
|
|
117
117
|
build_number
|
118
118
|
end
|
119
119
|
|
120
|
-
def found_pending_marker line
|
121
|
-
line.match( /^[\s\t]*Pending:/ )
|
122
|
-
end
|
123
|
-
|
124
|
-
def found_new_spec_marker line, status
|
125
|
-
( status == 'start' || status == 'updating spec data' ) && !line.match( /^[\s\t]*#/ )
|
126
|
-
end
|
127
|
-
|
128
|
-
def found_spec_details_marker line, status
|
129
|
-
( status == 'found new pending spec' || status == 'updating spec data' ) && line.match( /^[\s\t]*\#/ )
|
130
|
-
end
|
131
|
-
|
132
120
|
def find_pending_specs
|
133
121
|
logfile = File.new( log )
|
134
122
|
status = ''
|
data/lib/toolbag.rb
CHANGED
@@ -12,36 +12,6 @@ module Toolbag
|
|
12
12
|
def found_spec_details_marker line, status
|
13
13
|
( status == 'found new pending spec' || status == 'updating spec data' ) && line.match( /^[\s\t]*\#/ )
|
14
14
|
end
|
15
|
-
|
16
|
-
def find_pending_specs
|
17
|
-
logfile = File.new( @log_file_name )
|
18
|
-
status = ''
|
19
|
-
@tasks = {}
|
20
|
-
task = {}
|
21
|
-
|
22
|
-
logfile.readlines.each do |line|
|
23
|
-
|
24
|
-
if found_pending_marker line
|
25
|
-
status = 'start'
|
26
|
-
|
27
|
-
elsif found_new_spec_marker line, status
|
28
|
-
status = 'found new pending spec'
|
29
|
-
task = {}
|
30
|
-
task[:name] = line.chomp
|
31
|
-
task[:details] = []
|
32
|
-
|
33
|
-
elsif found_spec_details_marker line, status
|
34
|
-
status = 'updating spec data'
|
35
|
-
if line.match /(spec.*)[:](\d+)/
|
36
|
-
task[:spec_file] = $1
|
37
|
-
task[:line_number] = $2
|
38
|
-
else
|
39
|
-
task[:details].push line.chomp
|
40
|
-
end
|
41
|
-
@tasks[task[:name]] = task
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
15
|
end
|
46
16
|
|
47
17
|
module Searches
|
@@ -110,7 +80,7 @@ module Toolbag
|
|
110
80
|
@email_mappings = config['users']
|
111
81
|
end
|
112
82
|
|
113
|
-
def
|
83
|
+
def report(options = nil)
|
114
84
|
if !options[:spam]
|
115
85
|
self.tasks_by_contributor.each_pair do |recipient, message|
|
116
86
|
if message == ''
|
data/spec/duckworth_spec.rb
CHANGED
@@ -97,7 +97,7 @@ describe Duckworth do
|
|
97
97
|
:job_name => 'assign_pending_tasks'
|
98
98
|
)
|
99
99
|
|
100
|
-
@duckworth.
|
100
|
+
@duckworth.report( :spam => false )
|
101
101
|
|
102
102
|
@expected_tasks = {
|
103
103
|
@test_01 => {
|
@@ -142,7 +142,7 @@ describe Duckworth do
|
|
142
142
|
@duckworth.tasks[@test_02][:details].should == @expected_tasks[@test_02][:details]
|
143
143
|
end
|
144
144
|
|
145
|
-
it "consolidates
|
145
|
+
it "consolidates reports into structure for e-mailing each developer once" do
|
146
146
|
expected_text = "\n" +
|
147
147
|
" Spec: spec/git_manager_spec.rb:11\n" +
|
148
148
|
" Collaborators: John Jimenez\n" +
|
metadata
CHANGED