Sha256: 086cb856e4a0e72ae2d394fe78c7b06d1be51c35bc56b9c1d8149df0098d20d6
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
$LOAD_PATH.unshift "../lib" require 'rubygems' locale_path = File.join(ENV["LOCALE_PATH"] || "../../locale/", "lib") gettext_path = File.join(ENV["GETTEXT_PATH"] || "../../gettext/", "lib") $LOAD_PATH.unshift locale_path $LOAD_PATH.unshift gettext_path task :default => :test desc "Create mo files" task :makemo do require 'activerecord' require 'gettext_activerecord/tools' GetText.create_mofiles(:mo_root => "locale") end SCHEMA_PATH = File.join(File.dirname(__FILE__), "db") desc "Update pot/po files for ActiveRecord test." task :updatepo do require 'activerecord' require 'db/sqlite' require 'db/migrate' require 'gettext_activerecord/tools' GetText::ActiveRecordParser.init( :adapter => "sqlite3", :encoding => "utf8", :activerecord_classes => ["ActiveRecord::Base", "Reply"], :database => ':memory:' ) GetText.update_pofiles("active_record", [ "models/developer.rb", "models/topic.rb", "models/reply.rb", "test_validations.rb" ], "active_record 1.0.0") end desc 'Run all tests' task :test do Dir.glob("test_*.rb").each do |path| ruby "-I../lib:../../locale/lib", "-I#{gettext_path}", "-rubygems", path rescue nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gettext_activerecord-2.1.0 | test/Rakefile |
gettext_activerecord-2.0.4 | test/Rakefile |