Sha256: 50afd846857ddbd467cf520c89a47b7b36faa4552d4e29339ae243fb6595c74a

Contents?: true

Size: 1.35 KB

Versions: 5

Compression:

Stored size: 1.35 KB

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"

task default: :test

desc "Run specs"
RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.pattern = "spec/**/*_spec.rb"
end

begin
  require "chefstyle"
  require "rubocop/rake_task"
  RuboCop::RakeTask.new(:style) do |task|
    task.options += ["--display-cop-names", "--no-color"]
  end
rescue LoadError
  puts "chefstyle/rubocop is not available.  gem install chefstyle to do style checking."
end

desc "Run all tests"
task test: [:style, :spec]

desc "Run tests for Travis CI"
task ci: [:style, :spec, :functional]

desc "Run functional"
task "functional" do
  system("bundle exec rspec functional")
end

desc "Render product matrix documentation"
task "matrix" do
  require "mixlib/install/product"

  doc_file = File.join(File.dirname(__FILE__), "PRODUCT_MATRIX.md")
  puts "Updating doc file at: #{doc_file}"

  File.open(doc_file, "w+") do |f|
    f.puts("| Product | Product Key  |")
    f.puts("| ------- | ------------ |")
    PRODUCT_MATRIX.products.sort.each do |p_key|
      product = PRODUCT_MATRIX.lookup(p_key)
      f.puts("| #{product.product_name} | #{p_key} |")
    end
    f.puts("")
    f.puts("Do not modify this file manually. It is automatically rendered via a rake task.")
  end
end

task :console do
  require "irb"
  require "irb/completion"
  require "mixlib/install"
  ARGV.clear
  IRB.start
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mixlib-install-2.1.5 Rakefile
mixlib-install-2.1.4 Rakefile
mixlib-install-2.1.3 Rakefile
mixlib-install-2.1.2 Rakefile
mixlib-install-2.1.1 Rakefile