Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (5 sloc) 235 Bytes
line = "HighVoltage::Routes.draw(map)"
path = "config/routes.rb"
puts "inserting #{line} into #{path}"
content = File.read(path).sub(/^(end\s*)$/) {|match| " #{line}\n#{match}" }
File.open(path, 'wb') { |file| file.write(content) }