From 009d047fbf715d80442acc68796da8ee14159d82 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 14 Nov 2014 13:46:21 +0000 Subject: [PATCH] Working around the clj-jgit problem. Not currently fit for prime time. --- .gitignore | 1 + README.md | 6 +++++- project.clj | 5 +++-- resources/public/content/Introduction.md | 4 ++++ src/smeagol/routes/wiki.clj | 4 ++-- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2c9d4a9..b510bc5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ pom.xml.asc .lein-plugins/ .lein-failures .lein-env + diff --git a/README.md b/README.md index cc7d205..4a6b9df 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Smeagol is a simple Wiki engine inspired by [Gollum](https://github.com/gollum/g So at this stage Smeagol is a Wiki engine written in Clojure which uses Markdown as its text format, which does have user authentication, and which uses Git as its versioning and backup system. +## DLL Hell + +Unfortunately, Smeagol currently uses **[clj-jgit](https://github.com/clj-jgit/clj-jgit)** for Git integration, and **clj-jgit** depends on an obsolete version (0.5.3) of **org.clojure/core.memoize**, whereas other components of the system rely on the current (0.5.6) version. This conflict currently makes it tricky to do an out-of-the-box build of Smeagol. You need to check out clj-jgit and build a custom build, depending on the current, not the obsolete, version of memoize. I'm working to fix this problem. + ## Markup syntax Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki. @@ -21,7 +25,7 @@ that is to say, the username is a keyword and the corresponding password is a st * Image (and other media) upload; * Improved editor. The editor is at present very primitive - right back from the beginnings of the Web. It would be nice to have a rich embedded editor like [Hallo](https://github.com/bergie/hallo) or [Aloha](http://aloha-editor.org/Content.Node/index.html) but I havenven't (yet) had time to integrate them! -* Improved security. Having the passwords in plain text rather than encrypted is just basically poor; having the passwd file in *public* space is also poor (although I believe it cannot be accessed via HTTP). Essentially, authentication mechanisms should be pluggable, and at present they aren't; +* Improved security. Having the passwords in plain text rather than encrypted is just basically poor; having the passwd file in *public* space is also poor (although I believe it cannot be accessed via HTTP). Essentially, authentication mechanisms should be pluggable, and at present they aren't; * Mechanism to add users through the user interface; * Mechanism to change passwords through the user interface; diff --git a/project.clj b/project.clj index 8eb55e3..446a496 100644 --- a/project.clj +++ b/project.clj @@ -2,13 +2,14 @@ :description "A simple Git-backed Wiki inspired by Gollum" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.6.0"] - [lib-noir "0.9.4" :exclusions [org.clojure/core.memoize org.clojure/tools.reader]] + [org.clojure/core.memoize "0.5.6"] + [lib-noir "0.9.4" :exclusions [org.clojure/tools.reader]] [ring-server "0.3.1"] [selmer "0.7.2"] [com.taoensso/timbre "3.3.1" :exclusions [org.clojure/tools.reader]] [com.taoensso/tower "3.0.2" :exclusions [com.taoensso/encore]] [markdown-clj "0.9.55" :exclusions [com.keminglabs/cljx]] - [clj-jgit "0.8.1"] + [clj-jgit "0.8.2-SNAPSHOT"] [environ "1.0.0"] [im.chit/cronj "1.4.2"] [noir-exception "0.2.2"] diff --git a/resources/public/content/Introduction.md b/resources/public/content/Introduction.md index f0088a1..fd1e9fc 100644 --- a/resources/public/content/Introduction.md +++ b/resources/public/content/Introduction.md @@ -4,6 +4,10 @@ Smeagol is a simple Wiki engine inspired by [Gollum](https://github.com/gollum/g So at this stage Smeagol is a Wiki engine written in Clojure which uses Markdown as its text format, which does have user authentication, and which uses Git as its versioning and backup system. +## DLL Hell + +Unfortunately, Smeagol currently uses **[clj-jgit](https://github.com/clj-jgit/clj-jgit)** for Git integration, and **clj-jgit** depends on an obsolete version (0.5.3) of **org.clojure/core.memoize**, whereas other components of the system rely on the current (0.5.6) version. This conflict currently makes it tricky to do an out-of-the-box build of Smeagol. You need to check out clj-jgit and build a custom build, depending on the current, not the obsolete, version of memoize. I'm working to fix this problem. + ## Markup syntax Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki. diff --git a/src/smeagol/routes/wiki.clj b/src/smeagol/routes/wiki.clj index b19557c..4ddd501 100644 --- a/src/smeagol/routes/wiki.clj +++ b/src/smeagol/routes/wiki.clj @@ -100,8 +100,8 @@ user (session/get :user)] (println (str "Action = " action)) (cond - (= action "Logout!") - (do + (= action "Logout!") + (do (session/remove! :user) (response/redirect "/wiki")) (and username password (auth/authenticate username password))