Skip to content
Newer
Older
100644 65 lines (58 sloc) 1.72 KB
e172632 @mojombo add tests and unify cli
authored
1 require 'rubygems'
d37db25 @mojombo first commit: extract code from smoke
authored
2 require 'rake'
3
e172632 @mojombo add tests and unify cli
authored
4 begin
5 require 'jeweler'
6 Jeweler::Tasks.new do |gem|
7 gem.name = "ernie"
1da3532 @mojombo add a real summary
authored
8 gem.summary = %Q{Ernie is a BERT-RPC server implementation.}
e172632 @mojombo add tests and unify cli
authored
9 gem.email = "tom@mojombo.com"
10 gem.homepage = "http://github.com/mojombo/ernie"
11 gem.authors = ["Tom Preston-Werner"]
53f1032 @mojombo add erlang build stuff
authored
12 gem.files.include(["ext"])
13 gem.extensions << 'ext/extconf.rb'
14 gem.add_dependency('erlectricity', '>= 1.0.1')
813556f @mojombo require the non-dangerous bertrpc 0.3.4
authored
15 gem.add_dependency('bertrpc', '>= 0.3.4')
d37db25 @mojombo first commit: extract code from smoke
authored
16
e172632 @mojombo add tests and unify cli
authored
17 # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18 end
19 rescue LoadError
20 puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
21 end
22
23 require 'rake/testtask'
24 Rake::TestTask.new(:test) do |test|
25 test.libs << 'lib' << 'test'
26 test.pattern = 'test/**/*_test.rb'
27 test.verbose = true
28 end
29
30 begin
31 require 'rcov/rcovtask'
32 Rcov::RcovTask.new do |test|
33 test.libs << 'test'
34 test.pattern = 'test/**/*_test.rb'
35 test.verbose = true
36 end
37 rescue LoadError
38 task :rcov do
39 abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
40 end
41 end
42
43 task :default => :test
44
45 # require 'rake/rdoctask'
46 # Rake::RDocTask.new do |rdoc|
47 # if File.exist?('VERSION.yml')
48 # config = YAML.load(File.read('VERSION.yml'))
49 # version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
50 # else
51 # version = ""
52 # end
53 #
54 # rdoc.rdoc_dir = 'rdoc'
55 # rdoc.title = "ernie #{version}"
56 # rdoc.rdoc_files.include('README*')
57 # rdoc.rdoc_files.include('lib/**/*.rb')
58 # end
59
60 task :ebuild do
61 ERLC_TEST_FLAGS = ""
62 ERLC_FLAGS = "-o ../ebin"
d37db25 @mojombo first commit: extract code from smoke
authored
63 cd "elib"
64 sh "erlc #{ERLC_FLAGS} #{ERLC_TEST_FLAGS} #{Dir["**/*.erl"].join(" ")}"
65 end
Something went wrong with that request. Please try again.