Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
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
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.0', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', 'jruby']
ruby-version: ['2.1', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', 'jruby']

steps:
- uses: actions/checkout@v3
Expand All @@ -36,7 +36,8 @@ jobs:
- name: Run tests
run: bundle exec rake test
- name: Submit code coverage results
uses: paambaati/codeclimate-action@v3.2.0
uses: paambaati/codeclimate-action@v9.0.0
if: matrix.ruby-version != '2.1'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPO_TOKEN }}

Expand Down
9 changes: 7 additions & 2 deletions discid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
spec.post_install_message = %q{Please make sure you have libdiscid (http://musicbrainz.org/doc/libdiscid) installed.}

spec.requirements = "libdiscid >= 0.1.0"
spec.required_ruby_version = ">= 2.0"
spec.required_ruby_version = ">= 2.1"
spec.required_rubygems_version = ">= 1.3.6"

spec.files = Dir['{lib,examples,test}/**/*.rb'] +
Expand All @@ -31,5 +31,10 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "yard"
spec.add_development_dependency "redcarpet" if not RUBY_PLATFORM == "java"
spec.add_development_dependency "test-unit"
spec.add_development_dependency "simplecov", "< 0.18"

# The code coverage is only supported for Ruby >= 2.4
if (RUBY_VERSION.split('.').map{|s|s.to_i} <=> [2, 4, 0]) >= 0
spec.add_development_dependency "simplecov"
spec.add_development_dependency "simplecov_json_formatter"
end
end
6 changes: 4 additions & 2 deletions test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2013-2014 Philipp Wolfer
# Copyright (C) 2013-2014, 2025 Philipp Wolfer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
Expand All @@ -15,10 +15,12 @@

begin
require 'simplecov'
require "simplecov_json_formatter"

SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
SimpleCov.start do
add_filter "/test/"
end
rescue LoadError
puts 'WARNING: codeclimate-test-reporter not available, no code coverage reported.'
puts 'WARNING: simplecov not available, no code coverage reported.'
end