Skip to content
Newer
Older
100644 43 lines (30 sloc) 1.18 KB
1b9a4fb @l4rk boilerplate
l4rk authored Sep 16, 2008
1 # Add your own tasks in files placed in lib/tasks ending in .rake,
2 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
4 require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5
6 require 'rake'
7 require 'rake/testtask'
8 require 'rake/rdoctask'
9
10 require 'tasks/rails'
11
12 def timestamp(label)
13 puts "*** #{label} @ #{DateTime.now.to_formatted_s :db} ***"
14 end
15
16 task :show_success do
17 timestamp "SUCCESSFUL BUILD"
18 end
19
20 task :show_start => :environment do
21 timestamp "BUILD"
4dcda7f new rake setup now configures sample settings.yml for you, thanks rsa…
GIT_AUTHOR_NAME authored Oct 8, 2008
22 end
23
24 desc "Copy application sample config for dev/test purposes"
25 task :copy_sample_config do
26 raise("Never copy the example config in production!") if Rails.env.production?
27
28 settings_file = File.join(Rails.root, *%w(config settings.yml))
29 settings_file_example = File.join(Rails.root, *%w(config settings.example.yml))
30
31 unless File.exist?(settings_file)
32 puts "Setting up config/setting.yml from config/settings.example.yml..."
33 FileUtils.cp(settings_file_example, settings_file)
34 end
35 end
36
37 task :environment => :copy_sample_config
38
39 Rake::Task[:default].clear() # clear out the default Rails test::unit tasks...
40
41 desc "Default task is to run the specs"
42 task :default => :spec
Something went wrong with that request. Please try again.