diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-10 19:09:14 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-11 10:59:11 -0400 |
commit | d0622b79d8d011c80f63e71c96e69754a5b0ec16 (patch) | |
tree | 6e9c387fb1699ba733507341d9009754798392b0 | |
parent | 69eb4be7ec8d978580c51d4ead157001511d4768 (diff) | |
download | gitlab-ce-d0622b79d8d011c80f63e71c96e69754a5b0ec16.tar.gz |
Better categorize test coverage resultsrs-coverage-updates
Also marks a few things as uncovered, and removes an unused class.
-rw-r--r-- | app/controllers/unicorn_test_controller.rb | 4 | ||||
-rw-r--r-- | lib/file_streamer.rb | 16 | ||||
-rw-r--r-- | lib/gitlab/middleware/webpack_proxy.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/o_auth/session.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/seeder.rb | 2 | ||||
-rw-r--r-- | spec/simplecov_env.rb | 25 |
6 files changed, 25 insertions, 26 deletions
diff --git a/app/controllers/unicorn_test_controller.rb b/app/controllers/unicorn_test_controller.rb index b7a1a046be0..ed04bd1f77d 100644 --- a/app/controllers/unicorn_test_controller.rb +++ b/app/controllers/unicorn_test_controller.rb @@ -1,12 +1,14 @@ +# :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: diff --git a/lib/file_streamer.rb b/lib/file_streamer.rb deleted file mode 100644 index 4e3c6d3c773..00000000000 --- a/lib/file_streamer.rb +++ /dev/null @@ -1,16 +0,0 @@ -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 diff --git a/lib/gitlab/middleware/webpack_proxy.rb b/lib/gitlab/middleware/webpack_proxy.rb index 6105d165810..6aecf63231f 100644 --- a/lib/gitlab/middleware/webpack_proxy.rb +++ b/lib/gitlab/middleware/webpack_proxy.rb @@ -1,6 +1,7 @@ # 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: diff --git a/lib/gitlab/o_auth/session.rb b/lib/gitlab/o_auth/session.rb index f33bfd0bd0e..30739f2a2c5 100644 --- a/lib/gitlab/o_auth/session.rb +++ b/lib/gitlab/o_auth/session.rb @@ -1,3 +1,4 @@ +# :nocov: module Gitlab module OAuth module Session @@ -15,3 +16,4 @@ module Gitlab end end end +# :nocov: diff --git a/lib/gitlab/seeder.rb b/lib/gitlab/seeder.rb index 823f697f51c..f9ab9bd466f 100644 --- a/lib/gitlab/seeder.rb +++ b/lib/gitlab/seeder.rb @@ -1,3 +1,4 @@ +# :nocov: module DeliverNever def deliver_later self @@ -21,3 +22,4 @@ module Gitlab end end end +# :nocov: diff --git a/spec/simplecov_env.rb b/spec/simplecov_env.rb index ac2c89b3ff9..25ddf932d42 100644 --- a/spec/simplecov_env.rb +++ b/spec/simplecov_env.rb @@ -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 |