diff --git a/Rakefile b/Rakefile index 925b87b..0c48773 100644 --- a/Rakefile +++ b/Rakefile @@ -8,17 +8,23 @@ GEMSPEC = Gem::Specification.load('oga.gemspec') LEXER_OUTPUT = 'lib/oga/xml/lexer.rb' PARSER_OUTPUT = 'lib/oga/xml/parser.rb' -GENERATED_FILES = [ +CLEAN.include( 'coverage', 'yardoc', LEXER_OUTPUT, PARSER_OUTPUT, 'benchmark/fixtures/big.xml' -] +) -GENERATED_FILES.each do |file| - CLEAN << file if File.exist?(file) -end +FILE_LIST = FileList.new( + 'checkum/**/*.*', + 'doc/**/*.*', + 'lib/**/*.*', + 'LICENSE', + 'MANIFEST', + '*.gemspec', + 'README.md' +) Dir['./task/*.rake'].each do |task| import(task) diff --git a/task/manifest.rake b/task/manifest.rake index 146dc02..da68f93 100644 --- a/task/manifest.rake +++ b/task/manifest.rake @@ -1,8 +1,7 @@ desc 'Generates the MANIFEST file' task :manifest do - generated = GENERATED_FILES.map { |path| File.expand_path(path) } - files = (`git ls-files`.split("\n") | generated).sort - handle = File.open(File.expand_path('../../MANIFEST', __FILE__), 'w') + files = FILE_LIST.to_a.sort + handle = File.open(File.expand_path('../../MANIFEST', __FILE__), 'w') handle.write(files.join("\n")) handle.close