summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/heater.rake11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/tasks/heater.rake b/lib/tasks/heater.rake
index 7d026d9..11862a5 100644
--- a/lib/tasks/heater.rake
+++ b/lib/tasks/heater.rake
@@ -1,6 +1,17 @@
namespace :heater do
desc "Warm up the cache."
task :preheat => :environment do
+ if GemeinschaftSetup.any?
+ else
+ # This is a fresh installation.
+ #
+ if Rails.env.production?
+ require 'open-uri'
+ open('/dev/null', 'wb') do |file|
+ file << open("http://localhost/gemeinschaft_setups/new").read
+ end
+ end
+ end
end
end \ No newline at end of file