This commit is contained in:
Michiel Borkent 2020-12-26 21:37:02 +01:00
parent adfffa1267
commit 6b2c03d617
4 changed files with 4 additions and 51 deletions

View file

@ -8,4 +8,3 @@
(-> (clj-kondo/run! {:lint ["src"]})
:summary)

View file

@ -1,13 +0,0 @@
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/hsqldb "0.0.1" #_{:force true})
(require '[pod.babashka.hsqldb :as db])
(def db "jdbc:hsqldb:mem:testdb;sql.syntax_mys=true")
(db/execute! db ["create table foo ( foo int );"])
(db/execute! db ["insert into foo values (1, 2, 3);"])
(db/execute! db ["select * from foo;"])

View file

@ -1,34 +0,0 @@
(require '[babashka.pods :refer [load-pod]])
(load-pod 'org.babashka/lanterna "0.0.1-SNAPSHOT" {#_#_:force true #_#_:transport :socket})
(require '[pod.babashka.lanterna.terminal :as terminal])
(def terminal (terminal/get-terminal))
(terminal/start terminal)
(terminal/put-string terminal
(str "Hello TUI Babashka!")
10 5)
(terminal/put-string terminal
(str "The size of this terminal: "
(terminal/get-size terminal))
10 6)
(terminal/put-string terminal
"Press q to exit."
10 7)
(terminal/flush terminal)
(def k (terminal/get-key-blocking terminal))
(terminal/put-string terminal
(str "You pressed: " k)
10 8)
(Thread/sleep 1000)
(terminal/stop terminal)
(shutdown-agents)

View file

@ -101,9 +101,10 @@
qsym version))
(defn pod-manifest
[qsym version]
[qsym version force?]
(let [f (io/file @pod-manifests-dir (str qsym) (str version ".edn"))]
(if (.exists f)
(if (and (not force?)
(.exists f))
(edn/read-string (slurp f))
(do (download (github-url qsym version) f false)
(edn/read-string (slurp f))))))
@ -149,7 +150,7 @@
(defn resolve [qsym version force?]
(assert (string? version) "Version must be provided!")
(when-let [manifest (pod-manifest qsym version)]
(when-let [manifest (pod-manifest qsym version force?)]
(let [artifacts (match-artifacts manifest)
cdir (cache-dir manifest)
ddir (data-dir manifest)