xccov-parse 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/bin/console +1 -1
- data/lib/{xccov/parse.rb → xccov-parse.rb} +3 -23
- data/lib/xccov-parse/parse.rb +22 -0
- data/lib/xccov-parse/version.rb +3 -0
- data/xccov-parse.gemspec +1 -1
- metadata +5 -4
- data/lib/xccov/parse/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 581a6ac0708081b731f83a6cb20dbf65d70ad9a1
|
4
|
+
data.tar.gz: 536af208b4c4cdc4545d74c238514468d27402c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bc8a0e06716442ea8225bf1e72ad23415ea0c238d63d7c7664dc56c5ebf1f11ffee6e8a59132f3c860fb52e3f65eefea0f58fb3a927462a22774e00df98d6f8
|
7
|
+
data.tar.gz: 1057036f1e6898c46164dca5de74e73d53075094f48986cf4c665d111bb63c8f681fe0a4a4d0672a1bda36c6fe252d8c0dec23af4a2d7ba8ffb204078f8a6fa6
|
data/bin/console
CHANGED
@@ -1,28 +1,8 @@
|
|
1
|
-
require "xccov
|
2
|
-
require "
|
3
|
-
|
4
|
-
require 'open3'
|
1
|
+
require "xccov-parse/version"
|
2
|
+
require "xccov-parse/parse"
|
3
|
+
require "open3"
|
5
4
|
|
6
5
|
class Xccov
|
7
|
-
class Parse
|
8
|
-
attr_reader :data
|
9
|
-
|
10
|
-
def initialize(file: nil, json: nil)
|
11
|
-
@data = JSON.parse(json) if json
|
12
|
-
@data = JSON.parse(File.read(file)) if file
|
13
|
-
end
|
14
|
-
|
15
|
-
def targets_name
|
16
|
-
@data.map { |data| data["name"] }
|
17
|
-
end
|
18
|
-
|
19
|
-
def targets_line_coverage
|
20
|
-
@data.reduce({}) do |memo, data|
|
21
|
-
memo.merge({ data["name"] => data["lineCoverage"] })
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
6
|
# @example
|
27
7
|
#
|
28
8
|
# xccov = Xccov.new
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require "json"
|
2
|
+
|
3
|
+
class Xccov
|
4
|
+
class Parse
|
5
|
+
attr_reader :data
|
6
|
+
|
7
|
+
def initialize(file: nil, json: nil)
|
8
|
+
@data = JSON.parse(json) if json
|
9
|
+
@data = JSON.parse(File.read(file)) if file
|
10
|
+
end
|
11
|
+
|
12
|
+
def targets_name
|
13
|
+
@data.map { |data| data["name"] }
|
14
|
+
end
|
15
|
+
|
16
|
+
def targets_line_coverage
|
17
|
+
@data.reduce({}) do |memo, data|
|
18
|
+
memo.merge({ data["name"] => data["lineCoverage"] })
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/xccov-parse.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xccov-parse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,8 +67,9 @@ files:
|
|
67
67
|
- Rakefile
|
68
68
|
- bin/console
|
69
69
|
- bin/setup
|
70
|
-
- lib/xccov
|
71
|
-
- lib/xccov/parse
|
70
|
+
- lib/xccov-parse.rb
|
71
|
+
- lib/xccov-parse/parse.rb
|
72
|
+
- lib/xccov-parse/version.rb
|
72
73
|
- xccov-parse.gemspec
|
73
74
|
homepage: https://github.com/KazuCocoa/xccov-parse
|
74
75
|
licenses:
|
data/lib/xccov/parse/version.rb
DELETED