GEM
remote: https://rubygems.org/
specs:
- aasm (5.2.0)
+ aasm (5.3.0)
concurrent-ruby (~> 1.0)
actioncable (7.0.3.1)
actionpack (= 7.0.3.1)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
- aws-partitions (1.608.0)
+ aws-partitions (1.610.0)
aws-sdk-core (3.131.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
- aws-sigv4 (1.5.0)
+ aws-sigv4 (1.5.1)
aws-eventstream (~> 1, >= 1.0.2)
better_errors (2.9.1)
coderay (>= 1.0.0)
docile (1.4.0)
doorkeeper (5.5.4)
railties (>= 5)
- doorkeeper-i18n (5.2.3)
+ doorkeeper-i18n (5.2.4)
doorkeeper (>= 5.2)
dry-configurable (0.15.0)
concurrent-ruby (~> 1.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.16.2)
- msgpack (1.5.3)
+ msgpack (1.5.4)
multi_json (1.15.0)
multi_xml (0.6.0)
net-imap (0.2.3)
net-protocol
timeout
nio4r (2.5.8)
- nokogiri (1.13.7)
+ nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oauth (0.4.7)
parser (3.1.2.0)
ast (~> 2.4.1)
pg (1.4.1)
- popper_js (2.9.3)
+ popper_js (2.11.5)
progress (3.6.0)
public_suffix (4.0.7)
puma (5.6.4)
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
- rack-protection (2.2.1)
+ rack-protection (2.2.2)
rack
rack-test (2.0.2)
rack (>= 1.3)
rexml (3.2.5)
rinku (2.0.6)
rotp (6.2.0)
- rubocop (1.31.2)
+ rubocop (1.32.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
- rubocop-ast (>= 1.18.0, < 2.0)
+ rubocop-ast (>= 1.19.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
sprockets (>= 3.0.0)
strong_migrations (1.2.0)
activerecord (>= 5.2)
- strscan (3.0.3)
+ strscan (3.0.4)
terser (1.1.12)
execjs (>= 0.3.0, < 3)
thor (1.2.1)
- tilt (2.0.10)
+ tilt (2.0.11)
timeout (0.3.0)
- tzinfo (2.0.4)
+ tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.2.0)
validates_email_format_of (1.6.3)
clear: both;
width: 100%;
}
-
- h2 {
- font-size: 1.5rem;
- }
-
- h3, h4 {
- font-size: 1.25rem;
- }
}
.overlay-sidebar #sidebar {
.richtext,
.prose {
code {
- font-size: 13px;
background: $lightgrey;
padding: 2px 3px;
}
pre {
- font-size: 13px;
background: $lightgrey;
padding: 2px 3px;
white-space: pre-wrap;
/* Rules for the "Welcome" page */
.site-welcome, .site-fixthemap {
- .center {
- text-align: center;
- .sprite {
- float: none;
- margin: auto;
- }
- }
-
.sprite {
background-image: image-url("welcome-sprite.png");
background-size: 500px 250px;
display: block;
- float: left;
}
.icon-list {
/* no-r2 */ background-position: -350px 0;
}
- .start-mapping {
- margin: auto;
- cursor: pointer;
- border: none;
- padding: 20px 40px;
- font-size: 30px;
- text-decoration: none;
- }
-
.icon.note {
background-color: #333;
border-radius: 4px;
before_action :redirect_browse_params, :only => :index
before_action :redirect_map_params, :only => [:index, :edit, :export]
before_action :require_oauth, :only => [:index]
+ before_action :require_user, :only => [:id]
before_action :update_totp, :only => [:index]
authorize_resource :class => false
session[:new_user].auth_provider = provider
session[:new_user].auth_uid = uid
- session[:new_user].status = "active" if email_verified && email == session[:new_user].email
+ session[:new_user].activate if email_verified && email == session[:new_user].email
redirect_to :action => "terms"
else
</div>
<div class='row'>
<div class="w-100 px-5 py-4 bg-dark">
- <h1 class="text-white font-weight-light"><%= t ".used_by_html", :name => tag.span("OpenStreetMap", :class => "user-name"), :locale => @locale %></h1>
+ <h1 class="text-white fw-light"><%= t ".used_by_html", :name => tag.span("OpenStreetMap", :class => "user-name"), :locale => @locale %></h1>
</div>
</div>
</div>
<div class='bg-white px-5 py-4'>
<div class='section'>
- <p><strong><%= t ".lede_text", :locale => @locale %></strong></p>
+ <p class="lead"><%= t ".lede_text", :locale => @locale %></p>
<h2><div class='icon local'></div><%= t ".local_knowledge_title", :locale => @locale %></h2>
<p><%= t ".local_knowledge_html", :locale => @locale %></p>
</div>
<h1><%= t ".title" %></h1>
<% end %>
-<h3><%= t "layouts.intro_header" %></h3>
-<p><%= t "layouts.intro_text" %></p>
+<h2><%= t "layouts.intro_header" %></h2>
+<p class="lead"><%= t "layouts.intro_text" %></p>
-<h3><%= t ".how_to_help.title" %></h3>
+<h2><%= t ".how_to_help.title" %></h2>
-<div class='container'>
- <div class='row'>
- <div class='col-sm'>
- <h5><%= t ".how_to_help.join_the_community.title" %></h5>
- <p><%= t ".how_to_help.join_the_community.explanation_html" %></p>
- <p class='text-center'>
- <a class="btn btn-primary" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
- </p>
- </div>
- <div class='col-sm'>
- <h5><%= t "site.welcome.add_a_note.title" %></h5>
- <p><%= t "site.welcome.add_a_note.paragraph_1_html" %></p>
- <p><%= t ".how_to_help.add_a_note.instructions_html", :map_url => root_path %></p>
- </div>
+<div class='row'>
+ <div class='col-sm'>
+ <h5><%= t ".how_to_help.join_the_community.title" %></h5>
+ <p><%= t ".how_to_help.join_the_community.explanation_html" %></p>
+ <p class='text-center'>
+ <a class="btn btn-primary" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
+ </p>
+ </div>
+ <div class='col-sm'>
+ <h5><%= t "site.welcome.add_a_note.title" %></h5>
+ <p><%= t "site.welcome.add_a_note.paragraph_1_html" %></p>
+ <p><%= t ".how_to_help.add_a_note.instructions_html", :map_url => root_path %></p>
</div>
</div>
-<h3><%= t ".other_concerns.title" %></h3>
+<h2><%= t ".other_concerns.title" %></h2>
<p><%= t ".other_concerns.explanation_html" %></p>
-<h3><%= t "site.welcome.questions.title" %></h3>
-<span class='sprite small term question'></span>
+<h2><%= t "site.welcome.questions.title" %></h2>
+<span class='sprite small term question float-start'></span>
<p><%= t "site.welcome.questions.paragraph_1_html", :help_url => help_path %></p>
<h1><%= t ".title" %></h1>
<% end %>
-<p><%= t ".introduction_html" %></p>
+<p class="lead"><%= t ".introduction_html" %></p>
-<h3><%= t ".whats_on_the_map.title" %></h3>
+<h2><%= t ".whats_on_the_map.title" %></h2>
<div class='row'>
<div class='col'>
- <div class='center'>
- <span class='sprite small check'></span>
+ <div>
+ <span class='sprite small check mx-auto'></span>
</div>
<p><%= t ".whats_on_the_map.on_html" %></p>
</div>
<div class='col'>
<div class='center'>
- <span class='sprite small x'></span>
+ <span class='sprite small x mx-auto'></span>
</div>
<p><%= t ".whats_on_the_map.off_html" %></p>
</div>
</div>
-<h3><%= t ".basic_terms.title" %></h3>
+<h2><%= t ".basic_terms.title" %></h2>
<p><%= t ".basic_terms.paragraph_1_html" %></p>
-<div class='clearfix icon-list'>
+<div class='clearfix'>
<div class='clearfix'>
- <span class='sprite small term editor'></span>
+ <span class='sprite small term editor float-start'></span>
<p><%= t ".basic_terms.editor_html" %></p>
</div>
<div class='clearfix'>
- <span class='sprite small term node'></span>
+ <span class='sprite small term node float-start'></span>
<p><%= t ".basic_terms.node_html" %></p>
</div>
<div class='clearfix'>
- <span class='sprite small term way'></span>
+ <span class='sprite small term way float-start'></span>
<p><%= t ".basic_terms.way_html" %></p>
</div>
<div class='clearfix'>
- <span class='sprite small term tag'></span>
+ <span class='sprite small term tag float-start'></span>
<p><%= t ".basic_terms.tag_html" %></p>
</div>
</div>
-<div class='clearfix icon-list'>
- <h3><%= t ".rules.title" %></h3>
- <span class='sprite small term rules'></span>
+<div class='clearfix'>
+ <h2><%= t ".rules.title" %></h2>
+ <span class='sprite small term rules float-start'></span>
<p><%= t ".rules.paragraph_1_html" %></p>
</div>
-<div class='clearfix icon-list'>
- <h3><%= t ".questions.title" %></h3>
- <span class='sprite small term question'></span>
+<div class='clearfix'>
+ <h2><%= t ".questions.title" %></h2>
+ <span class='sprite small term question float-start'></span>
<p><%= t ".questions.paragraph_1_html", :help_url => help_path %></p>
</div>
-<div class='clearfix center'>
- <p><a href="<%= edit_path %>" class="button start-mapping"><%= t ".start_mapping" %></a></p>
+<div class='clearfix text-center'>
+ <p class="display-5"><a href="<%= edit_path %>" class="button start-mapping"><%= t ".start_mapping" %></a></p>
</div>
<div class='alert alert-primary'>
- <h3><%= t ".add_a_note.title" %></h3>
+ <h2><%= t ".add_a_note.title" %></h2>
<p><%= t ".add_a_note.paragraph_1_html" %></p>
<p><%= t ".add_a_note.paragraph_2_html", :map_url => root_path %></p>
</div>
<table class="table table-borderless table-sm">
<tr>
- <td><%= t ".filename" %></td>
+ <th><%= t ".filename" %></th>
<td><%= @trace.name %> (<%= link_to t(".download"), trace_data_path(@trace) %>)</td>
</tr>
<tr>
- <td><%= t ".uploaded" %></td>
+ <th><%= t ".uploaded" %></th>
<td><%= l @trace.timestamp, :format => :friendly %></td>
</tr>
<% if @trace.inserted? %>
<tr>
- <td><%= t ".points" %></td>
+ <th><%= t ".points" %></th>
<td><%= number_with_delimiter(@trace.size) %></td></tr>
<tr>
- <td><%= t ".start_coordinates" %></td>
+ <th><%= t ".start_coordinates" %></th>
<td>
<div class="d-inline">
<%= t ".coordinates_html",
</tr>
<% end %>
<tr>
- <td><%= t ".owner" %></td>
+ <th><%= t ".owner" %></th>
<td><%= link_to @trace.user.display_name, user_path(@trace.user) %></td>
</tr>
<tr>
- <td><%= t ".description" %></td>
+ <th><%= t ".description" %></th>
<td><%= @trace.description %></td>
</tr>
<tr>
- <td><%= t ".tags" %></td>
+ <th><%= t ".tags" %></th>
<td>
<% unless @trace.tags.empty? %>
<%= safe_join(@trace.tags.collect { |tag| link_to tag.tag, :controller => "traces", :action => "index", :tag => tag.tag, :id => nil }, ", ") %>
</td>
</tr>
<tr>
- <td><%= t ".visibility" %></td>
+ <th><%= t ".visibility" %></th>
<td><%= t "traces.visibility.#{@trace.visibility}" %></td>
</tr>
</table>
-<br /><br />
-
<% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?) %>
<div>
<% if current_user == @trace.user %>
ist
credit_1_html: 'Wenn du OpenStreetMap-Daten verwendest, musst du die folgenden
zwei Bedingungen erfüllen:'
- credit_2_1_html: "<ul>\n<li>Nenne OpenStreetMap, indem du unseren Urheberrechts-Hinweis
- anzeigst</li> \n<li> Mache deutlich, dass die Daten unter der Open-Database-Lizenz
+ credit_2_1_html: "<ul>\n<li>Nenne OpenStreetMap, indem du unseren Urheberrechtshinweis
+ anzeigst.</li> \n<li> Mache deutlich, dass die Daten unter der Open-Database-Lizenz
verfügbar sind.</li> \n</ul>"
credit_3_1_html: Für den Urheberrechtshinweis haben wir unterschiedliche Anforderungen,
wie dieser angezeigt werden muss, je nachdem, wie du unsere Daten verwendest.
Beispielsweise gelten unterschiedliche Regeln für die Anzeige des Urheberrechtsvermerks,
je nachdem, ob du eine blätterbare Karte, eine gedruckte Karte oder ein
statisches Bild erstellt hast. Ausführliche Informationen zu den Anforderungen
- findest du im den <a href="https://wiki.osmfoundation.org/wiki/Licence/Attribution_Guidelines">Richtlinien
+ findest du in den <a href="https://wiki.osmfoundation.org/wiki/Licence/Attribution_Guidelines">Richtlinien
zur Namensnennung</a>.
credit_4_html: |-
Du musst auch klarstellen, dass die Daten unter der Open-Database-Lizenz
verfügbar sind. Du kannst dies tun, indem du auf <a href="https://www.openstreetmap.org/copyright">diese Urheberrechtsseite</a> verlinkst.
- Ersatzweise, und als Erfordernis, falls du OSM in Datenform weitergibst,
- kannst du die Lizenz(en) direkt verlinken und benennen. In Medien, in denen keine Links möglich sind (z.B. gedruckte Werken), empfehlen wir dir, deine Leser direkt auf openstreetmap.org zu verweisen (möglicherweise mit dem Erweitern von „OpenStreetMap“ zur vollen Adresse), auf opendatacommons.org, und, sofern zutreffend, auf creativecommons.org.
+ Ersatzweise kannst du bzw. musst du, falls du OSM in Datenform weitergibst, die Lizenz(en) direkt verlinken und benennen. In Medien, in denen keine Links möglich sind (z. B. in gedruckten Werken), empfehlen wir dir, deine Leser direkt auf openstreetmap.org zu verweisen (möglicherweise mit dem Erweitern von „OpenStreetMap“ zur vollen Adresse), auf opendatacommons.org und, sofern zutreffend, auf creativecommons.org.
attribution_example:
alt: Beispiel, wie man auf OpenStreetMap auf einer Webseite hinweist
title: Namensnennungs-Beispiel auf einer Website mit elektronischer Karte
village: 村里
"yes": 地點
railway:
- abandoned: 已拆除鐵路
+ abandoned: 遺跡鐵路
buffer_stop: 緩衝站
construction: 建造中鐵路
disused: 廢棄鐵路
assert_template "id"
assert_template :layout => false
end
+
+ # Test the id frame when not logged in
+ def test_id_without_login
+ get id_path
+
+ assert_response :redirect
+ assert_redirected_to login_path(:referer => "/id")
+ end
end
end
def test_user_create_google_success
- OmniAuth.config.add_mock(:google, :uid => "123454321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/new.tester" }
- })
-
new_email = "newtester-google@osm.org"
display_name = "new_tester-google"
password = "testtest"
+
+ OmniAuth.config.add_mock(:google, :uid => "123454321", :info => { "email" => new_email })
+
assert_difference("User.count") do
- assert_difference("ActionMailer::Base.deliveries.size", 1) do
+ assert_no_difference("ActionMailer::Base.deliveries.size") do
perform_enqueued_jobs do
post "/user/new",
:params => { :user => { :email => new_email,
:pass_crypt_confirmation => password },
:read_ct => 1, :read_tou => 1 }
assert_response :redirect
+ assert_redirected_to welcome_path
follow_redirect!
end
end
# Check the page
assert_response :success
- assert_template "confirmations/confirm"
+ assert_template "site/welcome"
ActionMailer::Base.deliveries.clear
end
end
def test_user_create_facebook_success
- OmniAuth.config.add_mock(:facebook, :uid => "123454321")
-
new_email = "newtester-facebook@osm.org"
display_name = "new_tester-facebook"
password = "testtest"
+
+ OmniAuth.config.add_mock(:facebook, :uid => "123454321", :info => { "email" => new_email })
+
assert_difference("User.count") do
- assert_difference("ActionMailer::Base.deliveries.size", 1) do
+ assert_no_difference("ActionMailer::Base.deliveries.size") do
perform_enqueued_jobs do
post "/user/new",
:params => { :user => { :email => new_email,
:pass_crypt_confirmation => password },
:read_ct => 1, :read_tou => 1 }
assert_response :redirect
+ assert_redirected_to welcome_path
follow_redirect!
end
end
# Check the page
assert_response :success
- assert_template "confirmations/confirm"
+ assert_template "site/welcome"
ActionMailer::Base.deliveries.clear
end
end
def test_user_create_windowslive_success
- OmniAuth.config.add_mock(:windowslive, :uid => "123454321")
-
new_email = "newtester-windowslive@osm.org"
display_name = "new_tester-windowslive"
password = "testtest"
+
+ OmniAuth.config.add_mock(:windowslive, :uid => "123454321", :info => { "email" => new_email })
+
assert_difference("User.count") do
assert_difference("ActionMailer::Base.deliveries.size", 1) do
perform_enqueued_jobs do
:pass_crypt_confirmation => password },
:read_ct => 1, :read_tou => 1 }
assert_response :redirect
+ assert_redirected_to :controller => :confirmations, :action => :confirm, :display_name => display_name
follow_redirect!
end
end
end
def test_user_create_github_success
- OmniAuth.config.add_mock(:github, :uid => "123454321")
-
new_email = "newtester-github@osm.org"
display_name = "new_tester-github"
password = "testtest"
+
+ OmniAuth.config.add_mock(:github, :uid => "123454321", :info => { "email" => new_email })
+
assert_difference("User.count") do
assert_difference("ActionMailer::Base.deliveries.size", 1) do
perform_enqueued_jobs do
:read_ct => 1,
:read_tou => 1 }
assert_response :redirect
+ assert_redirected_to :controller => :confirmations, :action => :confirm, :display_name => display_name
follow_redirect!
end
end
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"
+
+ OmniAuth.config.add_mock(:wikipedia, :uid => "123454321", :info => { "email" => new_email })
+
assert_difference("User.count") do
assert_difference("ActionMailer::Base.deliveries.size", 1) do
perform_enqueued_jobs do
:read_ct => 1,
:read_tou => 1 }
assert_response :redirect
+ assert_redirected_to :controller => :confirmations, :action => :confirm, :display_name => display_name
follow_redirect!
end
end