git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Tree: 64fa2022dbd2f5130703415fe6884608535386a0

Files: 64fa2022dbd2f5130703415fe6884608535386a0 / Rakefile

2167 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 = "2.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 = "OpenBSD's bcrypt() password hashing algorithm."
49 s.description = <<-EOF
50 bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project
51 for hashing passwords. bcrypt-ruby provides a simple, humane wrapper for safely handling
52 passwords.
53 EOF
54
55 s.files = PKG_FILES.to_a
56 s.require_path = 'lib'
57
58 s.has_rdoc = true
59 s.rdoc_options = rd.options
60 s.extra_rdoc_files = rd.rdoc_files.to_a
61
62 s.extensions = FileList["ext/extconf.rb"].to_a
63
64 s.autorequire = 'bcrypt'
65 s.author = ["Coda Hale"]
66 s.email = "coda.hale@gmail.com"
67 s.homepage = "http://bcrypt-ruby.rubyforge.org"
68 s.rubyforge_project = "bcrypt-ruby"
69end
70
71Rake::GemPackageTask.new(spec) do |pkg|
72 pkg.need_zip = true
73 pkg.need_tar = true
74end
75
76task :compile do
77 Dir.chdir('./ext')
78 system "ruby extconf.rb"
79 system "make"
80end

Built with git-ssb-web