module Utils module Inreplace def inreplace paths, before=nil, after=nil Array(paths).each do |path| f = File.open(path, 'rb') s = f.read if before.nil? && after.nil? s.extend(StringInreplaceExtension) yield s else after = after.to_s if Symbol === after sub = s.gsub!(before, after) if sub.nil? message = <<-EOS.undent inreplace in '#{path}' failed Expected replacement of '#{before}' with '#{after}' EOS ARGV.homebrew_developer? ? odie(message) : opoo(message) end end f.reopen(path, 'wb').write(s) f.close end end end end 5e2827df9f7c5f55d6fdc8c7'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngLocale/angular-locale_uk.js
blob: c6a3c95ce49547a3d1921f37405f412d80600c37 (plain)
1
2
3
4