Permalink
Browse files

Added speclj 'lein new' template

  • Loading branch information...
1 parent 5f8223d commit a421db04f04d95ee0c2cd3ba41fb6504b15ca16e @bmcgavin committed Aug 17, 2012
@@ -0,0 +1,16 @@
+(ns leiningen.new.speclj
+ (:use [leiningen.new.templates :only [renderer name-to-path ->files]]))
+
+(def render (renderer "speclj"))
+
+(defn speclj
+ "FIXME: write documentation"
+ [name]
+ (let [data {:name name
+ :sanitized (name-to-path name)}]
+ (->files data
+ ["project.clj" (render "project.clj" data)]
+ ["README.md" (render "README.md" data)]
+ [".gitignore" (render ".gitignore" data)]
+ ["src/{{sanitized}}/core.clj" (render "core.clj" data)]
+ ["spec/{{sanitized}}/core_spec.clj" (render "core_spec.clj" data)])))
No changes.
@@ -0,0 +1,15 @@
+# {{sanitized}}
+
+A Clojure library designed to ... well, that part is up to you.
+
+Includes speclj.
+
+## Usage
+
+FIXME
+
+## License
+
+Copyright 2012 FIXME
+
+
@@ -0,0 +1,10 @@
+(ns {{name}}.core)
+
+(defn -main
+ "I don't do a whole lot."
+ [& args]
+ println ("Hello, World!"))
+
+(defn testSpec
+ []
+ true)
@@ -0,0 +1,15 @@
+(ns {{name}}.core-spec
+ (:use
+ [speclj.core]
+ [{{name}}.core]))
+
+(describe "Truth"
+
+ (it "is true"
+ (should true))
+
+ (it "is false"
+ (should-not false))
+
+ (it "calls functions"
+ (should (testSpec))))
@@ -0,0 +1,8 @@
+(defproject {{sanitized}} "0.1.0-SNAPSHOT"
+ :description "FIXME: write description"
+ :url "http://example.com/FIXME"
+ :license {:name "Eclipse Public License"
+ :url "http://www.eclipse.org/legal/epl-v10.html"}
+ :dependencies [[speclj "2.1.2"] [org.clojure/clojure "1.4.0"]]
+ :plugins [[speclj "2.1.2"]]
+ :test-paths ["spec/"])

0 comments on commit a421db0

Please sign in to comment.