Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,32 @@
require 'uri'
module URI
module_function
# Decode the uri components.
#
def decode(uri)
## gmosx: hmm is this needed?
## guard against invalid filenames for example pictures with
## spaces uploaded by users
escaped_uri = uri.gsub(/ /, "+")
if md = URI::REGEXP::REL_URI.match(escaped_uri)
path = "#{md[5]}#{md[6]}"
type = File.extname(path)
query_string = md[7]
## real_path = "#{$root_dir}/#{path}"
parameters = URI.query_to_hash(query_string)
path.gsub!(/\+/, " ")
return [path, type, parameters, query_string]
end
## this is usefull for uncovering bugs!
raise ArgumentError.new("the parameter '#{uri}' is not a valid uri")
end
end