X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f6695c9079f4eeeecaa796c879868f797f97cd55..469f64384dc7d3266f40cb1a0afafd4df1abb6e8:/lib/potlatch.rb diff --git a/lib/potlatch.rb b/lib/potlatch.rb index 165e37b0c..717622762 100644 --- a/lib/potlatch.rb +++ b/lib/potlatch.rb @@ -177,7 +177,7 @@ module Potlatch presettype = "" presetcategory = "" # StringIO.open(txt) do |file| - File.open("#{Rails.root}/config/potlatch/presets.txt") do |file| + File.open(Rails.root.join("config", "potlatch", "presets.txt")) do |file| file.each_line do |line| t = line.chomp if t =~ %r{(\w+)/(\w+)} @@ -201,7 +201,7 @@ module Potlatch colours = {} casing = {} areas = {} - File.open("#{Rails.root}/config/potlatch/colours.txt") do |file| + File.open(Rails.root.join("config", "potlatch", "colours.txt")) do |file| file.each_line do |line| next unless line.chomp =~ /(\w+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/ @@ -216,7 +216,7 @@ module Potlatch relcolours = {} relalphas = {} relwidths = {} - File.open("#{Rails.root}/config/potlatch/relation_colours.txt") do |file| + File.open(Rails.root.join("config", "potlatch", "relation_colours.txt")) do |file| file.each_line do |line| next unless line.chomp =~ /(\w+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/ @@ -230,7 +230,7 @@ module Potlatch # Read POI presets icon_list = [] icon_tags = {} - File.open("#{Rails.root}/config/potlatch/icon_presets.txt") do |file| + File.open(Rails.root.join("config", "potlatch", "icon_presets.txt")) do |file| file.each_line do |line| (icon, tags) = line.chomp.split("\t") icon_list.push(icon) @@ -241,7 +241,7 @@ module Potlatch # Read auto-complete autotags = { "point" => {}, "way" => {}, "POI" => {} } - File.open("#{Rails.root}/config/potlatch/autocomplete.txt") do |file| + File.open(Rails.root.join("config", "potlatch", "autocomplete.txt")) do |file| file.each_line do |line| next unless line.chomp =~ %r{^([\w:]+)/(\w+)\s+(.+)$}