Rakefile in simplecov-html-0.9.0 vs Rakefile in simplecov-html-0.10.0
- old
+ new
@@ -1,32 +1,41 @@
-require 'bundler'
+require "bundler"
Bundler::GemHelper.install_tasks
# See https://github.com/colszowka/simplecov/issues/171
desc "Set permissions on all files so they are compatible with both user-local and system-wide installs"
task :fix_permissions do
system 'bash -c "find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;"'
end
# Enforce proper permissions on each build
Rake::Task[:build].prerequisites.unshift :fix_permissions
-require 'rake/testtask'
+require "rake/testtask"
Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/test_*.rb'
+ test.libs << "lib" << "test"
+ test.pattern = "test/**/test_*.rb"
test.verbose = true
end
-task :default => :test
+begin
+ require "rubocop/rake_task"
+ RuboCop::RakeTask.new
+rescue LoadError
+ task :rubocop do
+ $stderr.puts "Rubocop is disabled"
+ end
+end
+task :default => [:test, :rubocop]
+
namespace :assets do
desc "Compiles all assets"
task :compile do
puts "Compiling assets"
- require 'sprockets'
+ require "sprockets"
assets = Sprockets::Environment.new
- assets.append_path 'assets/javascripts'
- assets.append_path 'assets/stylesheets'
- assets['application.js'].write_to('public/application.js')
- assets['application.css'].write_to('public/application.css')
+ assets.append_path "assets/javascripts"
+ assets.append_path "assets/stylesheets"
+ assets["application.js"].write_to("public/application.js")
+ assets["application.css"].write_to("public/application.css")
end
end