From 4321ec5e39bdb817fbcc61cc40a42b5a23a0a1ce Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 12:49:17 -0800 Subject: [PATCH] Update deps to modern versions and remove midje --- project.clj | 14 ++++++-------- src/pronouns/web.clj | 6 +++--- test/pronouns/pages_test.clj | 16 +++++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/project.clj b/project.clj index b14ac4e..bcb1454 100644 --- a/project.clj +++ b/project.clj @@ -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}) diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 69ad6ae..872a6aa 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -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)) diff --git a/test/pronouns/pages_test.clj b/test/pronouns/pages_test.clj index 04c14ce..e32a2ee 100644 --- a/test/pronouns/pages_test.clj +++ b/test/pronouns/pages_test.clj @@ -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 []) "")))