Sha256: 47597e1ac546b1c5db62506a9768537da381ad4a71c9e58b6a4f89e530fb0b1e

Contents?: true

Size: 978 Bytes

Versions: 1

Compression:

Stored size: 978 Bytes

Contents

# coding: utf-8
logfile = File.open(File.expand_path('../log/database.log',__FILE__), 'a')    
logfile.sync = true
require 'active_record/fixtures'
ActiveRecord::Base.logger = Logger.new(logfile)
migrator = ActiveRecord::Migrator.new(:up,File.expand_path('../db/migrate',__FILE__),nil)

if ! migrator.pending_migrations.blank? || ENV['REMIGRATE']
  ActiveRecord::Base.connection.execute("DROP DATABASE gettext_column_mapping")
  ActiveRecord::Base.connection.execute("CREATE DATABASE gettext_column_mapping")
  ActiveRecord::Base.establish_connection(:test)

  class ActiveRecord::Migration
    def self.load_data(filename, dir = File.expand_path('../db/fixtures',__FILE__))
      Fixtures.create_fixtures(dir, filename)
    end
  end

  # Migrate up
  puts "Migrate up"
  ActiveRecord::Migrator.migrate(File.expand_path('../db/migrate',__FILE__),nil)
end
$gettext_column_mapping_root = File.dirname(__FILE__)
FileUtils.mkdir_p(File.join($gettext_column_mapping_root,'locale'))

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feature-rich-0.2.0 spec/helper.rb