X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e17b89e89fa932673f7dc2cf5a2fd3437ec0eda6..2122ec263bf776c214c3d18fb28497ee827ca0f1:/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+(.+)$}