From 4440612909fcad38cd5157e4b39adc2e810de81c Mon Sep 17 00:00:00 2001 From: Dave Liepmann Date: Sun, 24 May 2020 13:15:43 +0200 Subject: [PATCH 1/2] Allow Reader in addition to String and java.io.File Per docstring, `uri` should accept Readers like from clojure.java.io/reader. --- src/meta_csv/core.cljc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/meta_csv/core.cljc b/src/meta_csv/core.cljc index 04223d6..116630c 100644 --- a/src/meta_csv/core.cljc +++ b/src/meta_csv/core.cljc @@ -637,6 +637,7 @@ opts (do (when-not (or (instance? String uri) + (instance? Reader uri) (instance? java.io.File uri)) (throw (ex-info "Cannot guess the specs of inputs that are neither String path nor File" {:uri uri}))) (guess-spec uri opts)))) From e2f1f26913cfe4be1f9c37755c935e8bccc2c27c Mon Sep 17 00:00:00 2001 From: Dave Liepmann Date: Mon, 20 Jul 2020 17:26:11 +0200 Subject: [PATCH 2/2] Allow URLs (and therefore clojure.java.io/resource) --- src/meta_csv/core.cljc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/meta_csv/core.cljc b/src/meta_csv/core.cljc index 116630c..427b283 100644 --- a/src/meta_csv/core.cljc +++ b/src/meta_csv/core.cljc @@ -638,6 +638,7 @@ (do (when-not (or (instance? String uri) (instance? Reader uri) + (instance? java.net.URL uri) (instance? java.io.File uri)) (throw (ex-info "Cannot guess the specs of inputs that are neither String path nor File" {:uri uri}))) (guess-spec uri opts))))