Find file
Fetching contributors…
Cannot retrieve contributors at this time
80 lines (64 sloc) 2.42 KB
require "rubygems"
require "rake/gempackagetask"
require "rake/rdoctask"
require 'rspec/core/rake_task'
desc "Run all examples"
task :default => :spec
# This builds the actual gem. For details of what all these options
# mean, and other ones you can add, check the documentation here:
spec = do |s|
# Change these as appropriate = "parslet"
s.version = "1.1.0"
s.summary = "Parser construction library with great error reporting in Ruby." = "Kaspar Schiess" = ""
s.homepage = ""
s.has_rdoc = true
s.extra_rdoc_files = %w(README)
s.rdoc_options = %w(--main README)
# Add any extra files to include in the gem
s.files = %w(Gemfile HISTORY.txt LICENSE Rakefile README) + Dir.glob("{spec,lib/**/*}")
s.require_paths = ["lib"]
# If you want to depend on other gems, add them here, along with any
# relevant versions
s.add_dependency("blankslate", "~>")
# If your tests use any gems, include them here
# This task actually builds the gem. We also regenerate a static
# .gemspec file, which is useful if something (i.e. GitHub) will
# be automatically building a gem for this project. If you're not
# using GitHub, edit as appropriate.
# To publish your gem online, install the 'gemcutter' gem; Read more
# about that here: do |pkg|
pkg.gem_spec = spec
desc "Build the gemspec file #{}.gemspec"
task :gemspec do
file = File.dirname(__FILE__) + "/#{}.gemspec", "w") {|f| f << spec.to_ruby }
task :package => :gemspec
require 'sdoc'
# Generate documentation do |rdoc|
rdoc.title = "parslet - construction of parsers made easy"
rdoc.options << '--line-numbers'
rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator
rdoc.template = 'direct' # lighter template used on
rdoc.main = "README"
rdoc.rdoc_files.include("README", "lib/**/*.rb")
rdoc.rdoc_dir = "rdoc"
desc 'Clear out RDoc and generated packages'
task :clean => [:clobber_rdoc, :clobber_package] do
rm "#{}.gemspec"