From 7544e264c9b06750f8253f5fb38245962c5706bd Mon Sep 17 00:00:00 2001 From: John Bachir Date: Fri, 16 Feb 2024 12:59:57 -0500 Subject: [PATCH 1/4] ability to hide settings view --- lib/coverband/reporters/web.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/coverband/reporters/web.rb b/lib/coverband/reporters/web.rb index c2f0aa70..7378cd11 100644 --- a/lib/coverband/reporters/web.rb +++ b/lib/coverband/reporters/web.rb @@ -121,6 +121,7 @@ def json end def settings + return "" if Coverband.configuration.hide_settings Coverband::Utils::HTMLFormatter.new(nil, base_path: base_path).format_settings! end From 3aac9b68794eb4f0d05df5da7ed377a59d2e0246 Mon Sep 17 00:00:00 2001 From: John Bachir Date: Mon, 4 Mar 2024 19:58:47 -0500 Subject: [PATCH 2/4] hide_settings setting --- lib/coverband/configuration.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/coverband/configuration.rb b/lib/coverband/configuration.rb index 5b8cae01..7cafd254 100644 --- a/lib/coverband/configuration.rb +++ b/lib/coverband/configuration.rb @@ -11,7 +11,7 @@ class Configuration :view_tracker, :defer_eager_loading_data, :track_routes, :route_tracker, :track_translations, :translations_tracker, - :trackers, :csp_policy + :trackers, :csp_policy, :hide_settings attr_writer :logger, :s3_region, :s3_bucket, :s3_access_key_id, :s3_secret_access_key, :password, :api_key, :service_url, :coverband_timeout, :service_dev_mode, @@ -86,6 +86,7 @@ def reset @all_root_patterns = nil @password = nil @csp_policy = false + @hide_settings = false # coverband service settings @api_key = nil From b0e37baea738ae039cf83424968d8215b71efd3f Mon Sep 17 00:00:00 2001 From: John Bachir Date: Mon, 4 Mar 2024 20:04:51 -0500 Subject: [PATCH 3/4] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 29d5d26b..61b5292b 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,14 @@ This feature is enabled by default. To stop this feature, disable the feature in ![image](https://raw.github.com/danmayer/coverband/master/docs/coverband_view_tracker.png) +### Hiding settings + +Coverband provides a view of all of its current settings. Sometimes you might want to hide this view, +such as when sharing coverband data with a large number of developers of varying trust levels. +You can disable the settings view like so: + +`config.track_views = false` + ### Fixing Coverage Only Shows Loading Hits If all your coverage is being counted as loading or eager_loading coverage, and nothing is showing as runtime Coverage the initialization hook failed for some reason. The most likely reason for this issue is manually calling `eager_load!` on some Plugin/Gem. If you or a plugin is altering the Rails initialization process, you can manually flip Coverband to runtime coverage by calling these two lines, in an `after_initialize` block, in `application.rb`. From 0819b075fccbf6cd1e2bb1421c5d4f83c43aaf0c Mon Sep 17 00:00:00 2001 From: John Bachir Date: Mon, 4 Mar 2024 20:06:01 -0500 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61b5292b..58d0ba7f 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ Coverband provides a view of all of its current settings. Sometimes you might wa such as when sharing coverband data with a large number of developers of varying trust levels. You can disable the settings view like so: -`config.track_views = false` +`config.hide_settings = false` ### Fixing Coverage Only Shows Loading Hits