Skip to content

Commit

Permalink
Found commented out parens
Browse files Browse the repository at this point in the history
  • Loading branch information
zolrath committed Sep 16, 2011
1 parent 1321c7b commit 8dc87a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/andrew_site/models/db.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Parses mongodb url from heroku, eg. mongodb://user:pass@localhost:1234/db" "Parses mongodb url from heroku, eg. mongodb://user:pass@localhost:1234/db"
(let [matcher (re-matcher #"^.*://(.*?):(.*?)@(.*?):(\d+)/(.*)$" url)] ;; Setup the regex. (let [matcher (re-matcher #"^.*://(.*?):(.*?)@(.*?):(\d+)/(.*)$" url)] ;; Setup the regex.
(when (.find matcher) ;; Check if it matches. (when (.find matcher) ;; Check if it matches.
(zipmap [:match :user :pass :host :port :db] (re-groups matcher))))) ;; Construct an options map. (zipmap [:match :user :pass :hOst :port :db] (re-groups matcher))))) ;; Construct an options map.


(defn maybe-init [] (defn maybe-init []
"Checks if connection and collection exist, otherwise initialize." "Checks if connection and collection exist, otherwise initialize."
Expand All @@ -18,7 +18,7 @@
config (split-mongo-url mongo-url)] ;; Extract options. config (split-mongo-url mongo-url)] ;; Extract options.
(println "Initializing mongo @ " mongo-url) (println "Initializing mongo @ " mongo-url)
(mongo! :db (:db config) :host (:host config) :port (Integer. (:port config))) ;; Setup global mongo. (mongo! :db (:db config) :host (:host config) :port (Integer. (:port config))) ;; Setup global mongo.
(authenticate (:user config) (:pass config)) ;; Setup u/p.))) (authenticate (:user config) (:pass config)))))


(def major-skills (def major-skills
(map #(:skill %) (fetch :skills :where {:level "major"}))) (map #(:skill %) (fetch :skills :where {:level "major"})))
Expand Down

0 comments on commit 8dc87a3

Please sign in to comment.