Sha256: 9bac576a7fffdfa0ba748852341a1c63a8e0dfb14c42f671320d13d3f249b30d
Contents?: true
Size: 951 Bytes
Versions: 29
Compression:
Stored size: 951 Bytes
Contents
namespace :foreman_salt do task :rubocop do begin require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop_salt) do |task| task.patterns = ["#{ForemanSalt::Engine.root}/app/**/*.rb", "#{ForemanSalt::Engine.root}/lib/**/*.rb", "#{ForemanSalt::Engine.root}/test/**/*.rb"] end rescue puts 'Rubocop not loaded.' end Rake::Task['rubocop_salt'].invoke end end namespace :test do desc 'Test ForemanSalt' Rake::TestTask.new(:foreman_salt) do |t| test_dir = File.join(File.dirname(__FILE__), '../..', 'test') t.libs << ['test', test_dir] t.pattern = "#{test_dir}/**/*_test.rb" t.verbose = true t.warning = false end end Rake::Task[:test].enhance ['test:foreman_salt'] load 'tasks/jenkins.rake' if Rake::Task.task_defined?(:'jenkins:unit') Rake::Task['jenkins:unit'].enhance ['test:foreman_salt', 'foreman_salt:rubocop'] end
Version data entries
29 entries across 29 versions & 1 rubygems