Created
August 22, 2013 11:38
-
-
Save andoneve/6306125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/gem_tasks" | |
task :clean do | |
`rm lib/lani/parser/lexer.rb` | |
end | |
task :regenerate do | |
has_rexical = `gem which rexical` | |
if has_rexical | |
`rex lib/lani/parser/lani.rex -o lib/lani/parser/lexer.rb` | |
else | |
puts "You need Rexical. Install it by doing:" | |
puts | |
puts "\t\tgem install rexical" | |
puts | |
puts "Or just type `bundle install`." | |
end | |
end | |
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new(:test) | |
task :test => :regenerate | |
task :default => :test | |
task :clean do | |
`rm lib/lani/parser/parser.rb` | |
end | |
task :regenerate do | |
has_racc = `gem which racc` | |
if has_racc | |
`rex lib/lani/parser/parser.rb -o lib/lani/parser/parser.rb` | |
else | |
puts "You need Racc. Install it by doing:" | |
puts | |
puts "\t\tgem install racc" | |
puts | |
puts "Or just type `bundle install`." | |
end | |
end | |
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new(:test) | |
task :test => :regenerate | |
task :default => :test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Namespacing: