spec now is valid

master
jem 4 years ago
parent 0ae68af441
commit fed673f07c

@ -19,12 +19,14 @@
(s/def ::twitter map?)
(s/def ::tumblr map?)
(s/def ::rss map?)
(def config? (s/keys :req [::mastodon-config]
:opt [::twitter ::tumblr ::rss]))
(s/def ::config config?)
;this has to stay on top - only ns-keywords can be uses in spec
(defn-spec mastodon-config ::mastodon-config
[config any?]
[config ::config]
(::mastodon-config config))
(defn find-config []
@ -161,3 +163,4 @@
(parse-feed last-post-time parser feed))))))))
(set! *main-cli-fn* -main)
(st/instrument 'mastodon-config)

@ -24,7 +24,7 @@
(s/def ::max-post-length (fn [n] (and
(int? n)
(<= n 600)
(< n 0))))
(> n 0))))
(s/def ::content-filters (s/* ::content-filter))
(s/def ::keyword-filters (s/* ::keyword-filter))