emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/webpaste d96da58fe4 4/4: Merge branch 'albertodonato-add-p


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste d96da58fe4 4/4: Merge branch 'albertodonato-add-paste-ubuntu-com'
Date: Tue, 24 May 2022 13:58:55 -0400 (EDT)

branch: elpa/webpaste
commit d96da58fe42988d5c433c71ee9f8e6fb75d595a9
Merge: 78272662e6 6e84af27e7
Author: Elis Hirwing <elis@hirwing.se>
Commit: Elis Hirwing <elis@hirwing.se>

    Merge branch 'albertodonato-add-paste-ubuntu-com'
---
 README.org                                   |  1 +
 tests/integration/test-webpaste-providers.el | 11 ++++++++++-
 webpaste.el                                  |  8 ++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 1f318fe349..222c2ea9ce 100644
--- a/README.org
+++ b/README.org
@@ -210,6 +210,7 @@ webpaste first and then just read the documentation by 
running this:
  - [X] dpaste.org
  - [X] gist.github.com
  - [X] paste.mozilla.org
+ - [X] paste.ubuntu.com
  - [X] bpa.st
  - [ ] paste.debian.net
  - [ ] bpaste.net
diff --git a/tests/integration/test-webpaste-providers.el 
b/tests/integration/test-webpaste-providers.el
index 371df44dbc..b7123b85fb 100644
--- a/tests/integration/test-webpaste-providers.el
+++ b/tests/integration/test-webpaste-providers.el
@@ -82,7 +82,16 @@
    (funcall (webpaste--get-provider-by-name "bpa.st") paste-message :sync t)
 
    (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
-   (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
+   (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0))
+
+  (it
+   "can paste with paste.ubuntu.com [ci]"
+
+   (spy-on 'file-name-nondirectory :and-return-value "file.txt")
+
+   (funcall (webpaste--get-provider-by-name "paste.ubuntu.com") paste-message 
:sync t)
 
+   (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+   (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
 
 ;;; test-webpaste-providers.el ends here
diff --git a/webpaste.el b/webpaste.el
index 769ab2ec34..07a850f783 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -133,6 +133,14 @@ This uses `browse-url-generic' to open URLs."
       :lang-overrides ((emacs-lisp-mode . "clojure"))
       :success-lambda webpaste--providers-success-returned-string)
 
+    ("paste.ubuntu.com"
+     :uri "https://paste.ubuntu.com/";
+     :post-data (("poster" . "webpaste"))  ;; the poster is required
+     :post-field "content"
+     :post-lang-field-name "syntax"
+     :lang-overrides ((emacs-lisp-mode . "emacs"))
+     :success-lambda webpaste--providers-success-response-url)
+
     ("gist.github.com"
      :uri "https://api.github.com/gists";
      :post-field nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]