xcov 0.9 → 0.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaf83175a00aac97b4b4e15458f0d9dc8f61c860
4
- data.tar.gz: f007348b0e89b0b7547bbcfeb5ae345cbeda6d13
3
+ metadata.gz: 737f8ea92f893afc5a980b14d96eb2446459fddf
4
+ data.tar.gz: 01852ffe68f8afe3068c2fa0c06044518074df43
5
5
  SHA512:
6
- metadata.gz: cfd0c43e38171bdc07d86e9537d0f2dbdd5a97576af994835943890b03bfe2ed9b8fb6953a0ef1b54f0d759b1111158fa0802bc477b4a90d01a1f0fb78578ba7
7
- data.tar.gz: e5e33f9c0fc634e0bcbf4475453611f4fa8460f09ffed9959ed62df6944b1a74b794ff017392592debb369499f493875332222373f9aabd3fb32f7fdb981fdb6
6
+ metadata.gz: 6db9d575d18049bc4dcf766797f222a8bfdae1b6a171b804da3bcaf64ded9880666e9166eb7cf0c5c2a53fc087e20e0211c44d97e3944f92448efdc138a0405d
7
+ data.tar.gz: 6f718e72b58466a30fc0ad680ebdf8c1c7c9ba8f61a2918359aa78c95a9cf305ea7f08c94721d9191cc29bdca6bb7e159fad32c9c3cf495c02ed3881478f73e1
data/README.md CHANGED
@@ -51,6 +51,9 @@ xcov -w LystSDK.xcworkspace -s LystSDK -o xcov_output
51
51
  * `--exclude_targets`: Comma separated list of targets to exclude from coverage report.
52
52
  * `--slack_url` `-i`: Incoming WebHook for your Slack group to post results (optional).
53
53
  * `--slack_channel` `-e`: Slack channel where the results will be posted (optional).
54
+ * `--html_report`: Enables the creation of a html report. Enabled by default (optional).
55
+ * `--json_report`: Enables the creation of a json report (optional).
56
+ * `--markdown_report`: Enables the creation of a markdown report (optional).
54
57
  * `--skip_slack`: Add this flag to avoid publishing results on Slack (optional).
55
58
 
56
59
  ### Ignoring files
@@ -86,7 +89,7 @@ xcov(
86
89
  ```
87
90
 
88
91
  ### [Danger](https://github.com/danger/danger)
89
- With the *Danger* plugin you can receive your coverage reports directly on your pull requests. You can find more information on the plugin repository available [here](https://github.com/nakiostudio/danger-xcov/tree/create-gem).
92
+ With the *Danger* plugin you can receive your coverage reports directly on your pull requests. You can find more information on the plugin repository available [here](https://github.com/nakiostudio/danger-xcov).
90
93
 
91
94
  ![screenshot](http://www.nakiostudio.com/danger-xcov.png)
92
95
 
@@ -95,6 +98,7 @@ With the *Danger* plugin you can receive your coverage reports directly on your
95
98
  * [nakiostudio](https://github.com/nakiostudio)
96
99
  * [opfeffer](https://github.com/opfeffer)
97
100
  * [stevenreinisch](https://github.com/stevenreinisch)
101
+ * [hds](https://github.com/hds)
98
102
 
99
103
  ## License
100
104
  This project is licensed under the terms of the MIT license. See the LICENSE file.
@@ -45,6 +45,24 @@ module Xcov
45
45
  env_name: "XCOV_OUTPUT_DIRECTORY",
46
46
  description: "The directory in which all reports will be stored",
47
47
  default_value: File.join(containing, "xcov_report")),
48
+ FastlaneCore::ConfigItem.new(key: :html_report,
49
+ env_name: "XCOV_HTML_REPORT",
50
+ description: "Produce an HTML report",
51
+ optional: true,
52
+ is_string: false,
53
+ default_value: true),
54
+ FastlaneCore::ConfigItem.new(key: :markdown_report,
55
+ env_name: "XCOV_MARKDOWN_REPORT",
56
+ description: "Produce a Markdown report",
57
+ optional: true,
58
+ is_string: false,
59
+ default_value: false),
60
+ FastlaneCore::ConfigItem.new(key: :json_report,
61
+ env_name: "XCOV_JSON_REPORT",
62
+ description: "Produce a JSON report",
63
+ optional: true,
64
+ is_string: false,
65
+ default_value: false),
48
66
  FastlaneCore::ConfigItem.new(key: :minimum_coverage_percentage,
49
67
  short_option: "-m",
50
68
  env_name: "XCOV_MINIMUM_COVERAGE_PERCENTAGE",
@@ -31,30 +31,47 @@ module Xcov
31
31
  # Create output path
32
32
  output_path = Xcov.config[:output_directory]
33
33
  FileUtils.mkdir_p(output_path)
34
- resources_path = File.join(output_path, "resources")
35
- FileUtils.mkdir_p(resources_path)
36
34
 
37
- # Copy images to output resources folder
38
- Dir[File.join(File.dirname(__FILE__), "../../assets/images/*")].each do |path|
39
- FileUtils.cp_r(path, resources_path)
40
- end
35
+ # Convert report to xCov model objects
36
+ report = Report.map(report_json)
41
37
 
42
- # Copy stylesheets to output resources folder
43
- Dir[File.join(File.dirname(__FILE__), "../../assets/stylesheets/*")].each do |path|
44
- FileUtils.cp_r(path, resources_path)
38
+ if Xcov.config[:html_report] then
39
+ resources_path = File.join(output_path, "resources")
40
+ FileUtils.mkdir_p(resources_path)
41
+
42
+ # Copy images to output resources folder
43
+ Dir[File.join(File.dirname(__FILE__), "../../assets/images/*")].each do |path|
44
+ FileUtils.cp_r(path, resources_path)
45
+ end
46
+
47
+ # Copy stylesheets to output resources folder
48
+ Dir[File.join(File.dirname(__FILE__), "../../assets/stylesheets/*")].each do |path|
49
+ FileUtils.cp_r(path, resources_path)
50
+ end
51
+
52
+ # Copy javascripts to output resources folder
53
+ Dir[File.join(File.dirname(__FILE__), "../../assets/javascripts/*")].each do |path|
54
+ FileUtils.cp_r(path, resources_path)
55
+ end
56
+
57
+ # Create HTML report
58
+ File.open(File.join(output_path, "index.html"), "wb") do |file|
59
+ file.puts report.html_value
60
+ end
45
61
  end
46
62
 
47
- # Copy javascripts to output resources folder
48
- Dir[File.join(File.dirname(__FILE__), "../../assets/javascripts/*")].each do |path|
49
- FileUtils.cp_r(path, resources_path)
63
+ # Create Markdown report
64
+ if Xcov.config[:markdown_report] then
65
+ File.open(File.join(output_path, "report.md"), "wb") do |file|
66
+ file.puts report.markdown_value
67
+ end
50
68
  end
51
69
 
52
- # Convert report to xCov model objects
53
- report = Report.map(report_json)
54
-
55
- # Create HTML report
56
- File.open(File.join(output_path, "index.html"), "wb") do |file|
57
- file.puts report.html_value
70
+ # Create JSON report
71
+ if Xcov.config[:json_report] then
72
+ File.open(File.join(output_path, "report.json"), "wb") do |file|
73
+ file.puts report_json.to_json
74
+ end
58
75
  end
59
76
 
60
77
  # Post result
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "0.9"
3
+ VERSION = "0.10"
4
4
  DESCRIPTION = "xcov is a friendly visualizer for Xcode's code coverage files"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcov
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '0.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-05 00:00:00.000000000 Z
11
+ date: 2016-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core