coverband 4.2.2.rc.1 → 4.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -6
- data/changes.md +19 -1
- data/lib/coverband/adapters/hash_redis_store.rb +8 -0
- data/lib/coverband/version.rb +1 -1
- data/views/view_tracker.erb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33ec68822b5c228e86048d62ded36cfeba06adf77022d07b39cdcb897c215f6f
|
4
|
+
data.tar.gz: 7494e163926def8f8406da850efe02f5cd79f6ba6377abaf14ccb09aedc6ca85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fda6dd49e21244819834f20e857ba2f4c8fddec4b1096a2b7ecfad7acdf6352cb2d4a8783f1cb5efc1ea2dc1ef5d03e7712f709fb928e29461dd41fc2dff76d8
|
7
|
+
data.tar.gz: b318161bc9c3709d41a35bb8a4e108a5ab38bea2feb095b1fc8d900f6e8a9bcfcc37dbf90392408d2efa3d510a58ceff5c69d19a422e4923049c08ee69d20c9c
|
data/README.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
[![Build Status](https://travis-ci.org/danmayer/coverband.svg?branch=master)](https://travis-ci.org/danmayer/coverband)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/github/danmayer/coverband/badge.svg?branch=master)](https://coveralls.io/github/danmayer/coverband?branch=master)
|
7
7
|
[![Maintainability](https://api.codeclimate.com/v1/badges/1e6682f9540d75f26da7/maintainability)](https://codeclimate.com/github/danmayer/coverband/maintainability)
|
8
|
+
[![Discord Shield](https://img.shields.io/discord/609509533999562753)](https://discord.gg/KAH38EV)
|
9
|
+
|
8
10
|
|
9
11
|
<p align="center">
|
10
12
|
<a href="#key-features">Key Features</a> •
|
@@ -179,10 +181,19 @@ config.ignore += ['config/application.rb',
|
|
179
181
|
'config/boot.rb',
|
180
182
|
'config/puma.rb',
|
181
183
|
'config/schedule.rb',
|
182
|
-
'bin/*'
|
184
|
+
'bin/*',
|
183
185
|
'config/environments/*',
|
184
186
|
'lib/tasks/*']
|
185
187
|
```
|
188
|
+
### View Tracking
|
189
|
+
|
190
|
+
Coverband allows an optional feature to track all view files that are used by an application.
|
191
|
+
|
192
|
+
To opt-in to this feature... enable the feature in your Coverband config.
|
193
|
+
|
194
|
+
`config.track_views = true`
|
195
|
+
|
196
|
+
![image](https://raw.github.com/danmayer/coverband/master/docs/coverband_view_tracker.png)
|
186
197
|
|
187
198
|
### Writing Coverband Results to S3
|
188
199
|
|
@@ -205,13 +216,13 @@ ENV['AWS_ACCESS_KEY_ID']
|
|
205
216
|
ENV['AWS_SECRET_ACCESS_KEY']
|
206
217
|
```
|
207
218
|
|
208
|
-
###
|
209
|
-
|
210
|
-
Between the release of 4.0 and 4.1 our data format changed. This resets all your coverage data. If you want to restore your previous coverage data, feel free to migrate.
|
219
|
+
### Redis Hash Store
|
211
220
|
|
212
|
-
|
221
|
+
Coverband on very high volume sites with many server processes reporting can have a race condition. To resolve the race condition and reduce Ruby memory overhead we have introduced a new Redis storage option. This moves the some of the work from the Ruby processes to Redis. It is worth noting because of this, it has a larger demands on the Redis server. So adjust your Redis instance accordingly. To help reduce the extra redis load you can also change the background reporting time period.
|
213
222
|
|
214
|
-
|
223
|
+
* set the new Redis store: `config.store = Coverband::Adapters::HashRedisStore.new(Redis.new(url: redis_url))`
|
224
|
+
* adjust from default 30s reporting `config.background_reporting_sleep_seconds = 120`
|
225
|
+
* reminder it is recommended to have a unique Redis per workload (background jobs, caching, Coverband), for this store, it may be more important to have a dedicated Redis.
|
215
226
|
|
216
227
|
### Clear Coverage
|
217
228
|
|
@@ -219,6 +230,14 @@ Now that Coverband uses MD5 hashes there should be no reason to manually clear c
|
|
219
230
|
|
220
231
|
`rake coverband:clear`
|
221
232
|
|
233
|
+
### Coverage Data Migration
|
234
|
+
|
235
|
+
Between the release of 4.0 and 4.1 our data format changed. This resets all your coverage data. If you want to restore your previous coverage data, feel free to migrate.
|
236
|
+
|
237
|
+
`rake coverband:migrate`
|
238
|
+
|
239
|
+
- We will be working to support migrations going forward, when possible
|
240
|
+
|
222
241
|
### Adding Rake Tasks outside of Rails
|
223
242
|
|
224
243
|
Rails apps should automaticallly include the tasks via the Railtie.
|
data/changes.md
CHANGED
@@ -78,10 +78,28 @@ Feature Ideas:
|
|
78
78
|
|
79
79
|
### Coverband 4.2.2
|
80
80
|
|
81
|
-
-
|
81
|
+
- new experimental hash redis store for high volume collection
|
82
|
+
(hundreds of clients), thanks @kbaum
|
83
|
+
- view_tracker supports tracking view layer files like `.html.erb`
|
84
|
+
- documentation improvements, thanks @brossetti1, @jjb, @kbaum
|
85
|
+
- we now have discordapp for discussions, thanks @kbaum,
|
86
|
+
https://discordapp.com/channels/609509533999562753/609509533999562756
|
87
|
+
- perf fix on Rails initialization, thanks @skangg
|
88
|
+
- simplified logging
|
82
89
|
|
83
90
|
# Released
|
84
91
|
|
92
|
+
### Coverband 4.2.2
|
93
|
+
|
94
|
+
- new experimental hash redis store for high volume collection
|
95
|
+
(hundreds of clients), thanks @kbaum
|
96
|
+
- view_tracker supports tracking view layer files like `.html.erb`
|
97
|
+
- documentation improvements, thanks @brossetti1, @jjb, @kbaum
|
98
|
+
- we now have discordapp for discussions, thanks @kbaum,
|
99
|
+
https://discordapp.com/channels/609509533999562753/609509533999562756
|
100
|
+
- perf fix on Rails initialization, thanks @skangg
|
101
|
+
- simplified logging
|
102
|
+
|
85
103
|
### Coverband 4.2.1
|
86
104
|
|
87
105
|
- larger changes
|
data/lib/coverband/version.rb
CHANGED
data/views/view_tracker.erb
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= display_nav(show_coverage_link: true) %>
|
14
14
|
<div id="content">
|
15
15
|
<% tracker = Coverband::Collectors::ViewTracker.new(store: Coverband.configuration.store) %>
|
16
|
-
<h2>Unused Views
|
16
|
+
<h2>Unused Views: (<%= tracker.unused_views.length %>)</h2>
|
17
17
|
<p>These views have never been rendered</p>
|
18
18
|
<ul>
|
19
19
|
<% tracker.unused_views.each do |view_file| %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<% end %>
|
22
22
|
</ul>
|
23
23
|
|
24
|
-
<h2>Used Views
|
24
|
+
<h2>Used Views: (<%= tracker.used_views.length %>)</h2>
|
25
25
|
<p>These views have been rendered at least once</p>
|
26
26
|
<ul>
|
27
27
|
<% tracker.used_views.each do |view_file| %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coverband
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.2
|
4
|
+
version: 4.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Mayer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-08-
|
12
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-s3
|
@@ -426,9 +426,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
426
426
|
version: '0'
|
427
427
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
428
428
|
requirements:
|
429
|
-
- - "
|
429
|
+
- - ">="
|
430
430
|
- !ruby/object:Gem::Version
|
431
|
-
version:
|
431
|
+
version: '0'
|
432
432
|
requirements: []
|
433
433
|
rubygems_version: 3.0.3
|
434
434
|
signing_key:
|