Browse Source

Upgraded ancient dependencies.

Replaced clj-time with clj-java-time because selmer doesn't
support clj-time any more.
master
Stephen Starkey 2 years ago
parent
commit
d36335cd90
  1. 4
      Dockerfile
  2. 2
      README.md
  3. 42
      project.clj
  4. 8
      spec/freefrog/governance_circles_spec.clj
  5. 2
      spec/freefrog/governance_roles_spec.clj
  6. 2
      spec/freefrog/governance_spec_helpers.clj
  7. 14
      spec/freefrog/lang_spec.clj
  8. 10
      spec/freefrog/render_spec.clj
  9. 12
      src/clj/freefrog/cli.clj
  10. 2
      src/clj/freefrog/core_roles.clj
  11. 2
      src/clj/freefrog/governance.clj
  12. 10
      src/clj/freefrog/lang.clj
  13. 2
      src/clj/freefrog/render.clj
  14. 2
      src/java/freefrog/GovernanceParseException.java

4
Dockerfile

@ -1,9 +1,9 @@
FROM dockerfile/java:oracle-java8
MAINTAINER Courage Labs, LLC <tech@couragelabs.com>
MAINTAINER Stephen Starkey <stephen@calmabiding.me>
RUN sudo apt-get update
ADD target/freefrog-0.0.1-SNAPSHOT-standalone.jar /srv/freefrog.jar
ADD target/freefrog-standalone.jar /srv/freefrog.jar
EXPOSE 3000

2
README.md

@ -77,7 +77,7 @@ can be found in the root:
## License
Copyright © 2015 Courage Labs
Copyright © 2019 Stephen Starkey
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by

42
project.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;
@ -17,45 +17,45 @@
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
(defproject freefrog "0.0.1-SNAPSHOT"
(defproject freefrog "0.0.2"
:description "freefrog"
:url "http://www.couragelabs.com"
:url "https://git.calmabiding.me/scstarkey/freefrog"
:license {:name "GNU Affero General Public License"
:url "http://www.gnu.org/licenses/agpl-3.0.html"}
:url "http://www.gnu.org/licenses/agpl-3.0.html"}
:min-lein-version "2.3.4"
:uberjar-name "freefrog-standalone.jar"
:source-paths ["src/clj" "src/java"]
:java-source-paths ["src/java"]
:dependencies [[clj-http "2.1.0"]
:dependencies [[clj-http "3.10.0"]
[clj-json "0.5.3"]
[clj-time "0.11.0"]
[selmer "1.0.2"]
[instaparse "1.4.1"]
[org.clojure/clojure "1.7.0"]
[org.clojure/tools.cli "0.3.3"]
[org.clojure/tools.logging "0.3.1"]
[speclj "3.3.1"]]
[clojure.java-time "0.3.2"]
[selmer "1.12.14"]
[instaparse "1.4.10"]
[org.clojure/clojure "1.10.1"]
[org.clojure/tools.cli "0.4.2"]
[org.clojure/tools.logging "0.5.0"]
[speclj "3.3.2"]]
:profiles {:uberjar {:aot :all}
:dev {
:plugins [[lein-clojars "0.9.1"]]
:dev {:plugins [[lein-clojars "0.9.1"]]
:dependencies [[clj-yaml "0.4.0"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:cli {:main freefrog.cli}}
:plugins [[lein-ancient "0.6.7"]
[lein-bikeshed "0.2.0"]
[lein-kibit "0.1.2"]
[lein-marginalia "0.8.0"]
[speclj "3.2.0"]]
:plugins [[lein-ancient "0.6.15"]
[lein-bikeshed "0.5.2"]
[lein-kibit "0.1.7"]
[lein-marginalia "0.9.1"]
[speclj "3.3.2"]]
:test-paths ["spec"]
:aliases {"autotest" ["spec" "-a"]
"docs" ["with-profile" "1.6" "marg" "src" "spec"]
"docs" ["marg" "src" "spec"]
"cli" ["with-profile" "cli" "run"]}
:main freefrog.cli)

8
spec/freefrog/governance_circles_spec.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;
@ -22,8 +22,8 @@
(ns freefrog.governance-circles-spec
(:require [freefrog.governance :as g]
[freefrog.governance-spec-helpers :refer :all]
[speclj.core :refer :all]
[clj-time.core :as t])
[java-time :refer [local-date]]
[speclj.core :refer :all])
(:import (java.lang IllegalArgumentException)))
(def sample-anchor-with-sample-policy
@ -323,7 +323,7 @@
(describe "Elected Roles"
;; Section 2.5.2
(let [expiration-date (t/date-time 2014 01 01)]
(let [expiration-date (local-date 2014 01 01)]
(describe "holding elections"
(it "can't elect someone to a non-core role"
(should-throw IllegalArgumentException

2
spec/freefrog/governance_roles_spec.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;

2
spec/freefrog/governance_spec_helpers.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;

14
spec/freefrog/lang_spec.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;
@ -19,15 +19,15 @@
(ns freefrog.lang-spec
(:require [clj-yaml.core :as yaml]
[clj-time.core :as t]
[freefrog.governance :as g]
[freefrog.lang :as l]
[java-time :refer [local-date]]
[speclj.core :refer :all])
(:import (freefrog GovernanceParseException)))
;; Monkey patch clj-yaml to do nice encoding of dates and defrecords
(ns clj-yaml.core
(:require [clj-time.format :as f]))
(:require [java-time :refer [local-date]]))
(defn encode-without-nils [data]
(encode (into {} (remove (comp nil? second) data))))
@ -37,11 +37,7 @@
(encode [data] (encode-without-nils data))
freefrog.governance.Circle
(encode [data] (encode-without-nils data))
org.joda.time.DateTime
(encode [data]
(f/unparse (f/formatters :date) data)))
(encode [data] (encode-without-nils data)))
(ns freefrog.lang-spec)
@ -50,7 +46,7 @@
(def sample-anchor-circle (g/create-circle "Courage Labs"))
(def expiration-date (t/date-time 2014 01 01))
(def expiration-date (local-date 2014 01 01))
(def very-governed-circle
(-> sample-anchor-circle

10
spec/freefrog/render_spec.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;
@ -20,8 +20,8 @@
(ns freefrog.render-spec
(:require [freefrog.governance :as g]
[freefrog.render :as render]
[speclj.core :refer :all]
[clj-time.core :as t]))
[java-time :refer [local-date]]
[speclj.core :refer :all]))
(def simple-circle (-> (g/create-circle "simple circle")
(g/update-purpose "Simplicity")
@ -39,9 +39,9 @@
(g/appoint-to-role "role 2" "larry")
(g/appoint-to-role "role 2" "george" "some stuff")
(g/elect-to-role g/facilitator-name "phil"
(t/date-time 2014 01 01))
(local-date 2014 01 01))
(g/elect-to-role g/secretary-name "larry"
(t/date-time 2014 01 01))
(local-date 2014 01 01))
(g/convert-to-circle "role 3")
(g/update-subcircle ["role 3"] g/add-role-to-circle
"test")))

12
src/clj/freefrog/cli.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;
@ -75,9 +75,9 @@
(render/make-role-renderable circle-to-introspect)
policy (-> rendered-circle
:policies
(nth idx)
:name)]
:policies
(nth idx)
:name)]
(get-in circle-to-introspect [:policies policy :text]))
@ -101,8 +101,8 @@
(let [anchor-circle (l/execute-directory dir)
extra-text (interpret-command! anchor-circle)
selected-circle (select-circle anchor-circle @path)]
(println (if extra-text extra-text
(render/markdown-role selected-circle))))
(println (or extra-text
(render/markdown-role selected-circle))))
(catch Throwable t
(.printStackTrace t))

2
src/clj/freefrog/core_roles.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;

2
src/clj/freefrog/governance.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;

10
src/clj/freefrog/lang.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;
@ -18,9 +18,9 @@
;
(ns freefrog.lang
(:require [clj-time.format :as f]
[clojure.java.io :as io]
(:require [clojure.java.io :as io]
[clojure.tools.logging :as log]
[java-time :refer [local-date]]
[freefrog.governance :as g]
[instaparse.core :as insta])
(:import (freefrog GovernanceParseException)))
@ -147,11 +147,9 @@
"secretary" g/secretary-name
"rep link" g/rep-link-name})
(def formatter (f/formatter "yyyy-MM-dd"))
(defn elect [circle [_ person-name role-name expiration] _]
(g/elect-to-role circle (elected-role-mapping role-name)
person-name (f/parse formatter expiration)))
person-name (local-date expiration)))
(defn appoint [circle [_ person-name role-name focus] _]
(g/appoint-to-role circle role-name person-name focus))

2
src/clj/freefrog/render.clj

@ -1,5 +1,5 @@
;
; Copyright © 2015 Courage Labs
; Copyright © 2019 Stephen Starkey
;
; This file is part of Freefrog.
;

2
src/java/freefrog/GovernanceParseException.java

@ -1,5 +1,5 @@
/*
* Copyright © 2015 Courage Labs
* Copyright © 2019 Stephen Starkey
*
* This file is part of Freefrog.
*

Loading…
Cancel
Save