fixed all test & added todos
This commit is contained in:
parent
3f30afcdcb
commit
bd2e3ba250
3 changed files with 9 additions and 7 deletions
|
@ -10,7 +10,7 @@
|
||||||
(:require [clojure.java.io :as io]
|
(:require [clojure.java.io :as io]
|
||||||
[clojure.string :as st]
|
[clojure.string :as st]
|
||||||
[schema.core :as s])
|
[schema.core :as s])
|
||||||
(:import [java.nio.file FileSystems Paths Files LinkOption StandardCopyOption]
|
(:import [java.nio.file FileSystems Paths Files SimpleFileVisitor LinkOption StandardCopyOption]
|
||||||
[java.nio.file.attribute FileAttribute]))
|
[java.nio.file.attribute FileAttribute]))
|
||||||
|
|
||||||
(def SourceType (s/enum :classpath :filesystem))
|
(def SourceType (s/enum :classpath :filesystem))
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
:else
|
:else
|
||||||
(recur (into (drop 1 paths)
|
(recur (into (drop 1 paths)
|
||||||
(map #(str path-to-work-with "/" %)
|
(map #(str path-to-work-with "/" %)
|
||||||
(.list (io/file (.toString (:java-path resource-to-work-with)))))) ; TODO better function
|
(.list (io/file (.toString (:java-path resource-to-work-with)))))) ; TODO doesnt work in jars
|
||||||
result))))
|
result))))
|
||||||
result)))
|
result)))
|
||||||
|
|
||||||
|
|
|
@ -48,5 +48,5 @@
|
||||||
(let [resources (get-distinct-markup-dirs fs-prefix posts pages
|
(let [resources (get-distinct-markup-dirs fs-prefix posts pages
|
||||||
ignore-patterns)]
|
ignore-patterns)]
|
||||||
(doseq [resource resources]
|
(doseq [resource resources]
|
||||||
(io/make-parents (io/file (str target-path "/" (:path resource))))
|
(io/make-parents (io/file (str target-path "/" (:short-path resource))))
|
||||||
(.mkdir (io/file (str target-path "/" (:path resource)))))))
|
(.mkdir (io/file (str target-path "/" (:short-path resource)))))))
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
"test_pages/home"
|
"test_pages/home"
|
||||||
"test_posts"
|
"test_posts"
|
||||||
"test_posts/home"]
|
"test_posts/home"]
|
||||||
(sort (map :path
|
(sort (map :short-path
|
||||||
(sut/get-distinct-markup-dirs
|
(sut/get-distinct-markup-dirs
|
||||||
"not-existing-get-from-cp"
|
"./not-existing-get-from-cp"
|
||||||
"test_posts" "test_pages"
|
"test_posts" "test_pages"
|
||||||
""))))))
|
""))))))
|
||||||
|
|
||||||
|
@ -34,7 +34,9 @@
|
||||||
(is (do
|
(is (do
|
||||||
(sut/delete-resource-recursive! (str target "2"))
|
(sut/delete-resource-recursive! (str target "2"))
|
||||||
(sut/create-dirs-from-markup-folders!
|
(sut/create-dirs-from-markup-folders!
|
||||||
"not-existing-get-from-cp" "test_posts" "test_pages"
|
"./not-existing-get-from-cp"
|
||||||
|
"test_posts"
|
||||||
|
"test_pages"
|
||||||
(str target "2") "")
|
(str target "2") "")
|
||||||
(and (ftt/verify-dir-exists
|
(and (ftt/verify-dir-exists
|
||||||
(str (str target "2") "/test_pages"))
|
(str (str target "2") "/test_pages"))
|
||||||
|
|
Loading…
Reference in a new issue