Rakefile in ballast-2.2.2 vs Rakefile in ballast-2.2.3

- old
+ new

@@ -4,11 +4,21 @@ # require "bundler/gem_tasks" require "rspec/core/rake_task" -RSpec::Core::RakeTask.new("spec") -RSpec::Core::RakeTask.new("spec:coverage") { |t| t.ruby_opts = "-r./spec/coverage_helper" } +# Compatibility layer for Rake 11.0 +Rake.application.class.send(:alias_method, :last_comment, :last_description) unless Rake.application.respond_to?(:last_comment) + +RSpec::Core::RakeTask.new("spec") do |t| + t.ruby_opts = ENV.fetch("RUBY_OPTS", "").to_s + t.rspec_opts = ENV.fetch("RSPEC_OPTS", "").to_s +end + +RSpec::Core::RakeTask.new("spec:coverage") do |t| + t.ruby_opts = ENV.fetch("RUBY_OPTS", "").to_s + " -r./spec/coverage_helper" + t.rspec_opts = ENV.fetch("RSPEC_OPTS", "").to_s +end desc "Generate the documentation" task :docs do system("yardoc") || raise("Failed Execution of: yardoc") end