buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject buildr git commit: Update add_configuration in idea project file generation to support arbitrary keys in the configuration block
Date Mon, 10 Nov 2014 21:46:01 GMT
Repository: buildr
Updated Branches:
  refs/heads/master 72ba95350 -> 67d9bcc7c


Update add_configuration in idea project file generation to support arbitrary keys in the
configuration block


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/67d9bcc7
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/67d9bcc7
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/67d9bcc7

Branch: refs/heads/master
Commit: 67d9bcc7cce0288e926bef2e0ff2c5f501bbe284
Parents: 72ba953
Author: Peter Donald <peter@realityforge.org>
Authored: Tue Nov 11 08:45:45 2014 +1100
Committer: Peter Donald <peter@realityforge.org>
Committed: Tue Nov 11 08:45:45 2014 +1100

----------------------------------------------------------------------
 lib/buildr/ide/idea.rb | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/67d9bcc7/lib/buildr/ide/idea.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/ide/idea.rb b/lib/buildr/ide/idea.rb
index c167ae2..5da6f98 100644
--- a/lib/buildr/ide/idea.rb
+++ b/lib/buildr/ide/idea.rb
@@ -663,12 +663,14 @@ module Buildr #:nodoc:
         end
       end
 
-      def add_configuration(name, type, factory_name, default = false)
+      def add_configuration(name, type, factory_name, default = false, options = {})
         add_to_composite_component(self.configurations) do |xml|
-          options = {:type => type, :factoryName => factory_name}
-          options[:name] = name unless default
-          options[:default] = true if default
-          xml.configuration(options) do |xml|
+          params = options.dup
+          params[:type] = type
+          params[:factoryName] = factory_name
+          params[:name] = name unless default
+          params[:default] = true if default
+          xml.configuration(params) do |xml|
             yield xml if block_given?
           end
         end


Mime
View raw message