Sha256: 2edb2c1a91dd0a1d953fd3ad7708458133c1548b77306bafe45061a520123366

Contents?: true

Size: 961 Bytes

Versions: 8

Compression:

Stored size: 961 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
  end
end

Rake::Task[:test].enhance do
  Rake::Task['test:foreman_salt'].invoke
end

load 'tasks/jenkins.rake'
if Rake::Task.task_defined?(:'jenkins:unit')
  Rake::Task['jenkins:unit'].enhance do
    Rake::Task['test:foreman_salt'].invoke
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_salt-5.0.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-5.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-4.0.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-4.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-3.0.2 lib/tasks/foreman_salt_tasks.rake
foreman_salt-3.0.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-3.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-2.1.0 lib/tasks/foreman_salt_tasks.rake