Sha256: 6e6c79796e0adb2e434c22be45b11a4c947716c469ac8c1fcb6e37762a5b7ee3

Contents?: true

Size: 1.93 KB

Versions: 1

Compression:

Stored size: 1.93 KB

Contents

$:.unshift "./lib"

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'

require 'locale/version'

desc "Default Task"
task :default => [ :test ]

PKG_VERSION = Locale::VERSION

# Run the unit tests
task :test do 
  Dir.glob("test/test_*.rb").each do |v|
    ruby "-Ilib #{v}"
  end
end

Rake::RDocTask.new { |rdoc|
  begin
    allison = `allison --path`.chop
  rescue Exception
    allison = ""
  end
  rdoc.rdoc_dir = 'doc'
  rdoc.title    = "Ruby-Locale library"
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README', 'ChangeLog')
  rdoc.rdoc_files.include('lib/**/*.rb')
  rdoc.template = allison if allison.size > 0
}

desc "Create gem and tar.gz"
spec = Gem::Specification.new do |s|
  s.name = 'locale'
  s.version = PKG_VERSION
  s.summary = 'Ruby-Locale is the pure ruby library which provides basic APIs for localization.'
  s.author = 'Masao Mutoh'
  s.email = 'mutoh@highway.ne.jp'
  s.homepage = 'http://locale.rubyforge.org/'
  s.rubyforge_project = "locale"
  s.files = FileList['**/*'].to_a.select{|v| v !~ /pkg|CVS/}
  s.require_path = 'lib'
  s.bindir = 'bin'
  s.has_rdoc = true
  s.description = <<-EOF
    Ruby-Locale is the pure ruby library which provides basic APIs for localization.
  EOF
end

Rake::PackageTask.new("ruby-locale", PKG_VERSION) do |o|
  o.package_files = FileList['**/*'].to_a.select{|v| v !~ /pkg|CVS/}
  o.need_tar_gz = true
  o.need_zip = false
end

Rake::GemPackageTask.new(spec) do |p|
  p.gem_spec = spec
  p.need_tar_gz = false
  p.need_zip = false
end

desc "Publish the release files to RubyForge."
task :release => [ :package ] do
  require 'rubyforge'

  rubyforge = RubyForge.new
  rubyforge.login
  rubyforge.add_release("locale", "locale",
                        "Ruby-Locale #{PKG_VERSION}",
                        "pkg/locale-#{PKG_VERSION}.gem",
                        "pkg/ruby-locale-#{PKG_VERSION}.tar.gz")
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locale-0.9.0 Rakefile