File: Rakefile

package info (click to toggle)
schleuder 5.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,352 kB
  • sloc: ruby: 12,100; sh: 230; makefile: 10
file content (25 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'active_record'
load "active_record/railties/databases.rake"

if Dir.exist?('/etc/schleuder')
require 'schleuder'
else
require_relative '../lib/schleuder.rb'
end

# Configure ActiveRecord
ActiveRecord::Tasks::DatabaseTasks.tap do |config|
  config.root = File.dirname(__FILE__)
  config.db_dir = 'db'
  config.migrations_paths = ['db/migrate']
  config.env = ENV['SCHLEUDER_ENV']
  config.database_configuration = Schleuder::Conf.databases
end

# ActiveRecord requires this task to be present
Rake::Task.define_task("db:environment")

namespace :db do
  # A shortcut.
  task init: ['db:create', 'db:schema:load']
end