Author: assaf
Date: Mon Sep 22 10:27:48 2008
New Revision: 697906

URL: http://svn.apache.org/viewvc?rev=697906&view=rev
Log:
Catching call to Buildr.settings before Buildr.application is fully loaded.
Buildr.application needs to find the buildfile before it can find build.yaml, 
so calling Buildr.setting too early just means we're not accessing the real 
build.yaml file.  This could happen if Buildr code attempts to do interesting 
stuff while loading the code, instead of waiting for actually running the code.
Failing is harsh, but at least it will get rid of subtle bugs.

Modified:
    incubator/buildr/trunk/lib/buildr.rb
    incubator/buildr/trunk/lib/buildr/core/application.rb

Modified: incubator/buildr/trunk/lib/buildr.rb
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr.rb?rev=697906&r1=697905&r2=697906&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr.rb (original)
+++ incubator/buildr/trunk/lib/buildr.rb Mon Sep 22 10:27:48 2008
@@ -15,7 +15,7 @@
 
 
 module Buildr
-  VERSION = '1.3.3'.freeze # unless const_defined?(:VERSION)
+  VERSION = '1.3.3'.freeze
 end
 
 require 'buildr/core'

Modified: incubator/buildr/trunk/lib/buildr/core/application.rb
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/core/application.rb?rev=697906&r1=697905&r2=697906&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/core/application.rb (original)
+++ incubator/buildr/trunk/lib/buildr/core/application.rb Mon Sep 22 10:27:48 
2008
@@ -141,6 +141,7 @@
 
     # Returns the Settings associated with this build.
     def settings
+      fail "Internal error: Called Buildr.settings before buildfile located" 
unless rakefile
       @settings ||= Settings.new(self)
     end
 


Reply via email to