# Offense count: 62
# Configuration parameters: CountComments.
Metrics/ClassLength:
- Max: 1659
+ Max: 1660
# Offense count: 69
Metrics/CyclomaticComplexity:
gem "omniauth-facebook"
gem "omniauth-windowslive"
gem "omniauth-github"
+gem "omniauth-mediawiki", ">= 0.0.3"
# Markdown formatting support
gem "redcarpet"
public_suffix (~> 2.0, >= 2.0.2)
arel (6.0.3)
ast (2.3.0)
- autoprefixer-rails (6.5.2)
+ autoprefixer-rails (6.5.3)
execjs
bigdecimal (1.1.0)
builder (3.2.2)
- capybara (2.10.1)
+ capybara (2.10.2)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
coffee-script (2.4.1)
coffee-script-source
execjs
- coffee-script-source (1.10.0)
+ coffee-script-source (1.11.1)
colorize (0.8.1)
composite_primary_keys (8.1.4)
activerecord (~> 4.2.0)
concurrent-ruby (1.0.2)
- coveralls (0.8.15)
+ coveralls (0.8.16)
json (>= 1.8, < 3)
simplecov (~> 0.12.0)
- term-ansicolor (~> 1.3)
+ term-ansicolor (~> 1.3.0)
thor (~> 0.19.1)
tins (>= 1.6.0, < 2)
crack (0.4.3)
geoip (1.6.2)
globalid (0.3.7)
activesupport (>= 4.1.0)
- hashdiff (0.3.0)
+ hashdiff (0.3.1)
hashie (3.4.6)
htmlentities (4.3.4)
http_accept_language (2.0.5)
i18n (0.7.0)
i18n-js (3.0.0.rc14)
i18n (~> 0.6, >= 0.6.6)
- image_optim (0.24.0)
+ image_optim (0.24.1)
exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0)
- image_size (~> 1.3)
+ image_size (~> 1.5)
in_threads (~> 1.3)
progress (~> 3.0, >= 3.0.1)
image_optim_rails (0.2.0)
image_optim (~> 0.24.0)
rails
sprockets
- image_size (1.4.2)
+ image_size (1.5.0)
in_threads (1.3.1)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
sprockets (>= 2, < 4)
sprockets-rails (>= 2, < 4)
tilt
- libv8 (3.16.14.15)
+ libv8 (3.16.14.17)
libxml-ruby (2.9.0)
logstash-event (1.2.02)
- logstasher (1.0.1)
+ logstasher (1.1.0)
activerecord (>= 4.0)
activesupport (>= 4.0)
logstash-event (~> 1.2.0)
mime-types-data (3.2016.0521)
mimemagic (0.3.0)
mini_portile2 (2.1.0)
- minitest (5.9.1)
+ minitest (5.10.1)
multi_json (1.12.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
multi_json (~> 1.3)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.3.1)
+ omniauth-mediawiki (0.0.3)
+ jwt (~> 1.0)
+ omniauth-oauth (~> 1.0)
+ omniauth-oauth (1.1.0)
+ oauth
+ omniauth (~> 1.0)
omniauth-oauth2 (1.4.0)
oauth2 (~> 1.0)
omniauth (~> 1.2)
cocaine (~> 0.5.5)
mime-types
mimemagic (= 0.3.0)
- parser (2.3.1.4)
+ parser (2.3.3.1)
ast (~> 2.2)
pg (0.19.0)
poltergeist (1.11.0)
websocket-driver (>= 0.2.0)
powerpack (0.1.1)
progress (3.2.2)
- psych (2.1.1)
+ psych (2.2.1)
public_suffix (2.0.4)
r2 (0.2.6)
- rack (1.6.4)
+ rack (1.6.5)
rack-cors (0.4.0)
rack-openid (1.3.1)
rack (>= 1.1.0)
ref (2.0.0)
request_store (1.3.1)
rinku (2.0.2)
- rubocop (0.45.0)
+ rubocop (0.46.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
- term-ansicolor (1.4.0)
+ term-ansicolor (1.3.2)
tins (~> 1.0)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
- thor (0.19.1)
+ thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
timecop (0.8.1)
- tins (1.12.0)
+ tins (1.13.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
- uglifier (3.0.3)
+ uglifier (3.0.4)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.1.1)
validates_email_format_of (1.6.3)
omniauth-facebook
omniauth-github
omniauth-google-oauth2 (>= 0.2.7)
+ omniauth-mediawiki (>= 0.0.3)
omniauth-openid
omniauth-windowslive
paperclip (~> 4.0)
### PostgreSQL account setup
-We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more database.
+We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more databases.
```
sudo -u postgres -i
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g id="Logo_simple" fill="black">
+ <g id="layer1" transform="translate(0.234847, 0.091766)">
+ <path d="M1.75809857,15.5864714 C1.53259286,15.5296771 1.41476714,15.4360657 0.812798571,14.8354114 C0.0965871429,14.1207686 0.0506614286,14.0509914 0.05179,13.6792257 C0.0529328571,13.2638686 -0.0724585714,13.4124171 2.21577,11.1180486 C4.52671571,8.80090286 4.40771571,8.90189143 4.82581857,8.90298 C5.01909286,8.90355143 5.06773,8.91449429 5.22358143,8.99300286 L5.40114714,9.08244857 L5.96119286,8.5224 L6.52124143,7.96235429 L6.38092714,7.74361714 C6.10788714,7.31797429 5.85054429,6.69690286 5.73492714,6.18456286 C5.40852143,4.73815714 5.76038429,3.20801714 6.68624429,2.04756857 C8.28345857,0.0456714286 11.1528186,-0.398394286 13.27489,1.02790857 C14.4393671,1.81058286 15.1962414,3.01958 15.41179,4.44129714 C15.4573557,4.74184571 15.4576157,5.45568571 15.4123614,5.77276857 C15.2546157,6.87590286 14.7850586,7.81346 13.9961871,8.60042571 C13.5897757,9.00585143 13.2639443,9.24073714 12.7466671,9.50116857 C12.1308443,9.81121714 11.6083871,9.95670571 10.8984843,10.0158286 C9.88698143,10.1000686 8.76552714,9.82031714 7.90698143,9.26958571 L7.68824429,9.12927143 L7.12819857,9.68931714 L6.56815,10.2493657 L6.65759857,10.4269286 C6.73610714,10.58278 6.74711571,10.6314171 6.74761857,10.8246943 C6.74876143,11.2423057 6.84782429,11.1252714 4.54627857,13.4239743 C2.77385857,15.1942057 2.50102143,15.4561657 2.36526714,15.5180457 C2.19138714,15.5973029 1.92182714,15.6276857 1.75818714,15.5864714 L1.75809857,15.5864714 Z M11.2712243,9.15195429 C12.5502929,8.91782286 13.6672814,8.06622571 14.2271586,6.89834 C15.11979,5.03633714 14.5194471,2.84804286 12.7986071,1.69118857 C12.3880957,1.41521714 11.81485,1.18257714 11.27685,1.07362 C10.9041357,0.998134286 10.1154929,1.00585429 9.72675286,1.08879143 C9.14647571,1.21259143 8.61371286,1.44346 8.15203571,1.77118 C7.86672714,1.97370571 7.39628429,2.44395714 7.19702143,2.72580286 C6.09283,4.28761714 6.19273,6.36339429 7.44143,7.80428857 C8.08152143,8.54289714 8.96678714,9.02773714 9.94637571,9.17618571 C10.2716957,9.22548571 10.9358843,9.21333714 11.2712243,9.15195714 L11.2712243,9.15195429 Z M8.87038714,13.8891629 C8.10495286,13.6680029 7.47133,13.47936 7.46233286,13.4699514 C7.44547571,13.4523229 8.23654429,10.6468171 8.26791,10.6130286 C8.28353857,10.5962 10.9920157,11.3547 11.1029871,11.4069886 C11.1422157,11.4254743 11.1007014,11.5927571 10.7663043,12.7595514 C10.55651,13.49186 10.3722014,14.1373486 10.35673,14.1939686 C10.3412443,14.2505914 10.3136357,14.2956486 10.2953443,14.2940943 C10.2770586,14.2926657 9.63582143,14.1103229 8.87038714,13.8891629 Z M10.7425129,14.2243971 C10.7425129,14.1901514 11.5295357,11.4412371 11.5420243,11.43186 C11.57051,11.41046 14.31823,10.6433514 14.3287386,10.65386 C14.3411671,10.6662886 13.5606443,13.4390343 13.5401471,13.4552829 C13.5261471,13.4663686 10.8885243,14.2190457 10.8042814,14.2359886 C10.77031,14.2428171 10.7425129,14.2377029 10.7425129,14.2243886 L10.7425129,14.2243971 Z M6.17704429,12.99702 C6.72003857,12.4511857 7.20394143,11.9528 7.25238429,11.8894971 C7.36159286,11.7467771 7.51339,11.4185714 7.55467,11.2359114 C7.57172714,11.1604143 7.58871857,11.00994 7.59241857,10.9015229 L7.59916143,10.7043971 L7.71662429,10.6712457 C7.78122714,10.6530171 7.83903571,10.6430457 7.84508714,10.6491029 C7.86014429,10.66416 7.07001857,13.4236343 7.04369571,13.44788 C7.03212429,13.4585371 6.61025571,13.58476 6.10621857,13.72836 L5.18979,13.9894514 L6.17705857,12.9970257 L6.17704429,12.99702 Z M11.4998186,11.0334343 C11.4942186,11.0240914 11.4770471,10.9704486 11.4616586,10.91426 L11.4336871,10.8121 L11.5342043,10.7951 C12.3954786,10.6493829 13.3179014,10.245 14.0444586,9.69462571 C14.1482557,9.61599714 14.2070786,9.58646 14.2147129,9.60913429 C14.24993,9.71374571 14.3901814,10.2192829 14.38533,10.2241314 C14.3635014,10.24596 11.5078643,11.0468829 11.4998071,11.03344 L11.4998186,11.0334343 Z M1.81592714,10.1996943 C1.78271,10.1727514 1.05799286,7.71489143 1.00331,7.44372286 C0.992367143,7.38943143 1.09760429,7.41535143 2.39921571,7.78740286 C3.76114143,8.17670571 3.80759857,8.19218571 3.82654429,8.26301714 C3.84343,8.32619429 3.83240143,8.34579143 3.74602143,8.40596857 C3.69096429,8.44432571 3.25066714,8.87132571 2.76758143,9.35486 C2.28449857,9.83839429 1.88227,10.2340114 1.87374429,10.2340114 C1.86523,10.2340114 1.83919857,10.2185543 1.81592714,10.1996943 L1.81592714,10.1996943 Z M2.34190143,7.38647714 C1.57939286,7.16728 0.953287143,6.98616 0.950555714,6.98398857 C0.941012857,6.97641714 1.75870714,4.13697714 1.77517286,4.12051143 C1.78951571,4.10616857 4.61573,4.89800571 4.64506714,4.92457429 C4.65103857,4.92997429 4.47244429,5.57706 4.24821,6.36254286 C3.87799286,7.65939714 3.83535,7.79043429 3.78439286,7.78785714 C3.75353,7.78642857 3.10440714,7.60567714 2.34190143,7.38647714 L2.34190143,7.38647714 Z M4.24206143,7.73209429 C4.24986143,7.71146571 4.37809571,7.26840286 4.52699571,6.74748286 L4.79772429,5.80035429 L4.83301571,6.00625143 C4.89416429,6.36299429 5.00259571,6.76962857 5.13113857,7.12424286 C5.19946714,7.31273714 5.25150429,7.47034286 5.24677857,7.47448286 C5.24206429,7.47862571 5.03435286,7.53969143 4.78521571,7.61019429 C4.53607857,7.6807 4.30875286,7.74540286 4.28004714,7.75398 C4.24341857,7.76492286 4.23209,7.75840857 4.24206143,7.73209429 L4.24206143,7.73209429 Z M3.19294143,4.11930571 C2.43043571,3.89996 1.79997286,3.71025429 1.79191,3.69773714 C1.76571,3.65706286 0.991552857,0.923451429 1.00299286,0.912011429 C1.01907857,0.895925714 3.76999,1.68537143 3.79624714,1.71360286 C3.82569571,1.74526571 4.61754429,4.52458857 4.59607857,4.52095429 C4.58685,4.51952571 3.95545,4.33865143 3.19294143,4.11930571 Z M4.57080143,3.01922286 C4.41709,2.48026286 4.26802429,1.95798571 4.23954429,1.85860286 L4.18776429,1.67791143 L5.27576429,1.36771429 C5.87416143,1.19710571 6.38229286,1.05058571 6.40494143,1.04211143 C6.42759857,1.03362571 6.35263286,1.13099714 6.23837,1.25846857 C5.63074143,1.93633143 5.23238143,2.66270571 4.98042143,3.55221714 C4.93345571,3.71803143 4.89502714,3.8802 4.89502714,3.91259429 C4.89502714,4.10048857 4.82103571,3.89659429 4.57080143,3.01922286 Z" id="path3940"></path>
+ </g>
+ </g>
+</svg>
\ No newline at end of file
width: 50%;
padding: 6px 10px;
word-wrap: break-word;
+ white-space: pre-wrap;
}
.browse-tag-k {
##
# wrap an api call in a timeout
def api_call_timeout
- OSM::Timer.timeout(API_TIMEOUT) do
+ OSM::Timer.timeout(API_TIMEOUT, Timeout::Error) do
yield
end
rescue Timeout::Error
##
# wrap a web page in a timeout
def web_timeout
- OSM::Timer.timeout(WEB_TIMEOUT) do
+ OSM::Timer.timeout(WEB_TIMEOUT, Timeout::Error) do
yield
end
rescue ActionView::Template::Error => ex
ex = ex.original_exception
if ex.is_a?(ActiveRecord::StatementInvalid) && ex.message =~ /execution expired/
- ex = Timeout::Error.new
- end
-
- if ex.is_a?(Timeout::Error)
render :action => "timeout"
else
raise
end
# override to stop oauth plugin sending errors
- def invalid_oauth_response
- end
+ def invalid_oauth_response; end
end
end
end
- def embed
- end
+ def embed; end
end
end
end
- def show
- end
+ def show; end
- def edit
- end
+ def edit; end
def update
# note - don't update the user ID
@locale = params[:copyright_locale] || I18n.locale
end
- def welcome
- end
+ def welcome; end
- def help
- end
+ def help; end
- def about
- end
+ def about; end
- def export
- end
+ def export; end
- def offline
- end
+ def offline; end
def preview
render :text => RichText.new(params[:format], params[:text]).to_html
"og:site_name" => t("layouts.project_name.title"),
"og:title" => [t("layouts.project_name.title"), title].compact.join(" | "),
"og:type" => "website",
- "og:image" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "http"),
- "og:image:secure_url" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "https"),
- "og:url" => url_for(:host => SERVER_URL),
+ "og:image" => image_url("osm_logo_256.png", :protocol => "http"),
+ "og:image:secure_url" => image_url("osm_logo_256.png", :protocol => "https"),
+ "og:url" => url_for(:only_path => false),
"og:description" => t("layouts.intro_text")
}
def save_with_history!
t = Time.now.getutc
+
+ self.version += 1
+ self.timestamp = t
+
Node.transaction do
- self.version += 1
- self.timestamp = t
- save!
+ # clone the object before saving it so that the original is
+ # still marked as dirty if we retry the transaction
+ clone.save!
# Create a NodeTag
tags = self.tags
:display_name => comment.user.display_name,
:title => "Re: #{comment.diary_entry.title}")
- mail :from => from_address(comment.user.display_name, "c", comment.id, comment.digest),
+ mail :from => from_address(comment.user.display_name, "c", comment.id, comment.digest, recipient.id),
:to => recipient.email,
:subject => I18n.t("notifier.diary_comment_notification.subject", :user => comment.user.display_name)
end
end
end
- def from_address(name, type, id, digest)
+ def from_address(name, type, id, digest, user_id = nil)
if Object.const_defined?(:MESSAGES_DOMAIN) && domain = MESSAGES_DOMAIN
- "#{name} <#{type}-#{id}-#{digest[0, 6]}@#{domain}>"
+ if user_id
+ "#{name} <#{type}-#{id}-#{user_id}-#{digest[0, 6]}@#{domain}>"
+ else
+ "#{name} <#{type}-#{id}-#{digest[0, 6]}@#{domain}>"
+ end
else
EMAIL_FROM
end
private
def save_with_history!
+ t = Time.now.getutc
+
+ self.version += 1
+ self.timestamp = t
+
Relation.transaction do
# have to be a little bit clever here - to detect if any tags
# changed then we have to monitor their before and after state.
tags_changed = false
- t = Time.now.getutc
- self.version += 1
- self.timestamp = t
- save!
+ # clone the object before saving it so that the original is
+ # still marked as dirty if we retry the transaction
+ clone.save!
tags = self.tags.clone
relation_tags.each do |old_tag|
def save_with_history!
t = Time.now.getutc
+ self.version += 1
+ self.timestamp = t
+
# update the bounding box, note that this has to be done both before
# and after the save, so that nodes from both versions are included in the
# bbox. we use a copy of the changeset so that it isn't reloaded
cs.update_bbox!(bbox) unless nodes.empty?
Way.transaction do
- self.version += 1
- self.timestamp = t
- save!
+ # clone the object before saving it so that the original is
+ # still marked as dirty if we retry the transaction
+ clone.save!
tags = self.tags
WayTag.delete_all(:way_id => id)
feed.title changeset_list_title(params, @user)
feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
- feed.icon "http://#{SERVER_URL}/favicon.ico"
- feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png"
+ feed.icon image_url("favicon.ico")
+ feed.logo image_url("mag_map-rss2.0.png")
feed.rights :type => "xhtml" do |xhtml|
xhtml.a :href => "http://creativecommons.org/licenses/by-sa/2.0/" do |a|
- a.img :src => "http://#{SERVER_URL}/images/cc_button.png", :alt => "CC by-sa 2.0"
+ a.img :src => image_url("cc_button.png"), :alt => "CC by-sa 2.0"
end
end
xml.instruct!
xml.rss("version" => "2.0",
+ "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do
xml.title @title
xml.description @description
- xml.link url_for(:action => "list", :host => SERVER_URL)
+ xml.link url_for(:action => "list", :only_path => false)
xml.image do
- xml.url image_path("mag_map-rss2.0.png")
+ xml.url image_url("mag_map-rss2.0.png")
xml.title @title
xml.width "100"
xml.height "100"
- xml.link url_for(:action => "list", :host => SERVER_URL)
+ xml.link url_for(:action => "list", :only_path => false)
end
@entries.each do |entry|
xml.item do
xml.title entry.title
- xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
- xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
+ xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
+ xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
xml.description entry.body.to_html
xml.dc :creator, entry.user.display_name
xml.pubDate entry.created_at.to_s(:rfc822)
- xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL)
+ xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :only_path => false)
if entry.latitude && entry.longitude
xml.geo :lat, entry.latitude.to_s
<%= favicon_link_tag "favicon-96x96.png", :rel => "icon", :sizes => "96x96", :type => "image/png" %>
<%= favicon_link_tag "android-chrome-192x192.png", :rel => "icon", :sizes => "192x192", :type => "image/png" %>
<%= favicon_link_tag "favicon-16x16.png", :rel => "icon", :sizes => "16x16", :type => "image/png" %>
+ <%= tag("link", { :rel => "mask-icon", :href => asset_path("tag-icon.svg"), :color => "#7ebc6f" }) %>
<%= tag("link", { :rel => "manifest", :href => asset_path("manifest.json") }) %>
<%= tag("meta", { :name => "msapplication-config", :content => asset_path("browserconfig.xml") }) %>
<%= tag("meta", { :name => "msapplication-TileColor", :content => "#00a300" }) %>
xml.cdata! render(:partial => "description", :object => note, :formats => [:html])
end
- xml.link("href" => browse_note_url(note, :host => SERVER_URL))
+ xml.link("href" => browse_note_url(note, :only_path => false))
xml.extensions do
xml.id note.id
if comment.author
json.uid comment.author.id
json.user comment.author.display_name
- json.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
+ json.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
end
json.action comment.event
if comment.author
xml.uid comment.author.id
xml.user comment.author.display_name
- xml.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
+ xml.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
end
xml.action comment.event
xml.instruct!
xml.rss("version" => "2.0",
+ "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do
xml.link url_for(:controller => :trace, :action => :list, :only_path => false)
xml.image do
- xml.url image_path("mag_map-rss2.0.png", :host => SERVER_URL)
+ xml.url image_url("mag_map-rss2.0.png")
xml.title t("trace.georss.title")
xml.width 100
xml.height 100
<% if defined?(GITHUB_AUTH_ID) -%>
<li><%= auth_button "github", "github" %></li>
<% end -%>
+ <% if defined?(WIKIPEDIA_AUTH_ID) -%>
+ <li><%= auth_button "wikipedia", "wikipedia" %></li>
+ <% end -%>
<li><%= auth_button "yahoo", "openid", :openid_url => "yahoo.com" %></li>
<li><%= auth_button "wordpress", "openid", :openid_url => "wordpress.com" %></li>
<li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
#windowslive_auth_secret: ""
#github_auth_id: ""
#github_auth_secret: ""
+ #wikipedia_auth_id: ""
+ #wikipedia_auth_secret: ""
# MapQuest authentication details
#mapquest_key: ""
# Mapzen authentication details
windowslive_auth_secret: "dummy"
github_auth_id: "dummy"
github_auth_secret: "dummy"
+ wikipedia_auth_id: "dummy"
+ wikipedia_auth_secret: "dummy"
alias old_log log
- def log(sql, name)
- if block_given?
- old_log(sql, name) do
- yield
- end
+ def translate_exception_class_with_timeout(e, sql)
+ if e.is_a?(Timeout::Error) || e.is_a?(OSM::APITimeoutError)
+ e
else
- old_log(sql, name)
- end
- rescue ActiveRecord::StatementInvalid => ex
- if ex.message =~ /^OSM::APITimeoutError: /
- raise OSM::APITimeoutError.new
- elsif ex.message =~ /^Timeout::Error: /
- raise Timeout::Error.new("time's up!")
- else
- raise
+ translate_exception_class_without_timeout(e, sql)
end
end
+
+ alias_method_chain :translate_exception_class, :timeout
end
end
end
facebook_options = { :name => "facebook", :scope => "email" }
windowslive_options = { :name => "windowslive", :scope => "wl.signin,wl.emails" }
github_options = { :name => "github", :scope => "user:email" }
+wikipedia_options = { :name => "wikipedia", :client_options => { :site => "https://commons.wikimedia.org" } }
if defined?(GOOGLE_OPENID_REALM)
google_options[:openid_realm] = GOOGLE_OPENID_REALM
provider :facebook, FACEBOOK_AUTH_ID, FACEBOOK_AUTH_SECRET, facebook_options if defined?(FACEBOOK_AUTH_ID)
provider :windowslive, WINDOWSLIVE_AUTH_ID, WINDOWSLIVE_AUTH_SECRET, windowslive_options if defined?(WINDOWSLIVE_AUTH_ID)
provider :github, GITHUB_AUTH_ID, GITHUB_AUTH_SECRET, github_options if defined?(GITHUB_AUTH_ID)
+ provider :mediawiki, WIKIPEDIA_AUTH_ID, WIKIPEDIA_AUTH_SECRET, wikipedia_options if defined?(WIKIPEDIA_AUTH_ID)
end
# Pending fix for: https://github.com/intridea/omniauth/pull/795
private: Прыватны доступ
destination: Мэтавы доступ
construction: Дарогі ў стадыі будаўніцтва
+ bicycle_shop: Крама ровараў
+ bicycle_parking: Паркоўка для ровараў
toilets: Прыбіральні
richtext_area:
edit: Рэдагаваць
alt: Увайсці праз рахунак Windows Live
github:
title: Уваход праз GitHub
+ alt: Увайсці праз уліковы запіс GitHub
yahoo:
title: Уваход праз Yahoo
alt: Уваход праз Yahoo OpenID
gravatar:
gravatar: Выкарыстоўваць Gravatar
link text: што гэта?
+ disabled: Граватар быў адключаны.
+ enabled: Паказ вашага Граватара быў уключаны.
new image: Дадаць выяву
keep image: Захаваць бягучую выяву
delete image: Выдаліць бягучую выяву
de copyright i llicència</a> per a més detalls.'
legal_title: Avisos legals
legal_html: "Aquest lloc web i molts altres serveis relacionats són operats formalment
- per l' \n<a href=\"http://osmfoundation.org/\">OpenStreetMap Fundació</a> (OSMF)
- \ en nom de la comunitat.\n<br> \nSi us plau <a href=\"http://osmfoundation.org/Contact\">contacteu
+ per la \n<a href=\"http://osmfoundation.org/\">Fundació OpenStreetMap</a> (OSMF)
+ \ en nom de la comunitat. L'ús de tots els serveis operats per l'OSMF es troba
+ subjecte a les nostres <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\npolítiques
+ d'ús acceptable</a> i a les nostres <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">polítiques
+ de privadesa</a>\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Contacteu
amb l'OSMF</a> \nsi teniu qüestions sobre llicències, drets d'autor o altres
aspectes legals."
partners_title: Socis
notifier:
diary_comment_notification:
- subject: '[OpenStreetMap] %{user}, va comentar sobre la vostra entrada del diari'
+ subject: '[OpenStreetMap] %{user} ha comentat en una entrada de diari'
hi: Hola %{to_user},
- header: '%{from_user} ha comentat en la vostra recent entrada del diari OpenStreetMap
+ header: '%{from_user} ha comentat en una entrada de diari de l''OpenStreetMap
amb el tema %{subject}:'
footer: També podeu llegir el comentari a les %{readurl} i es pot comentar als
%{commenturl} o respondre a les %{replyurl}
de col·laboracio</a>.
email address: 'Adreça de correu:'
confirm email address: 'Confirmeu l''adreça de correu electrònic:'
- not displayed publicly: No es mostrarà públicament (vegeu la <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
- title="wiki privacy policy including section on email addresses">política
- de privacitat</a>)
+ not displayed publicly: La vostra adreça no es mostrarà públicament (vegeu la
+ nostra <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy" title="wiki
+ privacy policy including section on email addresses">política de privadesa</a>
+ per a més informació)
display name: 'Nom visible:'
display name description: El nom d'usuari que es motrarà públicament. El podeu
canviar més endavant a les preferències.
key:
title: Llegenda
tooltip: Llegenda
- tooltip_disabled: La llegenda només està disponible per a la capa estàndard
+ tooltip_disabled: La llegenda no és disponible per a aquesta capa
map:
zoom:
in: Amplia
instructions:
continue_without_exit: Continuar a %{name}
slight_right_without_exit: Gira lleugerament a la dreta a %{name}
+ offramp_right_without_exit: Agafeu el carril de la dreta a %{name}
+ onramp_right_without_exit: Gireu a la dreta al carril a %{name}
+ endofroad_right_without_exit: Al final de la carretera gireu a la dreta a
+ %{name}
+ merge_right_without_exit: Incorporeu-vos a la dreta a %{name}
+ fork_right_without_exit: A la cruïlla gireu a la dreta a %{name}
turn_right_without_exit: Gira a la dreta per %{name}
sharp_right_without_exit: Gira a la dreta a %{name}
uturn_without_exit: Canvi de sentit a %{name}
sharp_left_without_exit: Gira a l'esquerra a %{name}
turn_left_without_exit: Gira a l'esquerra per %{name}
+ offramp_left_without_exit: Agafeu el carril de l'esquerra a %{name}
+ onramp_left_without_exit: Gireu a l'esquerra al carril a %{name}
+ endofroad_left_without_exit: Al final de la carretera gireu a l'esquerra a
+ %{name}
+ merge_left_without_exit: Incorporeu-vos a l'esquerra a %{name}
+ fork_left_without_exit: A la cruïlla gireu a l'esquerra a %{name}
slight_left_without_exit: Gira lleugerament a l'esquerra a %{name}
via_point_without_exit: (pel punt)
follow_without_exit: Segueix %{name}
description: Descripció
heading: Introduïu informació per una nova redacció
submit: Crea una redacció
- title: Creant una nova redacció
+ title: Creació d’una versió nova
show:
description: 'Descripció:'
heading: Mostrant la redacció "%{title}"
Mehr Informationen dazu, wie unsere Daten verwendet werden können und wie man auf unsere Urheberschaft hinweist,
kann man auf unserer <a href="http://osmfoundation.org/Licence">OSMF-Lizenzseite</a> und in den
<a href="http://wiki.openstreetmap.org/wiki/DE:Legal_FAQ">Häufigen rechtlichen Fragen (Legal FAQ)</a> nachlesen.
- more_2_html: "Obwohl OpenStreetMap „Open Data“ ist, können wir keine \nunentgeltliche
- Karten-API für Drittparteienentwickler bereitstellen.\nSiehe unsere <a href=\"http://wiki.openstreetmap.org/wiki/API_usage_policy\">API-Verwendungsrichtlinie</a>,\n<a
- href=\"http://wiki.openstreetmap.org/wiki/Tile_usage_policy\">Kachelverwendungsrichtlinie</a>\nund
- <a href=\"http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy\">Nominatim-Verwendungsrichtlinie</a>."
+ more_2_html: |-
+ Obwohl OpenStreetMap „Open Data“ ist, können wir keine
+ unentgeltliche Karten-API für Drittparteien bereitstellen.
+ Siehe unsere <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API-Verwendungsrichtlinie</a>,
+ die <a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy">Kachelverwendungsrichtlinie</a>
+ und die <a href="http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy">Nominatim-Verwendungsrichtlinie</a>.
contributors_title_html: Unsere Mitwirkenden
contributors_intro_html: 'Unsere Mitwirkenden sind tausende einzelne Menschen.
Wir beziehen auch offen lizenzierte Daten von nationalen Kartenagenturen und
confirm: Tesdiq ke
user_block:
new:
- title: '%{name} i bloqe vırazeno'
- heading: '%{name} i bloqe vırazeno'
+ title: '%{name}i rê blok vırazeno.'
+ heading: '%{name}i ro blok vırazeno.'
submit: Bloqe vırazê
back: Bloqan pêron bıvin
edit:
FAQ</a>.
more_2_html: |
Although OpenStreetMap is open data, we cannot provide a
- free-of-charge map API for third-party developers.
+ free-of-charge map API for third-parties.
See our <a href="https://operations.osmfoundation.org/policies/api/">API Usage Policy</a>,
<a href="https://operations.osmfoundation.org/policies/tiles/">Tile Usage Policy</a>
and <a href="https://operations.osmfoundation.org/policies/nominatim/">Nominatim Usage Policy</a>.
github:
title: Login with GitHub
alt: Login with a GitHub Account
+ wikipedia:
+ title: Login with Wikipedia
+ alt: Login with a Wikipedia Account
yahoo:
title: Login with Yahoo
alt: Login with a Yahoo OpenID
title: IRC
description: Interaktiivinen chat monilla eri kielillä ja monista eri aiheista.
switch2osm:
+ title: switch2osm (Vaihda OSM:iin)
description: Auta yrityksiä ja organisaatioita vaihtamaan OpenStreetMapiin pohjautuviin
karttoihin ja muihin palveluihin.
wiki:
tai muuunnellaan, sitä saa levittää eteenpäin vain samalla lisenssillä. Lisätietoja
on <a href=''%{copyright_path}''>Tekijänoikeus ja lisenssi</a> -sivulla.'
legal_title: Lakitekninen jako
- legal_html: |-
- Tämä ja monet muut OSM-sivustot ovat muodollisesti <a href='http://osmfoundation.org/'>OpenStreetMap-säätiön</a> (OSMF) hallinnoimia OSM-yhteisön puolesta.
- <a href='http://osmfoundation.org/Contact'>Ota yhteys OSMF:ään</a> lisensointi-, tekijänoikeus- ja muissa lakiteknisissä kysymyksissä.
+ legal_html: "Tämä ja monet muut OSM-sivustot ovat muodollisesti <a href='http://osmfoundation.org/'>OpenStreetMap-säätiön</a>
+ (OSMF) hallinnoimia OSM-yhteisön puolesta. Kaikkien näiden sivustojen käyttöön
+ sovelletaan <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nhyväksytyn
+ käytön käytäntöjä</a> ja <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">tietosuojakäytäntöä</a>
+ (molemmat sisällöt saatavilla vain englanniksi).\n<br> \n<a href='http://osmfoundation.org/Contact'>Ota
+ yhteys OSMF:ään</a> lisensointi-, tekijänoikeus- ja muissa lakiteknisissä kysymyksissä."
partners_title: Kumppanit
notifier:
diary_comment_notification:
instructions:
continue_without_exit: Jatka tiellä %{name}
slight_right_without_exit: Kaarra oikealle tielle %{name}
+ offramp_right_without_exit: Poistu oikealle liittymään tielle %{name}
+ onramp_right_without_exit: Käänny oikealle liittymään tielle %{name}
+ endofroad_right_without_exit: Tienpäässä käänny oikealle tielle %{name}
+ merge_right_without_exit: Liity oikealle tielle %{name}
+ fork_right_without_exit: Liittymässä ryhmity oikealle suuntaan %{name}
turn_right_without_exit: Käänny oikealle tielle %{name}
sharp_right_without_exit: Käänny jyrkästi oikealle tielle %{name}
uturn_without_exit: Tee U-käännös tiellä %{name}
sharp_left_without_exit: Käänny jyrkästi vasemmalle tielle %{name}
turn_left_without_exit: Käänny vasemmalle tielle %{name}
+ offramp_left_without_exit: Poistu vasemmalle liittymään tielle %{name}
+ onramp_left_without_exit: Käänny vasemmalle liittymään tielle %{name}
+ endofroad_left_without_exit: Tienpäässä käänny vasemmalle tielle %{name}
+ merge_left_without_exit: Liity vasemmalle tielle %{name}
+ fork_left_without_exit: Liittymässä ryhmity vasemmalle suuntaan %{name}
slight_left_without_exit: Kaarra vasemmalle tielle %{name}
via_point_without_exit: (reittipiste)
follow_without_exit: Seuraa tietä %{name}
description: Aide pour les entreprises et les organisations de commutation à
OpenStreetMap, en fonction des cartes et d’autres services.
wiki:
- url: http://wiki.openstreetmap.org/
+ url: https://wiki.openstreetmap.org/wiki/FR:Page_principale
title: wiki.openstreetmap.org
description: Parcourez le wiki pour la documentation approfondie d’OSM
about_page:
de remotion</a> o submitte un plancto immediate usante nostre <a href="http://dmca.openstreetmap.org/">formulario
in linea</a>.
trademarks_title_html: <span id="trademarks"></span>Marcas commercial
- trademarks_1_html: OpenStreetMap e le logotypo con le lupa es marcas registrate
- del Fundation OpenStreetMap. Si vos ha questiones sur le uso de iste marcas,
- invia los al <a href="http://wiki.osmfoundation.org/wiki/Licensing_Working_Group">gruppo
+ trademarks_1_html: OpenStreetMap, le logotypo con le lupa e "State of the Map"
+ es marcas registrate del Fundation OpenStreetMap. Si vos ha questiones sur
+ le uso de iste marcas, invia los al <a href="http://wiki.osmfoundation.org/wiki/Licensing_Working_Group">gruppo
de labor sur licentias</a>.
welcome_page:
title: Benvenite!
legal_title: Juridic
legal_html: "Iste sito e multe altere servicios associate es formalmente gerite
per le \n<a href=\"http://osmfoundation.org/\">Fundation OpenStreetMap</a>
- (OSMF) \nin nomine del communitate.\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Contacta
+ (OSMF) \nin nomine del communitate. Le uso de tote le servicios gerite per OSMF
+ es subjecte a nostre <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\npoliticas
+ de uso acceptabile</a> e a nostre <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">politica
+ de confidentialitate</a>\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Contacta
OSMF</a> \nsi vos ha questiones sur licentias, derectos de autor o altere themas
juridic."
partners_title: Partners
notifier:
diary_comment_notification:
- subject: '[OpenStreetMap] %{user} commentava un entrata de tu diario'
+ subject: '[OpenStreetMap] %{user} commentava un entrata de diario'
hi: Salute %{to_user},
- header: '%{from_user} ha commentate le entrata recente de tu diario de OpenStreetMap
+ header: '%{from_user} ha commentate le entrata recente de diario OpenStreetMap
con le subjecto %{subject}:'
footer: Tu pote tamben leger le commento a %{readurl} e tu pote commentar a
%{commenturl} o responder a %{replyurl}
track: Pista
bridleway: Sentiero pro cavallos
cycleway: Via cyclabile
+ cycleway_national: Pista cyclabile national
+ cycleway_regional: Pista cyclabile regional
+ cycleway_local: Pista cyclabile local
footway: Sentiero pro pedones
rail: Ferrovia
subway: Metro
private: Accesso private
destination: Traffico local
construction: Vias in construction
+ bicycle_shop: Magazin de bicyclettas
+ bicycle_parking: Parcamento de bicyclettas
+ toilets: Toilettes
richtext_area:
edit: Modificar
preview: Previsualisation
windowslive:
title: Aperir session con Windows Live
alt: Aperir session con un conto de Windows Live
+ github:
+ title: Aperir session con GitHub
+ alt: Aperir session con un conto de GitHub
yahoo:
title: Aperir session con Yahoo
alt: Aperir session con un OpenID de Yahoo
de contributor</a>.
email address: 'Adresse de e-mail:'
confirm email address: 'Confirmar adresse de e-mail:'
- not displayed publicly: Non monstrate publicamente (vide le <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
- title="politica de confidentialitate del wiki includente un section super
- adresses de e-mail">politica de confidentialitate</a>)
+ not displayed publicly: Tu adresse non es monstrate publicamente. Vide nostre
+ <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy" title="Politica
+ de confidentialitate de OSMF includente un section sur adresses de e-mail">politica
+ de confidentialitate</a> pro plus information.
display name: 'Nomine public:'
display name description: Tu nomine de usator monstrate publicamente. Tu pote
cambiar lo plus tarde in le preferentias.
gravatar:
gravatar: Usar Gravatar
link text: que es isto?
+ disabled: Gravatar ha essite disactivate.
+ enabled: Tu Gravatar ha essite activate e essera monstrate desde ora.
new image: Adder un imagine
keep image: Retener le imagine actual
delete image: Remover le imagine actual
key:
title: Legenda
tooltip: Legenda
- tooltip_disabled: Le legenda es disponibile solmente pro le strato Standard
+ tooltip_disabled: Le legenda non es disponibile pro iste strato
map:
zoom:
in: Zoom avante
instructions:
continue_without_exit: Continuar sur %{name}
slight_right_without_exit: Curva suave a dextra verso %{name}
+ offramp_right_without_exit: Prende le rampa a dextra verso %{name}
+ onramp_right_without_exit: Girar a dextra sur le rampa verso %{name}
+ endofroad_right_without_exit: Al fin del strata, girar a dextra verso %{name}
+ merge_right_without_exit: Junger a dextra verso %{name}
+ fork_right_without_exit: Al bifurcation, girar a dextra verso %{name}
turn_right_without_exit: Girar a dextra verso %{name}
sharp_right_without_exit: Curva acute a dextra verso %{name}
uturn_without_exit: Retornar preter %{name}
sharp_left_without_exit: Curva acute a sinistra verso %{name}
turn_left_without_exit: Girar a sinistra verso %{name}
+ offramp_left_without_exit: Prende le rampa al sinistra verso %{name}
+ onramp_left_without_exit: Girar a sinistra sur le rampa verso %{name}
+ endofroad_left_without_exit: Al fin del strata, girar a sinistra verso %{name}
+ merge_left_without_exit: Junger a sinistra verso %{name}
+ fork_left_without_exit: Al bifurcation, girar a sinistra verso %{name}
slight_left_without_exit: Curva suave a sinistra verso %{name}
via_point_without_exit: (puncto intermedie)
follow_without_exit: Sequer %{name}
diary_entry:
user: Notandi
title: Fyrirsögn
- latitude: Lengdargráða
- longitude: Breiddargráða
+ latitude: Breiddargráða
+ longitude: Lengdargráða
language: Tungumál
friend:
user: Notandi
visible: Sýnileg
name: Nafn
size: Stærð
- latitude: Lengdargráða
- longitude: Breiddargráða
- public: Sýnileg öllum
+ latitude: Breiddargráða
+ longitude: Lengdargráða
+ public: Opinbert
description: Lýsing
message:
sender: Sendandi
body: Texti
recipient: Móttakandi
user:
- email: Netfang
+ email: Tölvupóstfang
active: Virkur
display_name: Sýnilegt nafn
description: Lýsing
with_name_html: '%{name} (%{id})'
editor:
default: Sjálfgefið (núna %{name})
+ potlatch:
+ name: Potlatch 1
+ description: Potlatch 1 (ritill í vafra)
id:
name: iD
+ description: iD (ritill í vafra)
+ potlatch2:
+ name: Potlatch 2
+ description: Potlatch 2 (ritill í vafra)
remote:
name: Fjarstýring
description: Fjarstýring (JOSM eða Merkaartor)
created: Búið til
closed: Lokað
created_html: Bjó til <abbr title='%{title}'>%{time} síðan</abbr>
+ closed_html: Lokað <abbr title='%{title}'> fyrir %{time} síðan</abbr>
+ created_by_html: Búið til <abbr title='%{title}'> fyrir %{time} síðan</abbr> af
+ %{user}
+ deleted_by_html: Eytt <abbr title='%{title}'> fyrir %{time} síðan</abbr> af %{user}
+ edited_by_html: Breytt <abbr title='%{title}'> fyrir %{time} síðan</abbr> af %{user}
+ closed_by_html: Lokað <abbr title='%{title}'> fyrir %{time} síðan</abbr> af %{user}
version: Útgáfa
in_changeset: Breytingasett
anonymous: nafnlaus
relation: Vensl (%{count})
relation_paginated: Vensl (%{x}-%{y} af %{count})
comment: Athugasemdir (%{count})
+ hidden_commented_by: Falin umsögn frá %{user} <abbr title='%{exact_time}'>%{when}
+ síðan</abbr>
+ commented_by: Umsögn frá %{user} <abbr title='%{exact_time}'>%{when} síðan</abbr>
changesetxml: Breytingasetts XML sniði
osmchangexml: osmChange XML sniði
feed:
history_title: 'Saga leiðar: %{name}'
nodes: Hnútar
relation:
+ title: 'Vensl: %{name}'
+ history_title: 'Ferill vensla: %{name}'
members: Meðlimir
relation_member:
entry: '%{type} %{name}'
way: leið
relation: venslum
start_rjs:
+ feature_warning: Hleð inn %{num_features} fitjum (kortahlutum), sem gæti valdið
+ því að vafrinn þinn verði hægur eða svari ekki. Ertu viss um að þú viljir
+ birta þessi gögn?
load_data: Hlaða inn gögnum
loading: Hleð inn gögnum...
tag_details:
new_note: Nýr minnispunktur
description: Lýsing
hidden_title: 'Falinn minnispunktur #%{note_name}'
+ query:
+ title: Rannsaka fitjur
+ introduction: Smelltu á kortið til að finna fitjur í nágrenninu.
+ nearby: Nálægar fitjur
+ enclosing: Umlykjandi fitjur
changeset:
changeset_paging_nav:
showing_page: Síða %{page}
next: Næsta »
- previous: « Fyrri
+ previous: « Fyrra
changeset:
- anonymous: Ónafngreindur
+ anonymous: Nafnlaus
no_edits: (engar breytingar)
view_changeset_details: Skoða breytingasett
changesets:
user_title: Blogg %{user}
leave_a_comment: Bæta við athugasemd
login_to_leave_a_comment: '%{login_link} til að bæta við athugasemd'
- login: Innskráðu þig
+ login: Innskrá
save_button: Vista
no_such_entry:
title: Þessi bloggfærsla er ekki til
other:
title: Aðrar heimildir
options: Valmöguleikar
- format: 'Snið:'
- scale: Skali
+ format: Snið
+ scale: Kvarði
max: hámark
- image_size: 'Stærð myndar:'
+ image_size: Stærð myndar
zoom: Aðdráttur
add_marker: Bæta punkti á kortið
- latitude: 'Lengdargráða:'
- longitude: 'Breiddargráða:'
+ latitude: 'Lengd:'
+ longitude: 'Breidd:'
output: Úttak
paste_html: Notaðu þennan HTML kóða til að bæta kortinu á vefsíðu
export_button: Niðurhala
taxiway: Akstursbraut
terminal: Flugstöð
amenity:
+ animal_shelter: Dýraheimili
arts_centre: Listamiðstöð
atm: Hraðbanki
bank: Banki
brothel: Hóruhús
bureau_de_change: Gjaldeyrisskipti
bus_station: Strætóstöð
- cafe: Kaffihúsið
+ cafe: Kaffihús
car_rental: Bílaleigan
car_wash: Bílaþvottastöðin
casino: Spilavíti
charging_station: Hleðslustöð
childcare: Barnagæsla
- cinema: Kvikmyndarhús
+ cinema: Kvikmyndahús
clinic: Heilsugæsla
clock: Klukka
college: Framhaldskóli
village_hall: Hreppsskrifstofa
waste_basket: Ruslafata
waste_disposal: Ruslsöfnun
+ youth_centre: Ungmennamiðstöð
boundary:
administrative: Stjórnsýslumörk
census: Manntalsmörk
gardener: Garðyrkjumaður
painter: Málari
photographer: Ljósmyndari
- plumber: Pípari
+ plumber: Pípulagningamaður
shoemaker: Skósmiður
tailor: Klæðskeri
"yes": Handverkshús
platform: Kerfishögun
primary: Stofnvegur
primary_link: Stofnvegur
+ proposed: Tillaga um veglagningu
+ raceway: Keppnisbraut
residential: Íbúðagata
rest_area: Hvíldarsvæði
road: Vegur
steps: Tröppur
street_lamp: Ljósastaur
track: Spor
+ traffic_signals: Umferðarljós
trail: Slóði
trunk: Stofnbraut
trunk_link: Stofnbraut
heritage: Sögulegur staður
house: Hús
icon: Táknmynd
+ manor: Herragarður
memorial: Minnismerki
mine: Náma
monument: Minnisvarði
+ roman_road: Rómverskur vegur
ruins: Rústir
stone: Steinn
tomb: Gröf
"yes": Tenging
landuse:
allotments: Úthlutuð svæði
+ basin: Lægð
cemetery: Grafreitur
commercial: Verslunarsvæði
farm: Býli
railway: Lestarteinar
reservoir: Uppistöðulón
residential: Íbúðasvæði
+ vineyard: Vínekra
+ "yes": Landnotkun
leisure:
bird_hide: Fuglaskoðunarhús
club: Klúbbur
+ common: Almenningur
fitness_centre: Líkamsræktarstöð
garden: Garður
golf_course: Golfvöllur
- horse_riding: Festaferðir
+ horse_riding: Hestaferðir
ice_rink: Skautahöll
marina: Bátalægi
miniature_golf: Mínigolf
land: Land
marsh: Votlendi
moor: Mýri
+ mud: Leir
peak: Tindur
point: Nes
reef: Sker
rock: Rokk
saddle: Söðull
sand: Sandur
+ scrub: Kjarr
spring: Lind
stone: Steinn
strait: Sund
volcano: Eldfjall
water: Vatn
wetland: Votlendi
- wood: Náttúrulegur skógur
+ wood: Skógur
office:
accountant: Bókari
administrative: Stjórnsýsla
architect: Arkítektar
company: Fyrirtæki
estate_agent: Fasteignasali
- travel_agent: Ferðaskrifstofan
+ lawyer: Lögmaður
+ travel_agent: Ferðaskrifstofa
"yes": Skrifstofa
place:
allotments: Úthlutuð svæði
airport: Flugvöllur
city: Borg
country: Land
- county: Landið
- farm: Sveitabærinn
+ county: Sýsla
+ farm: Býli
hamlet: Byggðakjarni
house: Hús
houses: Hús
books: Bókabúð
butcher: Slátrari
car: Bílavöruverslun
+ car_parts: Bílapartar
carpet: Teppabúð
clothes: Fataverslun
computer: Tölvuverslun
florist: Blómabúð
food: Matvöruverslun
funeral_directors: Útfararstjóri
- furniture: Húsgagnaverslun
+ furniture: Húsgögn
gallery: Gallerí
garden_centre: Garðyrkja
general: Almenn verslun
rapids: Flúðir
river: Á
stream: Lækur
- waterfall: Fossinn
+ waterfall: Foss
"yes": Siglingaleið
admin_levels:
level5: Héraðsmörk
start_mapping: Hefja kortlagningu
sign_up_tooltip: Stofnaðu aðgang til að geta breytt kortinu
edit: Breyta
- history: Breytingaskrá
+ history: Sagnfræði
export: Niðurhala
data: Gögn
export_data: Flytja út gögn
outbox: úthólf
from: Frá
subject: Titill
- date: Dagsetning
+ date: Döðlur
no_messages_yet: Þú hefur ekki fengið nein skilboð. Hví ekki að hafa samband
við einhverja %{people_mapping_nearby_link}?
people_mapping_nearby: nálæga notendur
to: Til
where_am_i: Hvar er ég?
where_am_i_title: Notar leitarvélina til að lýsa núverandi staðsetningu á kortinu
- submit_text: Ok
+ submit_text: Fara
key:
table:
entry:
- Smálest
- sporvagn
cable:
- - Skíðalyfta
+ - Kláflyfta
- stólalyfta
runway:
- Flugbraut
- tindur
tunnel: Umkringt punktalínum = göng
bridge: Umkringt svartri línu = brú
- private: Í einkaeigu
+ private: Einkaaðgangur
destination: Umferð leyfileg á ákveðinn áfangastað
construction: Vegir í byggingu
richtext_area:
windowslive:
title: Skrá inn með Windows Live
alt: Skrá inn með Windows Live aðgangi
+ github:
+ title: Skrá inn með GitHub
yahoo:
title: Skrá inn með Yahoo
alt: Skrá inn með Yahoo OpenID-aðgangi
createnote_tooltip: Bæta við minnispunkti á kortið
map_notes_zoom_in_tooltip: Renndu að til að sjá minnispunkta á kortinu
map_data_zoom_in_tooltip: Renndu að til að skoða gögn kortsins
+ queryfeature_tooltip: Rannsaka fitjur
+ queryfeature_disabled_tooltip: Renndu inn til að rannsaka fitjur
changesets:
show:
comment: Athugasemd
node: Hnútur
way: Leið
relation: Vensl
+ nothing_found: Engar fitjur fundust
redaction:
edit:
description: Lýsing
copyright: 저작권
community: 커뮤니티
community_blogs: 커뮤니티 블로그
- community_blogs_title: OpenStreetMap 커뮤니티의 구성원에서의 블로그
+ community_blogs_title: OpenStreetMap 커뮤니티의 회원에서의 블로그
foundation: 재단
foundation_title: OpenStreetMap 재단
make_a_donation:
bridleway: 승마로
cycleway: 자전거 도로
cycleway_national: 국립 자전거 도로
+ cycleway_regional: 지역별 자전거 도로
cycleway_local: 일반 자전거 도로
footway: 보도
rail: 철도
약관</a>에 동의해야합니다.
email address: '이메일 주소:'
confirm email address: '이메일 주소 확인:'
- not displayed publicly: 공개적으로 표시되지 않습니다 (<a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
- title="이메일 주소 부분을 포함한 위키 개인정보 정책">개인 정보 정책</a>을 참조하세요)
+ not displayed publicly: 당신의 주소는 공개되지 않습니다. 자세한 내용은 <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy"
+ title="OSMF privacy policy including section on email addresses">개인정보 정책</a>을
+ 참조하시기 바랍니다.
display name: '표시 이름:'
display name description: 공개적으로 표시되는 사용자 이름입니다. 나중에 환경 설정에서 바꿀 수 있습니다.
external auth: '제3자 인증:'
latitude: '위도:'
longitude: '경도:'
update home location on click: 지도에서 클릭하면 집 위치로 업데이트할까요?
- save changes button: 변경 사항 저장
+ save changes button: 변경사항 저장
make edits public button: 내 편집을 공개하기
return to profile: 프로필로 돌아가기
flash update success confirm needed: 사용자 정보를 성공적으로 업데이트했습니다. 새 이메일 주소를 확인하기
instructions:
continue_without_exit: '%{name}(으)로 계속 가세요'
slight_right_without_exit: '%{name}을(를) 따라 오른쪽으로 완만하게 도세요'
+ offramp_right_without_exit: '%{name}을(를) 향해 램프로 우회전'
onramp_right_without_exit: 경사로에서 %{name}(으)로 우회전
endofroad_right_without_exit: 길 끝쪽에서 %{name}(으)로 우회전
+ merge_right_without_exit: '%{name}을(를) 따라 우회전'
fork_right_without_exit: 분기점에서 %{name}(으)로 우회전
turn_right_without_exit: '%{name}을(를) 따라 오른쪽으로 도세요'
sharp_right_without_exit: '%{name}을(를) 따라 오른쪽으로 꺾으세요'
uturn_without_exit: '%{name}을(를) 따라 유턴하세요'
sharp_left_without_exit: '%{name}을(를) 따라 왼쪽으로 꺾으세요'
turn_left_without_exit: '%{name}을(를) 따라 왼쪽으로 도세요'
+ offramp_left_without_exit: '%{name}을(를) 향해 램프로 좌회전'
onramp_left_without_exit: 경사로에서 %{name}(으)로 좌회전
endofroad_left_without_exit: 길 끝쪽에서 %{name}(으)로 좌회전
+ merge_left_without_exit: '%{name}을(를) 따라 좌회전'
fork_left_without_exit: 분기점에서 %{name}(으)로 좌회전
slight_left_without_exit: '%{name}을(를) 따라 왼쪽으로 완만하게 도세요'
via_point_without_exit: (점을 통해)
og lisenssiden</a> for detaljer.'
legal_title: Juridisk
legal_html: |-
- Dette nettstedet og mange tilknyttede tjenester drives formelt av <a href='http://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF) på vegne av fellesskapet.
+ Dette nettstedet og mange tilknyttede tjenester drives formelt av <a href='http://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF) på vegne av fellesskapet. Bruken av alle OSMF-drevne tjenester er gjenstand for vår <a href="http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">politikk for akseptabel bruk</a> og vår <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy">personvernspolitikk</a>
<br>
Vennligst <a href='http://osmfoundation.org/Contact'>kontakt OSMF</a> om du har spørsmål knyttet til lisensiering, opphavsrett eller andre juridiske spørsmål.
partners_title: Partnere
notifier:
diary_comment_notification:
- subject: '[OpenStreetMap] %{user} kommenterte et innlegg i dagboka di'
+ subject: '[OpenStreetMap] %{user} kommenterte et dagbokinnlegg'
hi: Hei %{to_user},
- header: '%{from_user} har kommentert på ditt siste OpenStreetMap-dagbokinnlegg
- med emnet %{subject}:'
+ header: '%{from_user} har kommentert på OpenStreetMap-dagbokinnlegget med emnet
+ %{subject}:'
footer: Du kan også lese kommentaren på %{readurl} og du kan kommentere på %{commenturl}
eller svare på %{replyurl}
message_notification:
license_agreement: Når du bekrefter kontoen din må du godkjenne <a href="http://www.osmfoundation.org/wiki/License/Contributor_Terms">bidragsytervilkårene</a>.
email address: 'E-postadresse:'
confirm email address: 'Bekreft e-postadresse:'
- not displayed publicly: Ikke vist offentlig (se <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
+ not displayed publicly: Adressa di vises ikke offentlig, se <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
title="Personvernpolitikk for Wiki-en inklusiv avsnitt om e-postadressser">vår
- personvernpolitikk</a>)
+ personvernpolitikk</a> for mer informasjon.
display name: 'Visningsnavn:'
display name description: Ditt offentlig fremviste brukernavn. Du kan endre
dette senere i innstillingene.
key:
title: Kartsymbol
tooltip: Kartsymbol
- tooltip_disabled: Kartnøkkel bare tilgjengelig for standardlag
+ tooltip_disabled: Kartnøkkel ikke tilgjengelig for dette laget
map:
zoom:
in: Forstørr utvalg
volcano: Vulkaan
water: Water
wetland: Moeras
- wood: Bos
+ wood: Bomen
office:
accountant: Boekhouder
administrative: Administratie
legal_title: Juridisch
legal_html: "Deze site en tal van andere diensten worden formeel beheerd door
\n<a href=\"http://osmfoundation.org/\">OpenStreetMap Foundation</a> (OSMF)
- \nnamens de gemeenschap.\n<br> \n<a href=\"http://osmfoundation.org/Contact\">Neem
- contact op met de OSMF</a> \nals u vragen of problemen hebt in verband met licenties,
- auteursrechten of andere juridische zaken."
+ \nnamens de gemeenschap. Het gebruik van alle door OSMF aangeboden diensten
+ is onderworpen\naan ons <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\nBeleid
+ voor aanvaardbaar gebruik</a> en ons <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">Privacybeleid</a>.\n<br>
+ \n<a href=\"http://osmfoundation.org/Contact\">Neem contact op met de OSMF</a>
+ \nals u vragen of problemen hebt in verband met licenties, auteursrechten of
+ andere juridische zaken."
partners_title: Partners
notifier:
diary_comment_notification:
subject: '[OpenStreetMap] %{user} heeft een reactie bij uw dagboek geplaatst'
hi: Hallo %{to_user},
- header: '%{from_user} heeft een reactie geplaatst bij uw recente OpenStreetMap-dagboekbericht
+ header: '%{from_user} heeft een reactie geplaatst bij uw OpenStreetMap-dagboekbericht
met het onderwerp %{subject}:'
footer: U kunt de reactie ook lezen op %{readurl} en u kunt zelf ook reageren
op %{commenturl} of antwoorden op %{replyurl}
track: Spoor
bridleway: Ruiterpad
cycleway: Fietspad
- cycleway_national: Nationale fietsweg
- cycleway_regional: Regionale fietsweg
- cycleway_local: Lokaal fietspad
- footway: Voetpad
- rail: Spoor
+ cycleway_national: Nationale fietsroute
+ cycleway_regional: Regionale fietsroute
+ cycleway_local: Lokale fietsroute
+ footway: Wandelpad of voetpad
+ rail: Spoorweg
subway: Metro
tram:
- Licht spoor
- terminal
admin: Bestuurlijke grens
forest: Bos
- wood: Bos
+ wood: Bomen
golf: Golfbaan
park: Park
resident: Bewoond gebied
common:
- - Algemeen
+ - Gemene grond
- weide
retail: Winkelgebied
industrial: Industriegebied
- commercial: Winkelgebied
+ commercial: Commercieel gebied
heathland: Heide
lake:
- Meer
no_auto_account_create: Helaas is het niet mogelijk om automatisch een gebruiker
voor u aan te maken.
contact_webmaster: Neem contact op met de <a href="%{webmaster}">webmaster</a>
- om een gebruiker te laten maken. We proberen uw aanvraag dan zo snel mogelijk
+ om een account te laten maken. We proberen uw aanvraag dan zo snel mogelijk
af te handelen.
about:
header: Open en te bewerken
voor bijdragen</a>.
email address: 'E-mailadres:'
confirm email address: 'E-mailadres bevestigen:'
- not displayed publicly: Niet openbaar gemaakt. Zie <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
- title="wiki privacyovereenkomst met een sectie over e-mailadressen">Privacyovereenkomst</a>.
+ not displayed publicly: Uw adres wordt niet openbaar gemaakt, zie ons <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
+ title="OSMF privacybeleid met een paragraaf over e-mailadressen">Privacybeleid</a>
+ voor meer informatie.
display name: 'Weergavenaam:'
display name description: Uw openbare gebruikersnaam. U kunt deze later in uw
voorkeuren wijzigen.
opnieuw laten verzenden</a>.
confirm_resend:
success: Er is ter bevestiging een e-mail verstuurd naar %{email} en als u uw
- gebruiker hebt bevestigd, kunt u gaan mappen.<br /><br />Als u een spamfilter
+ account hebt bevestigd, kunt u gaan mappen.<br /><br />Als u een spamfilter
gebruikt die per e-mail een bevestiging stuurt, zorg er dan voor dat u %{sender}
toestaat. Dit systeem stuurt geen antwoord op bevestigingsverzoeken.
failure: De gebruiker %{name} is niet gevonden.
key:
title: Legenda
tooltip: Legenda
- tooltip_disabled: Legenda is alleen beschikbaar voor standaardlaag
+ tooltip_disabled: Legenda is niet beschikbaar voor deze laag
map:
zoom:
in: Inzoomen
slight_right_without_exit: Flauwe bocht naar rechts naar %{name}
offramp_right_without_exit: Neem de oprit aan de rechterkant naar %{name}
onramp_right_without_exit: Sla rechtsaf op de oprit naar %{name}
- endofroad_right_without_exit: Sla op het einde van de weg rechtsaf naar %{name}
+ endofroad_right_without_exit: Sla rechtsaf aan het einde van de weg naar %{name}
merge_right_without_exit: Voeg rechts in naar %{name}
- fork_right_without_exit: Sla bij de splitsing rechtsaf naar %{name}
+ fork_right_without_exit: Sla rechtsaf bij de splitsing naar %{name}
turn_right_without_exit: Sla rechtsaf naar %{name}
sharp_right_without_exit: Scherp rechtsaf naar %{name}
uturn_without_exit: U-bocht langs %{name}
turn_left_without_exit: Sla linksaf naar %{name}
offramp_left_without_exit: Neem de oprit aan de linkerkant naar %{name}
onramp_left_without_exit: Sla linksaf op de oprit naar %{name}
- endofroad_left_without_exit: Sla op het einde van de weg linksaf naar %{name}
+ endofroad_left_without_exit: Sla linksaf bij het einde van de weg naar %{name}
merge_left_without_exit: Voeg links in naar %{name}
- fork_left_without_exit: Sla bij de splitsing linksaf naar %{name}
+ fork_left_without_exit: Sla linksaf bij de splitsing naar %{name}
slight_left_without_exit: Flauwe bocht naar links naar %{name}
via_point_without_exit: (via punt)
follow_without_exit: Volg %{name}
name: Potlatch 2
description: Potlatch 2 (w przeglądarce)
remote:
- name: Zewnętrzny edytor
+ name: Zdalny program
description: Zdalny program (JOSM lub Merkaartor)
browse:
created: Utworzone
javascripts:
close: Zamknij
share:
- title: Udostępnij
+ title: Udostępnianie
cancel: Anuluj
image: Obraz
link: Odnośnik lub HTML
popup: Jesteś w promieniu {distance} {unit} od tego punktu
base:
standard: Podstawowa
- cycle_map: Mapa rowerowa
- transport_map: Transport publiczny
- hot: Pomoc humanitarna
+ cycle_map: Rowerowa
+ transport_map: Transportu publicznego
+ hot: Pomocy humanitarnej
layers:
header: Warstwy mapy
notes: Uwagi
como o nome de um restaurante ou o limite de velocidade de uma rodovia.
rules:
title: Regras!
- paragraph_1_html: O OpenStreetMap tem poucas regras formas mas espera que todos
+ paragraph_1_html: O OpenStreetMap tem poucas regras formais mas espera que todos
os participantes contribuam e se comuniquem com a comunidade. Se estiver pensando
em atividades que não sejam editar manualmente, lei a e siga as orientações
em <a href='http://wiki.openstreetmap.org/wiki/Pt:Import/Guidelines'>Importações</a>
legal_title: Termos legais
legal_html: "Este site e outros serviços relacionados são formalmente geridos
pela \n<a href='http://osmfoundation.org/'>OpenStreetMap Foundation</a> (OSMF)
- \nem nome da comunidade.\n<br> \nPor favor <a href='http://osmfoundation.org/Contact'>contacte
- a OSMF</a> \nse tiver questões sobre a licença, direitos de autor, questões
- legais ou problemas."
+ \nem nome da comunidade. A utilização de todos os serviços operados pela OSMF
+ está sujeita às nossas normas de <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">Utilização
+ Aceitável</a> e de <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">Privacidade</a>\n<br>
+ \nPor favor <a href='http://osmfoundation.org/Contact'>contacte a OSMF</a> \nse
+ tiver questões relacionadas com licenças, direitos de autor, questões legais
+ ou problemas."
partners_title: Parceiros
notifier:
diary_comment_notification:
- subject: '[OpenStreetMap] %{user} comentou numa entrada do seu diário'
+ subject: '[OpenStreetMap] %{user} comentou uma entrada de diário'
hi: Olá %{to_user},
- header: '%{from_user} comentou na sua entrada recente do diário no OpenStreetMap
- com o assunto %{subject}:'
+ header: '%{from_user} comentou a entrada do diário OpenStreetMap com o assunto
+ %{subject}:'
footer: Também pode ler o comentário em %{readurl} e comentar em %{commenturl}
ou responder em %{replyurl}
message_notification:
revoke:
administrator: Retirar acesso de administrador
moderator: Retirar acesso de moderador
- block_history: bloqueios recebidos
- moderator_history: bloqueios feitos
+ block_history: Bloqueios ativos
+ moderator_history: Bloqueios feitos
comments: Comentários
- create_block: bloquear este utilizador
- activate_user: ativar este utilizador
- deactivate_user: desativar este utilizador
+ create_block: Bloquear este utilizador
+ activate_user: Ativar este utilizador
+ deactivate_user: Desativar este utilizador
confirm_user: Confirmar esse utilizador
- hide_user: ocultar este utilizador
- unhide_user: descobrir este utilizador
- delete_user: eliminar este utilizador
+ hide_user: Ocultar este utilizador
+ unhide_user: Desocultar este utilizador
+ delete_user: Eliminar este utilizador
confirm: Confirmar
friends_changesets: alterações dos amigos
friends_diaries: ver as entradas em diários dos amigos
key:
title: Legenda do mapa
tooltip: Legenda do mapa
- tooltip_disabled: Legenda do Mapa disponível apenas no Mapa Padrão
+ tooltip_disabled: Legenda do Mapa indisponível para esta camada
map:
zoom:
in: Aproximar
key:
title: Легенда карты
tooltip: Условные знаки
- tooltip_disabled: Ð\9aлÑ\8eÑ\87евÑ\8bе каÑ\80Ñ\82Ñ\8b не доступны для этого слоя
+ tooltip_disabled: УÑ\81ловнÑ\8bе знаки не доступны для этого слоя
map:
zoom:
in: Приблизить
hide: Скрыть
resolve: Обработать
reactivate: Переоткрыть
- comment_and_resolve: Ð\9fÑ\80окомменÑ\82иÑ\80овать и обработать
- comment: Ð\9fÑ\80окомменÑ\82иÑ\80овать
+ comment_and_resolve: Ð\9eÑ\82веÑ\82ить и обработать
+ comment: Ð\9eÑ\82веÑ\82ить
edit_help: Передвиньте карту и увеличьте место, которые вы хотите править, затем
кликните здесь.
directions:
entry: Zveza %{relation_name}
entry_role: Zveza %{relation_name} (kot %{relation_role})
not_found:
- sorry: 'Oprostite, %{type} #%{id} ni mogoče najti.'
+ sorry: 'Žal %{type} #%{id} ni mogoče najti.'
type:
node: vozlišče
way: pot
relation: zveza
changeset: Paket sprememb
+ note: opomba
timeout:
sorry: Oprostite, podatki za %{type} z ID-jem %{id} se predolgo prenašajo.
type:
way: pot
relation: zveza
changeset: Paket sprememb
+ note: opomba
redacted:
redaction: Redakcija %{id}
message_html: Verzija %{version} te %{type} ne more biti prikazana, ker je bila
title_user: Paketi sprememb uporabnika %{user}
title_friend: Paket sprememb vaših prijateljev
title_nearby: Paketi sprememb bližnjih uporabnikov
- empty: Ni najdenih množic sprememb.
- empty_area: Na tem področju ni množic sprememb.
+ empty: Ni najdenih paketov sprememb.
+ empty_area: Na tem področju ni paketov sprememb.
+ empty_user: Ni paketov sprememb tega uporabnika.
+ no_more: Ni najdenih več paketov sprememb.
+ no_more_area: Ni več paketov sprememb na tem področju.
+ no_more_user: Ni več paketov sprememb tega uporabnika.
load_more: Naloži več
timeout:
sorry: Žal je seznam zahtevanih sprememb predolg za prenos.
rss:
+ title_all: Razprava o paketu sprememb OpenStreetMap
+ title_particular: 'Razprava o paketu sprememb OpenStreetMap #%{changeset_id}'
+ comment: 'Nov komentar o paketu sprememb #%{changeset_id} uporabnika %{author}'
commented_at_html: Posodobljeno %{when} nazaj
commented_at_by_html: Posodobil %{user} %{when} nazaj
full: Celoten pogovor
planet:
title: Planet OSM
description: Redno posodabljane kopije celotne podatkovne zbirke OpenStreetMap
+ overpass:
+ title: Overpass API
+ description: Prenesi to območje iz zrcalnega strežnika podatkovne zbirke
+ OpenStreetMap
geofabrik:
title: Prenosi Geofabrik
description: Redno posodabljani izvlečki celin, držav in izbranih mest
cinema: Kinematograf
clinic: Klinika
clock: Ura
- college: Srednja šola
+ college: Fakulteta
community_centre: Center skupnosti
courthouse: Sodišče
crematorium: Krematorij
motorcycle_parking: Parkirišče motornih koles
nightclub: Nočni klub
nursery: Vrtec
- nursing_home: Dom za ostarele
+ nursing_home: Dom za starejše
office: Pisarne
parking: Parkirišče
parking_entrance: Vhod v parkirišče
pharmacy: Lekarna
- place_of_worship: Cerkev
+ place_of_worship: Mesto za čaščenje
police: Policija
post_box: Poštni nabiralnik
post_office: Pošta
waste_basket: Koš za odpadke
youth_centre: Mladinski center
boundary:
- administrative: Upravne meje
+ administrative: Upravna meja
census: Popisna meja
national_park: Nacionalni Park
protected_area: Zavarovano območje
bridleway: Jahalna pot
bus_guideway: Turistični avtobus
bus_stop: Avtobusna postaja
- construction: Autocesta v izgradnji
+ construction: Cesta v izgradnji
cycleway: Kolesarska steza
elevator: Dvigalo
emergency_access_point: Dostop za interventna vozila
garages: Garaže
grass: Travnik
greenfield: Pripravljeno za gradbišče
- industrial: Industrijska cona
+ industrial: Industrijsko podočje
landfill: Smetišče
meadow: Travnik
military: Vojaško območje
island: Otok
land: Otok
marsh: Močvirje
- moor: Močvirje
+ moor: Pušča
mud: Blato
peak: Vrh
point: Točka
wetland: Mokrišče
wood: Pragozd
office:
- accountant: Računovodja
+ accountant: Računovodstvo
administrative: Administracija
architect: Arhitekt
company: Podjetje
islet: Otoček
isolated_dwelling: Osamljena hiša
locality: Krajevno ime
- moor: Muring
+ moor: Pušča
municipality: Občina
neighbourhood: Mestna četrt
postcode: Poštna številka
bakery: Pekarna
beauty: Salon lepote
beverages: Trgovina pijač
- bicycle: Trgovina koles
+ bicycle: Kolesarska trgovina
books: Knjigarna
boutique: Butik
butcher: Mesar
car_parts: Avtomobilski deli
car_repair: Avtoservis
carpet: Prodajalna preprog
- charity: Dobrodelni trgovina
+ charity: Trgovina za dobrodelne namene
chemist: Kemična trgovina
clothes: Trgovina z oblekami
computer: Računalniška trgovina
- confectionery: Trgovina sladkarij
+ confectionery: Slaščičarna
convenience: Minimarket
copyshop: Kopirnica
- cosmetics: Drogerija
+ cosmetics: Trgovina s kozmetiko
deli: Delikatesna trgovina
department_store: Trgovska hiša
discount: Outlet
doityourself: Orodjarna
dry_cleaning: Čistilnica
- electronics: Elektronska trgovina
+ electronics: Trgovina z elektroniko
estate_agent: Nepremičninska agencija
farm: Kmečka trgovina
fashion: Modna trgovina
newsagent: Trafika
optician: Optik
organic: Trgovina z ekološko hrano
- outdoor: Trgovina na prostem
+ outdoor: Trgovina za dejavnosti na prostem
pet: Trgovina za male živali
pharmacy: Lekarna
photo: Fotograf
cabin: Nočitev
camp_site: Kamp
caravan_site: Kamp
- chalet: Apartma
+ chalet: Počitniška hišica
gallery: Galerija
guest_house: Penzion
hostel: Hostel
ditch: Jarek
dock: Dok
drain: Jarek
- lock: Zapornica
- lock_gate: Velika zapornica
+ lock: Velika zapornica
+ lock_gate: Zapornica
mooring: Sidrišče
rapids: Brzice
river: Reka
sign_up_tooltip: Ustvarite si nov uporabniški račun za urejanje
edit: Uredi
history: Zgodovina
- export: Izvoz
+ export: Izvozi
data: Podatki
export_data: Izvoz podatkov
gps_traces: Sledi GPS
community_blogs: Blogi skupnosti
community_blogs_title: Blogi članov skupnosti OpenStreetMap
foundation: Fundacija
- foundation_title: OpenStreetMap Fubdacija
+ foundation_title: Fundacija OpenStreetMap
make_a_donation:
title: Podprite OpenStreetMap z denarnim prispevkom
text: Prispevajte finančna sredstva
- Travniki
- travnik
retail: Trgovsko območje
- industrial: Industrijsko območje
+ industrial: Industrijsko področje
commercial: Poslovno območje
heathland: Grmičevje
lake:
private: Zasebni dostop
destination: Dovoljeno za dostavo
construction: Ceste v gradnji
+ bicycle_shop: Kolesarska trgovina
+ bicycle_parking: Parkirišče za kolesa
+ toilets: Stranišče
richtext_area:
edit: Uredi
preview: Predogled
pošte pred sprejemom sporočil neznanih pošiljateljev zahteva potrditev, vas
prosimo, da pošiljatelja %{sender} uvrstite na seznam dovoljenih pošiljateljev.
Sistem pač ne zmore dovolj inteligentno odgovarjati na vse take zahtevke.
- failure: Ne najdem uporabnika %{name}.
+ failure: Uporabnika %{name} ni bilo mogoče najti.
confirm_email:
heading: Potrdite spremembo naslova e-pošte
press confirm button: Za potrditev spremembe vašega naslova elektronske pošte
summary_no_ip: '%{name} ustvarjen dne %{date}'
confirm: Potrdi izbrane uporabnike
hide: Skrij izbrane uporabnike
- empty: Ne najdem nobenega uporabnika
+ empty: Nobenega uporabnika ni bilo mogoče najti
suspended:
title: Račun zaklenjen
heading: Račun zaklenjen
non_moderator_update: Morate biti moderator da ustvarite ali popravite blokado.
non_moderator_revoke: Morate biti moderator da prekličete blokado.
not_found:
- sorry: Žal blokade uporabnika z ID %{id} ni bilo mogoče najti.
+ sorry: Žal blokade uporabnika z ID-jem %{id} ni bilo mogoče najti.
back: Nazaj na kazalo
new:
title: Ustvarjanje blokade za %{name}
edit_tooltip: Urejanje zemljevida
edit_disabled_tooltip: Povečajte za urejanje zemljevida
createnote_tooltip: Dodaj opombo na zemljevid
- createnote_disabled_tooltip: Povečaj za dodati opombo na zemljevid
- map_notes_zoom_in_tooltip: Povečaj za prikaz opomb zemljevida
- map_data_zoom_in_tooltip: Povečaj za prikaz podatkov zemljevida
+ createnote_disabled_tooltip: Povečajte za dodajanje opomb na zemljevid
+ map_notes_zoom_in_tooltip: Povečajte za prikaz opomb zemljevida
+ map_data_zoom_in_tooltip: Povečajte za prikaz podatkov zemljevida
queryfeature_tooltip: Poišči značilnosti
+ queryfeature_disabled_tooltip: Povečajte za iskanje značilnosti
changesets:
show:
comment: Komentiraj
node: Vozlišče
way: Pot
relation: Zveza
+ nothing_found: Značilnosti ni bilo mogoče najti
redaction:
edit:
description: Opis
disused_station: Stacion hekurudhor jashtë përdorimi
funicular: Linjë teleferiku
halt: Stacion hekerudhor
+ historic_station: Stacion hekurudhor historik
junction: Nyje hekurudhore
level_crossing: Kryqzim hekurudhor
light_rail: Hekurudhë e lehtë
+ miniature: Hekurudhudhë në miniaturë
monorail: Hekurudhë me një shinë
+ narrow_gauge: Ngushticë hekurudhe
platform: Platformë hekurudhore
preserved: Hekurudhë muze
proposed: Hekurudhë e planifikuar
+ spur: Hekurudhë
stop: Stacion hekurudhor
subway: Metro
subway_entrance: Hyrje metroje
shop:
bakery: Furrë buke
butcher: Mishtore
+ car: Sallon automobilash
car_parts: Autopjesë
car_repair: Autoservis
carpet: Dyqan qilimash
legal_babble:
title_html: Të drejtat autoriale dhe licensa
intro_1_html: |-
- OpenStreetMap is <i>open data</i>, licensed under the <a
+ OpenStreetMap<sup><a href="#trademarks">®</a></sup> përmban <i>të dhëna të hapura</i>, të licencuara nën <a
href="http://opendatacommons.org/licenses/odbl/">Open Data
- Commons Open Database License</a> (ODbL).
- intro_2_html: " Ju jeni të lirë të kopjoni, shpërndani, transmetoni dhe adoptoni
- hartat\n dhe të dhënat tona, duke pasur parasysh citimin e OpenStreetMap
- dhe \n kontribuuesve të saj. Nëse ndryshoni apo ndërtoni mbi hartat apo të
- dhënat tona, ju\n mund të shpërndani rezultatet nën licencën e njëjtë. Licenca
- e\n e plotë <a\n href=\"http://creativecommons.org/licenses/by-sa/2.0/legalcode\">legal\n
+ Commons Open Database License</a> (ODbL) by the <a
+ href="http://osmfoundation.org/">OpenStreetMap Foundation</a> (OSMF).
+ intro_2_html: "Ju jeni të lirë të kopjoni, shpërndani, transmetoni dhe adoptoni
+ dhe të dhënat tona, \nduke pasur parasysh citimin e OpenStreetMap dhe kontribuuesve
+ të saj. Nëse ndryshoni apo ndërtoni mbi hartat apo të dhënat tona, ju\nmund
+ të shpërndani rezultatet nën licencën e njëjtë. Licenca e plotë <a\n href=\"http://creativecommons.org/licenses/by-sa/2.0/legalcode\">legal\n
\ code</a> shpjegon të drejtat dhe përgjegjësitë tuaja."
+ intro_3_html: |-
+ Hartografimi i pjesëve tona, dhe dokumantacioni ynë, janë të licencuara nën licensë të <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative
+ Commons Attribution-ShareAlike 2.0</a>(CC BY-SA).
credit_title_html: Si të citoni OpenStreetMap
credit_1_html: Ne kërkojmë që ju të përdorni kreditet e “© OpenStreetMap
contributors”.
title: Mirësevjen
whats_on_the_map:
title: Çfarë ka në hartë?
+ basic_terms:
+ title: Termat bazë për hartografim
+ paragraph_1_html: OpenStreetMap ka disa shprehje në zhargonin e vet. Këtu janë
+ disa fjalë kyçe mund të jenë të dobishme.
+ editor_html: Një <strong>redaktor</strong> është një program apo faqe të cilën
+ mund ta përdorni për ta redaktuar hartën.
+ node_html: Një <strong>nyje</strong> është një pikë në hartë, si një restorant
+ i vetëm ose një pemë.
+ way_html: Një <strong>rrugë</strong> është një linjë apo fushë, si një rrugë,
+ lumë, liqen apo ndërtesë.
rules:
title: Rregullat!
start_mapping: Fillo hartografimin
title: Nuk ke kohë për të redaktuar? Shto një shënim!
help_page:
title: Merr ndihmë
+ welcome:
+ url: Mirësevjen
+ title: Mirësevjen në OSM
beginners_guide:
url: http://wiki.openstreetmap.org/wiki/Sq:Beginners%27_guide
+ title: Udhëzues për fillestarë.
+ description: Një udhëzues për fillestarë që mirëmbahet nga komuniteti.
+ help:
+ url: https://help.openstreetmap.org/
+ title: help.openstreetmap.org
forums:
title: Forumet
+ about_page:
+ next: Tjetra
+ copyright_html: <span>©</span>OpenStreetMap<br>kontribuesit
notifier:
diary_comment_notification:
hi: Përshëndetje %{to_user},
greeting: Përshëndetje,
changeset_comment_notification:
greeting: Përshëndetje,
+ commented:
+ partial_changeset_without_comment: pa koment
message:
inbox:
title: Kutia mbërritëse
legal_title: Juridik
legal_html: "Denna sida och många andra liknande tjänster drivs formellt av \n<a
href=\"http://osmfoundation.org/\">OpenStreetMap Foundation</a> (OSMF) \npå
- gemenskapens vägnar.\n<br> \nVänligen <a href=\"http://osmfoundation.org/Contact\">kontakta
- OSMF</a> \nom du har frågor eller funderingar om licenser, upphovsrätt eller
- andra rättsliga frågor."
+ gemenskapens vägnar. Användning av alla OSMF-opererade tjänster är föremål\nför
+ våra <a href=\"http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy\">\npolicyer
+ för acceptabel användning</a> och vår <a href=\"http://wiki.osmfoundation.org/wiki/Privacy_Policy\">integritetspolicy</a>\n<br>
+ \nVänligen <a href=\"http://osmfoundation.org/Contact\">kontakta OSMF</a> \nom
+ du har frågor eller funderingar om licenser, upphovsrätt eller andra rättsliga
+ frågor."
partners_title: Partners
notifier:
diary_comment_notification:
title: OpenStreetMap GPS-spår
description:
description_with_count:
- one: GPX-fil med %{count} punkter från %{user}
+ one: GPX-fil med %{count} punkt från %{user}
other: GPX-fil med %{count} punkter från %{user}
description_without_count: GPX-fil från %{user}
application:
license_agreement: När du bekräftar ditt konto måste du samtycka till <a href="http://www.osmfoundation.org/wiki/License/Contributor_Terms">bidragsgivarvillkoren</a>.
email address: 'E-postadress:'
confirm email address: 'Bekräfta e-postadress:'
- not displayed publicly: Visas inte offentligt (se <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
- title="wikins integritetspolicy (inkluderar avsnitt om e-postadresser)">integritetspolicyn</a>)
+ not displayed publicly: Din adress visas inte offentligt, se vår <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
+ title="OSMF-integritetspolicy som inkluderar avsnitt om e-postadresser">integritetspolicy</a>
+ för mer information
display name: 'Visat namn:'
display name description: Ditt offentligt visade användarnamn. Du kan ändra
detta senare i inställningarna.
activerecord:
models:
acl: అనుమతి నియంత్రణ జాబితా
+ changeset: మార్పుల సమితి
country: దేశం
diary_comment: డైరీ వ్యాఖ్య
diary_entry: దినచర్య పద్దు
relation: సంబంధాలు (%{count})
relation_paginated: '%{count} లో %{x}-%{y} యొక్క సంబంధాలు'
comment: వ్యాఖ్యలు (%{count})
+ commented_by: '%{user} నుండి వ్యాఖ్య <abbr title=''%{exact_time}''>%{when} క్రితం</abbr>'
discussion: చర్చ
+ node:
+ title: 'బిందువు: %{name}'
relation:
title: 'సంబంధం: %{name}'
history_title: 'సంబంధపు చరిత్ర: %{name}'
new_note: కొత్త గమనిక
description: వివరణ
query:
- nearby: daggarlo unna lakshanalu
+ nearby: దగ్గర్లోని విశేషాలు
changeset:
changeset_paging_nav:
showing_page: పేజీ %{page}
diary_entry:
new:
title: కొత్త దినచర్య పద్దు
+ publish_button: ప్రచురించు
list:
title: వాడుకరుల డైరీలు
title_friends: స్నేహితుల దినచర్యలు
+ title_nearby: చుట్టుపక్కల వాడుకరుల డైరీలు
user_title: '%{user} యొక్క దినచర్య'
in_language_title: '%{language}లో ఉన్న డైరీ పద్దులు'
new: కొత్త దినచర్య పద్దు
older_entries: పాత పద్దులు
newer_entries: కొత్త పద్దులు
edit:
- title: dairy lo unna entry ni marchu
+ title: డైరీ పద్దును మార్చు
subject: 'విషయం:'
body: 'వివరణ:'
language: 'భాష:'
marketplace: సంత
nursery: పిల్లల బడి
office: కార్యాలయం
+ parking: పార్కింగు
pharmacy: మందుల దుకాణం
place_of_worship: పూజా స్థలం
police: పోలీసు
building:
"yes": భవనం
craft:
- painter: chitrakarudu
+ painter: పెయింటర్
photographer: చాయాగ్రాహకుడు
tailor: దర్జీ
highway:
secondary_link: ద్వితీయ శ్రేణి రహదారి
steps: మెట్లు
street_lamp: వీధి దీపం
+ "yes": దారి
historic:
battlefield: యుద్ధరంగం
boundary_stone: సరిహద్దు రాయి
ruins: శిథిలాలు
tomb: సమాధి
tower: గోపురం
+ junction:
+ "yes": కూడలి
landuse:
cemetery: శ్మశానం
commercial: వాణిజ్య ప్రదేశం
reservoir: జలాశయం
reservoir_watershed: జలాశయం
residential: నివాస ప్రాంతం
+ "yes": భూఉపయోగం
leisure:
beach_resort: బీచి రిసార్టు
bird_hide: పక్షులకు ఆవాసం
toys: బొమ్మల అంగడి
"yes": దుకాణం
tourism:
+ apartment: అపార్టుమెంట్
hotel: హోటెల్
information: సమాచారం
museum: ప్రదర్శన శాల
local_knowledge_title: స్థానిక పరిజ్ఞానం
partners_title: భాగస్వాములు
notifier:
+ diary_comment_notification:
+ hi: హలో %{to_user},
+ message_notification:
+ hi: హలో %{to_user},
gpx_notification:
with_description: వివరణతో
signup_confirm:
building: ప్రముఖ కట్టడము
station: రైల్వే స్టేషన్
construction: నిర్మాణంలో ఉన్న రహదార్లు
+ toilets: మరుగుదొడ్లు
richtext_area:
edit: మార్చు
preview: మునుజూపు
title: నమోదవ్వండి
email address: 'ఈమెయిలు చిరునామా:'
confirm email address: 'ఈమెయిలు చిరునామాని నిర్ధారించండి:'
- not displayed publicly: బహిరà°\82à°\97à°\82à°\97à°¾ à°\9aà±\82పిà°\82à°\9aబడదà±\81 (<a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy"
- title="wiki privacy policy including section on email addresses">గోప్యతా విధానాన్ని</a>
- à°\9aà±\82à°¡à°\82à°¡à°¿)
+ not displayed publicly: à°®à±\80 à°\9aà°¿à°°à±\81నామా బహిరà°\82à°\97à°\82à°\97à°¾ à°\9aà±\82పబడదà±\81, మరిà°\82à°¤ సమాà°\9aారà°\82 à°\95à±\8bà°¸à°\82 మా
+ <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy" title="OSMF గోప్యతా
+ విధానà°\82, à°\88à°®à±\86యిలà±\81 à°\9aà°¿à°°à±\81నామాల విà°à°¾à°\97à°\82 à°\95à±\82à°¡à°¾ à°\89à°\82ది">à°\97à±\8bà°ªà±\8dయతా విధానానà±\8dని</a> à°\9aà±\82à°¡à°\82à°¡à°¿
display name: 'చూపించే పేరు:'
password: 'సంకేతపదం:'
confirm password: 'సంకేతపదాన్ని నిర్ధారించండి:'
new email address: 'కొత్త ఈమెయిల్ చిరునామా:'
email never displayed publicly: (బహిరంగంగా ఎన్నటికీ చూపించబడదు)
openid:
+ link: https://wiki.openstreetmap.org/wiki/OpenID
link text: ఇది ఏమిటి?
public editing:
+ enabled link: https://wiki.openstreetmap.org/wiki/Anonymous_edits
enabled link text: ఇది ఏమిటి?
disabled link text: నేను ఎందుకు మార్చలేను?
contributor terms:
layers:
notes: పటపు గమనికలు
data: పటం భోగట్టా
+ copyright: © <a href='%{copyright_url}'>ఓపెన్స్ట్రీట్మాప్ తోడ్పాటుదార్లు</a>
donate_link_text: <a class='donate-attr' href='%{donate_url}'>విరాళం ఇవ్వండి</a>
changesets:
show:
hide: దాచు
comment_and_resolve: వ్యాఖ్యానించి పరిష్కరించండి
comment: వ్యాఖ్యానించండి
+ directions:
+ distance: దూరం
+ time: సమయం
+ query:
+ relation: సంబంధం
redaction:
edit:
description: వివరణ
请在<a
href="http://osmfoundation.org/Licence">OSMF许可协议页面</a>和<a
href="http://wiki.openstreetmap.org/wiki/Legal_FAQ">法律常见问题</a>阅读更多关于使用我们的数据,以及如何表明我们是作者的信息。
- more_2_html: 尽管 OpenStreetMap 开放数据,但是我们无法为第三方开发人员提供免费的地图 API。详见我们的 <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API使用政策</a>、<a
+ more_2_html: 尽管 OpenStreetMap 开放数据,但是我们无法为第三方提供免费的地图 API。详见我们的 <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API使用政策</a>、<a
href="http://wiki.openstreetmap.org/wiki/Zh-hans:Tile_usage_policy">地图图块使用政策</a>及<a
href="http://wiki.openstreetmap.org/wiki/Zh-hans:Nominatim#使用政策">名称服务使用政策</a>。
contributors_title_html: 我们的贡献者
description: OpenStreetMap 使用者最近的日記項目
comments:
has_commented_on: '%{display_name} 在以下的日記項目發表了評論'
- post: 發表
+ post: 貼文
when: 於
comment: 評論
ago: '%{ago} 前'
在<a
href="http://osmfoundation.org/Licence">OSMF 授權條款頁面</a>與<a
href="http://wiki.openstreetmap.org/wiki/Zh-hant:Legal_FAQ">法律上的常見問題</a>中,可閱讀更多關於使用我們的資料,以及如何標明我們是作者的資料。
- more_2_html: 雖然 OpenStreetMap 是開放資料,但我們無法為第三方開發人員提供免費的地圖 API。詳見我們的<a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API
+ more_2_html: 雖然 OpenStreetMap 是開放資料,但我們無法為第三方提供免費的地圖 API。詳見我們的<a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API
使用政策</a>、<a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy">地圖影像塊使用政策</a>及<a
href="http://wiki.openstreetmap.org/wiki/Zh-hant:Nominatim#使用政策">Nominatim
服務使用政策</a>。
end
end
- def down
- end
+ def down; end
end
end
end
- def down
- end
+ def down; end
end
providers["Facebook"] = "facebook" if defined?(FACEBOOK_AUTH_ID)
providers["Windows Live"] = "windowslive" if defined?(WINDOWSLIVE_AUTH_ID)
providers["GitHub"] = "github" if defined?(GITHUB_AUTH_ID)
+ providers["Wikipedia"] = "wikipedia" if defined?(WIKIPEDIA_AUTH_ID)
end.freeze
end
module PasswordHash
SALT_BYTE_SIZE = 32
HASH_BYTE_SIZE = 32
- PBKDF2_ITERATIONS = 1000
+ PBKDF2_ITERATIONS = 10000
DIGEST_ALGORITHM = "sha512".freeze
def self.create(password)
require File.dirname(__FILE__) + "/../config/environment"
-exit 0 unless recipient = ARGV[0].match(/^([cm])-(\d+)-(.*)$/)
-
-if recipient[1] == "c"
- comment = DiaryComment.find(recipient[2])
+if recipient = ARGV[0].match(/^c-(\d+)-(\d+)-(.*)$/)
+ comment = DiaryComment.find(recipient[1])
digest = comment.digest
- date = diary_comment.created_at
- from = comment.diary_entry.user
+ date = comment.created_at
+ from = User.find(recipient[2])
to = comment.user
-else
- message = Message.find(recipient[2])
+ token = recipient[3]
+elsif recipient = ARGV[0].match(/^m-(\d+)-(.*)$/)
+ message = Message.find(recipient[1])
digest = message.digest
date = message.sent_on
from = message.recipient
to = message.sender
+ token = recipient[2]
+else
+ exit 0
end
-exit 0 unless recipient[3] == digest[0, 6]
+exit 0 unless token == digest[0, 6]
exit 0 if date < 1.month.ago
message.update_attribute(:message_read, true) if message
def test_findrelations_by_tags
visible_relation = current_relations(:visible_relation)
+ create(:relation_tag, :relation => visible_relation, :k => "test", :v => "yes")
used_relation = current_relations(:used_relation)
+ create(:relation_tag, :relation => used_relation, :k => "test", :v => "yes")
+ create(:relation_tag, :relation => used_relation, :k => "name", :v => "Test Relation")
amf_content "findrelations", "/1", ["yes"]
post :amf_read
def test_map
node = current_nodes(:used_node_1)
+ tag = create(:node_tag, :node => node)
# Need to split the min/max lat/lon out into their own variables here
# so that we can test they are returned later.
minlon = node.lon - 0.1
assert_select "bounds[minlon='#{minlon}'][minlat='#{minlat}'][maxlon='#{maxlon}'][maxlat='#{maxlat}']", :count => 1
assert_select "node[id='#{node.id}'][lat='#{node.lat}'][lon='#{node.lon}'][version='#{node.version}'][changeset='#{node.changeset_id}'][visible='#{node.visible}'][timestamp='#{node.timestamp.xmlschema}']", :count => 1 do
# This should really be more generic
- assert_select "tag[k='test'][v='yes']"
+ assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
end
assert_select "way", :count => 2
assert_select "way[id='1']", :count => 1
# the same as the node we are looking at
def test_map_inclusive
node = current_nodes(:used_node_1)
+ tag = create(:node_tag, :node => node)
bbox = "#{node.lon},#{node.lat},#{node.lon},#{node.lat}"
get :map, :bbox => bbox
assert_response :success, "The map call should have succeeded"
assert_select "bounds[minlon='#{node.lon}'][minlat='#{node.lat}'][maxlon='#{node.lon}'][maxlat='#{node.lat}']", :count => 1
assert_select "node[id='#{node.id}'][lat='#{node.lat}'][lon='#{node.lon}'][version='#{node.version}'][changeset='#{node.changeset_id}'][visible='#{node.visible}'][timestamp='#{node.timestamp.xmlschema}']", :count => 1 do
# This should really be more generic
- assert_select "tag[k='test'][v='yes']"
+ assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
end
assert_select "way", :count => 2
assert_select "way[id='1']", :count => 1
end
def test_changeset_download
+ tag = create(:old_node_tag, :old_node => nodes(:used_node_2))
+
get :download, :id => changesets(:normal_user_first_change).id
+
assert_response :success
assert_template nil
# print @response.body
assert_select "osmChange[version='#{API_VERSION}'][generator='#{GENERATOR}']" do
assert_select "create", :count => 5
assert_select "create>node[id='#{nodes(:used_node_2).node_id}'][visible='#{nodes(:used_node_2).visible?}'][version='#{nodes(:used_node_2).version}']" do
- assert_select "tag[k='#{node_tags(:t3).k}'][v='#{node_tags(:t3).v}']"
+ assert_select "tag[k='#{tag.k}'][v='#{tag.v}']"
end
assert_select "create>node[id='#{nodes(:visible_node).node_id}']"
end
##
# test adding tags to a node
def test_duplicate_tags
+ existing = create(:node_tag, :node => current_nodes(:public_visible_node))
# setup auth
basic_authorization(users(:public_user).email, "test")
# add an identical tag to the node
tag_xml = XML::Node.new("tag")
- tag_xml["k"] = current_node_tags(:public_v_t1).k
- tag_xml["v"] = current_node_tags(:public_v_t1).v
+ tag_xml["k"] = existing.k
+ tag_xml["v"] = existing.v
# add the tag into the existing xml
node_xml = current_nodes(:public_visible_node).to_xml
put :update, :id => current_nodes(:public_visible_node).id
assert_response :bad_request,
"adding duplicate tags to a node should fail with 'bad request'"
- assert_equal "Element node/#{current_nodes(:public_visible_node).id} has duplicate tags with key #{current_node_tags(:t1).k}", @response.body
+ assert_equal "Element node/#{current_nodes(:public_visible_node).id} has duplicate tags with key #{existing.k}", @response.body
end
# test whether string injection is possible
assert_select "time", :count => 1
assert_select "name", "Note: #{open_note.id}"
assert_select "desc", :count => 1
- assert_select "link[href='http://www.openstreetmap.org/note/#{open_note.id}']", :count => 1
+ assert_select "link[href='http://test.host/note/#{open_note.id}']", :count => 1
assert_select "extensions", :count => 1 do
assert_select "id", open_note.id.to_s
assert_select "url", note_url(open_note, :format => "gpx")
basic_authorization(users(:public_user).email, "test")
# setup a simple XML node
+ create_list(:node_tag, 2, :node => current_nodes(:node_with_versions))
xml_doc = current_nodes(:node_with_versions).to_xml
xml_node = xml_doc.find("//osm/node").first
nodeid = current_nodes(:node_with_versions).id
+ # Ensure that the current tags are propagated to the history too
+ propagate_tags(current_nodes(:node_with_versions), nodes(:node_with_versions_v4))
+
# keep a hash of the versions => string, as we'll need something
# to test against later
versions = {}
# Test that getting the current version is identical to picking
# that version with the version URI call.
def test_current_version
+ create(:node_tag, :node => current_nodes(:visible_node))
+ create(:node_tag, :node => current_nodes(:used_node_1))
+ create(:node_tag, :node => current_nodes(:used_node_2))
+ create(:node_tag, :node => current_nodes(:node_used_by_relationship))
+ create(:node_tag, :node => current_nodes(:node_with_versions))
+ propagate_tags(current_nodes(:visible_node), nodes(:visible_node))
+ propagate_tags(current_nodes(:used_node_1), nodes(:used_node_1))
+ propagate_tags(current_nodes(:used_node_2), nodes(:used_node_2))
+ propagate_tags(current_nodes(:node_used_by_relationship), nodes(:node_used_by_relationship))
+ propagate_tags(current_nodes(:node_with_versions), nodes(:node_with_versions_v4))
+
check_current_version(current_nodes(:visible_node))
check_current_version(current_nodes(:used_node_1))
check_current_version(current_nodes(:used_node_2))
def precision(f)
(f * GeoRecord::SCALE).round.to_f / GeoRecord::SCALE
end
+
+ def propagate_tags(node, old_node)
+ node.tags.each do |k, v|
+ create(:old_node_tag, :old_node => old_node, :k => k, :v => v)
+ end
+ end
end
##
# check that we can retrieve versions of a way
def test_version
+ create(:way_tag, :way => current_ways(:visible_way))
+ create(:way_tag, :way => current_ways(:used_way))
+ create(:way_tag, :way => current_ways(:way_with_versions))
+ propagate_tags(current_ways(:visible_way), ways(:visible_way))
+ propagate_tags(current_ways(:used_way), ways(:used_way))
+ propagate_tags(current_ways(:way_with_versions), ways(:way_with_versions_v4))
+
check_current_version(current_ways(:visible_way).id)
check_current_version(current_ways(:used_way).id)
check_current_version(current_ways(:way_with_versions).id)
# now redact it
post :redact, :id => way.way_id, :version => way.version, :redaction => redaction.id
end
+
+ def propagate_tags(way, old_way)
+ way.tags.each do |k, v|
+ create(:old_way_tag, :old_way => old_way, :k => k, :v => v)
+ end
+ end
end
def test_update_relation_tags
basic_authorization "test@example.com", "test"
rel_id = current_relations(:multi_tag_relation).id
+ create_list(:relation_tag, 4, :relation => current_relations(:multi_tag_relation))
cs_id = changesets(:public_user_first_change).id
with_relation(rel_id) do |rel|
def test_update_relation_tags_via_upload
basic_authorization users(:public_user).email, "test"
rel_id = current_relations(:multi_tag_relation).id
+ create_list(:relation_tag, 4, :relation => current_relations(:multi_tag_relation))
cs_id = changesets(:public_user_first_change).id
with_relation(rel_id) do |rel|
##
# test searching ways
def test_search_ways
+ [:visible_way, :invisible_way, :used_way].each do |way|
+ create(:way_tag, :way => current_ways(way), :k => "test", :v => "yes")
+ end
+ create(:way_tag, :way => current_ways(:used_way), :k => "name", :v => "Test Way")
+
get :search_ways, :type => "test"
assert_response :service_unavailable
assert_equal "Searching for a key without value is currently unavailable", response.headers["Error"]
##
# test searching relations
def test_search_relations
+ [:visible_relation, :invisible_relation, :used_relation].each do |relation|
+ create(:relation_tag, :relation => current_relations(relation), :k => "test", :v => "yes")
+ end
+ create(:relation_tag, :relation => current_relations(:used_relation), :k => "name", :v => "Test Relation")
+
get :search_relations, :type => "test"
assert_response :service_unavailable
assert_equal "Searching for a key without value is currently unavailable", response.headers["Error"]
get :list, :page => 3
assert_response :success
assert_template :list
- assert_select "table#user_list tr", :count => 25
+ assert_select "table#user_list tr", :count => 26
end
def test_list_post_confirm
# setup auth
basic_authorization(users(:normal_user).email, "test")
+ existing = create(:way_tag, :way => current_ways(:visible_way))
+
# add an identical tag to the way
tag_xml = XML::Node.new("tag")
- tag_xml["k"] = current_way_tags(:t1).k
- tag_xml["v"] = current_way_tags(:t1).v
+ tag_xml["k"] = existing.k
+ tag_xml["v"] = existing.v
# add the tag into the existing xml
way_xml = current_ways(:visible_way).to_xml
# add an identical tag to the way
tag_xml = XML::Node.new("tag")
- tag_xml["k"] = current_way_tags(:t1).k
- tag_xml["v"] = current_way_tags(:t1).v
+ tag_xml["k"] = existing.k
+ tag_xml["v"] = existing.v
# add the tag into the existing xml
way_xml = current_ways(:visible_way).to_xml
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding a duplicate tag to a way should fail with 'bad request'"
- assert_equal "Element way/#{current_ways(:visible_way).id} has duplicate tags with key #{current_way_tags(:t1).k}", @response.body
+ assert_equal "Element way/#{current_ways(:visible_way).id} has duplicate tags with key #{existing.k}", @response.body
end
##
--- /dev/null
+FactoryGirl.define do
+ factory :node_tag do
+ sequence(:k) { |n| "Key #{n}" }
+ sequence(:v) { |n| "Value #{n}" }
+
+ # Fixme requires node factory
+ node_id 1
+ end
+end
--- /dev/null
+FactoryGirl.define do
+ factory :old_node_tag do
+ sequence(:k) { |n| "Key #{n}" }
+ sequence(:v) { |n| "Value #{n}" }
+
+ # Fixme requires old_node factory
+ node_id 1
+ version 1
+ end
+end
--- /dev/null
+FactoryGirl.define do
+ factory :old_relation_tag do
+ sequence(:k) { |n| "Key #{n}" }
+ sequence(:v) { |n| "Value #{n}" }
+
+ # Fixme requires old_relation factory
+ relation_id 1
+ version 1
+ end
+end
--- /dev/null
+FactoryGirl.define do
+ factory :old_way_tag do
+ sequence(:k) { |n| "Key #{n}" }
+ sequence(:v) { |n| "Value #{n}" }
+
+ # Fixme requires old_way factory
+ way_id 1
+ version 1
+ end
+end
--- /dev/null
+FactoryGirl.define do
+ factory :relation_tag do
+ sequence(:k) { |n| "Key #{n}" }
+ sequence(:v) { |n| "Value #{n}" }
+
+ # Fixme requires relation factory
+ relation_id 1
+ end
+end
--- /dev/null
+FactoryGirl.define do
+ factory :way_tag do
+ sequence(:k) { |n| "Key #{n}" }
+ sequence(:v) { |n| "Value #{n}" }
+
+ # Fixme requires way factory
+ way_id 1
+ end
+end
+++ /dev/null
-t1:
- node_id: 1
- k: 'testvisible'
- v: 'yes'
-
-t2:
- node_id: 2
- k: 'testused'
- v: 'yes'
-
-t3:
- node_id: 3
- k: 'test'
- v: 'yes'
-
-t4:
- node_id: 4
- k: 'test'
- v: 'yes'
-
-nv_t1:
- node_id: 15
- k: 'testing'
- v: 'added in node version 3'
-
-nv_t2:
- node_id: 15
- k: 'testing two'
- v: 'modified in node version 4'
-
-public_v_t1:
- node_id: 16
- k: 'testvisible'
- v: 'yes'
-
-nwn_name:
- node_id: 18
- k: 'name'
- v: 'Test Node'
-
-nwn_name_pt:
- node_id: 18
- k: 'name:pt'
- v: 'Nó teste'
-
-nwn_building:
- node_id: 18
- k: 'building'
- v: 'yes'
-
-nwn_tourism:
- node_id: 18
- k: 'tourism'
- v: 'museum'
-
-nwn_shop:
- node_id: 18
- k: 'shop'
- v: 'gift'
-
-nwrwn_ref:
- node_id: 19
- k: 'ref'
- v: '3.1415926'
+++ /dev/null
-t1:
- relation_id: 1
- k: 'test'
- v: 'yes'
-
-t2:
- relation_id: 2
- k: 'test'
- v: 'yes'
-
-t3:
- relation_id: 3
- k: 'test'
- v: 'yes'
-
-t3_2:
- relation_id: 3
- k: 'name'
- v: 'Test Relation'
-
-mt_1:
- relation_id: 4
- k: 'tag1'
- v: 'val1'
-
-mt_2:
- relation_id: 4
- k: 'tag2'
- v: 'val2'
-
-mt_3:
- relation_id: 4
- k: 'tag3'
- v: 'val3'
-
-mt_4:
- relation_id: 4
- k: 'tag4'
- v: 'val4'
-
-rv_t1:
- relation_id: 8
- k: 'testing'
- v: 'added in relation version 3'
-
-rv_t2:
- relation_id: 8
- k: 'testing two'
- v: 'modified in relation version 4'
+++ /dev/null
-t1:
- way_id: 1
- k: 'test'
- v: 'yes'
-
-t2:
- way_id: 2
- k: 'test'
- v: 'yes'
-
-t3:
- way_id: 3
- k: 'test'
- v: 'yes'
-
-t3_t2:
- way_id: 3
- k: 'name'
- v: 'Test Way'
-
-wv_t1:
- way_id: 4
- k: 'testing'
- v: 'added in way version 3'
-
-wv_t2:
- way_id: 4
- k: 'testing two'
- v: 'modified in way version 4'
+++ /dev/null
-t1:
- node_id: 1
- k: 'testvisible'
- v: 'yes'
- version: 1
-
-t2:
- node_id: 3
- k: 'test'
- v: 'yes'
- version: 1
-
-t3:
- node_id: 4
- k: 'test'
- v: 'yes'
- version: 1
-
-nv3_t1:
- node_id: 15
- k: 'testing'
- v: 'added in node version 3'
- version: 3
-
-nv3_t2:
- node_id: 15
- k: 'testing two'
- v: 'added in node version 3'
- version: 3
-
-nv3_t3:
- node_id: 15
- k: 'testing three'
- v: 'added in node version 3'
- version: 3
-
-nv4_t1:
- node_id: 15
- k: 'testing'
- v: 'added in node version 3'
- version: 4
-
-nv4_t2:
- node_id: 15
- k: 'testing two'
- v: 'modified in node version 4'
- version: 4
-
-public_v_t1:
- node_id: 16
- k: 'testvisible'
- v: 'yes'
- version: 1
-
-nwnv1_name:
- node_id: 18
- k: 'name'
- v: 'Test Node'
- version: 1
-
-nwnv1_name_pt:
- node_id: 18
- k: 'name:pt'
- v: 'Nó teste'
- version: 1
-
-nwnv1_building:
- node_id: 18
- k: 'building'
- v: 'yes'
- version: 1
-
-nwnv1_tourism:
- node_id: 18
- k: 'tourism'
- v: 'museum'
- version: 1
-
-nwnv1_shop:
- node_id: 18
- k: 'shop'
- v: 'gift'
- version: 1
-
-nwnv2_name:
- node_id: 18
- k: 'name'
- v: 'Test Node'
- version: 2
-
-nwnv2_name_pt:
- node_id: 18
- k: 'name:pt'
- v: 'Nó teste'
- version: 2
-
-nwnv2_building:
- node_id: 18
- k: 'building'
- v: 'yes'
- version: 2
-
-nwnv2_tourism:
- node_id: 18
- k: 'tourism'
- v: 'museum'
- version: 2
-
-nwnv2_shop:
- node_id: 18
- k: 'shop'
- v: 'gift'
- version: 2
+++ /dev/null
-t1:
- relation_id: 1
- k: 'test'
- v: 'yes'
- version: 1
-
-t2:
- relation_id: 2
- k: 'test'
- v: 'yes'
- version: 1
-
-t3:
- relation_id: 3
- k: 'test'
- v: 'yes'
- version: 1
-
-t3_2:
- relation_id: 3
- k: 'name'
- v: 'Test Relation'
- version: 1
-
-mt_1:
- relation_id: 4
- k: 'tag1'
- v: 'val1'
- version: 1
-
-mt_2:
- relation_id: 4
- k: 'tag2'
- v: 'val2'
- version: 1
-
-mt_3:
- relation_id: 4
- k: 'tag3'
- v: 'val3'
- version: 1
-
-mt_4:
- relation_id: 4
- k: 'tag4'
- v: 'val4'
- version: 1
-
-rv3_t1:
- relation_id: 8
- k: 'testing'
- v: 'added in relation version 3'
- version: 3
-
-rv3_t2:
- relation_id: 8
- k: 'testing two'
- v: 'added in relation version 3'
- version: 3
-
-rv3_t3:
- relation_id: 8
- k: 'testing three'
- v: 'added in relation version 3'
- version: 3
-
-rv4_t1:
- relation_id: 8
- k: 'testing'
- v: 'added in relation version 3'
- version: 4
-
-rv4_t2:
- relation_id: 8
- k: 'testing two'
- v: 'modified in relation version 4'
- version: 4
terms_agreed: "2010-01-01 11:22:33"
terms_seen: true
creation_ip: "1.2.3.4"
+
+wikipedia_user:
+ id: 25
+ email: wikipedia-user@example.com
+ status: active
+ pass_crypt: <%= Digest::MD5.hexdigest('test') %>
+ creation_time: "2008-05-01 01:23:45"
+ display_name: wikipediauser
+ data_public: true
+ auth_provider: wikipedia
+ auth_uid: 123456789
+ terms_agreed: "2010-01-01 11:22:33"
+ terms_seen: true
+ languages: en
+++ /dev/null
-t1:
- way_id: 1
- k: 'test'
- v: 'yes'
- version: 1
-
-t2:
- way_id: 2
- k: 'test'
- v: 'yes'
- version: 1
-
-t3:
- way_id: 3
- k: 'test'
- v: 'yes'
- version: 1
-
-t3_t2:
- way_id: 3
- k: 'name'
- v: 'Test Way'
- version: 1
-
-wv3_t1:
- way_id: 4
- k: 'testing'
- v: 'added in way version 3'
- version: 3
-
-wv3_t2:
- way_id: 4
- k: 'testing two'
- v: 'added in way version 3'
- version: 3
-
-wv3_t3:
- way_id: 4
- k: 'testing three'
- v: 'added in way version 3'
- version: 3
-
-wv4_t1:
- way_id: 4
- k: 'testing'
- v: 'added in way version 3'
- version: 4
-
-wv4_t2:
- way_id: 4
- k: 'testing two'
- v: 'modified in way version 4'
- version: 4
-
-t6_v1:
- way_id: 6
- k: 'test'
- v: 'yes'
- version: 1
-
-t6_v2:
- way_id: 6
- k: 'test'
- v: 'yes'
- version: 2
-
-t6_v3:
- way_id: 6
- k: 'test'
- v: 'yes'
- version: 3
-
-t6_v4:
- way_id: 6
- k: 'test'
- v: 'yes'
- version: 4
assert_match %r{^<span title=".*">4 months</span>$}, date
end
- def test_body_class
- end
+ def test_body_class; end
- def test_current_page_class
- end
+ def test_current_page_class; end
end
end
def test_printable_name
+ add_tags_selection(current_nodes(:node_with_name))
+ create(:node_tag, :node => current_nodes(:node_with_ref_without_name), :k => "ref", :v => "3.1415926")
+ add_old_tags_selection(nodes(:node_with_name_current_version))
+ add_old_tags_selection(nodes(:node_with_name_redacted_version))
+
+ # current_nodes(:redacted_node) is deleted, so has no tags.
assert_dom_equal "17", printable_name(current_nodes(:redacted_node))
assert_dom_equal "<bdi>Test Node</bdi> (<bdi>18</bdi>)", printable_name(current_nodes(:node_with_name))
assert_dom_equal "<bdi>Test Node</bdi> (<bdi>18</bdi>)", printable_name(nodes(:node_with_name_current_version))
end
def test_link_class
+ add_tags_selection(current_nodes(:node_with_name))
+
assert_equal "node", link_class("node", current_nodes(:visible_node))
assert_equal "node deleted", link_class("node", current_nodes(:invisible_node))
assert_equal "node deleted", link_class("node", current_nodes(:redacted_node))
assert_equal "node building yes shop gift tourism museum", link_class("node", current_nodes(:node_with_name))
+
+ add_old_tags_selection(nodes(:node_with_name_current_version))
+ add_old_tags_selection(nodes(:node_with_name_redacted_version))
assert_equal "node building yes shop gift tourism museum", link_class("node", nodes(:node_with_name_current_version))
assert_equal "node deleted", link_class("node", nodes(:node_with_name_redacted_version))
end
def test_link_title
+ add_tags_selection(current_nodes(:node_with_name))
+
assert_equal "", link_title(current_nodes(:visible_node))
assert_equal "", link_title(current_nodes(:invisible_node))
assert_equal "", link_title(current_nodes(:redacted_node))
assert_equal "building=yes, shop=gift, and tourism=museum", link_title(current_nodes(:node_with_name))
+
+ add_old_tags_selection(nodes(:node_with_name_current_version))
+ add_old_tags_selection(nodes(:node_with_name_redacted_version))
assert_equal "building=yes, shop=gift, and tourism=museum", link_title(nodes(:node_with_name_current_version))
assert_equal "", link_title(nodes(:node_with_name_redacted_version))
end
end
def test_icon_tags
+ add_tags_selection(current_nodes(:node_with_name))
+
tags = icon_tags(current_nodes(:node_with_name))
assert_equal 3, tags.count
assert tags.include?(%w(building yes))
assert tags.include?(%w(tourism museum))
assert tags.include?(%w(shop gift))
+ add_old_tags_selection(nodes(:node_with_name_current_version))
+ add_old_tags_selection(nodes(:node_with_name_redacted_version))
+
tags = icon_tags(nodes(:node_with_name_current_version))
assert_equal 3, tags.count
assert tags.include?(%w(building yes))
link = telephone_link("phone", "+1 (234) 567-890")
assert_equal "tel:+1(234)567-890", link
end
+
+ def add_old_tags_selection(old_node)
+ { "building" => "yes",
+ "shop" => "gift",
+ "tourism" => "museum",
+ "name" => "Test Node",
+ "name:pt" => "Nó teste" }.each do |key, value|
+ create(:old_node_tag, :old_node => old_node, :k => key, :v => value)
+ end
+ end
+
+ def add_tags_selection(node)
+ { "building" => "yes",
+ "shop" => "gift",
+ "tourism" => "museum",
+ "name" => "Test Node",
+ "name:pt" => "Nó teste" }.each do |key, value|
+ create(:node_tag, :node => node, :k => key, :v => value)
+ end
+ end
end
assert_not_nil token.created_at
assert_nil token.authorized_at
assert_nil token.invalidated_at
- assert_equal options[:oauth_callback], token.callback_url
+ assert_equal_allowing_nil options[:oauth_callback], token.callback_url
assert_allowed token, client.permissions
token
OmniAuth.config.mock_auth[:facebook] = nil
OmniAuth.config.mock_auth[:windowslive] = nil
OmniAuth.config.mock_auth[:github] = nil
+ OmniAuth.config.mock_auth[:wikipedia] = nil
OmniAuth.config.test_mode = false
end
assert_response :success
assert_template "site/welcome"
end
+
+ def test_user_create_wikipedia_success
+ OmniAuth.config.add_mock(:wikipedia, :uid => "123454321")
+
+ new_email = "newtester-wikipedia@osm.org"
+ display_name = "new_tester-wikipedia"
+ password = "testtest"
+ assert_difference("User.count") do
+ assert_difference("ActionMailer::Base.deliveries.size", 1) do
+ post "/user/new",
+ :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :pass_crypt => "", :pass_crypt_confirmation => "" }
+ assert_response :redirect
+ assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to "/user/terms"
+ post "/user/save",
+ :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :auth_uid => "123454321", :pass_crypt => password, :pass_crypt_confirmation => password }
+ assert_response :redirect
+ follow_redirect!
+ end
+ end
+
+ # Check the page
+ assert_response :success
+ assert_template "user/confirm"
+
+ ActionMailer::Base.deliveries.clear
+ end
+
+ def test_user_create_wikipedia_failure
+ OmniAuth.config.mock_auth[:wikipedia] = :connection_failed
+
+ new_email = "newtester-wikipedia2@osm.org"
+ display_name = "new_tester-wikipedia2"
+ assert_difference("User.count", 0) do
+ assert_difference("ActionMailer::Base.deliveries.size", 0) do
+ post "/user/new",
+ :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :pass_crypt => "", :pass_crypt_confirmation => "" }
+ assert_response :redirect
+ assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to auth_failure_path(:strategy => "wikipedia", :message => "connection_failed", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "user/new"
+ end
+ end
+
+ ActionMailer::Base.deliveries.clear
+ end
+
+ def test_user_create_wikipedia_redirect
+ OmniAuth.config.add_mock(:wikipedia, :uid => "123454321")
+
+ new_email = "redirect_tester_wikipedia@osm.org"
+ display_name = "redirect_tester_wikipedia"
+ # nothing special about this page, just need a protected page to redirect back to.
+ referer = "/traces/mine"
+ assert_difference("User.count") do
+ assert_difference("ActionMailer::Base.deliveries.size", 1) do
+ post "/user/new",
+ :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :pass_crypt => "", :pass_crypt_confirmation => "" }, :referer => referer
+ assert_response :redirect
+ assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to "/user/terms"
+ post_via_redirect "/user/save",
+ :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "wikipedia", :auth_uid => "http://localhost:1123/new.tester", :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest" }
+ end
+ end
+
+ # Check the e-mail
+ register_email = ActionMailer::Base.deliveries.first
+
+ assert_equal register_email.to[0], new_email
+ # Check that the confirm account url is correct
+ confirm_regex = Regexp.new("/user/redirect_tester_wikipedia/confirm\\?confirm_string=([a-zA-Z0-9]*)")
+ register_email.parts.each do |part|
+ assert_match confirm_regex, part.body.to_s
+ end
+ confirm_string = register_email.parts[0].body.match(confirm_regex)[1]
+
+ # Check the page
+ assert_response :success
+ assert_template "user/confirm"
+
+ ActionMailer::Base.deliveries.clear
+
+ # Go to the confirmation page
+ get "/user/#{display_name}/confirm", :confirm_string => confirm_string
+ assert_response :success
+ assert_template "user/confirm"
+
+ post "/user/#{display_name}/confirm", :confirm_string => confirm_string
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "site/welcome"
+ end
end
OmniAuth.config.mock_auth[:facebook] = nil
OmniAuth.config.mock_auth[:windowslive] = nil
OmniAuth.config.mock_auth[:github] = nil
+ OmniAuth.config.mock_auth[:wikipedia] = nil
OmniAuth.config.test_mode = false
end
assert_select "span.username", false
end
+ def test_login_wikipedia_success
+ OmniAuth.config.add_mock(:wikipedia, :uid => "123456789")
+
+ get "/login", :referer => "/history"
+ assert_response :redirect
+ assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+ follow_redirect!
+ assert_response :success
+ assert_template "user/login"
+ get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ follow_redirect!
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "changeset/history"
+ assert_select "span.username", "wikipediauser"
+ end
+
+ def test_login_wikipedia_connection_failed
+ OmniAuth.config.mock_auth[:wikipedia] = :connection_failed
+
+ get "/login", :referer => "/history"
+ assert_response :redirect
+ assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+ follow_redirect!
+ assert_response :success
+ assert_template "user/login"
+ get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to auth_failure_path(:strategy => "wikipedia", :message => "connection_failed", :origin => "/login?referer=%2Fhistory")
+ follow_redirect!
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "login"
+ assert_select "div.flash.error", "Connection to authentication provider failed"
+ assert_select "span.username", false
+ end
+
+ def test_login_wikipedia_invalid_credentials
+ OmniAuth.config.mock_auth[:wikipedia] = :invalid_credentials
+
+ get "/login", :referer => "/history"
+ assert_response :redirect
+ assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+ follow_redirect!
+ assert_response :success
+ assert_template "user/login"
+ get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ follow_redirect!
+ assert_response :redirect
+ assert_redirected_to auth_failure_path(:strategy => "wikipedia", :message => "invalid_credentials", :origin => "/login?referer=%2Fhistory")
+ follow_redirect!
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "login"
+ assert_select "div.flash.error", "Invalid authentication credentials"
+ assert_select "span.username", false
+ end
+
+ def test_login_wikipedia_unknown
+ OmniAuth.config.add_mock(:wikipedia, :uid => "987654321")
+
+ get "/login", :referer => "/history"
+ assert_response :redirect
+ assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history"
+ follow_redirect!
+ assert_response :success
+ assert_template "user/login"
+ get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ assert_response :redirect
+ assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history")
+ follow_redirect!
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "user/new"
+ assert_select "span.username", false
+ end
+
private
def try_password_login(username, password, remember_me = nil)
end
def check_bbox(bbox, result)
- assert_equal result[0], bbox.min_lon, "min_lon"
- assert_equal result[1], bbox.min_lat, "min_lat"
- assert_equal result[2], bbox.max_lon, "max_lon"
- assert_equal result[3], bbox.max_lat, "max_lat"
+ assert_equal_allowing_nil result[0], bbox.min_lon, "min_lon"
+ assert_equal_allowing_nil result[1], bbox.min_lat, "min_lat"
+ assert_equal_allowing_nil result[2], bbox.max_lon, "max_lon"
+ assert_equal_allowing_nil result[3], bbox.max_lat, "max_lat"
end
end
end
def test_script
- assert_equal EN.script, Locale.tag("en").script
- assert_equal EN_GB.script, Locale.tag("en-GB").script
- assert_equal FR.script, Locale.tag("fr").script
- assert_equal ZH_HANS.script, Locale.tag("zh-Hans").script
- assert_equal ZH_HANT_TW.script, Locale.tag("zh-Hant-TW").script
- assert_equal ZH_YUE.script, Locale.tag("zh-yue").script
- assert_equal ZH_YUE.script, Locale.tag("zh-YUE").script
- assert_equal BE_TARASK.script, Locale.tag("be-tarask").script
- assert_equal BE_TARASK.script, Locale.tag("be-Tarask").script
+ assert_equal_allowing_nil EN.script, Locale.tag("en").script
+ assert_equal_allowing_nil EN_GB.script, Locale.tag("en-GB").script
+ assert_equal_allowing_nil FR.script, Locale.tag("fr").script
+ assert_equal_allowing_nil ZH_HANS.script, Locale.tag("zh-Hans").script
+ assert_equal_allowing_nil ZH_HANT_TW.script, Locale.tag("zh-Hant-TW").script
+ assert_equal_allowing_nil ZH_YUE.script, Locale.tag("zh-yue").script
+ assert_equal_allowing_nil ZH_YUE.script, Locale.tag("zh-YUE").script
+ assert_equal_allowing_nil BE_TARASK.script, Locale.tag("be-tarask").script
+ assert_equal_allowing_nil BE_TARASK.script, Locale.tag("be-Tarask").script
end
def test_region
- assert_equal EN.region, Locale.tag("en").region
- assert_equal EN_GB.region, Locale.tag("en-GB").region
- assert_equal FR.region, Locale.tag("fr").region
- assert_equal ZH_HANS.region, Locale.tag("zh-Hans").region
- assert_equal ZH_HANT_TW.region, Locale.tag("zh-Hant-TW").region
- assert_equal ZH_YUE.region, Locale.tag("zh-yue").region
- assert_equal ZH_YUE.region, Locale.tag("zh-YUE").region
- assert_equal BE_TARASK.region, Locale.tag("be-tarask").region
- assert_equal BE_TARASK.region, Locale.tag("be-Tarask").region
+ assert_equal_allowing_nil EN.region, Locale.tag("en").region
+ assert_equal_allowing_nil EN_GB.region, Locale.tag("en-GB").region
+ assert_equal_allowing_nil FR.region, Locale.tag("fr").region
+ assert_equal_allowing_nil ZH_HANS.region, Locale.tag("zh-Hans").region
+ assert_equal_allowing_nil ZH_HANT_TW.region, Locale.tag("zh-Hant-TW").region
+ assert_equal_allowing_nil ZH_YUE.region, Locale.tag("zh-yue").region
+ assert_equal_allowing_nil ZH_YUE.region, Locale.tag("zh-YUE").region
+ assert_equal_allowing_nil BE_TARASK.region, Locale.tag("be-tarask").region
+ assert_equal_allowing_nil BE_TARASK.region, Locale.tag("be-Tarask").region
end
def test_variant
- assert_equal EN.variant, Locale.tag("en").variant
- assert_equal EN_GB.variant, Locale.tag("en-GB").variant
- assert_equal FR.variant, Locale.tag("fr").variant
- assert_equal ZH_HANS.variant, Locale.tag("zh-Hans").variant
- assert_equal ZH_HANT_TW.variant, Locale.tag("zh-Hant-TW").variant
- assert_equal ZH_YUE.variant, Locale.tag("zh-yue").variant
- assert_equal ZH_YUE.variant, Locale.tag("zh-YUE").variant
- assert_equal BE_TARASK.variant, Locale.tag("be-tarask").variant
- assert_equal BE_TARASK.variant, Locale.tag("be-Tarask").variant
+ assert_equal_allowing_nil EN.variant, Locale.tag("en").variant
+ assert_equal_allowing_nil EN_GB.variant, Locale.tag("en-GB").variant
+ assert_equal_allowing_nil FR.variant, Locale.tag("fr").variant
+ assert_equal_allowing_nil ZH_HANS.variant, Locale.tag("zh-Hans").variant
+ assert_equal_allowing_nil ZH_HANT_TW.variant, Locale.tag("zh-Hant-TW").variant
+ assert_equal_allowing_nil ZH_YUE.variant, Locale.tag("zh-yue").variant
+ assert_equal_allowing_nil ZH_YUE.variant, Locale.tag("zh-YUE").variant
+ assert_equal_allowing_nil BE_TARASK.variant, Locale.tag("be-tarask").variant
+ assert_equal_allowing_nil BE_TARASK.variant, Locale.tag("be-Tarask").variant
end
def test_list
assert_equal true, PasswordHash.upgrade?("67a1e09bb1f83f5007dc119c14d663aa", "salt")
end
+ def test_pbkdf2_1000_32_sha512
+ assert_equal true, PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=", "password")
+ assert_equal false, PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=", "wrong")
+ assert_equal false, PasswordHash.check("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gwrongtoNzm/CNKe4cf7bPKwdUNrk=", "password")
+ assert_equal true, PasswordHash.upgrade?("ApT/28+FsTBLa/J8paWfgU84SoRiTfeY8HjKWhgHy08=", "sha512!1000!HR4z+hAvKV2ra1gpbRybtoNzm/CNKe4cf7bPKwdUNrk=")
+ end
+
+ def test_pbkdf2_10000_32_sha512
+ assert_equal true, PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "password")
+ assert_equal false, PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "wrong")
+ assert_equal false, PasswordHash.check("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtMwronguvanFT5/WtWaCwdOdrir8QOtFwxhO0A=", "password")
+ assert_equal false, PasswordHash.upgrade?("3wYbPiOxk/tU0eeIDjUhdvi8aDP3AbFtwYKKxF1IhGg=", "sha512!10000!OUQLgtM7eD8huvanFT5/WtWaCwdOdrir8QOtFwxhO0A=")
+ end
+
def test_default
hash1, salt1 = PasswordHash.create("password")
hash2, salt2 = PasswordHash.create("password")
class NodeTagTest < ActiveSupport::TestCase
api_fixtures
- def test_tag_count
- assert_equal 13, NodeTag.count
- node_tag_count(:visible_node, 1)
- node_tag_count(:invisible_node, 1)
- node_tag_count(:used_node_1, 1)
- node_tag_count(:used_node_2, 1)
- node_tag_count(:node_with_versions, 2)
- end
-
- def node_tag_count(node, count)
- nod = current_nodes(node)
- assert_equal count, nod.node_tags.count
- end
-
def test_length_key_valid
- key = "k"
+ tag = create(:node_tag)
(0..255).each do |i|
- tag = NodeTag.new
- tag.node_id = current_node_tags(:t1).node_id
- tag.k = key * i
- tag.v = "v"
+ tag.k = "k" * i
assert tag.valid?
end
end
def test_length_value_valid
- val = "v"
+ tag = create(:node_tag)
(0..255).each do |i|
- tag = NodeTag.new
- tag.node_id = current_node_tags(:t1).node_id
- tag.k = "k"
- tag.v = val * i
+ tag.v = "v" * i
assert tag.valid?
end
end
def test_length_key_invalid
- ["k" * 256].each do |i|
- tag = NodeTag.new
- tag.node_id = current_node_tags(:t1).node_id
- tag.k = i
- tag.v = "v"
- assert !tag.valid?, "Key should be too long"
- assert tag.errors[:k].any?
- end
+ tag = create(:node_tag)
+ tag.k = "k" * 256
+ assert !tag.valid?, "Key should be too long"
+ assert tag.errors[:k].any?
end
def test_length_value_invalid
- ["k" * 256].each do |i|
- tag = NodeTag.new
- tag.node_id = current_node_tags(:t1).node_id
- tag.k = "k"
- tag.v = i
- assert !tag.valid?, "Value should be too long"
- assert tag.errors[:v].any?
- end
+ tag = create(:node_tag)
+ tag.v = "v" * 256
+ assert !tag.valid?, "Value should be too long"
+ assert tag.errors[:v].any?
end
def test_empty_node_tag_invalid
end
def test_uniqueness
+ existing = create(:node_tag)
tag = NodeTag.new
- tag.node_id = current_node_tags(:t1).node_id
- tag.k = current_node_tags(:t1).k
- tag.v = current_node_tags(:t1).v
+ tag.node_id = existing.node_id
+ tag.k = existing.k
+ tag.v = existing.v
assert tag.new_record?
assert !tag.valid?
assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
def test_node_tags
node = current_nodes(:node_with_versions)
+ taglist = create_list(:node_tag, 2, :node => node)
tags = Node.find(node.id).node_tags.order(:k)
- assert_equal 2, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in node version 3", tags[0].v
- assert_equal "testing two", tags[1].k
- assert_equal "modified in node version 4", tags[1].v
+ assert_equal taglist.count, tags.count
+ taglist.sort_by!(&:k).each_index do |i|
+ assert_equal taglist[i].k, tags[i].k
+ assert_equal taglist[i].v, tags[i].v
+ end
end
def test_tags
node = current_nodes(:node_with_versions)
+ taglist = create_list(:node_tag, 2, :node => node)
tags = Node.find(node.id).tags
- assert_equal 2, tags.size
- assert_equal "added in node version 3", tags["testing"]
- assert_equal "modified in node version 4", tags["testing two"]
+ assert_equal taglist.count, tags.count
+ taglist.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
end
def test_containing_relation_members
class OldNodeTagTest < ActiveSupport::TestCase
api_fixtures
- def test_old_node_tag_count
- assert_equal 19, OldNodeTag.count, "Unexpected number of fixtures loaded."
- end
-
def test_length_key_valid
- key = "k"
+ tag = create(:old_node_tag)
(0..255).each do |i|
- tag = OldNodeTag.new
- tag.node_id = node_tags(:t1).node_id
- tag.version = node_tags(:t1).version
- tag.k = key * i
- tag.v = "v"
+ tag.k = "k" * i
assert tag.valid?
end
end
def test_length_value_valid
- val = "v"
+ tag = create(:old_node_tag)
(0..255).each do |i|
- tag = OldNodeTag.new
- tag.node_id = node_tags(:t1).node_id
- tag.version = node_tags(:t1).version
- tag.k = "k"
- tag.v = val * i
+ tag.v = "v" * i
assert tag.valid?
end
end
def test_length_key_invalid
- ["k" * 256].each do |i|
- tag = OldNodeTag.new
- tag.node_id = node_tags(:t1).node_id
- tag.version = node_tags(:t1).version
- tag.k = i
- tag.v = "v", "Key should be too long"
- assert !tag.valid?
- assert tag.errors[:k].any?
- end
+ tag = create(:old_node_tag)
+ tag.k = "k" * 256
+ assert !tag.valid?
+ assert tag.errors[:k].any?
end
def test_length_value_invalid
- ["k" * 256].each do |i|
- tag = OldNodeTag.new
- tag.node_id = node_tags(:t1).node_id
- tag.version = node_tags(:t1).version
- tag.k = "k"
- tag.v = i
- assert !tag.valid?, "Value should be too long"
- assert tag.errors[:v].any?
- end
+ tag = create(:old_node_tag)
+ tag.v = "v" * 256
+ assert !tag.valid?, "Value should be too long"
+ assert tag.errors[:v].any?
end
def test_empty_tag_invalid
end
def test_uniqueness
+ existing = create(:old_node_tag)
tag = OldNodeTag.new
- tag.node_id = node_tags(:t1).node_id
- tag.version = node_tags(:t1).version
- tag.k = node_tags(:t1).k
- tag.v = node_tags(:t1).v
+ tag.node_id = existing.node_id
+ tag.version = existing.version
+ tag.k = existing.k
+ tag.v = existing.v
assert tag.new_record?
assert !tag.valid?
assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
end
def test_node_tags
+ taglist_v3 = create_list(:old_node_tag, 3, :old_node => nodes(:node_with_versions_v3))
+ taglist_v4 = create_list(:old_node_tag, 2, :old_node => nodes(:node_with_versions_v4))
+
node = nodes(:node_with_versions_v1)
tags = OldNode.find(node.id).old_tags.order(:k)
assert_equal 0, tags.count
node = nodes(:node_with_versions_v3)
tags = OldNode.find(node.id).old_tags.order(:k)
- assert_equal 3, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in node version 3", tags[0].v
- assert_equal "testing three", tags[1].k
- assert_equal "added in node version 3", tags[1].v
- assert_equal "testing two", tags[2].k
- assert_equal "added in node version 3", tags[2].v
+ assert_equal taglist_v3.count, tags.count
+ taglist_v3.sort_by!(&:k).each_index do |i|
+ assert_equal taglist_v3[i].k, tags[i].k
+ assert_equal taglist_v3[i].v, tags[i].v
+ end
node = nodes(:node_with_versions_v4)
tags = OldNode.find(node.id).old_tags.order(:k)
- assert_equal 2, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in node version 3", tags[0].v
- assert_equal "testing two", tags[1].k
- assert_equal "modified in node version 4", tags[1].v
+ assert_equal taglist_v4.count, tags.count
+ taglist_v4.sort_by!(&:k).each_index do |i|
+ assert_equal taglist_v4[i].k, tags[i].k
+ assert_equal taglist_v4[i].v, tags[i].v
+ end
end
def test_tags
+ taglist_v3 = create_list(:old_node_tag, 3, :old_node => nodes(:node_with_versions_v3))
+ taglist_v4 = create_list(:old_node_tag, 2, :old_node => nodes(:node_with_versions_v4))
+
node = nodes(:node_with_versions_v1)
tags = OldNode.find(node.id).tags
assert_equal 0, tags.size
node = nodes(:node_with_versions_v3)
tags = OldNode.find(node.id).tags
- assert_equal 3, tags.size
- assert_equal "added in node version 3", tags["testing"]
- assert_equal "added in node version 3", tags["testing two"]
- assert_equal "added in node version 3", tags["testing three"]
+ assert_equal taglist_v3.count, tags.count
+ taglist_v3.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
node = nodes(:node_with_versions_v4)
tags = OldNode.find(node.id).tags
- assert_equal 2, tags.size
- assert_equal "added in node version 3", tags["testing"]
- assert_equal "modified in node version 4", tags["testing two"]
+ assert_equal taglist_v4.count, tags.count
+ taglist_v4.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
end
end
class OldRelationTagTest < ActiveSupport::TestCase
api_fixtures
- def test_tag_count
- assert_equal 13, OldRelationTag.count
- end
-
def test_length_key_valid
- key = "k"
+ tag = create(:old_relation_tag)
(0..255).each do |i|
- tag = OldRelationTag.new
- tag.relation_id = relation_tags(:t1).relation_id
- tag.version = 1
- tag.k = key * i
- tag.v = "v"
+ tag.k = "k" * i
assert tag.valid?
end
end
def test_length_value_valid
- val = "v"
+ tag = create(:old_relation_tag)
(0..255).each do |i|
- tag = OldRelationTag.new
- tag.relation_id = relation_tags(:t1).relation_id
- tag.version = 1
- tag.k = "k"
- tag.v = val * i
+ tag.v = "v" * i
assert tag.valid?
end
end
def test_length_key_invalid
- ["k" * 256].each do |i|
- tag = OldRelationTag.new
- tag.relation_id = relation_tags(:t1).relation_id
- tag.version = 1
- tag.k = i
- tag.v = "v"
- assert !tag.valid?, "Key should be too long"
- assert tag.errors[:k].any?
- end
+ tag = create(:old_relation_tag)
+ tag.k = "k" * 256
+ assert !tag.valid?, "Key should be too long"
+ assert tag.errors[:k].any?
end
def test_length_value_invalid
- ["k" * 256].each do |i|
- tag = OldRelationTag.new
- tag.relation_id = relation_tags(:t1).relation_id
- tag.version = 1
- tag.k = "k"
- tag.v = i
- assert !tag.valid?, "Value should be too long"
- assert tag.errors[:v].any?
- end
+ tag = create(:old_relation_tag)
+ tag.v = "v" * 256
+ assert !tag.valid?, "Value should be too long"
+ assert tag.errors[:v].any?
end
def test_empty_tag_invalid
end
def test_uniqueness
+ existing = create(:old_relation_tag)
tag = OldRelationTag.new
- tag.relation_id = relation_tags(:t1).relation_id
- tag.version = relation_tags(:t1).version
- tag.k = relation_tags(:t1).k
- tag.v = relation_tags(:t1).v
+ tag.relation_id = existing.relation_id
+ tag.version = existing.version
+ tag.k = existing.k
+ tag.v = existing.v
assert tag.new_record?
assert !tag.valid?
assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
end
def test_relation_tags
+ taglist_v3 = create_list(:old_relation_tag, 3, :old_relation => relations(:relation_with_versions_v3))
+ taglist_v4 = create_list(:old_relation_tag, 2, :old_relation => relations(:relation_with_versions_v4))
+
relation = relations(:relation_with_versions_v1)
tags = OldRelation.find(relation.id).old_tags.order(:k)
assert_equal 0, tags.count
relation = relations(:relation_with_versions_v3)
tags = OldRelation.find(relation.id).old_tags.order(:k)
- assert_equal 3, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in relation version 3", tags[0].v
- assert_equal "testing three", tags[1].k
- assert_equal "added in relation version 3", tags[1].v
- assert_equal "testing two", tags[2].k
- assert_equal "added in relation version 3", tags[2].v
+ assert_equal taglist_v3.count, tags.count
+ taglist_v3.sort_by!(&:k).each_index do |i|
+ assert_equal taglist_v3[i].k, tags[i].k
+ assert_equal taglist_v3[i].v, tags[i].v
+ end
relation = relations(:relation_with_versions_v4)
tags = OldRelation.find(relation.id).old_tags.order(:k)
- assert_equal 2, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in relation version 3", tags[0].v
- assert_equal "testing two", tags[1].k
- assert_equal "modified in relation version 4", tags[1].v
+ assert_equal taglist_v4.count, tags.count
+ taglist_v4.sort_by!(&:k).each_index do |i|
+ assert_equal taglist_v4[i].k, tags[i].k
+ assert_equal taglist_v4[i].v, tags[i].v
+ end
end
def test_relation_members
end
def test_tags
+ taglist_v3 = create_list(:old_relation_tag, 3, :old_relation => relations(:relation_with_versions_v3))
+ taglist_v4 = create_list(:old_relation_tag, 2, :old_relation => relations(:relation_with_versions_v4))
+
relation = relations(:relation_with_versions_v1)
tags = OldRelation.find(relation.id).tags
assert_equal 0, tags.size
relation = relations(:relation_with_versions_v3)
tags = OldRelation.find(relation.id).tags
- assert_equal 3, tags.size
- assert_equal "added in relation version 3", tags["testing"]
- assert_equal "added in relation version 3", tags["testing two"]
- assert_equal "added in relation version 3", tags["testing three"]
+ assert_equal taglist_v3.count, tags.count
+ taglist_v3.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
relation = relations(:relation_with_versions_v4)
tags = OldRelation.find(relation.id).tags
- assert_equal 2, tags.size
- assert_equal "added in relation version 3", tags["testing"]
- assert_equal "modified in relation version 4", tags["testing two"]
+ assert_equal taglist_v4.count, tags.count
+ taglist_v4.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
end
end
class OldWayTagTest < ActiveSupport::TestCase
api_fixtures
- def test_tag_count
- assert_equal 13, OldWayTag.count
- end
-
def test_length_key_valid
- key = "k"
+ tag = create(:old_way_tag)
(0..255).each do |i|
- tag = OldWayTag.new
- tag.way_id = way_tags(:t1).way_id
- tag.version = 1
- tag.k = key * i
- tag.v = "v"
+ tag.k = "k" * i
assert tag.valid?
end
end
def test_length_value_valid
- val = "v"
+ tag = create(:old_way_tag)
(0..255).each do |i|
- tag = OldWayTag.new
- tag.way_id = way_tags(:t1).way_id
- tag.version = 1
- tag.k = "k"
- tag.v = val * i
+ tag.v = "v" * i
assert tag.valid?
end
end
def test_length_key_invalid
- ["k" * 256].each do |i|
- tag = OldWayTag.new
- tag.way_id = way_tags(:t1).way_id
- tag.version = 1
- tag.k = i
- tag.v = "v"
- assert !tag.valid?, "Key should be too long"
- assert tag.errors[:k].any?
- end
+ tag = create(:old_way_tag)
+ tag.k = "k" * 256
+ assert !tag.valid?, "Key should be too long"
+ assert tag.errors[:k].any?
end
def test_length_value_invalid
- ["k" * 256].each do |i|
- tag = OldWayTag.new
- tag.way_id = way_tags(:t1).way_id
- tag.version = 1
- tag.k = "k"
- tag.v = i
- assert !tag.valid?, "Value should be too long"
- assert tag.errors[:v].any?
- end
+ tag = create(:old_way_tag)
+ tag.v = "v" * 256
+ assert !tag.valid?, "Value should be too long"
+ assert tag.errors[:v].any?
end
def test_empty_tag_invalid
end
def test_uniqueness
+ existing = create(:old_way_tag)
tag = OldWayTag.new
- tag.way_id = way_tags(:t1).way_id
- tag.version = way_tags(:t1).version
- tag.k = way_tags(:t1).k
- tag.v = way_tags(:t1).v
+ tag.way_id = existing.way_id
+ tag.version = existing.version
+ tag.k = existing.k
+ tag.v = existing.v
assert tag.new_record?
assert !tag.valid?
assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
end
def test_way_tags
+ taglist_v3 = create_list(:old_way_tag, 3, :old_way => ways(:way_with_versions_v3))
+ taglist_v4 = create_list(:old_way_tag, 2, :old_way => ways(:way_with_versions_v4))
+
way = ways(:way_with_versions_v1)
tags = OldWay.find(way.id).old_tags.order(:k)
assert_equal 0, tags.count
way = ways(:way_with_versions_v3)
tags = OldWay.find(way.id).old_tags.order(:k)
- assert_equal 3, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in way version 3", tags[0].v
- assert_equal "testing three", tags[1].k
- assert_equal "added in way version 3", tags[1].v
- assert_equal "testing two", tags[2].k
- assert_equal "added in way version 3", tags[2].v
+ assert_equal taglist_v3.count, tags.count
+ taglist_v3.sort_by!(&:k).each_index do |i|
+ assert_equal taglist_v3[i].k, tags[i].k
+ assert_equal taglist_v3[i].v, tags[i].v
+ end
way = ways(:way_with_versions_v4)
tags = OldWay.find(way.id).old_tags.order(:k)
- assert_equal 2, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in way version 3", tags[0].v
- assert_equal "testing two", tags[1].k
- assert_equal "modified in way version 4", tags[1].v
+ assert_equal taglist_v4.count, tags.count
+ taglist_v4.sort_by!(&:k).each_index do |i|
+ assert_equal taglist_v4[i].k, tags[i].k
+ assert_equal taglist_v4[i].v, tags[i].v
+ end
end
def test_tags
+ taglist_v3 = create_list(:old_way_tag, 3, :old_way => ways(:way_with_versions_v3))
+ taglist_v4 = create_list(:old_way_tag, 2, :old_way => ways(:way_with_versions_v4))
+
way = ways(:way_with_versions_v1)
tags = OldWay.find(way.id).tags
assert_equal 0, tags.size
way = ways(:way_with_versions_v3)
tags = OldWay.find(way.id).tags
- assert_equal 3, tags.size
- assert_equal "added in way version 3", tags["testing"]
- assert_equal "added in way version 3", tags["testing two"]
- assert_equal "added in way version 3", tags["testing three"]
+ assert_equal taglist_v3.count, tags.count
+ taglist_v3.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
way = ways(:way_with_versions_v4)
tags = OldWay.find(way.id).tags
- assert_equal 2, tags.size
- assert_equal "added in way version 3", tags["testing"]
- assert_equal "modified in way version 4", tags["testing two"]
+ assert_equal taglist_v4.count, tags.count
+ taglist_v4.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
end
def test_get_nodes_undelete
way = ways(:way_with_versions_v3)
+ node_tag = create(:node_tag, :node => current_nodes(:node_with_versions))
+ node_tag2 = create(:node_tag, :node => current_nodes(:used_node_1))
nodes = OldWay.find(way.id).get_nodes_undelete
assert_equal 2, nodes.size
- assert_equal [1.0, 1.0, 15, 4, { "testing" => "added in node version 3", "testing two" => "modified in node version 4" }, true], nodes[0]
- assert_equal [3.0, 3.0, 3, 1, { "test" => "yes" }, true], nodes[1]
+ assert_equal [1.0, 1.0, 15, 4, { node_tag.k => node_tag.v }, true], nodes[0]
+ assert_equal [3.0, 3.0, 3, 1, { node_tag2.k => node_tag2.v }, true], nodes[1]
way = ways(:way_with_redacted_versions_v2)
+ node_tag3 = create(:node_tag, :node => current_nodes(:invisible_node))
nodes = OldWay.find(way.id).get_nodes_undelete
assert_equal 2, nodes.size
- assert_equal [3.0, 3.0, 3, 1, { "test" => "yes" }, true], nodes[0]
- assert_equal [2.0, 2.0, 2, 1, { "testused" => "yes" }, false], nodes[1]
+ assert_equal [3.0, 3.0, 3, 1, { node_tag2.k => node_tag2.v }, true], nodes[0]
+ assert_equal [2.0, 2.0, 2, 1, { node_tag3.k => node_tag3.v }, false], nodes[1]
end
end
class RelationTagTest < ActiveSupport::TestCase
api_fixtures
- def test_relation_tag_count
- assert_equal 10, RelationTag.count
- end
-
def test_length_key_valid
- key = "k"
+ tag = create(:relation_tag)
(0..255).each do |i|
- tag = RelationTag.new
- tag.relation_id = 1
- tag.k = key * i
- tag.v = "v"
+ tag.k = "k" * i
assert tag.valid?
end
end
def test_length_value_valid
- val = "v"
+ tag = create(:relation_tag)
(0..255).each do |i|
- tag = RelationTag.new
- tag.relation_id = 1
- tag.k = "k"
- tag.v = val * i
+ tag.v = "v" * i
assert tag.valid?
end
end
def test_length_key_invalid
- ["k" * 256].each do |i|
- tag = RelationTag.new
- tag.relation_id = 1
- tag.k = i
- tag.v = "v"
- assert !tag.valid?, "Key #{i} should be too long"
- assert tag.errors[:k].any?
- end
+ tag = create(:relation_tag)
+ tag.k = "k" * 256
+ assert !tag.valid?, "Key should be too long"
+ assert tag.errors[:k].any?
end
def test_length_value_invalid
- ["v" * 256].each do |i|
- tag = RelationTag.new
- tag.relation_id = 1
- tag.k = "k"
- tag.v = i
- assert !tag.valid?, "Value #{i} should be too long"
- assert tag.errors[:v].any?
- end
+ tag = create(:relation_tag)
+ tag.v = "v" * 256
+ assert !tag.valid?, "Value should be too long"
+ assert tag.errors[:v].any?
end
def test_empty_tag_invalid
end
def test_uniquness
+ existing = create(:relation_tag)
tag = RelationTag.new
- tag.relation_id = current_relation_tags(:t1).relation_id
- tag.k = current_relation_tags(:t1).k
- tag.v = current_relation_tags(:t1).v
+ tag.relation_id = existing.relation_id
+ tag.k = existing.k
+ tag.v = existing.v
assert tag.new_record?
assert !tag.valid?
assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
def test_relation_tags
relation = current_relations(:relation_with_versions)
+ taglist = create_list(:relation_tag, 2, :relation => relation)
+
tags = Relation.find(relation.id).relation_tags.order(:k)
- assert_equal 2, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in relation version 3", tags[0].v
- assert_equal "testing two", tags[1].k
- assert_equal "modified in relation version 4", tags[1].v
+ assert_equal taglist.count, tags.count
+ taglist.sort_by!(&:k).each_index do |i|
+ assert_equal taglist[i].k, tags[i].k
+ assert_equal taglist[i].v, tags[i].v
+ end
end
def test_tags
relation = current_relations(:relation_with_versions)
+ taglist = create_list(:relation_tag, 2, :relation => relation)
+
tags = Relation.find(relation.id).tags
- assert_equal 2, tags.size
- assert_equal "added in relation version 3", tags["testing"]
- assert_equal "modified in relation version 4", tags["testing two"]
+ assert_equal taglist.count, tags.count
+ taglist.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
end
def test_containing_relation_members
def test_user_preferred_editor
user = users(:normal_user)
- assert_equal nil, user.preferred_editor
+ assert_nil user.preferred_editor
user.preferred_editor = "potlatch"
assert_equal "potlatch", user.preferred_editor
user.save!
end
def test_visible
- assert_equal 22, User.visible.count
+ assert_equal 23, User.visible.count
assert_raise ActiveRecord::RecordNotFound do
User.visible.find(users(:suspended_user).id)
end
end
def test_active
- assert_equal 21, User.active.count
+ assert_equal 22, User.active.count
assert_raise ActiveRecord::RecordNotFound do
User.active.find(users(:inactive_user).id)
end
end
def test_identifiable
- assert_equal 23, User.identifiable.count
+ assert_equal 24, User.identifiable.count
assert_raise ActiveRecord::RecordNotFound do
User.identifiable.find(users(:normal_user).id)
end
user.delete
assert_equal "user_#{user.id}", user.display_name
assert user.description.blank?
- assert_equal nil, user.home_lat
- assert_equal nil, user.home_lon
+ assert_nil user.home_lat
+ assert_nil user.home_lon
assert_equal false, user.image.file?
assert_equal "deleted", user.status
assert_equal false, user.visible?
class WayTagTest < ActiveSupport::TestCase
api_fixtures
- def test_way_tag_count
- assert_equal 6, WayTag.count
- end
-
def test_length_key_valid
- key = "k"
+ tag = create(:way_tag)
(0..255).each do |i|
- tag = WayTag.new
- tag.way_id = current_way_tags(:t1).way_id
- tag.k = key * i
- tag.v = current_way_tags(:t1).v
+ tag.k = "k" * i
assert tag.valid?
end
end
def test_length_value_valid
- val = "v"
+ tag = create(:way_tag)
(0..255).each do |i|
- tag = WayTag.new
- tag.way_id = current_way_tags(:t1).way_id
- tag.k = "k"
- tag.v = val * i
+ tag.v = "v" * i
assert tag.valid?
end
end
def test_length_key_invalid
- ["k" * 256].each do |i|
- tag = WayTag.new
- tag.way_id = current_way_tags(:t1).way_id
- tag.k = i
- tag.v = "v"
- assert !tag.valid?, "Key #{i} should be too long"
- assert tag.errors[:k].any?
- end
+ tag = create(:way_tag)
+ tag.k = "k" * 256
+ assert !tag.valid?, "Key should be too long"
+ assert tag.errors[:k].any?
end
def test_length_value_invalid
- ["v" * 256].each do |i|
- tag = WayTag.new
- tag.way_id = current_way_tags(:t1).way_id
- tag.k = "k"
- tag.v = i
- assert !tag.valid?, "Value #{i} should be too long"
- assert tag.errors[:v].any?
- end
+ tag = create(:way_tag)
+ tag.v = "v" * 256
+ assert !tag.valid?, "Value should be too long"
+ assert tag.errors[:v].any?
end
def test_empty_tag_invalid
end
def test_uniqueness
+ existing = create(:way_tag)
tag = WayTag.new
- tag.way_id = current_way_tags(:t1).way_id
- tag.k = current_way_tags(:t1).k
- tag.v = current_way_tags(:t1).v
+ tag.way_id = existing.way_id
+ tag.k = existing.k
+ tag.v = existing.v
assert tag.new_record?
assert !tag.valid?
assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
def test_way_tags
way = current_ways(:way_with_versions)
+ taglist = create_list(:way_tag, 2, :way => way)
tags = Way.find(way.id).way_tags.order(:k)
- assert_equal 2, tags.count
- assert_equal "testing", tags[0].k
- assert_equal "added in way version 3", tags[0].v
- assert_equal "testing two", tags[1].k
- assert_equal "modified in way version 4", tags[1].v
+ assert_equal taglist.count, tags.count
+ taglist.sort_by!(&:k).each_index do |i|
+ assert_equal taglist[i].k, tags[i].k
+ assert_equal taglist[i].v, tags[i].v
+ end
end
def test_tags
way = current_ways(:way_with_versions)
+ taglist = create_list(:way_tag, 2, :way => way)
tags = Way.find(way.id).tags
- assert_equal 2, tags.size
- assert_equal "added in way version 3", tags["testing"]
- assert_equal "modified in way version 4", tags["testing two"]
+ assert_equal taglist.count, tags.count
+ taglist.each do |tag|
+ assert_equal tag.v, tags[tag.k]
+ end
end
def test_containing_relation_members
set_fixture_class :current_nodes => Node
set_fixture_class :nodes => OldNode
- fixtures :current_node_tags, :node_tags
- set_fixture_class :current_node_tags => NodeTag
- set_fixture_class :node_tags => OldNodeTag
-
fixtures :current_ways
set_fixture_class :current_ways => Way
- fixtures :current_way_nodes, :current_way_tags
+ fixtures :current_way_nodes
set_fixture_class :current_way_nodes => WayNode
- set_fixture_class :current_way_tags => WayTag
fixtures :ways
set_fixture_class :ways => OldWay
- fixtures :way_nodes, :way_tags
+ fixtures :way_nodes
set_fixture_class :way_nodes => OldWayNode
- set_fixture_class :way_tags => OldWayTag
fixtures :current_relations
set_fixture_class :current_relations => Relation
- fixtures :current_relation_members, :current_relation_tags
+ fixtures :current_relation_members
set_fixture_class :current_relation_members => RelationMember
- set_fixture_class :current_relation_tags => RelationTag
fixtures :relations
set_fixture_class :relations => OldRelation
- fixtures :relation_members, :relation_tags
+ fixtures :relation_members
set_fixture_class :relation_members => OldRelationMember
- set_fixture_class :relation_tags => OldRelationTag
fixtures :gpx_files, :gps_points, :gpx_file_tags
set_fixture_class :gpx_files => Trace
end
end
+ ##
+ # work round minitest insanity that causes it to tell you
+ # to use assert_nil to test for nil, which is fine if you're
+ # comparing to a nil constant but not if you're comparing
+ # an expression that might be nil sometimes
+ def assert_equal_allowing_nil(exp, act, msg = nil)
+ if exp.nil?
+ assert_nil act, msg
+ else
+ assert_equal exp, act, msg
+ end
+ end
+
##
# for some reason assert_equal a, b fails when the relations are
# actually equal, so this method manually checks the fields...