Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (22 sloc) 1.009 kB
39fcde3 @sudara first commit
authored
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'
52d1214 @tiendung Copy application sample config for dev/test purposes (borrow from spo…
tiendung authored
11
ce3ca33 @tiendung minor change
tiendung authored
12 # Borrow & modified from spot-us project
52d1214 @tiendung Copy application sample config for dev/test purposes (borrow from spo…
tiendung authored
13 desc "Copy application sample config for dev/test purposes"
14 task :copy_sample_config do
129d355 @sudara Yikes! Rails.env is a string here...
authored
15 if Rails.env == 'development' or Rails.env == 'test'
52d1214 @tiendung Copy application sample config for dev/test purposes (borrow from spo…
tiendung authored
16
475cc6a @tiendung add newrelic.example.yml
tiendung authored
17 %w[alonetone amazon_s3 database defensio facebooker newrelic].each do |settings|
52d1214 @tiendung Copy application sample config for dev/test purposes (borrow from spo…
tiendung authored
18 settings_file = File.join(Rails.root, *%W(config #{settings}.yml))
19 settings_file_example = File.join(Rails.root, *%W(config #{settings}.example.yml))
20
21 unless File.exist?(settings_file)
22 puts "Setting up config/#{settings}.yml from config/#{settings}.example.yml..."
23 FileUtils.cp(settings_file_example, settings_file)
24 end
25 end
26 end
27 end
28
29 task :environment => :copy_sample_config
Something went wrong with that request. Please try again.