Sha256: 698b198ce339cba7ed34ca58e474cacd199873d3375d8ee1e29cee56115b7b7a

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 KB

Contents

#!/bin/env ruby

require File.dirname(__FILE__) + '/../config/boot'
require "#{RAILS_ROOT}/config/environment"
require 'rails_generator'
require 'rails_generator/scripts/generate'

# First time plugin, has to be done this way since it can not be loaded in
# a different way
puts "Install the restful authentication plugin"
ARGV = ['install', 'git://github.com/technoweenie/restful-authentication.git']
require 'commands/plugin'
orig_name = $0
$0 = 'generate'

# Generate the admin first - this will also load the monkeypatches to prevent
# duplicate migration ids
puts "Install the adminstration backend"
Rails::Generator::Scripts::Generate.new.run(%w(talia_admin))

puts "Configure restful authentication"
Rails::Generator::Scripts::Generate.new.run(%w(authenticated user sessions))

puts "Install and configure role-requirements"
Commands::Plugin.parse!(['install', 'git://github.com/timcharper/role_requirement.git'])
Rails::Generator::Scripts::Generate.new.run(%w(roles Role User))

if(Rails::VERSION::MAJOR > 2 ||(Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR > 2))
  # TODO: Needed only as long as ActiveScaffold depends on it
  puts "Install the render_component plugin for ActiveScaffold (optional since Rails 2.2)"
  Commands::Plugin.parse!(['install', 'git://github.com/lackac/render_component.git', '-r', 'rails-edge'])
end

puts "Install the auto completion plugin"
Commands::Plugin.parse!(['install', 'auto_complete'])

puts "Migrating the database"
system("rake db:migrate")

migration_path = File.join(RAILS_ROOT, 'db', 'migrate')
ActiveRecord::Migrator.migrate(migration_path)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
talia_core-0.4.14 generators/talia_base/templates/script/setup_talia_backend