yob / abn

Small library for validating Australian Business Numbers

This URL has Read+Write access

abn / Rakefile
100644 63 lines (54 sloc) 1.805 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require 'rake'
require 'rubygems'
require 'spec/rake/spectask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
 
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'
 
require 'spec'
require 'abn'
 
desc "Default: run specs"
task :default => :spec
 
desc "Run all the specs for the ABN library."
Spec::Rake::SpecTask.new do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.spec_opts = ['--colour']
  t.rcov = true
  t.rcov_opts = ["--exclude \"spec/*,gems/*\""]
end
 
desc "Generate documentation for the ABN library."
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = 'ABN'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README.rdoc')
  rdoc.rdoc_files.include('MIT-LICENSE')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
 
PKG_NAME = "abn"
PKG_VERSION = ABN::Version::String
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RUBY_FORGE_PROJECT = "yob-projects"
 
spec = Gem::Specification.new do |s|
  s.name = PKG_NAME
  s.version = PKG_VERSION
  s.summary = "a (very) small library for working with Australian Business Numbers."
  s.description = "a (very) small library for working with Australian Business Numbers."
  s.author = "James Healy"
  s.email = "jimmy@deefa.com"
  s.homepage = "http://github.com/yob/abn/tree/master"
  s.has_rdoc = true
  s.rdoc_options << "--title" << "ABN" <<
                        "--line-numbers"
  s.rubyforge_project = RUBY_FORGE_PROJECT
  s.test_files = FileList["spec/**/*_spec.rb"]
  s.files = FileList[
    "lib/**/*.rb",
    "MIT-LICENSE",
    "README.rdoc"
  ]
end
 
Rake::GemPackageTask.new(spec) do |p|
  p.gem_spec = spec
  p.need_tar = false
  p.need_zip = false
end