Sha256: 1d10509c243eeec4cc1134342115c9400fe84d0e643afcb8da00a813cf6bd7b5

Contents?: true

Size: 1.51 KB

Versions: 2

Compression:

Stored size: 1.51 KB

Contents

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

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

# task :default => :spec

task :default => [:make, :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/front/unicode.rb' => 'lib/pre-unicode.rb' do
  puts "making regextest/front/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 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/unicode.rb',
         'lib/regextest/front/case-folding.rb',
         'doc/index.html',
        ] do 
  puts "Rake it!"
end

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


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
regextest-0.1.3 Rakefile
regextest-0.1.2 Rakefile