buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r919294 - in /buildr/trunk: CHANGELOG lib/buildr/ide/eclipse.rb spec/ide/eclipse_spec.rb
Date Fri, 05 Mar 2010 05:25:34 GMT
Author: boisvert
Date: Fri Mar  5 05:25:33 2010
New Revision: 919294

URL: http://svn.apache.org/viewvc?rev=919294&view=rev
Log:
BUILDR-392 Array values not flattened in (one version) of eclipse 
task properties (Antoine Toulme, Peter Dettman)


Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/ide/eclipse.rb
    buildr/trunk/spec/ide/eclipse_spec.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=919294&r1=919293&r2=919294&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Mar  5 05:25:33 2010
@@ -80,6 +80,8 @@
 * Fixed:  BUILDR-384 Buildr fails with rubygems 1.3.6
 * Fixed:  BUILDR-386 Display JRuby version in buildr -V (Antoine Toulme)
 * Fixed:  BUILDR-391 resources task does not detect changes
+* Fixed:  BUILDR-392 Array values not flattened in (one version) of eclipse
+          task properties (Antoine Toulme, Peter Dettman)
 * Fixed:  BUILDR-306 Cobertura extension does not handle dependencies
           correctly (Pepijn Van Eeckhoudt)
 * Fixed:  buildr test=all didn't run all tests as expected

Modified: buildr/trunk/lib/buildr/ide/eclipse.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/ide/eclipse.rb?rev=919294&r1=919293&r2=919294&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/ide/eclipse.rb (original)
+++ buildr/trunk/lib/buildr/ide/eclipse.rb Fri Mar  5 05:25:33 2010
@@ -72,7 +72,7 @@
       def natures(*values)
         if values.size > 0
           @natures ||= []
-          @natures += values
+          @natures += values.flatten
         else
           @natures || (@project.parent ? @project.parent.eclipse.natures : [])
         end
@@ -97,7 +97,7 @@
       def classpath_containers(*values)
         if values.size > 0
           @classpath_containers ||= []
-          @classpath_containers += values
+          @classpath_containers += values.flatten
         else
           @classpath_containers || (@project.parent ? @project.parent.eclipse.classpath_containers
: [])
         end
@@ -109,7 +109,7 @@
       def exclude_libs(*values)
         if values.size > 0
           @exclude_libs ||= []
-          @exclude_libs += values
+          @exclude_libs += values.flatten
         else
           @exclude_libs || (@project.parent ? @project.parent.eclipse.exclude_libs : [])
         end
@@ -141,7 +141,7 @@
       def builders(*values)
         if values.size > 0
           @builders ||= []
-          @builders += values
+          @builders += values.flatten
         else
           @builders || (@project.parent ? @project.parent.eclipse.builders : [])
         end

Modified: buildr/trunk/spec/ide/eclipse_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/ide/eclipse_spec.rb?rev=919294&r1=919293&r2=919294&view=diff
==============================================================================
--- buildr/trunk/spec/ide/eclipse_spec.rb (original)
+++ buildr/trunk/spec/ide/eclipse_spec.rb Fri Mar  5 05:25:33 2010
@@ -573,6 +573,13 @@
       project('foo:bar').eclipse.natures.should include('foo_nature')
       project('foo:bar2').eclipse.natures.should include('bar2_nature')
     end
+    
+    it 'should handle arrays correctly' do
+      define('foo') do
+        eclipse.natures ['foo_nature', 'bar_nature']
+      end
+      project('foo').eclipse.natures.should == ['foo_nature', 'bar_nature']
+    end
   end
 
   describe 'builders variable' do
@@ -597,7 +604,14 @@
       project('foo:bar').eclipse.builders.should include('foo_builder')
       project('foo:bar2').eclipse.builders.should include('bar2_builder')
     end
-  end
+    
+    it 'should handle arrays correctly' do
+      define('foo') do
+        eclipse.builders ['foo_builder', 'bar_builder']
+      end
+      project('foo').eclipse.builders.should == ['foo_builder', 'bar_builder']
+    end
+  end 
 
   describe 'classpath_containers variable' do
     it 'should be configurable' do
@@ -621,6 +635,13 @@
       project('foo:bar').eclipse.classpath_containers.should include('foo_classpath_containers')
       project('foo:bar2').eclipse.classpath_containers.should include('bar2_classpath_containers')
     end
+    
+    it 'should handle arrays correctly' do
+      define('foo') do
+        eclipse.classpath_containers ['foo_cc', 'bar_cc']
+      end
+      project('foo').eclipse.classpath_containers.should == ['foo_cc', 'bar_cc']
+    end
   end
 
   describe 'exclude_libs' do



Mime
View raw message