public
Description: URITemplate is a parser for URI Templates as defined in the URI Template specification (http://bitworking.org/projects/URI-Templates).
Homepage: http://uri-templates.rubyforge.org/
Clone URL: git://github.com/juretta/uri-templates.git
Stefan Saasen (author)
Mon Mar 17 20:38:56 -0700 2008
commit  46f6d017e6fc57ae42a763a5b21639c5078ad7c4
tree    e8681391c5d2e6dc7321a6fbc8e5d2109c1544f0
parent  cb8edfbabcf788869a44d566991d3a9df8633599
uri-templates / Rakefile
100644 48 lines (40 sloc) 1.386 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -*- ruby -*-
 
require 'rubygems'
require 'hoe'
require 'rcov/rcovtask'
require 'rake/clean'
require File.join(File.dirname(__FILE__), 'lib', 'uri', 'version')
 
class Hoe
  def extra_deps
    @extra_deps.reject { |x| Array(x).first == 'hoe' }
  end
end
 
# clean files and directories
CLEAN.include ['**/.*.sw?', '*.gem', '.config', 'coverage']
 
Hoe.new('uri-templates', UriTemplate::VERSION::STRING) do |p|
  p.rubyforge_name = 'uri-templates'
  p.author = 'Stefan Saasen'
  p.email = 's@juretta.com'
  p.need_tar = false
  p.clean_globs = CLEAN
  p.rsync_args << " -z"
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
  p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
  #p.spec_extras = {:dependencies => []} # - A hash of extra values to set in the gemspec.
  p.remote_rdoc_dir = ''
  p.extra_deps = [['treetop', '>=1.2.3']]
end
 
desc "Create the UriTemplate parser from the Treetop grammar"
task :generate_parser do
  sh 'tt grammar/uri_template.treetop -o lib/uri_template/grammar.rb'
end
 
desc 'Measures test coverage'
Rcov::RcovTask.new("coverage") do |t|
  t.test_files = FileList['test/test_*.rb']
  t.verbose = false
  t.rcov_opts << "--test-unit-only"
  t.ruby_opts << "-Ilib:ext/rcovrt" # in order to use this rcov
  t.output_dir = "coverage"
end
 
# vim: syntax=Ruby