buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1491099 - in /buildr/trunk: CHANGELOG lib/buildr/core/application.rb
Date Sat, 08 Jun 2013 23:42:40 GMT
Author: donaldp
Date: Sat Jun  8 23:42:40 2013
New Revision: 1491099

URL: http://svn.apache.org/r1491099
Log:
BUILDR-668 - Specify File::FNM_EXTGLOB for include globs where needed in Ruby >= 2.0.0.
Reported by Yavor Nikolov.

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

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1491099&r1=1491098&r2=1491099&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sat Jun  8 23:42:40 2013
@@ -4,6 +4,8 @@
           - rspec-mocks (2.13.1)
           - rspec-core (2.13.1)
           - rspec (2.13.0)
+* Fixed:  BUILDR-668 - Specify File::FNM_EXTGLOB for include globs
+          where needed in Ruby >= 2.0.0. Reported by Yavor Nikolov.
 * Fixed:  Ensure generation of buildfiles from eclipse projects will
           finds .project files in Ruby >= 2.0.0.
 * Fixed:  Patch Rake::FileList in Ruby >= 2.0.0 to match dot files if

Modified: buildr/trunk/lib/buildr/core/application.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/application.rb?rev=1491099&r1=1491098&r2=1491099&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/application.rb (original)
+++ buildr/trunk/lib/buildr/core/application.rb Sat Jun  8 23:42:40 2013
@@ -699,9 +699,12 @@ module ::Rake
     # Add matching glob patterns.
     def add_matching(pattern)
       # Patch to use File::FNM_DOTMATCH where appropriate
-      args = []
-      args << File::FNM_DOTMATCH if pattern =~ /\.\*/
-      FileList.glob(pattern, *args).each do |fn|
+      flags = 0
+      args = [pattern]
+      flags |= File::FNM_DOTMATCH if pattern =~ /\.\*/
+      flags |= File::FNM_EXTGLOB if pattern =~ /[^\\]\{.*\}/
+      args << flags unless 0 == flags
+      FileList.glob(*args).each do |fn|
         self << fn unless exclude?(fn)
       end
     end



Mime
View raw message