summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-16 21:06:22 +0100
committerJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-16 21:06:22 +0100
commit6a3eb3a21958e4bc1a73e5774c3717fc01ee64e0 (patch)
tree933902730c79edb8f1f8372ce6af6217433c9a84 /lib
parentea70e08534319dd3f15c34859c498771fa7d9b32 (diff)
parenta74efe4bb1b5afeaf892d18ba2e7969ed17b4099 (diff)
Merge branch 'develop' of https://github.com/amooma/GS5 into develop
Diffstat (limited to 'lib')
-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