From da74147af4e3f8d1487ee4daa8a61af778bcee99 Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 29 Jun 2016 09:57:24 -0400 Subject: [PATCH] cleanups --- src/mtgcoll/client/routes/collection.cljs | 1 - src/mtgcoll/client/routes/stats.cljs | 1 - src/mtgcoll/client/utils.cljs | 8 -------- src/mtgcoll/models/mtgjson.clj | 11 ++++------- src/mtgcoll/routes/images.clj | 1 - src/mtgcoll/scrapers/image_assets.clj | 2 -- src/mtgcoll/views/functions/sets.clj | 4 +--- 7 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/mtgcoll/client/routes/collection.cljs b/src/mtgcoll/client/routes/collection.cljs index 03808f1..0ecf6e7 100644 --- a/src/mtgcoll/client/routes/collection.cljs +++ b/src/mtgcoll/client/routes/collection.cljs @@ -1,6 +1,5 @@ (ns mtgcoll.client.routes.collection (:require - [clojure.string :as string] [reagent.core :as r] [views.reagent.client.component :as vc :refer [view-cursor] :refer-macros [defvc]] [webtools.reagent.bootstrap :as bs] diff --git a/src/mtgcoll/client/routes/stats.cljs b/src/mtgcoll/client/routes/stats.cljs index 5d5480b..8c83150 100644 --- a/src/mtgcoll/client/routes/stats.cljs +++ b/src/mtgcoll/client/routes/stats.cljs @@ -1,6 +1,5 @@ (ns mtgcoll.client.routes.stats (:require - [clojure.string :as string] [reagent.core :as r] [cljsjs.chartjs] [views.reagent.client.component :as vc :refer [view-cursor] :refer-macros [defvc]] diff --git a/src/mtgcoll/client/utils.cljs b/src/mtgcoll/client/utils.cljs index c716832..4524023 100644 --- a/src/mtgcoll/client/utils.cljs +++ b/src/mtgcoll/client/utils.cljs @@ -3,14 +3,6 @@ [cljs.pprint :as pprint] [clojure.string :as string])) -(defn dissoc-idx - [coll idx] - (vec (concat (subvec coll 0 idx) (subvec coll (inc idx))))) - -(defn pad - [n coll val] - (take n (concat coll (repeat val)))) - (defn format-date [date] (if (and date diff --git a/src/mtgcoll/models/mtgjson.clj b/src/mtgcoll/models/mtgjson.clj index 0074294..726d4ca 100644 --- a/src/mtgcoll/models/mtgjson.clj +++ b/src/mtgcoll/models/mtgjson.clj @@ -5,15 +5,12 @@ [clojure.java.jdbc :as sql] [cheshire.core :as json] [pantomime.mime :refer [mime-type-of]] - [mtgcoll.config :as config] - [mtgcoll.db :refer [db]] - [mtgcoll.db :as db]) + [mtgcoll.db :refer [db]]) (:use mtgcoll.utils) - (:import (java.text SimpleDateFormat) - (java.sql Timestamp))) - -(def mtg-json-path (config/get :import :json-path)) + (:import + (java.text SimpleDateFormat) + (java.sql Timestamp))) (defn load-json [json-file] diff --git a/src/mtgcoll/routes/images.clj b/src/mtgcoll/routes/images.clj index 084f1ca..f0068cf 100644 --- a/src/mtgcoll/routes/images.clj +++ b/src/mtgcoll/routes/images.clj @@ -1,7 +1,6 @@ (ns mtgcoll.routes.images (:require [clojure.java.io :as io] - [clojure.java.jdbc :as sql] [compojure.core :refer [routes GET POST]] [webtools.response :as response] [mtgcoll.config :as config] diff --git a/src/mtgcoll/scrapers/image_assets.clj b/src/mtgcoll/scrapers/image_assets.clj index fe07105..20712a7 100644 --- a/src/mtgcoll/scrapers/image_assets.clj +++ b/src/mtgcoll/scrapers/image_assets.clj @@ -1,9 +1,7 @@ (ns mtgcoll.scrapers.image-assets (:require - [clojure.string :as string] [clojure.java.io :as io] [clojure.java.jdbc :as sql] - [clj-http.client :as http] [mtgcoll.db :refer [db]] [mtgcoll.config :as config]) (:use diff --git a/src/mtgcoll/views/functions/sets.clj b/src/mtgcoll/views/functions/sets.clj index fbc8822..3fe6296 100644 --- a/src/mtgcoll/views/functions/sets.clj +++ b/src/mtgcoll/views/functions/sets.clj @@ -1,6 +1,4 @@ -(ns mtgcoll.views.functions.sets - (:require - [honeysql.core :as hsql])) +(ns mtgcoll.views.functions.sets) (defn set-info [code]