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

Version Path
foreman_salt-14.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.2.4 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.2.3 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.2.2 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.2.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.2.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.1.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-13.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-12.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-11.0.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-11.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-10.3.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-10.3.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-10.2.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-10.1.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-8.0.4 lib/tasks/foreman_salt_tasks.rake
foreman_salt-9.0.1 lib/tasks/foreman_salt_tasks.rake
foreman_salt-10.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-9.0.0 lib/tasks/foreman_salt_tasks.rake
foreman_salt-8.0.3 lib/tasks/foreman_salt_tasks.rake