Rakefile in rabbit-2.1.1 vs Rakefile in rabbit-2.1.2
- old
+ new
@@ -1,8 +1,8 @@
# -*- ruby -*-
#
-# Copyright (C) 2008-2012 Kouhei Sutou <kou@cozmixng.org>
+# Copyright (C) 2008-2014 Kouhei Sutou <kou@cozmixng.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
@@ -18,12 +18,14 @@
require "find"
require "rubygems"
require "rubygems/package_task"
require "bundler/gem_helper"
-require "gettext/task"
+require "gettext/tools/task"
+task :default => :test
+
base_dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(base_dir, 'lib'))
rsync_local_path = "~/public_html/"
rsync_base_path = "rabbit@rabbit-shocker.org:#{rsync_local_path}"
@@ -51,13 +53,14 @@
def spec.extra_rdoc_files
@extra_rdoc_files = force_array(super)
end
-GetText::Task.new(spec) do |task|
+GetText::Tools::Task.define do |task|
+ task.spec = spec
task.files -= Dir.glob("sample/**/*.*")
- task.mo_base_directory = "data"
+ task.mo_base_directory = "data/locale"
end
Gem::PackageTask.new(spec) do |package|
package.need_tar_gz = true
end
@@ -150,11 +153,11 @@
desc "generate HTML and needed files."
task :generate => screenshots do
Dir.chdir("doc") do
rm_rf("_site")
- sh("ruby", "-S", "jekyll", "build")
+ ruby("-S", "jekyll", "build")
end
end
namespace :publish do
dependencies = ["html:generate"]
@@ -221,6 +224,11 @@
desc "Restart GitHub POST receiver"
task :restart do
touch("misc/github-post-receiver/tmp/restart.txt")
end
end
+end
+
+desc "Run test"
+task :test do
+ ruby("test/run-test.rb")
end