Sha256: 38ffa963bb0b89f6bf3a9f34d91f45514bcc9799aafbd6feb46311de1d9b0e77

Contents?: true

Size: 1.97 KB

Versions: 1

Compression:

Stored size: 1.97 KB

Contents

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

RSpec::Core::RakeTask.new(:spec)

# task :default => :spec

task :default => [:make, :doc, :spec]

# Generating parser
file 'lib/regextest/front/parser.rb' => 'lib/regextest/front/parser.y' do
  puts 'making regextest/front/parser.rb'
  sh 'racc lib/regextest/front/parser.y -o lib/regextest/front/parser.rb'
end

# Generating bracket parser
file 'lib/regextest/front/bracket-parser.rb' => 'lib/regextest/front/bracket-parser.y' do
  puts 'making regextest/front/bracket-parser.rb'
  sh 'racc lib/regextest/front/bracket-parser.y -o lib/regextest/front/bracket-parser.rb'
end

# Generating Unicode parser
file 'lib/regextest/unicode.rb' => 'lib/pre/unicode.rb' do
  puts "making regextest/unicode.rb"
  sh 'ruby  lib/pre/unicode.rb'
end

# Generating case-folding mapping
file 'lib/regextest/front/case-folding.rb' => 'lib/pre/case-folding.rb' do
  puts "making regextest/front/case-folding.rb"
  sh 'ruby  lib/pre/case-folding.rb'
end

# Generating regression test suite
file 'spec/regression_spec.rb' => 'lib/pre/generate-spec.rb' do
  puts "making spec/regression_spec.rb"
  sh 'ruby  lib/pre/generate-spec.rb'
end

# Generating documents
file 'doc/index.html' => ['lib/regextest.rb', 'lib/regextest/regexp.rb', 'README.md'] do
  puts "making document for Regextest"
  sh 'yardoc lib/regextest.rb lib/regextest/regexp.rb'
end

task :make =>
        ['lib/regextest/front/parser.rb',
         'lib/regextest/front/bracket-parser.rb',
         'lib/regextest/front/case-folding.rb',
         'lib/regextest/unicode.rb',
         'spec/regression_spec.rb',
         'doc/index.html',
        ] do 
  puts "Rake it!"
end

task :test => :make do 
  puts "Test it!"
  sh 'ruby test.rb'
end

# Generating documents
file 'doc/index.html' => [ 'lib/regextest/regexp.rb', 'README.md' ] do
  puts "making document for regextest"
  sh 'yardoc lib/regextest/regexp.rb'
end

task :doc =>
        [
          'doc/index.html',
        ] do 
  puts "Generate documents"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
regextest-0.1.8 Rakefile