public
Description: The kick ass (non-commercial) home for musicians and their music
Homepage: http://alonetone.com
Clone URL: git://github.com/sudara/alonetone.git
commit  151d821739813ba0871f5889a69afe0011f2ee85
tree    06c69720146ab7b33923e59682064227280d3942
parent  b7f8cf81e2a96c5f6c90379045e13e3b486ebdc5
alonetone / Rakefile
100644 29 lines (22 sloc) 1.009 kb
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
26
27
28
29
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
 
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
 
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
require 'tasks/rails'
 
# Borrow & modified from spot-us project
desc "Copy application sample config for dev/test purposes"
task :copy_sample_config do
  if Rails.env == 'development' or Rails.env == 'test'
    
    %w[alonetone amazon_s3 database defensio facebooker newrelic].each do |settings|
      settings_file = File.join(Rails.root, *%W(config #{settings}.yml))
      settings_file_example = File.join(Rails.root, *%W(config #{settings}.example.yml))
 
      unless File.exist?(settings_file)
        puts "Setting up config/#{settings}.yml from config/#{settings}.example.yml..."
        FileUtils.cp(settings_file_example, settings_file)
      end
    end
  end
end
 
task :environment => :copy_sample_config