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}} :main wanijo.main}}
:neo4j {:path "neo4j"} :neo4j {:path "neo4j"}
:repl-options {:init-ns wanijo.framework.repl} :repl-options {:init-ns wanijo.infrastructure.repl}
:ring {:handler wanijo.handler/app :ring {:handler wanijo.handler/app
:nrepl {:start? true}} :nrepl {:start? true}}
:less {:source-paths ["resources/app/stylesheets"] :less {:source-paths ["resources/app/stylesheets"]

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

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

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

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

@ -1,5 +1,5 @@
(ns wanijo.home.view (ns wanijo.home.view
(:require [wanijo.framework.view :as view])) (:require [wanijo.infrastructure.view :as view]))
(defn root! [req] (defn root! [req]
(view/layout! :session (:session 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]] (:require [compojure.core :refer [POST GET defroutes]]
[ring.util.response :refer [redirect]] [ring.util.response :refer [redirect]]
[ring.util.anti-forgery :refer [anti-forgery-field]] [ring.util.anti-forgery :refer [anti-forgery-field]]
[buddy.hashers :as hashers] [buddy.hashers :as hashers]
[hiccup.form :as hform] [hiccup.form :as hform]
[wanijo.framework.view :as view] [wanijo.infrastructure.view :as view]
[wanijo.framework.routing :refer [register! path]] [wanijo.infrastructure.routing :refer [register! path]]
[wanijo.user.db :as user-domain])) [wanijo.user.db :as user-domain]))
(defn- login-check! [req] (defn- login-check! [req]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,6 +1,6 @@
(ns wanijo.specs (ns wanijo.specs
(:require [clojure.spec.alpha :as spec] (: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 ::created_at ::neo4j/date-str)
(spec/def ::updated_at ::neo4j/date-str) (spec/def ::updated_at ::neo4j/date-str)

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

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

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

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

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

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

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

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

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

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

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