Sha256: 11d6a59c185f6a433c3ac54f0334375f456fe9c281cbe14ed5b27b4d0ea3f7bb
Contents?: true
Size: 1.29 KB
Versions: 8
Compression:
Stored size: 1.29 KB
Contents
require 'rake/testtask' # Tasks namespace :foreman_virt_who_configure do namespace :example do desc 'Example Task' task task: :environment do # Task goes here end end end # Tests namespace :test do desc 'Test ForemanVirtWhoConfigure' Rake::TestTask.new(:foreman_virt_who_configure) 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 namespace :foreman_virt_who_configure do task :rubocop do begin require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop_foreman_virt_who_configure) do |task| task.patterns = ["#{ForemanVirtWhoConfigure::Engine.root}/app/**/*.rb", "#{ForemanVirtWhoConfigure::Engine.root}/lib/**/*.rb", "#{ForemanVirtWhoConfigure::Engine.root}/test/**/*.rb"] end rescue puts 'Rubocop not loaded.' end Rake::Task['rubocop_foreman_virt_who_configure'].invoke end end Rake::Task[:test].enhance ['test:foreman_virt_who_configure'] load 'tasks/jenkins.rake' if Rake::Task.task_defined?(:'jenkins:unit') Rake::Task['jenkins:unit'].enhance ['test:foreman_virt_who_configure', 'foreman_virt_who_configure:rubocop'] end
Version data entries
8 entries across 8 versions & 1 rubygems