Update deps to modern versions and remove midje

This commit is contained in:
Morgan Astra 2018-11-14 12:49:17 -08:00
parent 05a2d8fcff
commit 4321ec5e39
3 changed files with 18 additions and 18 deletions

View File

@ -2,18 +2,16 @@
:description "Pronoun.is is a website for personal pronoun usage examples"
:url "http://pronoun.is"
:license "GNU Affero General Public License 3.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[compojure "1.1.8"]
[ring/ring-jetty-adapter "1.2.2"]
[ring.middleware.logger "0.5.0"]
[ring/ring-devel "1.2.2"]
[environ "0.5.0"]
:dependencies [[org.clojure/clojure "1.9.0"]
[compojure "1.6.1"]
[ring/ring-jetty-adapter "1.7.1"]
[ring/ring-devel "1.7.1"]
[environ "1.1.0"]
[hiccup "1.0.5"]]
:min-lein-version "2.0.0"
:plugins [[environ/environ.lein "0.2.1"]
[lein-ring "0.9.7"]]
:hooks [environ.leiningen.hooks]
:uberjar-name "pronouns-standalone.jar"
:profiles {:production {:env {:production true}}
:dev {:dependencies [[midje "1.6.3"]]}}
:profiles {:production {:env {:production true}}}
:ring {:handler pronouns.web/app})

View File

@ -20,13 +20,13 @@
[compojure.route :as route]
[clojure.string :as s]
[clojure.java.io :as io]
[ring.middleware.logger :as logger]
[ring.adapter.jetty :as jetty]
;[ring.middleware.logger :as logger]
[ring.middleware.stacktrace :as trace]
[ring.middleware.params :as params]
[ring.middleware.resource :refer [wrap-resource]]
[ring.middleware.content-type :refer [wrap-content-type]]
[ring.middleware.not-modified :refer [wrap-not-modified]]
[ring.adapter.jetty :as jetty]
[environ.core :refer [env]]
[pronouns.util :as u]
[pronouns.pages :as pages]))
@ -64,7 +64,7 @@
(wrap-resource "images")
wrap-content-type
wrap-not-modified
logger/wrap-with-logger
;logger/wrap-with-logger
wrap-error-page
trace/wrap-stacktrace
params/wrap-params))

View File

@ -1,10 +1,12 @@
(ns pronouns.pages-test
(:require [pronouns.pages :as pages]
[midje.sweet :refer :all]))
[clojure.test :refer [deftest testing is are]]))
(fact "prose-comma-list turns a list of strings into a prose list with commas"
(pages/prose-comma-list ["foo"]) => "foo"
(pages/prose-comma-list ["foo" "bar"]) => "foo and bar"
(pages/prose-comma-list ["foo" "bar" "baz"]) => "foo, bar, and baz"
(pages/prose-comma-list ["foo" "bar" "baz" "bobble"]) => "foo, bar, baz, and bobble"
(pages/prose-comma-list []) => "")
(deftest prose-comma-list
(testing "prose-comma-list turns a list of strings into a prose list"
(are [call result] (= call result)
(pages/prose-comma-list ["foo"]) "foo"
(pages/prose-comma-list ["foo" "bar"]) "foo and bar"
(pages/prose-comma-list ["foo" "bar" "baz"]) "foo, bar, and baz"
(pages/prose-comma-list ["foo" "bar" "baz" "bobble"]) "foo, bar, baz, and bobble"
(pages/prose-comma-list []) "")))