Sha256: 55bffeaf38e9eacac13a41e3a02a8bcf47abeb27185200b1a6293987aac8638f

Contents?: true

Size: 1.3 KB

Versions: 17

Compression:

Stored size: 1.3 KB

Contents

# Tasks
namespace :foreman_remote_execution do
  namespace :example do
    desc 'Example Task'
    task task: :environment do
      # Task goes here
    end
  end
end

# Tests
namespace :test do
  desc 'Test ForemanRemoteExecution'
  Rake::TestTask.new(:foreman_remote_execution) 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

namespace :foreman_remote_execution do
  task :rubocop do
    begin
      require 'rubocop/rake_task'
      RuboCop::RakeTask.new(:rubocop_foreman_remote_execution) do |task|
        task.patterns = ["#{ForemanRemoteExecution::Engine.root}/app/**/*.rb",
                         "#{ForemanRemoteExecution::Engine.root}/lib/**/*.rb",
                         "#{ForemanRemoteExecution::Engine.root}/test/**/*.rb"]
      end
    rescue
      puts 'Rubocop not loaded.'
    end

    Rake::Task['rubocop_foreman_remote_execution'].invoke
  end
end

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

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
foreman_remote_execution-0.3.1 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.3.0 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.2.3 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.2.2 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.2.1 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.1.2 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.1.1 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.1.0 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.10 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.8 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.7 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.6 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.5 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.4 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.3 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.2 lib/tasks/foreman_remote_execution_tasks.rake
foreman_remote_execution-0.0.1 lib/tasks/foreman_remote_execution_tasks.rake