Skip to content

Commit

Permalink
renames misleading fn names containing 'html'
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedek Fazekas committed Jan 12, 2015
1 parent c16b764 commit 1f783ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/gargamel/bower.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
(println (format "Generating changelog for project %s between %s and %s"
grg/proj-name
from to))
(grg/create-html-changelog (grg/enrich-changelog (changelog grg/proj-name source-path from to) source-path)
(grg/create-changelog (grg/enrich-changelog (changelog grg/proj-name source-path from to) source-path)
from to source-path)))
8 changes: 4 additions & 4 deletions src/leiningen/gargamel.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
(map #(assoc % :project-name (:name project)))
(map #(assoc % :url (git/commit-url (:dir project) (:name project) (:hash %)))))))

(defn render-html-changelog [from to changes source-dir]
(defn- render-changelog [from to changes source-dir]
(let [[to-release to-build-num to-time] (str/split to #"-")
[from-release from-build-num from-time] (str/split from #"-")
from-params (if (and from-build-num from-time)
Expand Down Expand Up @@ -94,15 +94,15 @@
(group-by (partial create-section sections-config))
((partial section-titles sections-config)))))

(defn create-html-changelog [changes from to source-dir]
(defn create-changelog [changes from to source-dir]
(let [to (or to "HEAD")
target-dir (File. target-path)
extension (or (:output-extension project-config) ".html")
filepath (format "%s/changelog-%s-%s%s" target-path from to extension)]
(when-not (.exists target-dir)
(.mkdirs target-dir))
(println "writing changelog file: " filepath)
(spit filepath (render-html-changelog from to changes source-dir))))
(spit filepath (render-changelog from to changes source-dir))))

(defn gargamel-changelog [project-name path project-dir from to]
(binding [proj-name project-name
Expand All @@ -116,7 +116,7 @@

(stl/register-template (str/replace (.getName template-file) #"(.*)\..*" "$1") (slurp template-file)))))
(println (format "Generating changelog for project %s between %s and %s" project-name from to))
(create-html-changelog (enrich-changelog (changelog from to {:name project-name :dir proj-dir}) proj-dir)
(create-changelog (enrich-changelog (changelog from to {:name project-name :dir proj-dir}) proj-dir)
from to proj-dir))))

(defn gargamel
Expand Down

0 comments on commit 1f783ea

Please sign in to comment.