Sha256: 1882ec55e95e57f1ae5a31bc90d9c1ede5dc09d207c2879ac6f23cd52b9f61b4

Contents?: true

Size: 1.21 KB

Versions: 21

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

require 'rake/testtask'

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

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

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

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

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
foreman_webhooks-4.0.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.2.3 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.2.2 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.1.1 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.2.1 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.2.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.1.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.0.5 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-2.0.3 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.0.4 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-2.0.2 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.0.3 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.0.2 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.0.1 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-2.0.1 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-3.0.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-2.0.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-1.1.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-1.0.0 lib/tasks/foreman_webhooks_tasks.rake
foreman_webhooks-0.0.3 lib/tasks/foreman_webhooks_tasks.rake