Sha256: 87cf663e4daf0f138347bc8a07e5a5af5ce3dbb4ff1d8542d5fcb68198d9217f

Contents?: true

Size: 1.03 KB

Versions: 133

Compression:

Stored size: 1.03 KB

Contents

require 'rake/testtask'

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

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

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

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

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
foreman_rh_cloud-10.0.3 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-11.0.3 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.59 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-11.0.2 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-11.0.1 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-11.0.0 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.58 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-10.0.2 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.57 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-10.0.1 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.56 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.55 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.54 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.53 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.52 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-8.0.52 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-9.0.51 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-8.0.51 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-7.0.48 lib/tasks/foreman_rh_cloud_tasks.rake
foreman_rh_cloud-7.0.47 lib/tasks/foreman_rh_cloud_tasks.rake