git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Tree: 03c07302c3f65146490bf60e9a39bd16fe1dcf67

Files: 03c07302c3f65146490bf60e9a39bd16fe1dcf67 / Rakefile

1938 bytesRaw
1gem "rspec"
2require "spec/rake/spectask"
3require 'rake/gempackagetask'
4require 'rake/contrib/rubyforgepublisher'
5require 'rake/clean'
6require 'rake/rdoctask'
7
8PKG_NAME = "bcrypt-ruby"
9PKG_VERSION = "1.0.0"
10PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
11PKG_FILES = FileList[
12 '[A-Z]*',
13 'lib/**/*.rb',
14 'spec/**/*.rb',
15 'ext/*.c',
16 'ext/*.h',
17 'ext/*.rb'
18]
19
20task :default => [:spec]
21
22desc "Run all specs"
23Spec::Rake::SpecTask.new do |t|
24 t.spec_files = FileList['spec/**/*_spec.rb']
25 t.spec_opts = ['--color','--backtrace','--diff']
26 t.rcov = true
27 t.rcov_dir = 'doc/output/coverage'
28 t.rcov_opts = ['--exclude', 'spec\/spec,spec\/.*_spec.rb']
29end
30
31desc "Run all specs and store html output in doc/output/report.html"
32Spec::Rake::SpecTask.new('spec_html') do |t|
33 t.spec_files = FileList['spec/**/*_spec.rb']
34 t.spec_opts = ['--diff','--format html','--backtrace','--out doc/output/report.html']
35end
36
37desc 'Generate RDoc'
38rd = Rake::RDocTask.new do |rdoc|
39 rdoc.rdoc_dir = 'doc/output/rdoc'
40 rdoc.options << '--title' << 'bcrypt-ruby' << '--line-numbers' << '--inline-source' << '--main' << 'README'
41 rdoc.template = ENV['TEMPLATE'] if ENV['TEMPLATE']
42 rdoc.rdoc_files.include('README', 'COPYING', 'lib/**/*.rb')
43end
44
45spec = Gem::Specification.new do |s|
46 s.name = PKG_NAME
47 s.version = PKG_VERSION
48 s.summary = "Blah."
49 s.description = <<-EOF
50 Woot.
51 EOF
52
53 s.files = PKG_FILES.to_a
54 s.require_path = 'lib'
55
56 s.has_rdoc = true
57 s.rdoc_options = rd.options
58 s.extra_rdoc_files = rd.rdoc_files.to_a
59
60 s.extensions = FileList["ext/extconf.rb"].to_a
61
62 s.autorequire = 'bcrypt'
63 s.author = ["Coda Hale"]
64 s.email = "coda.hale@gmail.com"
65 s.homepage = "http://bcrypt-ruby.rubyforge.org"
66 s.rubyforge_project = "bcrypt-ruby"
67end
68
69Rake::GemPackageTask.new(spec) do |pkg|
70 pkg.need_zip = true
71 pkg.need_tar = true
72end
73
74task :compile do
75 Dir.chdir('./ext')
76 system "ruby extconf.rb"
77 system "make"
78end

Built with git-ssb-web