Sha256: b43441b2560fb7230803d1191edc6f97a9b34f0a2c115eb4cf66fa982cf3c0b1

Contents?: true

Size: 1.45 KB

Versions: 156

Compression:

Stored size: 1.45 KB

Contents

# RSpec tasks
begin
  require 'rspec/core/rake_task'

  # Create the 'spec' task
  RSpec::Core::RakeTask.new(:spec) do |task|
    task.rspec_opts = '--color'
  end

  namespace :spec do
    desc "Run the test suite and generate coverage metrics"
    task :coverage => [ :simplecov, :spec ]

    # Add test coverage to the 'spec' task.
    task :simplecov do
      ENV['COVERAGE'] = '1'
    end
  end

  task :default => :spec
rescue LoadError
  warn "[Warning]: Could not load `rspec`."
end

# YARD tasks
begin
  require 'yard'
  require 'yard/rake/yardoc_task'

  YARD::Rake::YardocTask.new(:doc) do |yardoc|
    yardoc.files = [ 'lib/**/*.rb', '-', '**/*.md' ]
  end
rescue LoadError
  warn "[Warning]: Could not load `yard`."
end

# Cane tasks
begin
  require 'cane/rake_task'

  Cane::RakeTask.new(:cane) do |cane|
    cane.add_threshold 'coverage/.last_run.json', :>=, 100
    cane.abc_max = 15
  end

  Rake::Task['cane'].prerequisites << Rake::Task['spec:coverage']
  Rake::Task[:default].clear_prerequisites
  task :default => :cane
rescue LoadError
  warn "[Warning]: Could not load `cane`."
end

# Gem tasks
begin
  require 'rubygems/tasks'

  task :gem => 'gem:build'
  task :validate => [ 'cane', 'doc', 'gem:validate' ]

  namespace :gem do
    Gem::Tasks.new(
      :tag => { :format => 'v%s' },
      :sign => { :checksum => true, :pgp => true },
      :build => { :tar => true }
    )
  end
rescue LoadError
  warn "[Warning]: Could not load `rubygems/tasks`."
end

Version data entries

156 entries across 156 versions & 3 rubygems

Version Path
puppet-retrospec-1.5.0 vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile
puppet-retrospec-1.3.1 vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile
puppet-retrospec-1.3.0 vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile
puppet-4.8.2 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.2-x86-mingw32 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.2-x64-mingw32 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.2-universal-darwin lib/puppet/vendor/semantic/Rakefile
puppet-4.7.1 lib/puppet/vendor/semantic/Rakefile
puppet-4.7.1-x86-mingw32 lib/puppet/vendor/semantic/Rakefile
puppet-4.7.1-x64-mingw32 lib/puppet/vendor/semantic/Rakefile
puppet-4.7.1-universal-darwin lib/puppet/vendor/semantic/Rakefile
puppet-4.8.1 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.1-x86-mingw32 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.1-x64-mingw32 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.1-universal-darwin lib/puppet/vendor/semantic/Rakefile
puppet-4.8.0 lib/puppet/vendor/semantic/Rakefile
puppet-4.8.0-x86-mingw32 lib/puppet/vendor/semantic/Rakefile