Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: coverallsapp/coverage-reporter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5.0
Choose a base ref
...
head repository: coverallsapp/coverage-reporter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.1
Choose a head ref
  • 2 commits
  • 9 files changed
  • 2 contributors

Commits on Jun 19, 2023

  1. Copy the full SHA
    a61ecee View commit details
  2. Copy the full SHA
    cafb887 View commit details
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: coverage-reporter
version: 0.5.0
version: 0.5.1
crystal: ">= 1.7.2"
license: MIT

9 changes: 9 additions & 0 deletions spec/coverage_reporter/parsers/cobertura_parser_spec.cr
Original file line number Diff line number Diff line change
@@ -5,6 +5,15 @@ Spectator.describe CoverageReporter::CoberturaParser do

let(base_path) { nil }

describe "#globs" do
it "finds all cobertura files" do
expect(Dir[subject.globs]).to contain(
"spec/fixtures/cobertura/cobertura.xml",
"spec/fixtures/cobertura/cobertura-coverage.xml",
)
end
end

describe "#matches?" do
it "matches correct filenames" do
expect(subject.matches?("cobertura.xml")).to eq false
8 changes: 8 additions & 0 deletions spec/coverage_reporter/parsers/gcov_parser_spec.cr
Original file line number Diff line number Diff line change
@@ -5,6 +5,14 @@ Spectator.describe CoverageReporter::GcovParser do

let(base_path) { nil }

describe "#globs" do
it "finds all gcov files" do
expect(Dir[subject.globs]).to contain(
"spec/fixtures/gcov/main.c.gcov",
)
end
end

describe "#matches?" do
it "matches only .gcov files" do
expect(subject.matches?(".gcov")).to eq true
10 changes: 10 additions & 0 deletions spec/coverage_reporter/parsers/jacoco_parser_spec.cr
Original file line number Diff line number Diff line change
@@ -5,6 +5,16 @@ Spectator.describe CoverageReporter::JacocoParser do

let(base_path) { nil }

describe "#globs" do
it "finds all jacoco files" do
expect(Dir[subject.globs]).to contain(
"spec/fixtures/jacoco/jacoco-oneline-report.xml",
"spec/fixtures/jacoco/jacoco-report-multiple-packages.xml",
"spec/fixtures/jacoco/jacoco-report.xml",
)
end
end

describe "#matches?" do
it "matches correct filenames" do
expect(subject.matches?("spec/fixtures/jacoco/jacoco-report.xml")).to eq true
11 changes: 11 additions & 0 deletions spec/coverage_reporter/parsers/lcov_parser_spec.cr
Original file line number Diff line number Diff line change
@@ -5,6 +5,17 @@ Spectator.describe CoverageReporter::LcovParser do

let(base_path) { nil }

describe "#globs" do
it "finds all lcov files" do
expect(Dir[subject.globs]).to contain(
"spec/fixtures/lcov/empty.lcov",
"spec/fixtures/lcov/test.lcov",
"spec/fixtures/lcov/coverage/test.lcov",
"spec/fixtures/lcov/test-current-folder.lcov",
)
end
end

describe "#matches?" do
it "matches correct filenames" do
expect(subject.matches?("somefile.lcov")).to eq true
8 changes: 8 additions & 0 deletions spec/coverage_reporter/parsers/simplecov_parser_spec.cr
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@ require "../../spec_helper"
Spectator.describe CoverageReporter::SimplecovParser do
subject { described_class.new }

describe "#globs" do
it "finds all simplecov files" do
expect(Dir[subject.globs]).to contain(
"spec/fixtures/simplecov/.resultset.json",
)
end
end

describe "#matches?" do
it "matches correct filenames" do
expect(subject.matches?(".resultset.jsonb")).to eq false
1 change: 1 addition & 0 deletions spec/fixtures/cobertura/cobertura-coverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion src/coverage_reporter.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "./coverage_reporter/*"

module CoverageReporter
VERSION = "0.5.0"
VERSION = "0.5.1"
end
4 changes: 2 additions & 2 deletions src/coverage_reporter/parsers/cobertura_parser.cr
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@ module CoverageReporter
[
"**/*/cobertura.xml",
"cobertura.xml",
"**/*/coverage.xml",
"coverage.xml",
"**/*/*coverage.xml",
"*coverage.xml",
]
end