autoprefixer-rails (10.4.16.0)
execjs (~> 2)
aws-eventstream (1.3.0)
- aws-partitions (1.950.0)
- aws-sdk-core (3.201.0)
+ aws-partitions (1.954.0)
+ aws-sdk-core (3.201.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
doorkeeper (>= 5.5, < 5.8)
jwt (>= 2.5)
drb (2.2.1)
- dry-configurable (1.1.0)
+ dry-configurable (1.2.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-core (1.0.1)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
- faraday (2.9.2)
+ faraday (2.10.0)
faraday-net_http (>= 2.0, < 3.2)
+ logger
faraday-net_http (3.1.0)
net-http
ffi (1.17.0)
image_size (3.4.0)
in_threads (1.6.0)
io-console (0.7.2)
- irb (1.13.2)
+ irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.12.0)
marcel (1.0.4)
matrix (0.4.2)
maxminddb (0.1.22)
- mini_magick (4.13.1)
+ mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
mini_racer (0.9.0)
omniauth (~> 2.0)
openstreetmap-deadlock_retry (1.3.1)
parallel (1.25.1)
- parser (3.3.3.0)
+ parser (3.3.4.0)
ast (~> 2.4.1)
racc
pg (1.5.6)
rouge (4.3.0)
rtlcss (0.2.1)
mini_racer (>= 0.6.3)
- rubocop (1.64.1)
+ rubocop (1.65.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
- regexp_parser (>= 1.8, < 3.0)
+ regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
- websocket (1.2.10)
+ websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
# External authentication support
- def openid_logo
- image_tag "openid.svg", :size => "36", :alt => t("application.auth_providers.openid_logo_alt"), :class => "align-text-bottom"
- end
-
def auth_button(name, provider, options = {})
link_to(
image_tag("#{name}.svg",
<%# :tabindex starts high to allow rendering at the bottom of the template %>
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
<div id="login_openid_url" class="mb-3">
- <label for="openid_url" class="form-label"><%= t ".openid_html", :logo => openid_logo %></label>
+ <label for="openid_url" class="form-label">
+ <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
+ <%= t ".openid_url" %>
+ </label>
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
<%= text_field_tag("openid_url", "", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
<span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
oauth2_authorizations: OAuth 2 authorizations
muted_users: Muted Users
auth_providers:
- openid_logo_alt: "Log in with an OpenID"
- openid_html: "%{logo} OpenID"
+ openid_url: "OpenID URL"
openid_login_button: "Continue"
openid:
title: Log in with OpenID
url = "#{Settings.nominatim_url}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{language}"
begin
- response = Timeout.timeout(4) do
- REXML::Document.new(Net::HTTP.get(URI.parse(url)))
+ response = OSM.http_client.get(URI.parse(url)) do |request|
+ request.options.timeout = 4
end
+
+ results = REXML::Document.new(response.body) if response.success?
rescue StandardError
- response = nil
+ results = nil
end
- if response && result = response.get_text("reversegeocode/result")
+ if results && result = results.get_text("reversegeocode/result")
result.value
else
"#{number_with_precision(lat, :precision => 3)}, #{number_with_precision(lon, :precision => 3)}"
# Return the HTTP client to use
def self.http_client
- @http_client ||= Faraday.new(:request => { :timeout => 15 })
+ @http_client ||= Faraday.new(:request => { :timeout => 15 },
+ :headers => { :user_agent => Settings.server_url })
end
# Return the MaxMindDB database handle
assert_match %r{^<img .* width="50" height="50" .* />$}, thumbnail
end
- def test_openid_logo
- logo = openid_logo
- assert_match %r{^<img .* src="/images/openid.svg" .* />$}, logo
- end
-
def test_auth_button
button = auth_button("google", "google")
img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
qs@^6.9.4:
- version "6.12.2"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.2.tgz#5443b587f3bf73ac68968de491e5b25bafe04478"
- integrity sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg==
+ version "6.12.3"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.3.tgz#e43ce03c8521b9c7fd7f1f13e514e5ca37727754"
+ integrity sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==
dependencies:
side-channel "^1.0.6"