Sha256: 925cd5277cda1811a6b40ba56350d348bce5cb40f9361d875ef2301c2039864a

Contents?: true

Size: 1.25 KB

Versions: 6

Compression:

Stored size: 1.25 KB

Contents

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

task default: :ci

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]

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

6 entries across 6 versions & 1 rubygems

Version Path
mixlib-install-2.1.0 Rakefile
mixlib-install-2.0.4 Rakefile
mixlib-install-2.0.3 Rakefile
mixlib-install-2.0.2 Rakefile
mixlib-install-2.0.1 Rakefile
mixlib-install-2.0.0 Rakefile