class Bundler::Thor::Actions::InjectIntoFile
def replace!(regexp, string, force)
Adds the content to the file.
def replace!(regexp, string, force) unless base.options[:pretend] content = File.binread(destination) if force || !content.include?(replacement) content.gsub!(regexp, string) File.open(destination, "wb") { |file| file.write(content) } end end end