DotCoverRakeTask 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/DotCoverRakeTask.rb +24 -6
- 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: 969084217947af2ff5dee19a5e38cd9c714552da
|
4
|
+
data.tar.gz: 8e7e05bf8242954afce9d5f1fb6c74770583f0a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 056a231f1335471f822e36dc7181fd68098cca51d7cde735a5d4ff6b91dff820e4352c1ff784883b323858bbe98bcf575ec0532a8ee39a6cf3e3938b9f3faefc
|
7
|
+
data.tar.gz: 6104a7ccbd6c5d23d0f5644c27df33dc634bbb5ef836be4ec8f97feb88405343d8112385189d6621bcde6ab0fee9208fc324d24f541dab9a462f5fdedb12bfb4
|
data/lib/DotCoverRakeTask.rb
CHANGED
@@ -19,22 +19,40 @@ class DotCoverWrapper
|
|
19
19
|
snapshot_output_file = "#{configuration.report_directory}/#{configuration.snapshot_name}"
|
20
20
|
report_file_path_and_name = "#{configuration.report_directory}/#{configuration.report_name}"
|
21
21
|
|
22
|
-
|
23
|
-
puts output
|
22
|
+
run_coverage(configuration.executable, configuration.nunit_executable, nunit_command_line_args, snapshot_output_file, configuration.filters)
|
24
23
|
|
25
24
|
if (configuration.html_report)
|
26
25
|
report_html_file = "#{report_file_path_and_name}.html"
|
27
|
-
|
28
|
-
puts output
|
26
|
+
create_html_report(configuration.executable, report_html_file)
|
29
27
|
end
|
30
28
|
|
31
29
|
if (configuration.xml_report)
|
32
30
|
report_xml_file = "#{report_file_path_and_name}.xml"
|
33
|
-
|
34
|
-
puts output
|
31
|
+
create_xml_report(configuration.executable, report_xml_file)
|
35
32
|
end
|
36
33
|
|
37
34
|
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def run_coverage(executable, nunit_executable, nunit_command_line_args, snapshot_output_file, filters)
|
39
|
+
output = `#{executable} cover /TargetExecutable=#{nunit_executable} /TargetArguments="#{nunit_command_line_args}" /Output=#{snapshot_output_file} /Filters=#{filters}`
|
40
|
+
puts output
|
41
|
+
end
|
42
|
+
|
43
|
+
def create_html_report(executable, snapshot_output_file, report_file)
|
44
|
+
create_report(executable, snapshot_output_file, report_file, "HTML")
|
45
|
+
end
|
46
|
+
|
47
|
+
def create_xml_report(executable, snapshot_output_file, report_file)
|
48
|
+
create_report(executable, snapshot_output_file, report_file, "XML")
|
49
|
+
end
|
50
|
+
|
51
|
+
def create_report(executable, snapshot_output_file, report_file, report_type)
|
52
|
+
output = `#{executable} report /Source="#{snapshot_output_file}" /Output="#{report_file}" /ReportType="#{report_type}"`
|
53
|
+
puts output
|
54
|
+
end
|
55
|
+
|
38
56
|
end
|
39
57
|
|
40
58
|
class DotCoverConfiguration
|