Sha256: e6a246d06f50ad10292eb536f5d8be86e47e94172bafdaecc9b92cae1b7df575

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

require 'gettext/utils'

desc "Create mo files"
task :makemo do
  GetText.create_mofiles(true, "po", "locale")
end

SCHEMA_PATH = File.join(File.dirname(__FILE__), "db")

desc 'Build the MySQL test databases'
task :createdb do
  %x( mysqladmin -u root create activerecord_unittest )
  %x( mysqladmin -u root create activerecord_unittest2 )
  %x( mysql -u root activerecord_unittest < #{File.join(SCHEMA_PATH, 'mysql.sql')} )
end

desc 'Drop the MySQL test databases'
task :dropdb do
  %x( mysqladmin -u root -f drop activerecord_unittest )
  %x( mysqladmin -u root -f drop activerecord_unittest2 )
end

desc 'Rebuild the MySQL test databases'
task :rebuilddb => [:dropdb, :builddb]

require 'gettext/utils'

desc "Update pot/po files for ActiveRecord test."
task :updatepo do
  GetText::ActiveRecordParser.init(
    :adapter  => "mysql",
    :username => "root",
    :encoding => "utf8",
    :activerecord_classes => ["ActiveRecord::Base", "Reply"],
    :socket => "/var/lib/mysql/mysql.sock",
    :database => 'activerecord_unittest'
  )
  GetText.update_pofiles("active_record", 
                         ["fixtures/developer.rb", 
                          "fixtures/topic.rb",
                          "fixtures/reply.rb",
                          "gettext_test_active_record.rb"],
                         "active_record 1.0.0")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gettext-1.8.0-mswin32 test/Rakefile
gettext-1.8.0 test/Rakefile