incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962117 - /incubator/deltacloud/trunk/framework/config/environment.rb
Date Thu, 08 Jul 2010 23:23:57 GMT
Author: lutter
Date: Thu Jul  8 23:23:57 2010
New Revision: 962117

URL: http://svn.apache.org/viewvc?rev=962117&view=rev
Log:
Allow for DEFAULT_DRIVER and $DRIVER env overrides

Modified:
    incubator/deltacloud/trunk/framework/config/environment.rb

Modified: incubator/deltacloud/trunk/framework/config/environment.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/config/environment.rb?rev=962117&r1=962116&r2=962117&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/config/environment.rb (original)
+++ incubator/deltacloud/trunk/framework/config/environment.rb Thu Jul  8 23:23:57 2010
@@ -50,9 +50,9 @@ Rails::Initializer.run do |config|
   # config.i18n.default_locale = :de
 end
 
-#DRIVER=:ec2
-#DRIVER=:mock
-#DRIVER=:rhevm
+#DEFAULT_DRIVER=:ec2
+DEFAULT_DRIVER=:mock
+#DEFAULT_DRIVER=:rhevm
 
 
 unless defined?( DRIVER )
@@ -62,7 +62,11 @@ unless defined?( DRIVER )
 end
 
 unless defined?( DRIVER )
-  raise Exception.new( "DRIVER must be defined through environment variable or config/environment.rb"
)
+  if ( defined?( DEFAULT_DRIVER ) )
+    DRIVER=DEFAULT_DRIVER
+  else
+    raise Exception.new( "DRIVER must be defined through environment variable or DEFAULT_DRIVER
through config/environment.rb" )
+  end
 end
 
 



Mime
View raw message