xcov 0.10 → 0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 737f8ea92f893afc5a980b14d96eb2446459fddf
4
- data.tar.gz: 01852ffe68f8afe3068c2fa0c06044518074df43
3
+ metadata.gz: 96f2023108a18f3597f35fb93d66576e53b254d3
4
+ data.tar.gz: b916cf90a7c1d9cda8fe55eb43aa39376a6cea53
5
5
  SHA512:
6
- metadata.gz: 6db9d575d18049bc4dcf766797f222a8bfdae1b6a171b804da3bcaf64ded9880666e9166eb7cf0c5c2a53fc087e20e0211c44d97e3944f92448efdc138a0405d
7
- data.tar.gz: 6f718e72b58466a30fc0ad680ebdf8c1c7c9ba8f61a2918359aa78c95a9cf305ea7f08c94721d9191cc29bdca6bb7e159fad32c9c3cf495c02ed3881478f73e1
6
+ metadata.gz: 06b9f8f7b9a86a1f8b9e700e8eb4ac99a6e1c055b30ed9dc98541f810ae101a7e9a4e64c0f23a05270b7d8d63a98b7e25ad4d98e8f4a857de1a021e9c2c39028
7
+ data.tar.gz: a8f246f59a85532207b58a4901e4a7be930b74ef24651681b4f8275509a783d2e70764955c9fe9e505ae9de267ffc025e0b2e55b9136af60461b3b66d728ff57
data/README.md CHANGED
@@ -56,6 +56,8 @@ xcov -w LystSDK.xcworkspace -s LystSDK -o xcov_output
56
56
  * `--markdown_report`: Enables the creation of a markdown report (optional).
57
57
  * `--skip_slack`: Add this flag to avoid publishing results on Slack (optional).
58
58
 
59
+ _**Note:** All paths you provide should be absolute and unescaped_
60
+
59
61
  ### Ignoring files
60
62
  You can easily ignore the coverage for a specified set of files by adding their filenames to the *ignore file* specified with the `--ignore_file_path` parameter (this file is `.xcovignore` by default). You can also specify a wildcard expression for matching a group of files.
61
63
 
@@ -88,7 +90,7 @@ xcov(
88
90
  )
89
91
  ```
90
92
 
91
- ### [Danger](https://github.com/danger/danger)
93
+ ### [Danger](https://danger.systems)
92
94
  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).
93
95
 
94
96
  ![screenshot](http://www.nakiostudio.com/danger-xcov.png)
@@ -99,6 +101,7 @@ With the *Danger* plugin you can receive your coverage reports directly on your
99
101
  * [opfeffer](https://github.com/opfeffer)
100
102
  * [stevenreinisch](https://github.com/stevenreinisch)
101
103
  * [hds](https://github.com/hds)
104
+ * [michaelharro](https://github.com/michaelharro)
102
105
 
103
106
  ## License
104
107
  This project is licensed under the terms of the MIT license. See the LICENSE file.
@@ -13,7 +13,7 @@ module Xcov
13
13
 
14
14
  def self.parse(file)
15
15
  report_output = Tempfile.new("report.json")
16
- command = "#{ENV['XCOV_CORE_LIBRARY_PATH']} -s #{file} -o #{report_output.path}"
16
+ command = "#{ENV['XCOV_CORE_LIBRARY_PATH'].shellescape} -s #{file.shellescape} -o #{report_output.path.shellescape}"
17
17
  description = [{ prefix: "Parsing .xccoverage file: " }]
18
18
  execute_command(command, description)
19
19
  output_file = File.read(report_output.path)
@@ -18,6 +18,13 @@ module Xcov
18
18
  Function.template("function").result(binding)
19
19
  end
20
20
 
21
+ def json_value
22
+ {
23
+ "name" => @name,
24
+ "coverage" => @coverage,
25
+ }
26
+ end
27
+
21
28
  # Class methods
22
29
 
23
30
  def self.map (dictionary)
@@ -45,6 +45,13 @@ module Xcov
45
45
  "#{@targets.map { |target| target.markdown_value }.join("")}\n> Powered by [xcov](https://github.com/nakiostudio/xcov)"
46
46
  end
47
47
 
48
+ def json_value
49
+ {
50
+ "coverage" => @coverage,
51
+ "targets" => @targets ? @targets.map{ |target| target.json_value } : []
52
+ }
53
+ end
54
+
48
55
  # Class methods
49
56
 
50
57
  def self.map dictionary
@@ -45,6 +45,20 @@ module Xcov
45
45
  "#{@name} | `#{@displayable_coverage}` | #{coverage_emoji}\n"
46
46
  end
47
47
 
48
+ def json_value
49
+ value = {
50
+ "name" => @name,
51
+ "coverage" => @coverage,
52
+ "type" => @type,
53
+ "functions" => @functions ? @functions.map{ |function| function.json_value } : []
54
+ }
55
+ if @ignored then
56
+ value["ignored"] = true
57
+ end
58
+ return value
59
+ end
60
+
61
+
48
62
  # Class methods
49
63
 
50
64
  def self.map (dictionary)
@@ -42,6 +42,14 @@ module Xcov
42
42
  markdown
43
43
  end
44
44
 
45
+ def json_value
46
+ {
47
+ "name" => @name,
48
+ "coverage" => @coverage,
49
+ "files" => @files ? @files.map{ |file| file.json_value } : []
50
+ }
51
+ end
52
+
45
53
  # Class methods
46
54
 
47
55
  def self.map (dictionary)
@@ -70,7 +70,7 @@ module Xcov
70
70
  # Create JSON report
71
71
  if Xcov.config[:json_report] then
72
72
  File.open(File.join(output_path, "report.json"), "wb") do |file|
73
- file.puts report_json.to_json
73
+ file.puts report.json_value.to_json
74
74
  end
75
75
  end
76
76
 
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "0.10"
3
+ VERSION = "0.11"
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.10'
4
+ version: '0.11'
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-07-06 00:00:00.000000000 Z
11
+ date: 2016-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core