Browse Source

Upgraded ancient dependencies.

Replaced clj-time with clj-java-time because selmer doesn't
support clj-time any more.
Stephen Starkey 10 months ago
parent
commit
d36335cd90

+ 2
- 2
Dockerfile View File

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

+ 1
- 1
README.md View File

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

+ 21
- 21
project.clj View File

@@ -1,5 +1,5 @@
1 1
 ;
2
-; Copyright © 2015 Courage Labs
2
+; Copyright © 2019 Stephen Starkey
3 3
 ;
4 4
 ; This file is part of Freefrog.
5 5
 ;
@@ -17,45 +17,45 @@
17 17
 ; along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18
 ;
19 19
 
20
-(defproject freefrog "0.0.1-SNAPSHOT"
20
+(defproject freefrog "0.0.2"
21 21
   :description "freefrog"
22
-  :url "http://www.couragelabs.com"
22
+  :url "https://git.calmabiding.me/scstarkey/freefrog"
23 23
   :license {:name "GNU Affero General Public License"
24
-            :url  "http://www.gnu.org/licenses/agpl-3.0.html"}
24
+            :url "http://www.gnu.org/licenses/agpl-3.0.html"}
25 25
 
26 26
   :min-lein-version "2.3.4"
27 27
 
28
+  :uberjar-name "freefrog-standalone.jar"
29
+
28 30
   :source-paths ["src/clj" "src/java"]
29 31
 
30 32
   :java-source-paths ["src/java"]
31 33
 
32
-  :dependencies [[clj-http "2.1.0"]
34
+  :dependencies [[clj-http "3.10.0"]
33 35
                  [clj-json "0.5.3"]
34
-                 [clj-time "0.11.0"]
35
-                 [selmer "1.0.2"]
36
-                 [instaparse "1.4.1"]
37
-                 [org.clojure/clojure "1.7.0"]
38
-                 [org.clojure/tools.cli "0.3.3"]
39
-                 [org.clojure/tools.logging "0.3.1"]
40
-                 [speclj "3.3.1"]]
36
+                 [clojure.java-time "0.3.2"]
37
+                 [selmer "1.12.14"]
38
+                 [instaparse "1.4.10"]
39
+                 [org.clojure/clojure "1.10.1"]
40
+                 [org.clojure/tools.cli "0.4.2"]
41
+                 [org.clojure/tools.logging "0.5.0"]
42
+                 [speclj "3.3.2"]]
41 43
 
42 44
   :profiles {:uberjar {:aot :all}
43
-             :dev {
44
-                   :plugins [[lein-clojars "0.9.1"]]
45
+             :dev {:plugins [[lein-clojars "0.9.1"]]
45 46
                    :dependencies [[clj-yaml "0.4.0"]]}
46
-             :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
47 47
              :cli {:main freefrog.cli}}
48 48
 
49
-  :plugins [[lein-ancient "0.6.7"]
50
-            [lein-bikeshed "0.2.0"]
51
-            [lein-kibit "0.1.2"]
52
-            [lein-marginalia "0.8.0"]
53
-            [speclj "3.2.0"]]
49
+  :plugins [[lein-ancient "0.6.15"]
50
+            [lein-bikeshed "0.5.2"]
51
+            [lein-kibit "0.1.7"]
52
+            [lein-marginalia "0.9.1"]
53
+            [speclj "3.3.2"]]
54 54
 
55 55
   :test-paths ["spec"]
56 56
 
57 57
   :aliases {"autotest" ["spec" "-a"]
58
-            "docs" ["with-profile" "1.6" "marg" "src" "spec"]
58
+            "docs" ["marg" "src" "spec"]
59 59
             "cli" ["with-profile" "cli" "run"]}
60 60
 
61 61
   :main freefrog.cli)

+ 4
- 4
spec/freefrog/governance_circles_spec.clj View File

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

+ 1
- 1
spec/freefrog/governance_roles_spec.clj View File

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

+ 1
- 1
spec/freefrog/governance_spec_helpers.clj View File

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

+ 5
- 9
spec/freefrog/lang_spec.clj View File

@@ -1,5 +1,5 @@
1 1
 ;
2
-; Copyright © 2015 Courage Labs
2
+; Copyright © 2019 Stephen Starkey
3 3
 ;
4 4
 ; This file is part of Freefrog.
5 5
 ;
@@ -19,15 +19,15 @@
19 19
 
20 20
 (ns freefrog.lang-spec
21 21
   (:require [clj-yaml.core :as yaml]
22
-            [clj-time.core :as t]
23 22
             [freefrog.governance :as g]
24 23
             [freefrog.lang :as l]
24
+            [java-time :refer [local-date]]
25 25
             [speclj.core :refer :all])
26 26
   (:import (freefrog GovernanceParseException)))
27 27
 
28 28
 ;; Monkey patch clj-yaml to do nice encoding of dates and defrecords
29 29
 (ns clj-yaml.core
30
-  (:require [clj-time.format :as f]))
30
+  (:require [java-time :refer [local-date]]))
31 31
 
32 32
 (defn encode-without-nils [data]
33 33
   (encode (into {} (remove (comp nil? second) data))))
@@ -37,11 +37,7 @@
37 37
   (encode [data] (encode-without-nils data))
38 38
 
39 39
   freefrog.governance.Circle
40
-  (encode [data] (encode-without-nils data))
41
-
42
-  org.joda.time.DateTime
43
-  (encode [data]
44
-    (f/unparse (f/formatters :date) data)))
40
+  (encode [data] (encode-without-nils data)))
45 41
 
46 42
 (ns freefrog.lang-spec)
47 43
 
@@ -50,7 +46,7 @@
50 46
 
51 47
 (def sample-anchor-circle (g/create-circle "Courage Labs"))
52 48
 
53
-(def expiration-date (t/date-time 2014 01 01))
49
+(def expiration-date (local-date 2014 01 01))
54 50
 
55 51
 (def very-governed-circle
56 52
   (-> sample-anchor-circle

+ 5
- 5
spec/freefrog/render_spec.clj View File

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

+ 6
- 6
src/clj/freefrog/cli.clj View File

@@ -1,5 +1,5 @@
1 1
 ;
2
-; Copyright © 2015 Courage Labs
2
+; Copyright © 2019 Stephen Starkey
3 3
 ;
4 4
 ; This file is part of Freefrog.
5 5
 ;
@@ -75,9 +75,9 @@
75 75
             (render/make-role-renderable circle-to-introspect)
76 76
 
77 77
             policy (-> rendered-circle
78
-                     :policies
79
-                     (nth idx)
80
-                     :name)]
78
+                       :policies
79
+                       (nth idx)
80
+                       :name)]
81 81
 
82 82
         (get-in circle-to-introspect [:policies policy :text]))
83 83
 
@@ -101,8 +101,8 @@
101 101
         (let [anchor-circle (l/execute-directory dir)
102 102
               extra-text (interpret-command! anchor-circle)
103 103
               selected-circle (select-circle anchor-circle @path)]
104
-          (println (if extra-text extra-text
105
-                                  (render/markdown-role selected-circle))))
104
+          (println (or extra-text
105
+                       (render/markdown-role selected-circle))))
106 106
 
107 107
         (catch Throwable t
108 108
           (.printStackTrace t))

+ 1
- 1
src/clj/freefrog/core_roles.clj View File

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

+ 1
- 1
src/clj/freefrog/governance.clj View File

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

+ 4
- 6
src/clj/freefrog/lang.clj View File

@@ -1,5 +1,5 @@
1 1
 ;
2
-; Copyright © 2015 Courage Labs
2
+; Copyright © 2019 Stephen Starkey
3 3
 ;
4 4
 ; This file is part of Freefrog.
5 5
 ;
@@ -18,9 +18,9 @@
18 18
 ;
19 19
 
20 20
 (ns freefrog.lang
21
-  (:require [clj-time.format :as f]
22
-            [clojure.java.io :as io]
21
+  (:require [clojure.java.io :as io]
23 22
             [clojure.tools.logging :as log]
23
+            [java-time :refer [local-date]]
24 24
             [freefrog.governance :as g]
25 25
             [instaparse.core :as insta])
26 26
   (:import (freefrog GovernanceParseException)))
@@ -147,11 +147,9 @@
147 147
                            "secretary"   g/secretary-name
148 148
                            "rep link"    g/rep-link-name})
149 149
 
150
-(def formatter (f/formatter "yyyy-MM-dd"))
151
-
152 150
 (defn elect [circle [_ person-name role-name expiration] _]
153 151
   (g/elect-to-role circle (elected-role-mapping role-name)
154
-                   person-name (f/parse formatter expiration)))
152
+                   person-name (local-date expiration)))
155 153
 
156 154
 (defn appoint [circle [_ person-name role-name focus] _]
157 155
   (g/appoint-to-role circle role-name person-name focus))

+ 1
- 1
src/clj/freefrog/render.clj View File

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

+ 1
- 1
src/java/freefrog/GovernanceParseException.java View File

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