From ac8587290a53cb8e69d28c01bad9f18a2a4d6e33 Mon Sep 17 00:00:00 2001
From: Raphael Sofaer <raphael@joindiaspora.com>
Date: Thu, 9 Jun 2011 15:31:16 -0700
Subject: [PATCH] Throw in a travis config file to try using travis

---
 .travis.yml              |  6 ++++++
 app/models/app_config.rb | 10 +++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..fca7c4b2d9
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,6 @@
+rvm:
+  - ree
+  - 1.9.2
+
+script: "rake cruise"
+env: "TRAVIS=true"
diff --git a/app/models/app_config.rb b/app/models/app_config.rb
index f84a0f46cd..b8a7ea1ae2 100644
--- a/app/models/app_config.rb
+++ b/app/models/app_config.rb
@@ -9,7 +9,7 @@ class AppConfig < Settingslogic
   namespace Rails.env
 
   def self.load!
-    if no_config_file? && !have_old_config_file?
+    if no_config_file? && !have_old_config_file? && !travis?
       $stderr.puts <<-HELP
 ******** You haven't set up your Diaspora settings file. **********
 Please do the following:
@@ -36,7 +36,7 @@ HELP
     end
 
     super
-    
+
     normalize_pod_url
     normalize_admins
   end
@@ -53,6 +53,10 @@ HELP
     File.exists?(File.join(Rails.root, "config", "app.yml")) || (File.exists?(File.join(Rails.root, "config", "app_config.yml")))
   end
 
+  def self.travis?
+    ENV["TRAVIS"]
+  end
+
   def self.normalize_pod_url
     unless self[:pod_url] =~ /^(https?:\/\/)/ # starts with http:// or https://
       self[:pod_url] = "http://#{self[:pod_url]}"
@@ -94,4 +98,4 @@ HELP
     end
     return @@pod_uri
   end
-end
\ No newline at end of file
+end
-- 
GitLab