Sha256: 4061013e1e2d24daa69b31b6d7cb8525f5e8f0b2b325e044ec4a127ae0b12a66

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

# Load extensions
Aura::Extension.active.each { |ext| ext.load! }

seed_file = Main.approot('config/seed.yml')

# If the file config/seed.yml is present, use that to initialize the DB.
# Only if the DB is pristine, though!
if File.exists?(seed_file) and Main.database.tables.empty?
  puts "Note: Restoring sample data from config/seed.yml."
  Aura.db_restore YAML::load_file(seed_file)

# ..otherwise, setup the database: do migrations and put in fresh data.
else
  Aura.run_migrations!
  Main.seed
end

Aura::Extension.active.each { |ext| ext.init }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aura-0.0.1.pre10 app/init/extensions.rb