DotCoverRakeTask 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/DotCoverRakeTask.rb +24 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c60fb162d80ded8ceb4eb26739a5b7179224051d
4
- data.tar.gz: f822bd2f11487c79e30c2954874aed9891aa1e15
3
+ metadata.gz: 969084217947af2ff5dee19a5e38cd9c714552da
4
+ data.tar.gz: 8e7e05bf8242954afce9d5f1fb6c74770583f0a5
5
5
  SHA512:
6
- metadata.gz: 27679e5be0a9a8cd0230713a09a2414c6ff5951dead7e6955e0a52c78eabd6e8eee04458c68a15e3fc3d3fcf2aba747ac998e2d1032b73277194d2178e06446d
7
- data.tar.gz: 7739f02772df456bdfdb077a26e99bb2928fd5c46908ccb60e57682a055c76ca499c0f1a14e8d3c7f7261d5690ce637ddb90eb3b0c60edc92eec0d9fa9593b49
6
+ metadata.gz: 056a231f1335471f822e36dc7181fd68098cca51d7cde735a5d4ff6b91dff820e4352c1ff784883b323858bbe98bcf575ec0532a8ee39a6cf3e3938b9f3faefc
7
+ data.tar.gz: 6104a7ccbd6c5d23d0f5644c27df33dc634bbb5ef836be4ec8f97feb88405343d8112385189d6621bcde6ab0fee9208fc324d24f541dab9a462f5fdedb12bfb4
@@ -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
- output = `#{configuration.executable} cover /TargetExecutable=#{configuration.nunit_executable} /TargetArguments="#{nunit_command_line_args}" /Output=#{snapshot_output_file} /Filters=#{configuration.filters}`
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
- output = `#{configuration.executable} report /Source="#{snapshot_output_file}" /Output="#{report_html_file}" /ReportType="HTML"`
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
- output = `#{configuration.executable} report /Source="#{snapshot_output_file}" /Output="#{report_xml_file}" /ReportType="XML"`
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: DotCoverRakeTask
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - iainjmitchell