fastlane-plugin-kuhverij 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/lib/fastlane/plugin/kuhverij/actions/kuhverij_action.rb +26 -5
- data/lib/fastlane/plugin/kuhverij/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb28481821cbdaffdb88b80dc86c4f6a915c1eb63fa0678a22fd23acb2cd4a02
|
4
|
+
data.tar.gz: 5f6982c3e927ff4cd66bd6e66a159e34e4fb5cf28a8328528fcc7607270ade2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fa7a94a99ba7f6144e48842e414fd2cdf3016ffcf2f5e6e9c2f3e5f52fd8b4c08f594d30e8450e7c20e6cb52d17751754cf4ace63143db9a62d47247c44761c
|
7
|
+
data.tar.gz: e884ff5dc63fc0892ef6ba57ca4ca758aaeeca6a463c7557d403dc5d29de79d61981b1f1260bf9d53fbc0ca77f1b9ba8e3d478a80d5ad93ab1f30c0c092087e1
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# kuhverij plugin
|
2
2
|
|
3
3
|
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-kuhverij)
|
4
|
+
[![Build Status](https://travis-ci.org/mbogh/fastlane-plugin-kuhverij.svg?branch=master)](https://travis-ci.org/mbogh/fastlane-plugin-kuhverij)
|
4
5
|
|
5
6
|
## Getting Started
|
6
7
|
|
@@ -20,8 +21,6 @@ Simplified Code Coverage
|
|
20
21
|
|
21
22
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
23
|
|
23
|
-
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
-
|
25
24
|
## Run tests for this plugin
|
26
25
|
|
27
26
|
To run both the tests, and code style validation, run
|
@@ -8,12 +8,24 @@ module Fastlane
|
|
8
8
|
|
9
9
|
def self.run(params)
|
10
10
|
derived_data_path = params[:derived_data_path]
|
11
|
-
coverage_report_path = Dir["#{derived_data_path}/**/*.xccovreport"].first
|
12
|
-
UI.user_error!("No '.xccovreport' could be found at #{derived_data_path}") if coverage_report_path.nil?
|
13
11
|
|
14
12
|
commands = []
|
15
|
-
|
16
|
-
|
13
|
+
|
14
|
+
coverage_report_path = Dir["#{derived_data_path}/**/*.xccovreport"].first
|
15
|
+
result_bundle_path = Dir["#{derived_data_path}/**/*.xcresult"].first
|
16
|
+
|
17
|
+
if !coverage_report_path.nil?
|
18
|
+
command = "xcrun xccov view --only-targets --json"
|
19
|
+
command << " #{coverage_report_path.shellescape}"
|
20
|
+
elsif !result_bundle_path.nil?
|
21
|
+
UI.important("No '.xccovreport' could be found at #{derived_data_path} will look for '.xcresult'")
|
22
|
+
|
23
|
+
command = "xcrun xccov view --report --only-targets --json"
|
24
|
+
command << " #{result_bundle_path.shellescape}"
|
25
|
+
else
|
26
|
+
UI.user_error!("No '.xccovreport' or '.xcresult' could be found at #{derived_data_path}")
|
27
|
+
end
|
28
|
+
|
17
29
|
commands << command
|
18
30
|
|
19
31
|
code_coverage_json = Fastlane::Actions.sh(command, log: false)
|
@@ -25,7 +37,7 @@ module Fastlane
|
|
25
37
|
end
|
26
38
|
|
27
39
|
def self.code_coverage_message(json_string)
|
28
|
-
code_coverage = JSON.parse(json_string)
|
40
|
+
code_coverage = JSON.parse(strip_debug(json_string))
|
29
41
|
covered_lines = 0
|
30
42
|
executable_lines = 0
|
31
43
|
|
@@ -42,6 +54,15 @@ module Fastlane
|
|
42
54
|
message
|
43
55
|
end
|
44
56
|
|
57
|
+
def self.strip_debug(json_string)
|
58
|
+
result = ""
|
59
|
+
json_string.each_line do |line|
|
60
|
+
result << line unless line.include?('xccov[')
|
61
|
+
end
|
62
|
+
|
63
|
+
result
|
64
|
+
end
|
65
|
+
|
45
66
|
def self.should_skip_target(name)
|
46
67
|
return true if name.nil?
|
47
68
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-kuhverij
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Bøgh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|