Patch #1008 ยป migrate_from_trac.patch
migrate_from_trac.rake 2008-04-07 06:24:45.000000000 +0000 | ||
---|---|---|
19 | 19 |
require 'iconv' |
20 | 20 |
require 'pp' |
21 | 21 | |
22 |
class String |
|
23 |
alias original_indexer [] |
|
24 |
def [](pos, length = 0) |
|
25 |
if length == 0 |
|
26 |
self.original_indexer(pos) |
|
27 |
else |
|
28 |
self.split(//)[pos, length].join |
|
29 |
end |
|
30 |
end |
|
31 |
end |
|
32 |
|
|
22 | 33 |
namespace :redmine do |
23 | 34 |
desc 'Trac migration script' |
24 | 35 |
task :migrate_from_trac => :environment do |