Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move config copy rake task to lib/

  • Loading branch information...
commit effe01b9725eaeef690ee859e2ee753af2864aaa 1 parent ca417f0
@sudara authored
Showing with 18 additions and 19 deletions.
  1. +0 −19 Rakefile
  2. +18 −0 lib/tasks/copy_config.rake
View
19 Rakefile
@@ -5,22 +5,3 @@
require File.expand_path('../config/application', __FILE__)
Alonetone::Application.load_tasks
-
-# 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 database defensio 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
View
18 lib/tasks/copy_config.rake
@@ -0,0 +1,18 @@
+# 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 database defensio 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
Please sign in to comment.
Something went wrong with that request. Please try again.