remove less from compile, specs for edit-properties fuction

integration-tests
Josha von Gizycki 5 years ago
parent 45b15372d4
commit e45df3ee84

@ -61,7 +61,6 @@
:ring {:handler wanijo.handler/app} :ring {:handler wanijo.handler/app}
:less {:source-paths ["resources/app/stylesheets"] :less {:source-paths ["resources/app/stylesheets"]
:target-path "resources/public/css"} :target-path "resources/public/css"}
:aliases {"uberjar" ["do" ["less" "once"] "uberjar"] :aliases {"uberjar" ["do" ["less" "once"] "uberjar"]}
"compile" ["do" ["less" "once"] "compile"]}
:hiera {:cluster-depth 2} :hiera {:cluster-depth 2}
:eastwood {:namespaces [:source-paths]}) :eastwood {:namespaces [:source-paths]})

@ -1,11 +1,15 @@
(ns wanijo.instance.domain (ns wanijo.instance.domain
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[clojure.spec.test.alpha :as spectest]
[wanijo.framework.neo4j :as neo4j] [wanijo.framework.neo4j :as neo4j]
[clojure.pprint :as pprint])) [clojure.pprint :as pprint]))
(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)
(spec/def ::name (spec/and (complement empty?) string?)) (spec/def ::name (spec/and (complement empty?) string?))
(spec/def ::value (some-fn string? boolean? nil? number?))
(spec/def ::instance_uuid ::neo4j/uuid)
(spec/def ::attribute_uuid ::neo4j/uuid)
(neo4j/defquery findy-by-schema (neo4j/defquery findy-by-schema
"MATCH (i:instance)-[:of]->(s:schema) "MATCH (i:instance)-[:of]->(s:schema)
@ -115,6 +119,18 @@
:attribute_uuid (-> prop :attribute :uuid)}])) :attribute_uuid (-> prop :attribute :uuid)}]))
(:properties instance))) (:properties instance)))
(spec/def ::prop-tuple-values
(spec/keys :req-un [::neo4j/uuid
::neo4j/date-str
::value
::instance_uuid
::attribute_uuid]))
(spec/def ::prop-tuple
(spec/tuple fn? ::prop-tuple-values))
(spec/fdef instance->prop-tuples
:ret (spec/coll-of ::prop-tuple))
(spectest/instrument `instance->prop-tuples)
(defn edit! [instance] (defn edit! [instance]
(let [prop-tuples (instance->prop-tuples instance)] (let [prop-tuples (instance->prop-tuples instance)]
(apply neo4j/exec-queries! (apply neo4j/exec-queries!

Loading…
Cancel
Save