Author: donaldp
Date: Sat May 19 00:31:52 2012
New Revision: 1340320
URL: http://svn.apache.org/viewvc?rev=1340320&view=rev
Log:
Recent versions of rake will resolve paths in FileList so we need to do the same
Modified:
buildr/trunk/lib/buildr/core/doc.rb
buildr/trunk/spec/core/doc_spec.rb
Modified: buildr/trunk/lib/buildr/core/doc.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/doc.rb?rev=1340320&r1=1340319&r2=1340320&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/doc.rb (original)
+++ buildr/trunk/lib/buildr/core/doc.rb Sat May 19 00:31:52 2012
@@ -112,7 +112,7 @@ module Buildr
# Includes additional source files and directories when generating the
documentation
# and returns self. When specifying a directory, includes all source
files in that directory.
def include(*files)
- @files.include *files.flatten.compact
+ @files.include *files.flatten.compact.collect{|f|File.expand_path(f)}
self
end
@@ -121,7 +121,7 @@ module Buildr
#
# Excludes source files and directories from generating the
documentation.
def exclude(*files)
- @files.exclude *files
+ @files.exclude *files.collect{|f|File.expand_path(f)}
self
end
@@ -205,7 +205,7 @@ module Buildr
def source_files #:nodoc:
@source_files ||= @files.map(&:to_s).map do |file|
Array(engine.class.source_ext).map do |ext|
- File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] :
file
+ File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] :
File.expand_path(file)
end
end.flatten.reject { |file| @files.exclude?(file) }
end
Modified: buildr/trunk/spec/core/doc_spec.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/core/doc_spec.rb?rev=1340320&r1=1340319&r2=1340320&view=diff
==============================================================================
--- buildr/trunk/spec/core/doc_spec.rb (original)
+++ buildr/trunk/spec/core/doc_spec.rb Sat May 19 00:31:52 2012
@@ -124,7 +124,7 @@ describe Project, '#doc' do
compile.using(:javac)
doc.include included
end
- project('foo').doc.source_files.should include(included)
+ project('foo').doc.source_files.should include(File.expand_path(included))
end
it 'should respond to exclude() and return self' do