rename wanijo.framework to wanijo.infrastructure

neo4j-4
Josha von Gizycki 5 years ago
parent 66e3401024
commit 8479133d58

@ -57,7 +57,7 @@
:main wanijo.main}}
:neo4j {:path "neo4j"}
:repl-options {:init-ns wanijo.framework.repl}
:repl-options {:init-ns wanijo.infrastructure.repl}
:ring {:handler wanijo.handler/app
:nrepl {:start? true}}
:less {:source-paths ["resources/app/stylesheets"]

@ -1,7 +1,7 @@
(ns wanijo.attribute.db
(:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(def types
#{"string" "markdown"})

@ -3,7 +3,7 @@
[clojure.pprint :refer [pprint]]
[ring.util.response :as resp]
[formulare.core :as form]
[wanijo.framework.routing :refer [register! path]]
[wanijo.infrastructure.routing :refer [register! path]]
[wanijo.attribute.db :as domain]
[wanijo.schema
[view :as schema-view]

@ -17,7 +17,7 @@
[wanijo.instance.routes :as instance-routes]
[wanijo.visualisation.routes :as vis-routes]
[wanijo.tag.routes :as tag-routes]
[wanijo.framework
[wanijo.infrastructure
[auth :as auth]
[devmode :as devmode]
[routing :refer [path]]]))

@ -1,6 +1,6 @@
(ns wanijo.home.routes
(:require [compojure.core :refer [defroutes GET]]
[wanijo.framework.routing :refer [register!]]
[wanijo.infrastructure.routing :refer [register!]]
[wanijo.home.view :as home-view]))
(defroutes routes

@ -1,5 +1,5 @@
(ns wanijo.home.view
(:require [wanijo.framework.view :as view]))
(:require [wanijo.infrastructure.view :as view]))
(defn root! [req]
(view/layout! :session (:session req)))

@ -1,11 +1,11 @@
(ns wanijo.framework.auth
(ns wanijo.infrastructure.auth
(:require [compojure.core :refer [POST GET defroutes]]
[ring.util.response :refer [redirect]]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[buddy.hashers :as hashers]
[hiccup.form :as hform]
[wanijo.framework.view :as view]
[wanijo.framework.routing :refer [register! path]]
[wanijo.infrastructure.view :as view]
[wanijo.infrastructure.routing :refer [register! path]]
[wanijo.user.db :as user-domain]))
(defn- login-check! [req]

@ -1,4 +1,4 @@
(ns wanijo.framework.common)
(ns wanijo.infrastructure.common)
(defn in? [coll x]
(some? (some (partial = x) coll)))

@ -1,4 +1,4 @@
(ns wanijo.framework.devmode
(ns wanijo.infrastructure.devmode
(:require [hiccup.core :as hcore]
[clojure.string :as cljs]))

@ -1,6 +1,6 @@
(ns wanijo.framework.neo4j
(ns wanijo.infrastructure.neo4j
(:require [neo4j-clj.core :as db]
[wanijo.framework.devmode :as devmode]
[wanijo.infrastructure.devmode :as devmode]
[clj-time.format :as time-format]
[clj-time.local :as time-local]
[clojure.spec.alpha :as spec]

@ -1,7 +1,7 @@
(ns wanijo.framework.repl
(ns wanijo.infrastructure.repl
(:require [buddy.hashers :as hashers]
[neo4j-clj.core :as db]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(db/defquery create-user
"CREATE (n:user)

@ -1,4 +1,4 @@
(ns wanijo.framework.routing
(ns wanijo.infrastructure.routing
(:require [clojure.string :as string]))
(def all-routes

@ -1,4 +1,4 @@
(ns wanijo.framework.time
(ns wanijo.infrastructure.time
(:require [clj-time.format :as format]))
(defn prettify-dt [date-str]

@ -1,9 +1,9 @@
(ns wanijo.framework.view
(ns wanijo.infrastructure.view
(:require [hiccup
[page :refer [html5 include-js include-css]]
[form :as hform]
[core :refer [h]]]
[wanijo.framework.routing :refer [path]]))
[wanijo.infrastructure.routing :refer [path]]))
(defn btnlink
([target caption]

@ -1,7 +1,7 @@
(ns wanijo.instance.db
(:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j]
[wanijo.infrastructure.neo4j :as neo4j]
[wanijo.schema.db :as domain-schema]
[wanijo.attribute.db :as domain-attr]
[wanijo.tag.db :as domain-tag]

@ -11,7 +11,7 @@
[db :as domain-schema]
[middleware :as middleware-schema]]
[wanijo.link.db :as domain-link]
[wanijo.framework.routing :refer [register! path]]
[wanijo.infrastructure.routing :refer [register! path]]
[wanijo.attribute.db :as domain-attr]))
(defn list! [schema-uuid req]

@ -8,7 +8,7 @@
[wanijo.tag.view :as view-tag]
[wanijo.instance.db :as domain]
[wanijo.visualisation.viz :as viz]
[wanijo.framework
[wanijo.infrastructure
[view :as view]
[routing :refer [path]]
[time :refer [prettify-dt]]]))

@ -1,7 +1,7 @@
(ns wanijo.link.db
(:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(spec/def ::link
(spec/keys :req-un [::neo4j/uuid

@ -20,7 +20,7 @@
:port 8080
:handler wanijo-handler/dev-app))
(defn stop-server []
(defn stop-server! []
(.stop @server))
(defn -main [& args]

@ -1,7 +1,7 @@
(ns wanijo.schema.db
(:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(spec/def ::name
(spec/and ::specs/name (complement empty?)))

@ -1,6 +1,6 @@
(ns wanijo.schema.middleware
(:require [ring.util.response :as resp]
[wanijo.framework.routing :refer [path]]
[wanijo.infrastructure.routing :refer [path]]
[wanijo.schema.db :as domain]))
(defn wrap-user-schemas [handler]

@ -2,8 +2,8 @@
(:require [compojure.core :refer [defroutes GET POST DELETE] :as comp]
[ring.util.response :as resp]
[formulare.core :as form]
[wanijo.framework.view :as view]
[wanijo.framework.routing :refer [register! path]]
[wanijo.infrastructure.view :as view]
[wanijo.infrastructure.routing :refer [register! path]]
[wanijo.user.db :as domain-user]
[wanijo.schema
[view :as schema-view]

@ -4,9 +4,9 @@
[core :refer [h]]]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[formulare.core :as form]
[wanijo.framework.view :as view]
[wanijo.framework.routing :refer [path]]
[wanijo.framework.time :refer [prettify-dt]]
[wanijo.infrastructure.view :as view]
[wanijo.infrastructure.routing :refer [path]]
[wanijo.infrastructure.time :refer [prettify-dt]]
[wanijo.schema.db :as domain]
[wanijo.schema.forms :as forms]))

@ -1,6 +1,6 @@
(ns wanijo.specs
(:require [clojure.spec.alpha :as spec]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(spec/def ::created_at ::neo4j/date-str)
(spec/def ::updated_at ::neo4j/date-str)

@ -1,7 +1,7 @@
(ns wanijo.tag.db
(:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(spec/def ::name
(spec/and ::specs/name

@ -2,7 +2,7 @@
(:require [compojure.core :refer [defroutes POST DELETE]]
[ring.util.response :as resp]
[formulare.core :as form]
[wanijo.framework.routing :refer [register! path]]
[wanijo.infrastructure.routing :refer [register! path]]
[wanijo.schema.db :as domain-schema]
[wanijo.instance
[view :as view-instance]

@ -4,7 +4,7 @@
[ring.util.anti-forgery :refer [anti-forgery-field]]
[formulare.core :as form]
[wanijo.tag.forms :as forms]
[wanijo.framework
[wanijo.infrastructure
[routing :refer [path]]
[view :as view]
[time :refer [prettify-dt]]]))

@ -1,6 +1,6 @@
(ns wanijo.user.db
(:require [clojure.spec.alpha :as spec]
[wanijo.framework.neo4j :as neo4j]))
[wanijo.infrastructure.neo4j :as neo4j]))
(spec/def ::ident
(spec/and string? not-empty))

@ -1,7 +1,7 @@
(ns wanijo.user.routes
(:require [compojure.core :refer [defroutes GET POST]]
[ring.util.response :as resp]
[wanijo.framework.routing :refer [register!]]
[wanijo.infrastructure.routing :refer [register!]]
[wanijo.user.view :as view-user]
[wanijo.user.db :as domain]))

@ -2,8 +2,8 @@
(:require [hiccup.form :as hform]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[formulare.core :as form]
[wanijo.framework.view :as view]
[wanijo.framework.routing :refer [path]]
[wanijo.infrastructure.view :as view]
[wanijo.infrastructure.routing :refer [path]]
[wanijo.user.db :as domain]))
(def edit-form

@ -1,6 +1,6 @@
(ns wanijo.visualisation.db
(:require [clojure.spec.alpha :as spec]
[wanijo.framework.neo4j :as neo4j]
[wanijo.infrastructure.neo4j :as neo4j]
[wanijo.instance.db :as domain-instance]))
(spec/def ::link-name

@ -2,8 +2,8 @@
(:require [compojure.core :refer [defroutes wrap-routes
GET POST DELETE]]
[ring.util.response :as resp]
[wanijo.framework.routing :refer [register! path]]
[wanijo.framework.view :as view]
[wanijo.infrastructure.routing :refer [register! path]]
[wanijo.infrastructure.view :as view]
[wanijo.instance.db :as domain-instance]
[wanijo.schema.db :as domain-schema]
[wanijo.visualisation

@ -2,8 +2,8 @@
(:require [hiccup.page :refer [include-js include-css]]
[hiccup.form :as hform]
[hiccup.core :refer [h]]
[wanijo.framework.routing :refer [path]]
[wanijo.framework.view :as view]))
[wanijo.infrastructure.routing :refer [path]]
[wanijo.infrastructure.view :as view]))
(defn index [instance req]
(view/layout!

@ -3,7 +3,7 @@
[dorothy
[core :as dot]
[jvm :as doro-jvm]]
[wanijo.framework.routing :refer [path]]))
[wanijo.infrastructure.routing :refer [path]]))
(defn node->label
([node]

@ -1,6 +1,6 @@
(ns wanijo.framework.routing-test
(ns wanijo.infrastructure.routing-test
(:require [clojure.test :refer :all]
[wanijo.framework.routing :refer [parse-path]]))
[wanijo.infrastructure.routing :refer [parse-path]]))
(deftest test-parse-path
(testing "no params in path"
Loading…
Cancel
Save