Fix order of methods for posts-io and update older packages
This commit is contained in:
parent
724d1e9a7f
commit
ae976925fb
|
@ -38,9 +38,6 @@
|
|||
:resource-paths ["resources"]
|
||||
:target-path "target/%s/"
|
||||
:main ^:skip-aot shapey-shifty.core
|
||||
|
||||
:plugins [[lein-cljfmt "0.6.6"]]
|
||||
|
||||
:profiles
|
||||
{:uberjar {:omit-source true
|
||||
:aot :all
|
||||
|
@ -57,6 +54,7 @@
|
|||
[ring/ring-devel "1.8.0"]
|
||||
[ring/ring-mock "0.4.0"]]
|
||||
:plugins [[com.jakemccrary/lein-test-refresh "0.24.1"]
|
||||
[lein-cljfmt "0.6.6"]
|
||||
[jonase/eastwood "0.3.5"]]
|
||||
|
||||
:source-paths ["env/dev/clj"]
|
||||
|
|
|
@ -37,6 +37,15 @@
|
|||
card (get author :card)]
|
||||
(assoc post :author card)))
|
||||
|
||||
(defn read-post
|
||||
([file]
|
||||
(when (.exists file)
|
||||
(-> file slurp edn/read-string assoc-author)))
|
||||
([dt-path n]
|
||||
(let [path (format "%s/%s/%d/%s" base-posts-path (pathmap-to-path dt-path) n post-filename)
|
||||
f (io/file path)]
|
||||
(read-post f))))
|
||||
|
||||
(defn read-all-posts
|
||||
([]
|
||||
(read-all-posts base-posts-path))
|
||||
|
@ -46,12 +55,3 @@
|
|||
file-seq
|
||||
(filter #(.isFile %))
|
||||
(map #(read-post %)))))
|
||||
|
||||
(defn read-post
|
||||
([file]
|
||||
(when (.exists file)
|
||||
(-> file slurp edn/read-string assoc-author)))
|
||||
([dt-path n]
|
||||
(let [path (format "%s/%s/%d/%s" base-posts-path (pathmap-to-path dt-path) n post-filename)
|
||||
f (io/file path)]
|
||||
(read-post f))))
|
||||
|
|
Loading…
Reference in New Issue