root/Rakefile @ 8e62af8d
d4b5798a | Marc Dequènes (Duck) | # to allow in-place run
|
|
$: << File.join(File.dirname(__FILE__), ".", "lib")
|
|||
7cae0102 | Marc Dequènes (Duck) | ||
ENV['LC_ALL'] = "C"
|
|||
require 'rake'
|
|||
28c8cbc3 | Marc Dequènes (Duck) | require 'gettext/tools/task'
|
|
9cceb81a | Marc Dequènes (Duck) | require 'cyborghood/base/config_setup'
|
|
require 'cyborghood/base/info'
|
|||
7cae0102 | Marc Dequènes (Duck) | ||
28c8cbc3 | Marc Dequènes (Duck) | main_domain = "cyborghood"
|
|
components = ["postman"]
|
|||
po_dir = "po"
|
|||
mo_dir = CyborgHood::Config::L10N_DIR
|
|||
msgmerge_options = ['--sort-by-msgid']
|
|||
xgettext_options = ['--sort-by-msgid']
|
|||
GetText::Tools::Task.define do |task|
|
|||
task.package_name = CyborgHood::PRODUCT
|
|||
task.package_version = CyborgHood::VERSION
|
|||
task.domain = main_domain
|
|||
task.po_base_directory = po_dir
|
|||
task.mo_base_directory = mo_dir
|
|||
task.files = Dir.glob("lib/**/*.{rb,rhtml}")
|
|||
task.msgmerge_options = msgmerge_options
|
|||
task.xgettext_options = xgettext_options
|
|||
end
|
|||
7cae0102 | Marc Dequènes (Duck) | ||
28c8cbc3 | Marc Dequènes (Duck) | components.each do |c|
|
|
GetText::Tools::Task.define do |task|
|
|||
task.package_name = CyborgHood::PRODUCT
|
|||
task.package_version = CyborgHood::VERSION
|
|||
task.domain = main_domain + "_" + c
|
|||
task.po_base_directory = po_dir
|
|||
task.mo_base_directory = mo_dir
|
|||
task.files = [ File.join(CyborgHood::Config::BIN_DIR, c) ]
|
|||
task.msgmerge_options = msgmerge_options
|
|||
task.xgettext_options = xgettext_options
|
|||
7cae0102 | Marc Dequènes (Duck) | end
|
|
end
|
|||
ef68cb26 | Marc Dequènes (Duck) | ||
namespace :test do
|
|||
require 'rake/testtask'
|
|||
Rake::TestTask.new(:spec) do |t|
|
|||
t.libs.push "spec"
|
|||
t.test_files = FileList['spec/**/*.rb']
|
|||
t.verbose = true
|
|||
end
|
|||
end
|