Sha256: 7c360a03758505eaa86604e2b768b8a2297599ce9d8b0b89484b054e89e4b9f8

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

require 'polytrix'
require 'bundler/gem_tasks'
require 'rake/notes/rake_task'
require 'rspec/core/rake_task'
require 'cucumber'
require 'cucumber/rake/task'
require 'rubocop/rake_task'

task :default => [:spec, :features, :self, :rubocop]

RSpec::Core::RakeTask.new('spec') do |t|
  t.rspec_opts = "-f documentation"
end

Cucumber::Rake::Task.new(:features) do |t|
  t.cucumber_opts = "features --require features/support --require features/step_definitions -t ~@wip"
end

desc 'Remove reports and other generated artifacts'
task :clean do
  FileUtils.rm_rf 'docs'
  FileUtils.rm_rf 'reports'
end

desc 'Self-test and self-document'
task :self do
  sh 'bundle exec polytrix bootstrap'
  Dir.chdir 'samples' do
    # sh 'bundle exec polytrix test'
    sh 'bundle exec polytrix code2doc java --target-dir=docs/samples/code2doc/java'
    sh 'bundle exec polytrix code2doc python --target-dir=docs/samples/code2doc/python'
    sh 'bundle exec polytrix code2doc ruby --target-dir=docs/samples/code2doc/ruby'
    # sh 'bundle exec polytrix code2doc samples/*.rb'
  end
end

Rubocop::RakeTask.new(:rubocop) do |task|
  # abort rake on failure
  task.fail_on_error = true
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polytrix-0.1.2 Rakefile
polytrix-0.1.1 Rakefile
polytrix-0.1.0 Rakefile