Sha256: 2175dc1ca5129fd24c4b9d105c00f1d62d59e9dec09b6c088d35eae4e5c9d27b

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

require 'turntables/turntable'

require 'wlog/db_registry'
require 'wlog/commands/commandable'
require 'wlog/domain/static_configurations'

module Wlog
# Command to create the initial database
# @author Simon Symeonidis
class InnitDb < Commandable
  include StaticConfigurations
  def execute
    current_dir = "#{File.expand_path File.dirname(__FILE__)}/../sql"
    turntable   = Turntables::Turntable.new
    turntable.register(current_dir)
    turntable.make_at!("#{DataDirectory}#{ARGV[0] || DefaultDb}")
  end
end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wlog-1.1.1 lib/wlog/commands/innit_db.rb
wlog-1.0.5 lib/wlog/commands/innit_db.rb