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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb6af6827f4b01f4e0297cbd872a08441bf35b88
4
- data.tar.gz: b7e22890f96d710a8923b0b354157bb5f243473a
3
+ metadata.gz: 581a6ac0708081b731f83a6cb20dbf65d70ad9a1
4
+ data.tar.gz: 536af208b4c4cdc4545d74c238514468d27402c1
5
5
  SHA512:
6
- metadata.gz: f5eb4053c017188e55e61089dabcb25998b58c1d11c9db8969d49976b0182cdd5e35fd36cfe52670f2d0eb2785cc139a6ede0108f835cec137ec4f02d1f2c39b
7
- data.tar.gz: a81283ebb6c111c1e93a01917f7f8b910281ed5017316e5a6b1788cb6798e857d81720156e6a030d645c2011d005a22c80566e731f2152020115e13c9972c853
6
+ metadata.gz: 0bc8a0e06716442ea8225bf1e72ad23415ea0c238d63d7c7664dc56c5ebf1f11ffee6e8a59132f3c860fb52e3f65eefea0f58fb3a927462a22774e00df98d6f8
7
+ data.tar.gz: 1057036f1e6898c46164dca5de74e73d53075094f48986cf4c665d111bb63c8f681fe0a4a4d0672a1bda36c6fe252d8c0dec23af4a2d7ba8ffb204078f8a6fa6
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "xccov/parse"
4
+ require "xccov-parse"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -1,28 +1,8 @@
1
- require "xccov/parse/version"
2
- require "json"
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
@@ -0,0 +1,3 @@
1
+ class Xccov
2
+ VERSION = "0.2.0"
3
+ end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'xccov/parse/version'
4
+ require 'xccov-parse/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "xccov-parse"
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.1.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-15 00:00:00.000000000 Z
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/parse.rb
71
- - lib/xccov/parse/version.rb
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:
@@ -1,3 +0,0 @@
1
- class Xccov
2
- VERSION = "0.1.0"
3
- end