Skip to content

Commit

Permalink
Merge 4dd982c into 1b957b1
Browse files Browse the repository at this point in the history
  • Loading branch information
kbaum committed Jun 24, 2020
2 parents 1b957b1 + 4dd982c commit 38c177f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
28 changes: 14 additions & 14 deletions lib/coverband/configuration.rb
Expand Up @@ -23,19 +23,19 @@ class Configuration
# * Perhaps detect heroku deployment ENV var opposed to tasks?
#####
IGNORE_TASKS = ["coverband:clear",
"coverband:coverage",
"coverband:coverage_server",
"coverband:migrate",
"assets:precompile",
"db:version",
"db:create",
"db:drop",
"db:seed",
"db:setup",
"db:test:prepare",
"db:structure:dump",
"db:structure:load",
"db:version"]
"coverband:coverage",
"coverband:coverage_server",
"coverband:migrate",
"assets:precompile",
"db:version",
"db:create",
"db:drop",
"db:seed",
"db:setup",
"db:test:prepare",
"db:structure:dump",
"db:structure:load",
"db:version"]

# Heroku when building assets runs code from a dynamic directory
# /tmp was added to avoid coverage from /tmp/build directories during
Expand Down Expand Up @@ -180,7 +180,7 @@ def to_h
end

def use_oneshot_lines_coverage=(value)
raise(Exception, "One shot line coverage is only available in ruby >= 2.6") unless one_shot_coverage_implemented_in_ruby_version? || !value
raise(StandardError, "One shot line coverage is only available in ruby >= 2.6") unless one_shot_coverage_implemented_in_ruby_version? || !value

@use_oneshot_lines_coverage = value
end
Expand Down
2 changes: 1 addition & 1 deletion lib/coverband/reporters/web.rb
Expand Up @@ -168,7 +168,7 @@ def clear_view_tracking_file
# "/coverage/collect_coverage?" become:
# /coverage/
def base_path
request.path =~ %r{\/.*\/} ? request.path.match("\/.*\/")[0] : "/"
%r{\/.*\/}.match?(request.path) ? request.path.match("\/.*\/")[0] : "/"
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/benchmarks/benchmark.rake
Expand Up @@ -417,5 +417,5 @@ end

desc "runs benchmarks"
task benchmarks: ["benchmarks:redis_reporting",
"benchmarks:compare_file",
"benchmarks:compare_redis"]
"benchmarks:compare_file",
"benchmarks:compare_redis"]
14 changes: 7 additions & 7 deletions test/coverband/configuration_test.rb
Expand Up @@ -27,13 +27,13 @@ def setup
end
Coverband::Collectors::Coverage.instance.reset_instance
expected = ["vendor/",
".erb$",
".slim$",
"/tmp",
"internal:prelude",
"schema.rb",
"config/envionments",
"config/initializers"]
".erb$",
".slim$",
"/tmp",
"internal:prelude",
"schema.rb",
"config/envionments",
"config/initializers"]
assert_equal expected, Coverband.configuration.ignore
end

Expand Down
10 changes: 5 additions & 5 deletions test/coverband/utils/result_test.rb
Expand Up @@ -49,11 +49,11 @@
end

%i[covered_percent
covered_percentages
covered_strength
covered_lines
missed_lines
total_lines].each do |msg|
covered_percentages
covered_strength
covered_lines
missed_lines
total_lines].each do |msg|
it "responds to #{msg}" do
assert(subject.respond_to?(msg))
end
Expand Down

0 comments on commit 38c177f

Please sign in to comment.