Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 50 lines (39 sloc) 1.206 kB
fa1d357 @kschiess . removes a few error messages when running rake
authored
1 require 'rdoc/task'
2 require 'sdoc'
3
5ee96a9 @kschiess + update to rspec2.
authored
4 require 'rspec/core/rake_task'
fa1d357 @kschiess . removes a few error messages when running rake
authored
5 require "rubygems/package_task"
5aeef79 @kschiess + Adding gem building back in
authored
6
075f148 @kschiess . distinguish unit tests and acceptance tests
authored
7 desc "Run all tests: Exhaustive."
5ee96a9 @kschiess + update to rspec2.
authored
8 RSpec::Core::RakeTask.new
735983d @kschiess . spec setup
authored
9
075f148 @kschiess . distinguish unit tests and acceptance tests
authored
10 namespace :spec do
11 desc "Only run unit tests: Fast. "
12 RSpec::Core::RakeTask.new(:unit) do |task|
13 task.pattern = "spec/parslet/**/*_spec.rb"
14 end
15 end
16
db8ed6c @kschiess + gem builder tasks (gem this)
authored
17 task :default => :spec
18
19 # Generate documentation
fa1d357 @kschiess . removes a few error messages when running rake
authored
20 RDoc::Task.new do |rdoc|
12ef59a @kschiess + documentation cleanup
authored
21 rdoc.title = "parslet - construction of parsers made easy"
64ddb7a @kschiess - no inline source - deprecated option
authored
22 rdoc.options << '--line-numbers'
bc03948 @kschiess + sdoc
authored
23 rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator
24 rdoc.template = 'direct' # lighter template used on railsapi.com
25 rdoc.main = "README"
26 rdoc.rdoc_files.include("README", "lib/**/*.rb")
27 rdoc.rdoc_dir = "rdoc"
db8ed6c @kschiess + gem builder tasks (gem this)
authored
28 end
29
fdbf272 @floere - clobber_package call in Rakefile
floere authored
30 desc 'Clear out RDoc'
5aeef79 @kschiess + Adding gem building back in
authored
31 task :clean => [:clobber_rdoc, :clobber_package]
32
33 # This task actually builds the gem.
075f148 @kschiess . distinguish unit tests and acceptance tests
authored
34 task :gem => :spec
5aeef79 @kschiess + Adding gem building back in
authored
35 spec = eval(File.read('parslet.gemspec'))
075f148 @kschiess . distinguish unit tests and acceptance tests
authored
36
5aeef79 @kschiess + Adding gem building back in
authored
37 desc "Generate the gem package."
fa1d357 @kschiess . removes a few error messages when running rake
authored
38 Gem::PackageTask.new(spec) do |pkg|
5aeef79 @kschiess + Adding gem building back in
authored
39 pkg.gem_spec = spec
40 end
41
3fc81f7 @kschiess . rake stat
authored
42 desc "Prints LOC stats"
43 task :stat do
44 %w(lib spec example).each do |dir|
45 loc = %x(find #{dir} -name "*.rb" | xargs wc -l | grep 'total').split.first.to_i
46 printf("%20s %d\n", dir, loc)
47 end
48 end
49
Something went wrong with that request. Please try again.