Lines Matching refs:replacements
6 # Automate code replacements using regular expressions
14 # :dirs => a list of directory to run replacements. All subdirs are processed.
18 # :replacements => a list of replacements, lines are processed 2 by 2
54 :replacements =>
84 :replacements =>
102 :replacements =>
113 :replacements =>
137 :replacements =>
148 :replacements =>
166 :replacements =>
186 :replacements =>
283 :replacements =>
298 :replacements =>
319 :replacements =>
329 :replacements =>
340 :replacements =>
350 :replacements =>
361 :replacements =>
374 :replacements =>
386 :replacements =>
398 :replacements =>
407 ############################### List of replacements to run #################################
413 # Main method : run replacements defined in REPLACEMENTS constant
419 replace_dirs(repl[:replacements], repl[:dirs], stoplist, whitelist, repl[:extensions])
423 # Process replacements on the provided directories
424 def replace_dirs(replacements, dirs, stoplist, whitelist, extensions)
433 count = replace_file(file, replacements)
440 puts "Replaced in #{count_files} files, for a total of #{count_total} replacements"
444 def replace_file(file, replacements)
448 (0..replacements.size-1).step(2).each { |index|
449 pattern, replace = replacements[index], replacements[index+1]
488 puts "Replaced in #{count_files} files, for a total of #{count_total} replacements"
513 # Launch all replacements defined in the REPLACEMENTS constant