Sha256: f2415fa5979b33f0ac6cfbf5e75fc877bd6420b1f241e5eee00172033c6a8fd4

Contents?: true

Size: 588 Bytes

Versions: 2

Compression:

Stored size: 588 Bytes

Contents

if Dir.pwd == File.expand_path("../../..", __FILE__)
  require "yaml"
  config = YAML.load_file(File.expand_path("../../../config/database.yml", __FILE__))["test"]
  host, port, user, password, database = config.values_at "host", "port", "username", "password", "database"
  `#{
    [
      "mysqldump",
     ("-h #{host}" unless host.blank?), ("-P #{port}" unless port.blank?),
      "-u #{user}", ("-p#{password}" unless password.blank?),
      "--compact --no-create-db --add-drop-table --skip-lock-tables",
      "#{database} > ./db/cached_record.sql"
    ].compact.join(" ")
  }`
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cached_record-0.1.1 test/test_helper/db.rb
cached_record-0.1.0 test/test_helper/db.rb