Sha256: ca65a57a3de9c3cb3dde869041582987b6275671399e15ad78795edca23adc6a

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

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

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_snapshot_management-1.6.0 lib/tasks/foreman_snapshot_management_tasks.rake
foreman_snapshot_management-1.5.1 lib/tasks/foreman_snapshot_management_tasks.rake
foreman_snapshot_management-1.5.0 lib/tasks/foreman_snapshot_management_tasks.rake
foreman_snapshot_management-1.4.0 lib/tasks/foreman_snapshot_management_tasks.rake