forked from ixti/sidekiq-throttled
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
69 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
--backtrace | ||
--color | ||
--format=documentation | ||
--order random | ||
--require simplecov | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
SimpleCov.start do | ||
gemfile = File.basename(ENV.fetch("BUNDLE_GEMFILE", "Gemfile"), ".gemfile").strip | ||
gemfile = nil if gemfile.empty? || gemfile.casecmp?("gems.rb") || gemfile.casecmp?("Gemfile") | ||
|
||
command_name ["#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}", gemfile].compact.join("/") | ||
|
||
enable_coverage :branch | ||
|
||
if ENV["CI"] | ||
require "simplecov-cobertura" | ||
formatter SimpleCov::Formatter::CoberturaFormatter | ||
else | ||
formatter SimpleCov::Formatter::MultiFormatter.new([ | ||
SimpleCov::Formatter::SimpleFormatter, | ||
SimpleCov::Formatter::HTMLFormatter | ||
]) | ||
end | ||
|
||
add_filter "/demo/" | ||
add_filter "/gemfiles/" | ||
add_filter "/spec/" | ||
add_filter "/vendor/" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
# frozen_string_literal: true | ||
|
||
require "appraisal" | ||
require "bundler/gem_tasks" | ||
|
||
require "rspec/core/rake_task" | ||
RSpec::Core::RakeTask.new | ||
desc "Run tests" | ||
task :test do | ||
rm_rf "coverage" | ||
rm_rf "gemfiles" | ||
|
||
task default: ENV["APPRAISAL_INITIALIZED"] ? %i[spec] : %i[appraisal rubocop] | ||
Bundler.with_unbundled_env do | ||
sh "bundle exec appraisal generate" | ||
|
||
# XXX: `bundle exec appraisal install` fails on ruby-3.2 | ||
Dir["gemfiles/*.gemfile"].each do |gemfile| | ||
sh({ "BUNDLE_GEMFILE" => gemfile }, "bundle lock") | ||
sh({ "BUNDLE_GEMFILE" => gemfile }, "bundle check") do |ok| | ||
sh({ "BUNDLE_GEMFILE" => gemfile }, "bundle install") unless ok | ||
end | ||
end | ||
|
||
sh "bundle exec appraisal rspec --force-colour" | ||
end | ||
end | ||
|
||
desc "Lint codebase" | ||
task :lint do | ||
sh "bundle exec rubocop --color" | ||
end | ||
|
||
task default: %i[test lint] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.