xcov 0.8 → 0.9

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: fab9b5e1ca61f2be002266a8c186969f600dbb76
4
- data.tar.gz: 36cfc70ed2cc8c117886e82cfb7fc35154ccba7b
3
+ metadata.gz: aaf83175a00aac97b4b4e15458f0d9dc8f61c860
4
+ data.tar.gz: f007348b0e89b0b7547bbcfeb5ae345cbeda6d13
5
5
  SHA512:
6
- metadata.gz: 483d3206bf078ee1bd369b4f4018e862717e953a0f1eea19fb55cf2a0c1712e5077cbe1618d7df0b778a0274058324985f1c57903c19838cbd1bd1b4037bb879
7
- data.tar.gz: 33728a655159156cb4ba4cbcd5bc6de68da0cfc2c256e0028cd181d2a47062600d47a18e8663e6cf8e358c6053fd5ffb25dddf5a8756aebe54b0af89d826d9f5
6
+ metadata.gz: cfd0c43e38171bdc07d86e9537d0f2dbdd5a97576af994835943890b03bfe2ed9b8fb6953a0ef1b54f0d759b1111158fa0802bc477b4a90d01a1f0fb78578ba7
7
+ data.tar.gz: e5e33f9c0fc634e0bcbf4475453611f4fa8460f09ffed9959ed62df6944b1a74b794ff017392592debb369499f493875332222373f9aabd3fb32f7fdb981fdb6
data/README.md CHANGED
@@ -85,28 +85,10 @@ xcov(
85
85
  )
86
86
  ```
87
87
 
88
- ## Changelog
88
+ ### [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).
89
90
 
90
- ### v.0.7
91
- * Ignore file allows wildcards for matching a group of files (by **stevenreinisch**)
92
- * New `exclude_targets` option to exclude reporting for the targets given (by **stevenreinisch**)
93
-
94
- ### v.0.6
95
- * Ignored coverage for a specified list of files
96
-
97
- ### v.0.5
98
- * Fixed bug using the `derived_data_path` option
99
- * Fixed bug sorting multiple `.xccoverage` files by datetime
100
-
101
- ### v.0.4
102
- * Additional flag to enable coverage reports for `.xctest` targets
103
-
104
- ### v.0.3
105
- * Raised exception when the minimum coverage threshold is not reached (by **opfeffer**)
106
-
107
- ### v.0.2
108
- * Fixed bug expanding/collapsing rows with same filename
109
- * Added Fastlane integration to README
91
+ ![screenshot](http://www.nakiostudio.com/danger-xcov.png)
110
92
 
111
93
  ## Contributors
112
94
 
@@ -42,6 +42,18 @@ module Xcov
42
42
  end
43
43
  end
44
44
 
45
+ def coverage_emoji
46
+ if @coverage >= 0.80
47
+ return "✅"
48
+ elsif @coverage >= 0.50
49
+ return "⚠️"
50
+ elsif @coverage >= 0.25
51
+ return "🚫"
52
+ else
53
+ return "💀"
54
+ end
55
+ end
56
+
45
57
  # Class methods
46
58
  def self.template(name)
47
59
  ERB.new(File.read(File.join(File.dirname(__FILE__), "../../../views/", "#{name}.erb")))
@@ -41,6 +41,10 @@ module Xcov
41
41
  Function.template("report").result(binding)
42
42
  end
43
43
 
44
+ def markdown_value
45
+ "#{@targets.map { |target| target.markdown_value }.join("")}\n> Powered by [xcov](https://github.com/nakiostudio/xcov)"
46
+ end
47
+
44
48
  # Class methods
45
49
 
46
50
  def self.map dictionary
@@ -41,6 +41,10 @@ module Xcov
41
41
  Function.template("file").result(binding)
42
42
  end
43
43
 
44
+ def markdown_value
45
+ "#{@name} | `#{@displayable_coverage}` | #{coverage_emoji}\n"
46
+ end
47
+
44
48
  # Class methods
45
49
 
46
50
  def self.map (dictionary)
@@ -33,6 +33,15 @@ module Xcov
33
33
  Function.template("target").result(binding)
34
34
  end
35
35
 
36
+ def markdown_value
37
+ markdown = "## Current coverage for #{@name} is `#{@displayable_coverage}`\n"
38
+ return markdown << "✅ *No files affecting coverage found*\n\n---\n" if @files.empty?
39
+ markdown << "Files changed | - | - \n--- | --- | ---\n"
40
+ markdown << "#{@files.map { |file| file.markdown_value }.join("")}\n---\n"
41
+
42
+ markdown
43
+ end
44
+
36
45
  # Class methods
37
46
 
38
47
  def self.map (dictionary)
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "0.8"
3
+ VERSION = "0.9"
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.8'
4
+ version: '0.9'
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-05-23 00:00:00.000000000 Z
11
+ date: 2016-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core