Title: [732] trunk/rails-integration/plugins/goldspike-snapshot/lib/war_config.rb: Tweaks for syntax
Revision
732
Author
tantalon
Date
2007-09-02 19:49:25 -0400 (Sun, 02 Sep 2007)

Log Message

Tweaks for syntax

Modified Paths


Diff

Modified: trunk/rails-integration/plugins/goldspike-snapshot/lib/war_config.rb (731 => 732)


--- trunk/rails-integration/plugins/goldspike-snapshot/lib/war_config.rb	2007-09-02 23:22:52 UTC (rev 731)
+++ trunk/rails-integration/plugins/goldspike-snapshot/lib/war_config.rb	2007-09-02 23:49:25 UTC (rev 732)
@@ -8,6 +8,8 @@
 module War
   class Configuration
     include Singleton
+    # allow a getter to be used as a setter as well, makes config easier
+    include ActionMailer::AdvAttrAccessor
 
     # the name of the project
     attr_accessor :name
@@ -63,7 +65,7 @@
     attr_accessor :custom_tasks
 
     def initialize
-      WLog.debug("initializing configuration ...")
+      WLog.debug("Initializing configuration ...")
       
       # initialize variables
       @excludes = []
@@ -72,7 +74,6 @@
       
       # defaults
       @name = File.basename(File.expand_path(RAILS_ROOT))
-      @war_file = "[EMAIL PROTECTED]"
       @staging = RAILS_ROOT
       @local_java_lib = File.join('lib', 'java')
 
@@ -123,10 +124,15 @@
       end
 
       # load user configuration
-      WLog.debug("loading user configuration ...")
+      WLog.debug("Loading user configuration ...")
       load_user_configuration
     end # initialize
     
+    def war_file(value = @war_file)
+      @war_file = value
+      @war_file || "#{name}.war"
+    end
+    
     def exclude_files(pattern)
       @excludes << pattern
     end
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to