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

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

[nongnu] elpa/xml-rpc bc331d010b 56/64: Test CI


From: Stefan Kangas
Subject: [nongnu] elpa/xml-rpc bc331d010b 56/64: Test CI
Date: Fri, 31 Dec 2021 20:11:12 -0500 (EST)

branch: elpa/xml-rpc
commit bc331d010b841eef1bd578cb1b2308ac2d4e6f83
Author: Mark A. Hershberger <mah@nichework.com>
Commit: Mark A. Hershberger <mah@nichework.com>

    Test CI
---
 .github/workflows/CI.yml |  36 ++++++++++
 Makefile                 |   2 +
 README.org               |  83 ++++++++++++++++++++++
 xml-rpc.el               | 175 +----------------------------------------------
 4 files changed, 122 insertions(+), 174 deletions(-)

diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
new file mode 100644
index 0000000000..6fc34918a2
--- /dev/null
+++ b/.github/workflows/CI.yml
@@ -0,0 +1,36 @@
+
+name: CI
+
+on:
+  pull_request:
+  push:
+    paths-ignore:
+    - '**.org'
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        emacs_version:
+          - 24.1
+          - 24.2
+          - 24.3
+          - 24.4
+          - 24.5
+          - 25.1
+          - 25.2
+          - 25.3
+          - 26.1
+          - 26.2
+          - 26.3
+          - 27.1
+          - snapshot
+    steps:
+    - uses: purcell/setup-emacs@master
+      with:
+        version: ${{ matrix.emacs_version }}
+
+    - uses: actions/checkout@v2
+    - name: Run tests
+      run: 'make test'
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..57d5aaee72
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2 @@
+test:
+       emacs -batch -l xml-rpc-test.el -f ert-run-tests-batch-and-exit
diff --git a/README.org b/README.org
new file mode 100644
index 0000000000..ac678853cf
--- /dev/null
+++ b/README.org
@@ -0,0 +1,83 @@
+* Commentary:
+
+This is an XML-RPC client implementation in elisp, capable of both synchronous 
and asynchronous method calls (using the url package's async retrieval 
functionality).
+XML-RPC is remote procedure calls over HTTP using XML to describe the function 
call and return values.
+
+xml-rpc.el represents XML-RPC datatypes as lisp values, automatically 
converting to and from the XML datastructures as needed, both for method 
parameters and return values, making using XML-RPC methods fairly transparent 
to the lisp code.
+
+* Installation:
+
+If you use ELPA (http://tromey.com/elpa), you can install via the M-x 
package-list-packages interface. This is preferrable as you will have access to 
updates automatically.
+
+Otherwise, just make sure this file in your load-path (usually =~/.emacs.d= is 
included) and put
+#+begin_src elisp
+(require 'xml-rpc) 
+#+end_src
+in your =~/.emacs= or =~/.emacs.d/init.el= file.
+
+* Requirements
+
+xml-rpc.el uses the url package for http handling and =xml.el= for XML parsing 
or, if you have Emacs 27 with =libxml= included, =libxml=. url is a part of the 
W3 browser package.  The url package that is part of Emacs 22+ works great.
+
+* Bug reports
+
+Please use =M-x xml-rpc-submit-bug-report= to report bugs directly to the 
maintainer, or use [[https://github.com/xml-rpc-el/xml-rpc-el/issues][github's 
issue system]].
+
+* Representing data types
+ XML-RPC datatypes are represented as follows
+
+| type         | data                                   |
+| int          | 42                                     |
+| float/double | 42.0                                   |
+| string       | "foo"                                  |
+| base64       | (list :base64                          |
+|              | (base64-encode-string "hello" t))      |
+|              | '(:base64 "aGVsbG8=")                  |
+| array        | '(1 2 3 4)   '(1 2 3 (4.1 4.2))  [ ]   |
+|              | '(:array (("not" "a") ("struct" "!"))) |
+| struct       | '(("name" . "daniel")                  |
+|              | ("height" . 6.1))                      |
+| dateTime     | '(:datetime (1234 124))                |
+
+
+* Examples
+
+Here follows some examples demonstrating the use of xml-rpc.el
+
+** Normal synchronous operation
+#+begin_src elisp
+(xml-rpc-method-call "http://localhost:80/RPC"; 'foo-method foo bar zoo)
+#+end_src
+
+** Asynchronous example (cb-foo will be called when the methods returns)
+#+begin_src elisp
+(defun cb-foo (foo)
+  (print (format "%s" foo)))
+
+(xml-rpc-method-call-async 'cb-foo "http://localhost:80/RPC";
+                           'foo-method foo bar zoo)
+#+end_src
+
+** Some real world working examples for fun and play
+
+*** Check the temperature (celsius) outside jonas@codefactory.se's apartment
+#+begin_src elisp
+(xml-rpc-method-call
+     "http://flint.bengburken.net:80/xmlrpc/onewire_temp.php";
+     'onewire.getTemp)
+#+end_src
+
+*** Fetch the latest NetBSD news the past 5 days from O'reillynet
+#+begin_src elisp
+(xml-rpc-method-call "http://www.oreillynet.com/meerkat/xml-rpc/server.php";
+                  'meerkat.getItems
+                  '(("channel" . 1024)
+                    ("search" . "/NetBSD/")
+                    ("time_period" . "5DAY")
+                    ("ids" . 0)
+                    ("descriptions" . 200)
+                    ("categories" . 0)
+                    ("channels" . 0)
+                    ("dates" . 0)
+                    ("num_items" . 5)))
+#+end_src
diff --git a/xml-rpc.el b/xml-rpc.el
index 3426771bf2..78dfbadbe9 100644
--- a/xml-rpc.el
+++ b/xml-rpc.el
@@ -12,7 +12,7 @@
 ;; Created: May 13 2001
 ;; Keywords: xml rpc network
 ;; URL: http://github.com/hexmode/xml-rpc-el
-;; Last Modified: <2020-09-06 15:33:28 mah>
+;; Last Modified: <2020-09-06 18:06:55 mah>
 
 (defconst xml-rpc-version "1.6.14"
   "Current version of xml-rpc.el")
@@ -32,179 +32,6 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-;;; Commentary:
-
-;; This is an XML-RPC client implementation in elisp, capable of both
-;; synchronous and asynchronous method calls (using the url package's async
-;; retrieval functionality).
-;; XML-RPC is remote procedure calls over HTTP using XML to describe the
-;; function call and return values.
-
-;; xml-rpc.el represents XML-RPC datatypes as lisp values, automatically
-;; converting to and from the XML datastructures as needed, both for method
-;; parameters and return values, making using XML-RPC methods fairly
-;; transparent to the lisp code.
-
-;;; Installation:
-
-;; If you use ELPA (http://tromey.com/elpa), you can install via the
-;; M-x package-list-packages interface. This is preferrable as you
-;; will have access to updates automatically.
-
-;; Otherwise, just make sure this file in your load-path (usually
-;; ~/.emacs.d is included) and put (require 'xml-rpc) in your
-;; ~/.emacs or ~/.emacs.d/init.el file.
-
-;;; Requirements
-
-;; xml-rpc.el uses the url package for http handling and xml.el for
-;; XML parsing. url is a part of the W3 browser package.  The url
-;; package that is part of Emacs 22+ works great.
-;;
-;; xml.el is a part of GNU Emacs 21, but can also be downloaded from
-;; here: <URL:ftp://ftp.codefactory.se/pub/people/daniel/elisp/xml.el>
-
-;;; Bug reports
-
-;; Please use M-x xml-rpc-submit-bug-report to report bugs.
-
-;;; XML-RPC datatypes are represented as follows
-
-;;          int:  42
-;; float/double:  42.0
-;;       string:  "foo"
-;;       base64:  (list :base64 (base64-encode-string "hello" t)) '(:base64 
"aGVsbG8=")
-;;        array:  '(1 2 3 4)   '(1 2 3 (4.1 4.2))  [ ]  '(:array (("not" "a") 
("struct" "!")))
-;;       struct:  '(("name" . "daniel") ("height" . 6.1))
-;;     dateTime:  '(:datetime (1234 124))
-
-
-;;; Examples
-
-;; Here follows some examples demonstrating the use of xml-rpc.el
-
-;; Normal synchronous operation
-;; ----------------------------
-
-;; (xml-rpc-method-call "http://localhost:80/RPC"; 'foo-method foo bar zoo)
-
-;; Asynchronous example (cb-foo will be called when the methods returns)
-;; ---------------------------------------------------------------------
-
-;; (defun cb-foo (foo)
-;;   (print (format "%s" foo)))
-
-;; (xml-rpc-method-call-async 'cb-foo "http://localhost:80/RPC";
-;;                            'foo-method foo bar zoo)
-
-
-;; Some real world working examples for fun and play
-;; -------------------------------------------------
-
-;; Check the temperature (celsius) outside jonas@codefactory.se's apartment
-
-;; (xml-rpc-method-call
-;;      "http://flint.bengburken.net:80/xmlrpc/onewire_temp.php";
-;;      'onewire.getTemp)
-
-
-;; Fetch the latest NetBSD news the past 5 days from O'reillynet
-
-;; (xml-rpc-method-call "http://www.oreillynet.com/meerkat/xml-rpc/server.php";
-;;                   'meerkat.getItems
-;;                   '(("channel" . 1024)
-;;                     ("search" . "/NetBSD/")
-;;                     ("time_period" . "5DAY")
-;;                     ("ids" . 0)
-;;                     ("descriptions" . 200)
-;;                     ("categories" . 0)
-;;                     ("channels" . 0)
-;;                     ("dates" . 0)
-;;                     ("num_items" . 5)))
-
-
-;;; History:
-
-;; 1.6.13  - Fix running on Emacs 25 or later
-
-;; 1.6.12  - Add tests (thanks mdorman!), fix struct detection
-
-;; 1.6.11  - Add a way (xml-rpc-request-headers) for clients to add extra 
headers.
-
-;; 1.6.10.1 - removed extra HTTP header "Connection: close" and re-enabled 
keep-alive
-;;            to work with long-lived connections when large data is 
transmitted (LTC)
-
-;; 1.6.10  - Improve detection of structs with a patch from Jos'h Fuller.
-
-;; 1.6.9   - Add support for the i8 type (64 bit integers)
-;;         - Quote lambda with #' instead of ' to silence byte compiler
-
-;; 1.6.8.3 - [linda] Support for explicitly passing 'base64 data types.
-
-;; 1.6.8.2 - [linda] Fixed bug that empty values were translated into a 
boolean (nil)
-;;           instead of an empty string "" when turning XML into an Emacs list.
-
-;; 1.6.8.1 - [linda] Fixed bugs to be able to use empty lists and lists of 
lists
-;;           of strings as XML parameters.
-;;           (Bugs reported to web site with patches in Dec-2010.)
-
-;; 1.6.8   - Add a report-xml-rpc-bug function
-;;           Eliminate unused xml-rpc-get-temp-buffer-name
-;;           Improve compatibility with Xemacs
-
-;; 1.6.7   - Skipped version
-
-;; 1.6.6   - Use the correct dateTime elements.  Fix bug in parsing null int.
-
-;; 1.6.5.1 - Fix compile time warnings.
-
-;; 1.6.5   - Made handling of dateTime elements more robust.
-
-;; 1.6.4.1 - Updated to work with both Emacs22 and Emacs23.
-
-;; 1.6.2.2 - Modified to allow non-ASCII string again.
-;;           It can handle non-ASCII page name and comment
-;;           on Emacs 21 also.
-
-;; 1.6.2.1 - Modified to allow non-ASCII string.
-;;           If xml-rpc-allow-unicode-string is non-nil,
-;;           make 'value' object instead of 'base64' object.
-;;           This is good for WikiRPC.
-
-;; 1.6.2   - Fix whitespace issues to work better with new xml.el
-;;           Fix bug in string handling.
-;;           Add support for gzip-encoding when needed.
-
-;; 1.6.1   - base64 support added.
-;;           url-insert-entities-in-string done on string types now.
-
-;; 1.6     - Fixed dependencies (remove w3, add cl).
-;;           Move string-to-boolean and boolean-to-string into xml-rpc
-;;           namespace.
-;;           Fix bug in xml-rpc-xml-to-response where non-existent var was.
-;;           More tweaking of "Connection: close" header.
-;;           Fix bug in xml-rpc-request-process-buffer so that this works with
-;;           different mixes of the url.el code.
-
-;; 1.5.1   - Added Andrew J Cosgriff's patch to make the
-;;           xml-rpc-clean-string function work in XEmacs.
-
-;; 1.5     - Added headers to the outgoing url-retreive-synchronously
-;;           so that it would close connections immediately on completion.
-
-;; 1.4     - Added conditional debugging code.  Added version tag.
-
-;; 1.2     - Better error handling.  The documentation didn't match
-;;           the code.  That was changed so that an error was
-;;           signaled.  Also, better handling of various and
-;;           different combinations of xml.el and url.el.
-
-;; 1.1     - Added support for boolean types.  If the type of a
-;;           returned value is not specified, string is assumed
-
-;; 1.0     - First version
-
-
 ;;; Code:
 
 (require 'xml)



reply via email to

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