Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix: folder and resouces are confused

  • Loading branch information...
commit bd124dc74c46dfe5915bb59bff2c5a23eff7f3cf 1 parent 9bb1bf8
@shenfeng authored
View
4 src/me/shenfeng/mustache.clj
@@ -22,7 +22,7 @@
(get-name f folder) (get-content f)))
{} files))
-(defn- tmpls-from-rerouces [folder extentions]
+(defn- tmpls-from-folder [folder extentions]
(let [^File dir (if (instance? File folder) folder (File. ^String folder))]
(get-tmpls (map str
(filter
@@ -33,7 +33,7 @@
(file-seq dir)))
(.getName dir))))
-(defn- tmpls-from-folder [folder extentions]
+(defn- tmpls-from-rerouces [folder extentions]
(get-tmpls (ResourceList/getResources folder extentions) folder))
(defn- fn-name [n] ; app/search_result => app-search-result
View
2  test/me/shenfeng/mustache_test.clj
@@ -51,7 +51,7 @@
(is (test2)))
(deftest test-gen-tmpls-from-folder
- (gen-tmpls-from-folder "mustache.clj" [".tpl"])
+ (gen-tmpls-from-folder "../mustache.clj" [".tpl"])
(is (test-test2 {})) ;; => test2.clj => test-test2
(is (test-test2))
(is (test-test2)))
Please sign in to comment.
Something went wrong with that request. Please try again.