Skip to content
Snippets Groups Projects
Commit 8b8b2080 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge branch 'master' into dox_and_unit_tests

Conflicts:
	project.clj
	test/metabase_init/core_test.clj
parents adefbbb1 f383e577
No related branches found
No related tags found
No related merge requests found
(defproject metabase-init "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
(defproject metabase "metabase-0.1.0-SNAPSHOT"
:description "Metabase Community Edition"
:url "http://metabase.com/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[expectations "2.0.12"] ; unit tests
[marginalia "0.7.1"] ; for documentation
[environ "0.5.0"] ; easy environment management
[org.clojure/tools.logging "0.3.1"] ; logging framework
[log4j/log4j "1.2.17" :exclusions [javax.mail/mail
javax.jms/jms
com.sun.jdmk/jmxtools
com.sun.jmx/jmxri]]
[korma "0.4.0"] ; SQL lib
]
:plugins [[cider/cider-nrepl "0.8.2"] ; Interactive development w/ cider NREPL in Emacs
[lein-environ "0.5.0"] ; easy access to environment variables
[lein-expectations "0.0.7"] ; run unit tests with 'lein expectations'
[lein-midje "3.1.3"] ; another unit testing option
[lein-marginalia "0.7.0"] ; generate documentation with 'lein marg'
]
:main ^:skip-aot metabase-init.core
:main ^:skip-aot metabase.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
:profiles {:dev {:dependencies [[midje "1.6.3"]]
:jvm-opts ["-Dlogfile.path=target/log"]}
:uberjar {:aot :all}})
log4j.rootLogger=INFO, corvus
log4j.appender.corvus=org.apache.log4j.RollingFileAppender
log4j.appender.corvus.File=${logfile.path}/corvus.log
log4j.appender.corvus.MaxFileSize=500MB
log4j.appender.corvus.MaxBackupIndex=2
log4j.appender.corvus.layout=org.apache.log4j.PatternLayout
log4j.appender.corvus.layout.ConversionPattern=%d [%t] %-5p%c - %m%n
\ No newline at end of file
(ns metabase.core
(:gen-class)
(:require [clojure.tools.logging :as log]))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!")
(log/info "testing logging"))
(defn first-element [sequence default]
(if (nil? sequence)
default
(first sequence)))
\ No newline at end of file
(ns metabase-init.core
(:gen-class))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!"))
(ns metabase.core-test
(:use midje.sweet)
(:use [metabase.core])
(:require [clojure.tools.logging :as log]))
(println "You should expect to see three failures below.")
(log/info "testing out this logging")
(facts "about `first-element`"
(fact "it normally returns the first element"
(first-element [1 2 3] :default) => 1
(first-element '(1 2 3) :default) => 1)
;; I'm a little unsure how Clojure types map onto the Lisp I'm used to.
(fact "default value is returned for empty sequences"
(first-element [] :default) => :default
(first-element '() :default) => :default
(first-element nil :default) => :default
(first-element (filter even? [1 3 5]) :default) => :default))
(ns metabase-init.core-test
(:use expectations)
(:require [metabase-init.core :refer :all]))
;; Basic sanity check
(expect 2 (+ 1 1))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment