implement jvm platform

This commit is contained in:
jem 2021-02-26 14:44:02 +01:00
parent f5d6d6f27b
commit a8cbdf108b
3 changed files with 14 additions and 2 deletions

View file

@ -9,7 +9,6 @@
:source-paths ["src/main/cljc"
"src/main/clj"]
:resource-paths ["src/main/resources"]
:repositories [["snapshots" :clojars]
["releases" :clojars]]
:deploy-repositories [["snapshots" :clojars]

13
src/main/clj/yaml.clj Normal file
View file

@ -0,0 +1,13 @@
(ns dda.k8s-mastodon-bot.yaml
(:require
[clojure.java.io :as io]
[clj-yaml.core :as yaml]))
(defn load-resource [resource-name]
(slurp (io/resource resource-name)))
(defn from-string [input]
(yaml/parse-string input))
(defn to-string [edn]
(yaml/generate-string edn :dumper-options {:flow-style :block}))

View file

@ -18,4 +18,4 @@
:labels {:app.kubernetes.io/name "k8s-mastodon-bot"}},
:data {:config.edn "some-config-value\n",
:credentials.edn "some-credentials-value\n"}}
(cut/from-string (cut/load-resource "config.yml")))))
(cut/from-string (cut/load-resource "config.yaml")))))