oneshot_coverage 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -11
- data/lib/oneshot_coverage.rb +1 -1
- data/lib/oneshot_coverage/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d42b77d4fb638de835558905ebbb7559ac3a08557942366223c1a1ab49a8f81b
|
4
|
+
data.tar.gz: ba38466a1a238d5aeec7971df5f1846e5adbf05925ad4e77a1fa612e8d61555f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77ad38105678a6528f947030d8b651ce258dc14a249a09348a8fa5e505c2809a2987a157202d96845cd50ac35740ace64f779ce25c05c6d281da964931ce1060
|
7
|
+
data.tar.gz: 13515499d18486378a3cc6c7831ece71dc01424a2fb7c130ae84a63165f2492e64be6ab0656c82c807f2e99bea188a871666884fabd206cb2e417ff57e18fe35
|
data/README.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# OneshotCoverage
|
2
2
|
|
3
|
-
This gem
|
4
|
-
however, It could be good example to implement
|
3
|
+
This gem may not be very useful when you want to use [Coverage onetshot mode](https://bugs.ruby-lang.org/issues/15022),
|
4
|
+
however, It could be good example to study how to implement by yourself.
|
5
5
|
|
6
|
-
This gem
|
7
|
-
|
8
|
-
|
6
|
+
This gem provides simple tools to use oneshot mode easier. It gives you:
|
7
|
+
|
8
|
+
- Rack middleware for logging
|
9
|
+
- Pluggable logger interface
|
10
|
+
|
11
|
+
Please notice that it records code executions under the target path(usually, project base path).
|
12
|
+
If you have bundle gem path under target path, It will be ignored automatically.
|
9
13
|
|
10
14
|
## Installation
|
11
15
|
|
@@ -61,13 +65,9 @@ end
|
|
61
65
|
|
62
66
|
Please use `OneshotCoverage::Middleware`. This will emit logs per each request.
|
63
67
|
|
64
|
-
If you using Rails,
|
65
|
-
|
66
|
-
```
|
67
|
-
require 'oneshot_coverage/railtie'
|
68
|
-
```
|
68
|
+
If you using Rails, middleware will be inserted automatically.
|
69
69
|
|
70
|
-
|
70
|
+
#### With job/batch application
|
71
71
|
|
72
72
|
If your job or batch are exit as soon as it finished(i.e. execute via rails runner),
|
73
73
|
then you don't need to do anything. `OneshotCoverage.start` will set trap
|
data/lib/oneshot_coverage.rb
CHANGED
@@ -38,7 +38,7 @@ module OneshotCoverage
|
|
38
38
|
def is_target?(filepath, value)
|
39
39
|
return false if value[:oneshot_lines].empty?
|
40
40
|
return false if !filepath.start_with?(@target_path)
|
41
|
-
return false if @
|
41
|
+
return false if @bundler_path && filepath.start_with?(@bundler_path)
|
42
42
|
true
|
43
43
|
end
|
44
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oneshot_coverage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
rubygems_version: 3.0.
|
85
|
+
rubygems_version: 3.0.3
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Simple toolbox for oneshot coverage
|