Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
cores committed Aug 2, 2010
1 parent 0048117 commit 615ea02
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ application: http://github.com/cores/mukift.
$ git clone http://github.com/cores/mukif.git
$ cd mukif
$ bundle install
$ padrino rake app_custom_files:generate
$ rake app_custom_files:generate
+ set your database settings in 'config/database.rb'
$ padrino rake ar:create
$ padrino rake ar:migrate
Expand Down
40 changes: 39 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,43 @@ require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require(File.join(File.dirname(__FILE__), 'config', 'boot'))
config_path = File.join(File.dirname(__FILE__), 'config')

if File.exist?(File.join(config_path, 'mukif.yml'))
require File.join(config_path, 'boot')
end

# app custom files task

# run
# $ rake app_custom_files:generate

namespace :app_custom_files do

desc "Create a copy of all the app custom files without the '.example' extension."
task :generate do
config_files = ['mukif.yml', 'bg_tasks.yml', 'database.rb', 'schedule.rb', 'auth_keys.rb']
seeds_files = ['app_data.rb', 'dummy_data.rb']
deploy_files = ['backup.rb', 'deploy.rb', 'prepare.rb']

root_path = File.dirname(__FILE__)

config_path = File.join(root_path, 'config')
config_files.each do |f|
file = File.join(config_path, f)
FileUtils.copy_file("#{file}.example", file) unless File.exist?(file)
end

seeds_path = File.join(root_path, 'db', 'seeds')
seeds_files.each do |f|
file = File.join(seeds_path, f)
FileUtils.copy_file("#{file}.example", file) unless File.exist?(file)
end

deploy_path = File.join(root_path, 'deploy')
deploy_files.each do |f|
file = File.join(deploy_path, f)
FileUtils.copy_file("#{file}.example", file) unless File.exist?(file)
end
end
end
33 changes: 0 additions & 33 deletions lib/tasks/app_custom_files.rake

This file was deleted.

0 comments on commit 615ea02

Please sign in to comment.