Rake and darcs in Radiant extensions
April 1st, 2007I usually use darcs as code management system..it’s cool and easy to use…but i’ve got a problem using rake in my Radiant app..in fact when I type:
rake radiant:extensions:my_extension:task
..my task is executed twice because files in _darcs folder are loaded too..my friend Giovanni helps me saying that the code that runs extensions rakefiles is the following:
[RAILS_ROOT, RADIANT_ROOT].uniq.each do |root|
Dir[root + '/vendor/extensions/**/tasks/**/*.rake'].sort.each { |ext|
load ext
}
end
…thus I changed extensions rakefile with theese lines:
[RAILS_ROOT, RADIANT_ROOT].uniq.each do |root|
files = Dir[root + '/vendor/extensions/**/tasks/**/*.rake']
files.delete_if do |file|
file.include? '_darcs'
end
files.sort.each { |ext| load ext }
end
…and now it excludes all files in _darcs folder!













