summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoni Rabkin <yoni@rabkins.net>2020-08-03 18:54:17 -0400
committerYoni Rabkin <yoni@rabkins.net>2020-08-03 18:54:17 -0400
commit965be87719ab40ef57e8f37fda85c5851bd92e6f (patch)
tree94aa1c32bb5033894a8d73f238c77ece00a327d0
parent1995685feded34f0c70a8b6916fe593249602332 (diff)
fix broken dependencies
-rw-r--r--rt-liberation-rest.el38
-rw-r--r--rt-liberation.el36
2 files changed, 36 insertions, 38 deletions
diff --git a/rt-liberation-rest.el b/rt-liberation-rest.el
index 9b18974..0b52211 100644
--- a/rt-liberation-rest.el
+++ b/rt-liberation-rest.el
@@ -175,24 +175,6 @@
(re-search-forward rt-ok-regexp (point-max)))
(error "bad HTTP response from server"))))
-(defun rt-liber-rest-ticketsql-runner-parser-f ()
- "Parser function for a textual list of tickets."
- (let (idsub-list)
- (rt-liber-rest-parse-http-header)
- (while (re-search-forward "ticket/\\([0-9].+\\)" (point-max) t)
- ;; the output should be compatible with the input to
- ;; `rt-liber-create-tickets-string'
- (push (list (match-string-no-properties 1)
- ".")
- idsub-list))
- idsub-list))
-
-(defun rt-liber-rest-run-ls-query (query)
- "Run an \"ls\" type query against the server with QUERY."
- (rt-liber-parse-answer
- (rt-liber-rest-query-runner "ls" query)
- 'rt-liber-rest-ticketsql-runner-parser-f))
-
(defun rt-liber-rest-show-process (response)
"Process and return the show query response."
(when (not (stringp response))
@@ -227,20 +209,6 @@
(message "done retrieving %d tickets" l)))
(buffer-substring (point-min) (point-max))))
-(defun rt-liber-rest-run-show-base-query (idsublist)
- "Run \"show\" type query against the server with IDSUBLIST."
- (rt-liber-parse-answer
- (rt-liber-rest-show-query-runner idsublist)
- #'rt-liber-ticket-base-retriever-parser-f))
-
-(defun rt-liber-rest-run-ticket-history-base-query (ticket-id)
- "Run history query against server for TICKET-ID."
- (rt-liber-parse-answer
- (rt-liber-rest-query-runner "history" ticket-id)
- #'(lambda ()
- (rt-liber-rest-parse-http-header)
- (buffer-substring (point) (point-max)))))
-
(defun rt-liber-rest-handle-response (buffer)
"Handle the response provided in BUFFER."
(with-current-buffer rt-liber-rest-response-buffer
@@ -269,12 +237,6 @@
(rt-liber-rest-handle-response rt-liber-rest-response-buffer)))
(message "edit command ended at %s" (current-time-string)))
-(defun rt-liber-rest-command-set (id field status)
- "Set ticket ID status to be STATUS."
- (rt-liber-parse-answer
- (rt-liber-rest-edit-runner id field status)
- 'rt-liber-command-runner-parser-f))
-
(provide 'rt-liberation-rest)
diff --git a/rt-liberation.el b/rt-liberation.el
index aa48cea..ddd6900 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -396,6 +396,42 @@ AFTER date after predicate."
continue t))
ticketbase-list))
+(defun rt-liber-rest-ticketsql-runner-parser-f ()
+ "Parser function for a textual list of tickets."
+ (let (idsub-list)
+ (rt-liber-rest-parse-http-header)
+ (while (re-search-forward "ticket/\\([0-9].+\\)" (point-max) t)
+ (push (list (match-string-no-properties 1)
+ ".")
+ idsub-list))
+ idsub-list))
+
+(defun rt-liber-rest-run-ls-query (query)
+ "Run an \"ls\" type query against the server with QUERY."
+ (rt-liber-parse-answer
+ (rt-liber-rest-query-runner "ls" query)
+ 'rt-liber-rest-ticketsql-runner-parser-f))
+
+(defun rt-liber-rest-run-show-base-query (idsublist)
+ "Run \"show\" type query against the server with IDSUBLIST."
+ (rt-liber-parse-answer
+ (rt-liber-rest-show-query-runner idsublist)
+ #'rt-liber-ticket-base-retriever-parser-f))
+
+(defun rt-liber-rest-run-ticket-history-base-query (ticket-id)
+ "Run history query against server for TICKET-ID."
+ (rt-liber-parse-answer
+ (rt-liber-rest-query-runner "history" ticket-id)
+ #'(lambda ()
+ (rt-liber-rest-parse-http-header)
+ (buffer-substring (point) (point-max)))))
+
+(defun rt-liber-rest-command-set (id field status)
+ "Set ticket ID status to be STATUS."
+ (rt-liber-parse-answer
+ (rt-liber-rest-edit-runner id field status)
+ 'rt-liber-command-runner-parser-f))
+
;;; --------------------------------------------------------
;;; Ticket utilities