Browse files

Move config to clojars/config.clj.

  • Loading branch information...
1 parent 821a4c9 commit 31cb6ba57a981c87394aa7d48349ccd216a7a428 @technomancy technomancy committed Sep 5, 2011
Showing with 16 additions and 19 deletions.
  1. +10 −0 resources/clojars/config.clj
  2. +0 −7 src/clojars.clj
  3. +4 −10 src/clojars/config.clj
  4. +1 −1 src/clojars/db.clj
  5. +1 −1 src/clojars/scp.clj
View
10 resources/clojars/config.clj
@@ -0,0 +1,10 @@
+{:db {:classname "org.sqlite.JDBC"
+ :subprotocol "sqlite"
+ :subname "data/db"}
+ :key-file "data/authorized_keys"
+ :repo "repo"
+ :mail {:hostname "smtp.gmail.com"
+ :username "clojars@pupeno.com"
+ :password "fuuuuuu"
+ :port 465 ; If you change ssl to false, the port might not be effective, search for .setSSL and .setSslSmtpPort
+ :ssl true}}
View
7 src/clojars.clj
@@ -1,7 +0,0 @@
-(ns clojars
- (:require [clojure.java.io :as io]))
-
-(def config
- (-> (io/reader (io/resource "clojars/config.clj"))
- (java.io.PushbackReader.)
- (read)))
View
14 src/clojars/config.clj
@@ -1,10 +1,4 @@
-{:db {:classname "org.sqlite.JDBC"
- :subprotocol "sqlite"
- :subname "data/db"}
- :key-file "data/authorized_keys"
- :repo "repo"
- :mail {:hostname "smtp.gmail.com"
- :username "clojars@pupeno.com"
- :password "fuuuuuu"
- :port 465 ; If you change ssl to false, the port might not be effective, search for .setSSL and .setSslSmtpPort
- :ssl true}}
+(ns clojars.config
+ (:require [clojure.java.io :as io]))
+
+(def config (read-string (slurp (io/resource "clojars/config.clj"))))
View
2 src/clojars/db.clj
@@ -1,5 +1,5 @@
(ns clojars.db
- (:use [clojars :only [config]]
+ (:use [clojars.config :only [config]]
clojure.contrib.sql)
(:require [clojure.string :as str]
[clojure.java.io :as io])
View
2 src/clojars/scp.clj
@@ -2,7 +2,7 @@
(:import (java.io InputStream IOException File OutputStream
FileOutputStream)
com.martiansoftware.nailgun.NGContext)
- (:use [clojars :only [config]])
+ (:use [clojars.config :only [config]])
(:require [clojars.maven :as maven]
[clojars.db :as db])
(:gen-class

0 comments on commit 31cb6ba

Please sign in to comment.