Commit 7da3e414 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rs-coverage-updates' into 'master'

Better categorize test coverage results

See merge request !13485
parents 5896d1b1 d0622b79
# :nocov:
if Rails.env.test?
class UnicornTestController < ActionController::Base
def pid
render plain: Process.pid.to_s
end
def kill
Process.kill(params[:signal], Process.pid)
render plain: 'Bye!'
end
end
end
# :nocov:
class FileStreamer #:nodoc:
attr_reader :to_path
def initialize(path)
@to_path = path
end
# Stream the file's contents if Rack::Sendfile isn't present.
def each
File.open(to_path, 'rb') do |file|
while chunk = file.read(16384)
yield chunk
end
end
end
end
# This Rack middleware is intended to proxy the webpack assets directory to the
# webpack-dev-server. It is only intended for use in development.
# :nocov:
module Gitlab
module Middleware
class WebpackProxy < Rack::Proxy
......@@ -22,3 +23,4 @@ module Gitlab
end
end
end
# :nocov:
# :nocov:
module Gitlab
module OAuth
module Session
......@@ -15,3 +16,4 @@ module Gitlab
end
end
end
# :nocov:
# :nocov:
module DeliverNever
def deliver_later
self
......@@ -21,3 +22,4 @@ module Gitlab
end
end
end
# :nocov:
......@@ -36,18 +36,25 @@ module SimpleCovEnv
track_files '{app,lib}/**/*.rb'
add_filter '/vendor/ruby/'
add_filter 'app/controllers/sherlock/'
add_filter 'config/initializers/'
add_filter 'db/fixtures/'
add_filter 'lib/gitlab/sidekiq_middleware/'
add_filter 'lib/system_check/'
add_group 'Controllers', 'app/controllers'
add_group 'Models', 'app/models'
add_group 'Mailers', 'app/mailers'
add_group 'Helpers', 'app/helpers'
add_group 'Workers', %w(app/jobs app/workers)
add_group 'Libraries', 'lib'
add_group 'Services', 'app/services'
add_group 'Finders', 'app/finders'
add_group 'Uploaders', 'app/uploaders'
add_group 'Validators', 'app/validators'
add_group 'Finders', 'app/finders'
add_group 'Helpers', 'app/helpers'
add_group 'Libraries', 'lib'
add_group 'Mailers', 'app/mailers'
add_group 'Models', 'app/models'
add_group 'Policies', 'app/policies'
add_group 'Presenters', 'app/presenters'
add_group 'Serializers', 'app/serializers'
add_group 'Services', 'app/services'
add_group 'Uploaders', 'app/uploaders'
add_group 'Validators', 'app/validators'
add_group 'Workers', %w(app/jobs app/workers)
merge_timeout 365.days
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment