autoprefixer-rails (10.4.16.0)
execjs (~> 2)
aws-eventstream (1.3.0)
- aws-partitions (1.899.0)
+ aws-partitions (1.900.0)
aws-sdk-core (3.191.4)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
kramdown (2.4.0)
rexml
language_server-protocol (3.17.0.3)
- libv8-node (18.16.0.0)
+ libv8-node (18.19.0.0)
libxml-ruby (5.0.3)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
- mini_racer (0.8.0)
- libv8-node (~> 18.16.0.0)
+ mini_racer (0.9.0)
+ libv8-node (~> 18.19.0.0)
minitest (5.22.3)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
net-protocol
net-protocol (0.2.2)
timeout
- net-smtp (0.4.0.1)
+ net-smtp (0.5.0)
net-protocol
- nio4r (2.7.0)
+ nio4r (2.7.1)
nokogiri (1.16.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nio4r (~> 2.0)
quad_tile (1.0.1)
racc (1.7.3)
- rack (2.2.8.1)
+ rack (2.2.9)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-openid (1.4.2)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
- rdoc (6.6.2)
+ rdoc (6.6.3.1)
psych (>= 4.0.0)
regexp_parser (2.9.0)
- reline (0.4.3)
+ reline (0.5.0)
io-console (~> 0.5)
request_store (1.6.0)
rack (>= 1.4)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
- rubocop-rails (2.24.0)
+ rubocop-rails (2.24.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
thor (1.3.1)
tilt (2.3.0)
timeout (0.4.1)
- turbo-rails (2.0.4)
+ turbo-rails (2.0.5)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
validates_email_format_of (1.7.2)
i18n
vendorer (0.2.0)
- version_gem (1.1.3)
+ version_gem (1.1.4)
webmock (3.23.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
# Create a changeset from XML.
def create
- assert_method :put
-
cs = Changeset.from_xml(request.raw_post, :create => true)
# Assume that Changeset.from_xml has thrown an exception if there is an error parsing the xml
# marks a changeset as closed. this may be called multiple times
# on the same changeset, so is idempotent.
def close
- assert_method :put
-
changeset = Changeset.find(params[:id])
check_changeset_consistency(changeset, current_user)
# Returns: a diffResult document, as described in
# http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6
def upload
- # only allow POST requests, as the upload method is most definitely
- # not idempotent, as several uploads with placeholder IDs will have
- # different side-effects.
- # see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.2
- assert_method :post
-
changeset = Changeset.find(params[:id])
check_changeset_consistency(changeset, current_user)
#
# after succesful update, returns the XML of the changeset.
def update
- # request *must* be a PUT.
- assert_method :put
-
@changeset = Changeset.find(params[:id])
new_changeset = Changeset.from_xml(request.raw_post)
# Create a node from XML.
def create
- assert_method :put
-
node = Node.from_xml(request.raw_post, :create => true)
# Assume that Node.from_xml has thrown an exception if there is an error parsing the xml
end
def create
- assert_method :put
-
relation = Relation.from_xml(request.raw_post, :create => true)
# Assume that Relation.from_xml has thrown an exception if there is an error parsing the xml
authorize_resource
around_action :api_call_handle_error
- before_action :lookup_user_by_id, :only => [:show]
+ load_resource :only => :show
before_action :set_request_formats, :except => [:gpx_files]
private
- ##
- # ensure that there is a "user" instance variable
- def lookup_user_by_id
- @user = User.find(params[:id])
- end
-
- ##
- #
def disable_terms_redirect
# this is necessary otherwise going to the user terms page, when
# having not agreed already would cause an infinite redirect loop.
end
def create
- assert_method :put
-
way = Way.from_xml(request.raw_post, :create => true)
# Assume that Way.from_xml has thrown an exception if there is an error parsing the xml
report_error "#{e.class}: #{e.message}", :internal_server_error
end
- ##
- # asserts that the request method is the +method+ given as a parameter
- # or raises a suitable error. +method+ should be a symbol, e.g: :put or :get.
- def assert_method(method)
- ok = request.send(:"#{method.to_s.downcase}?")
- raise OSM::APIBadMethodError, method unless ok
- end
-
##
# wrap an api call in a timeout
def api_call_timeout(&block)
<dd class="list-inline-item"><%= @user.email %></dd>
<% unless @user.creation_ip.nil? -%>
<dt class="list-inline-item m-0"><%= t ".created from" %></dt>
- <dd class="list-inline-item"><%= @user.creation_ip %></dd>
+ <dd class="list-inline-item"><%= link_to @user.creation_ip, users_path(:ip => @user.creation_ip) %></dd>
<% end -%>
<dt class="list-inline-item m-0"><%= t ".status" %></dt>
- <dd class="list-inline-item"><%= @user.status.capitalize %></dd>
+ <dd class="list-inline-item"><%= link_to @user.status.capitalize, users_path(:status => @user.status) %></dd>
<dt class="list-inline-item m-0"><%= t ".spam score" %></dt>
<dd class="list-inline-item"><%= @user.spam_score %></dd>
</dl>