oyencov 0.0.10 → 0.0.12
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 +4 -4
- data/lib/oyencov/coverage_peek_delta.rb +2 -2
- data/lib/oyencov/method_range_parser.rb +2 -2
- data/lib/oyencov/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: ff6218062a4304c064bd18b563304049fae93dbb3e1a17abc4eaaf5cf3bf4745
|
4
|
+
data.tar.gz: 78e2fcd58b5bd068f18a8b41b2bee65d03e2ca83df60d5b829591408980d57f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aa056eaf6620a3fa79aa1abfab6d0bd8710726ebb6e5c6adbd86127759ab056e5a56dfedddd0e3c08abdaa01c609ebe3a67f8d79cb7177a29086628a4f96d1c
|
7
|
+
data.tar.gz: cbbace7739cc6a26223c16a3a3bc31cba672e78f68af41249e2763d7c458fa7bf241d010beea1a42d61ab19434dd86083515d6e8fe9c5bd33a6744b4e1fdb466
|
@@ -52,8 +52,8 @@ module OyenCov
|
|
52
52
|
filtered.each_pair do |fpath, line_hits|
|
53
53
|
MethodRangeParser[fpath]&.each_pair do |method_name, line_num|
|
54
54
|
# puts [method_name, line_num, line_hits[line_num]]
|
55
|
-
next if line_num.nil? || line_hits[line_num].nil?
|
56
|
-
current_method_hits[method_name] = line_hits[line_num]
|
55
|
+
next if line_num.nil? || line_hits[line_num - 1].nil?
|
56
|
+
current_method_hits[method_name] = line_hits[line_num - 1]
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -25,6 +25,7 @@ module OyenCov
|
|
25
25
|
# @return [Hash<String, >] Hash of methods to their children starting line count. The line count can be used to read how often the method is executed from `Coverage.peek_result`
|
26
26
|
private_class_method def self.parse_file(filepath)
|
27
27
|
traverse_ast(Parser::CurrentRuby.parse(File.read(filepath)))
|
28
|
+
.reverse
|
28
29
|
.to_h
|
29
30
|
.select do |k, v|
|
30
31
|
/\.|\#/.match?(k)
|
@@ -78,11 +79,10 @@ module OyenCov
|
|
78
79
|
|
79
80
|
node_children = node.children.find do |i|
|
80
81
|
Parser::AST::Node === i && i.type == :begin
|
81
|
-
end&.children ||
|
82
|
+
end&.children || node.children
|
82
83
|
|
83
84
|
ownself_name = declaration_name(node)
|
84
85
|
ownself_range = definition_line_num(node)
|
85
|
-
|
86
86
|
children_name_range = []
|
87
87
|
|
88
88
|
node_children&.each do |cnode|
|
data/lib/oyencov/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oyencov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anonoz Chong
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|