Permalink
Browse files

Added syntactic coloration to README

This is just to claim I've contributed to a clojure project. I'm sorry.
  • Loading branch information...
1 parent e36a821 commit ae74ceab6efea71486d3119f598eaa660c33cd6b @n1k0 n1k0 committed Sep 7, 2012
Showing with 23 additions and 19 deletions.
  1. +23 −19 README.md
View
@@ -12,32 +12,36 @@ With leiningen add it to your project dependencies like this:
And with Maven you can do:
- <dependency>
- <groupId>claude</groupId>
- <artifactId>claude</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </dependency>
+```xml
+<dependency>
+ <groupId>claude</groupId>
+ <artifactId>claude</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+</dependency>
+```
Then on your code you can use it this way:
- (ns my.namespace
- (use: [claude.core :as cf]
- [langohr.core :as lhc]
- [monger.core :as mg]))
+```clojure
+(ns my.namespace
+ (use: [claude.core :as cf]
+ [langohr.core :as lhc]
+ [monger.core :as mg]))
- (defonce default-url "mongodb://127.0.0.1/mydb)
+(defonce default-url "mongodb://127.0.0.1/mydb)
- (defn mongo-connect []
- (if (cf/cloudfoundry?)
- (mg/connect-via-uri! (cf/mongo-url))
- (mg/connect-via-uri! default-url)))
+(defn mongo-connect []
+ (if (cf/cloudfoundry?)
+ (mg/connect-via-uri! (cf/mongo-url))
+ (mg/connect-via-uri! default-url)))
- (defn rabbitmq-connect []
- (if (cf/cloudfoundry?)
- (lhc/connect (lhc/settings-from (cf/rabbit-url)))
- (lhc/connect)))
+(defn rabbitmq-connect []
+ (if (cf/cloudfoundry?)
+ (lhc/connect (lhc/settings-from (cf/rabbit-url)))
+ (lhc/connect)))
- (defonce ^Connection conn (rabbitmq-connect))
+(defonce ^Connection conn (rabbitmq-connect))
+```
## TODO

0 comments on commit ae74cea

Please sign in to comment.