Commit 93d46901 authored by Eric Timmons's avatar Eric Timmons
Browse files

Remove requirement to URL encode object names

It was added originally to deal with slashes in system names. However, there
shouldn't be any of those any more.
parent ea2dd421
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ the secondary.
* Project metadata

  For every project in the index, the object =projects/PROJECT-NAME/metadata=
  must exist, where =PROJECT-NAME= is the URL-encoded project name.
  must exist, where =PROJECT-NAME= is the project name.

  This object must contain a single plist. The defined keys are:

@@ -97,9 +97,9 @@ the secondary.

  For every project in the index, the object =project/PROJECT-NAME/releases= or
  =projects/PROJECT-NAME/releases-RELEASES-OBJECT-VERSION= must exist, where
  =PROJECT-NAME= is the URL-encoded project name and =RELEASES-OBJECT-VERSION=
  is defined in the project metadata. If the release object version is NIL/not
  provided, only the former must exist, otherwise the latter must exist.
  =PROJECT-NAME= is the project name and =RELEASES-OBJECT-VERSION= is defined
  in the project metadata. If the release object version is NIL/not provided,
  only the former must exist, otherwise the latter must exist.

  This object contains information about each release of the project. Every
  sexp must be of the form: =(version . release-plist)=, where =version= is a
@@ -131,8 +131,8 @@ the secondary.
* System metadata

  For every primary system in the index, the object
  =systems/SYSTEM-NAME/metadata= must exist, where =SYSTEM-NAME= is the
  URL-encoded primary system name.
  =systems/SYSTEM-NAME/metadata= must exist, where =SYSTEM-NAME= is the primary
  system name.

  This object must contain a single plist. The defined keys are:

+5 −6
Original line number Diff line number Diff line
@@ -11,8 +11,7 @@
          #:clpi/metadata
          #:clpi/release
          #:clpi/repos
          #:clpi/utils
          #:do-urlencode)
          #:clpi/utils)
  (:export #:project))

(in-package #:clpi/project)
@@ -67,7 +66,7 @@ instantiated."))

(defmethod metadata-path ((project project))
  (uiop:strcat "projects/"
               (urlencode (project-name project))
               (project-name project)
               "/metadata"))

(defmethod project-add-release ((project project) new-release)
@@ -138,10 +137,10 @@ instantiated."))

(defmethod project-releases-path ((project project))
  (let ((releases-object-version (project-releases-object-version project))
        (encoded-name (urlencode (project-name project))))
        (project-name (project-name project)))
    (if releases-object-version
        (uiop:strcat "projects/" encoded-name "/releases-" (write-to-string releases-object-version))
        (uiop:strcat "projects/" encoded-name "/releases"))))
        (uiop:strcat "projects/" project-name "/releases-" (write-to-string releases-object-version))
        (uiop:strcat "projects/" project-name "/releases"))))

(defmethod project-version-scheme ((project project))
  (metadata-value project :version-scheme))
+1 −2
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@
    (:use #:cl
          #:anaphora
          #:clpi/defs
          #:clpi/metadata
          #:do-urlencode)
          #:clpi/metadata)
  (:export #:system-release))

(in-package #:clpi/system-release)
+2 −3
Original line number Diff line number Diff line
@@ -8,8 +8,7 @@
          #:alexandria
          #:clpi/defs
          #:clpi/metadata
          #:clpi/utils
          #:do-urlencode)
          #:clpi/utils)
  (:export #:system))

(in-package #:clpi/system)
@@ -53,7 +52,7 @@ provide that version.")))

(defmethod metadata-path ((system system))
  (uiop:strcat "systems/"
               (urlencode (asdf:primary-system-name (system-name system)))
               (asdf:primary-system-name (system-name system))
               "/metadata"))

(defmethod system-add-system-release ((system system) new-system-release)