Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem "amazing_print", "~> 1.5"
gem "aws-sdk-s3", "~> 1.8", require: false
gem "baseline", github: "fastruby/baseline"
gem "bootsnap", "~> 1.17", require: false
gem "coverband", "~> 6.1"
gem "bootstrap", "~> 5.3.3"
gem "cgi"
gem "dartsass-rails", "~> 0.5"
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ GEM
choice (0.2.0)
concurrent-ruby (1.3.5)
connection_pool (2.5.4)
coverband (6.2.0)
base64
redis (>= 3.0)
crack (1.0.0)
bigdecimal
rexml
Expand Down Expand Up @@ -449,6 +452,7 @@ DEPENDENCIES
bootsnap (~> 1.17)
bootstrap (~> 5.3.3)
cgi
coverband (~> 6.1)
dartsass-rails (~> 0.5)
database_cleaner-active_record
dotenv (~> 3.1.2)
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.next.lock
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ GEM
choice (0.2.0)
concurrent-ruby (1.3.5)
connection_pool (2.5.4)
coverband (6.2.0)
base64
redis (>= 3.0)
crack (1.0.0)
bigdecimal
rexml
Expand Down Expand Up @@ -454,6 +457,7 @@ DEPENDENCIES
bootsnap (~> 1.17)
bootstrap (~> 5.3.3)
cgi
coverband (~> 6.1)
dartsass-rails (~> 0.5)
database_cleaner-active_record
dotenv (~> 3.1.2)
Expand Down
9 changes: 9 additions & 0 deletions config/initializers/coverband.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Coverband.configure do |config|
config.store = Coverband::Adapters::RedisStore.new(
Redis.new(url: ENV["REDIS_URL"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
)
config.track_views = true
config.background_reporting_enabled = true
config.web_enable_clear = true
config.ignore = %w[config/boot.rb config/environment.rb config/puma.rb bin/]
end
10 changes: 10 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "sidekiq/web"
require "sidekiq-scheduler/web"
require "coverband"

if Rails.env.production?
Sidekiq::Web.use Rack::Auth::Basic do |username, password|
Expand All @@ -9,10 +10,19 @@
}.map { ActiveSupport::SecurityUtils.secure_compare _1, ENV.fetch(_2) }
.all?
end

Coverband::Reporters::Web.use Rack::Auth::Basic do |username, password|
{
username => "COVERBAND_USERNAME",
password => "COVERBAND_PASSWORD"
}.map { ActiveSupport::SecurityUtils.secure_compare _1, ENV.fetch(_2) }
.all?
end
end

Rails.application.routes.draw do
mount Sidekiq::Web => "sidekiq"
mount Coverband::Reporters::Web.new, at: "/coverband"

get '/sitemap.xml', to: 'sitemaps#show'
get "/robots.txt" => "static#robots"
Expand Down
Loading