Skip to content

Instantly share code, notes, and snippets.

@paultag
Created December 13, 2012 23:39
Show Gist options
  • Save paultag/4281134 to your computer and use it in GitHub Desktop.
Save paultag/4281134 to your computer and use it in GitHub Desktop.
Test Clojure dput-ng hook
; Copyright (c) Paul R. Tagliamonte <[email protected]>, 2012, under the
; terms of dput-ng it's self.
(ns clojtest
(:require dput.core
dput.exceptions))
(defn log [x] ; for debug output
(.debug dput.core/logger x))
(defn dput-checker [changes profile interface]
(cond (>= (-> changes (.get "maintainer") (.find "[email protected]")) 0)
(throw (dput.exceptions/HookException. "Maintainer's Arno. Aborting upload"))
:else
(log "Nah, it's not arno, we're good")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment