Sha256: 76c6b00f2bf410816c2cfde5f0c5c14de906d8a8d9b034615ba8ec15d54d3973

Contents?: true

Size: 1.21 KB

Versions: 9

Compression:

Stored size: 1.21 KB

Contents

require 'rake/testtask'

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

# Tests
namespace :test do
  desc 'Test ForemanSccManager'
  Rake::TestTask.new(:foreman_scc_manager) 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_scc_manager do
  task :rubocop do
    begin
      require 'rubocop/rake_task'
      RuboCop::RakeTask.new(:rubocop_foreman_scc_manager) do |task|
        task.patterns = ["#{ForemanSccManager::Engine.root}/app/**/*.rb",
                         "#{ForemanSccManager::Engine.root}/lib/**/*.rb",
                         "#{ForemanSccManager::Engine.root}/test/**/*.rb"]
      end
    rescue
      puts 'Rubocop not loaded.'
    end

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

Rake::Task[:test].enhance ['test:foreman_scc_manager']

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman_scc_manager-1.3.1 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.3.0 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.2.0 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.1.3 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.1.2 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.1.1 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.1.0 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.0.1 lib/tasks/foreman_scc_manager_tasks.rake
foreman_scc_manager-1.0.0 lib/tasks/foreman_scc_manager_tasks.rake