Permalink
Browse files

init commit

  • Loading branch information...
0 parents commit a695415028d1788b2b9a27002d9a6c77e00be3d4 @sunng87 committed Feb 25, 2012
Showing with 86 additions and 0 deletions.
  1. +8 −0 .gitignore
  2. +13 −0 README
  3. +14 −0 project.clj
  4. +1 −0 src/karmalet/core.clj
  5. +12 −0 src/lobos/config.clj
  6. +32 −0 src/lobos/migrations.clj
  7. +6 −0 test/karmalet/test/core.clj
@@ -0,0 +1,8 @@
+/pom.xml
+*jar
+/lib
+/classes
+/native
+/.lein-failures
+/checkouts
+/.lein-deps-sum
@@ -0,0 +1,13 @@
+# karmalet
+
+FIXME: write description
+
+## Usage
+
+FIXME: write
+
+## License
+
+Copyright (C) 2012 FIXME
+
+Distributed under the Eclipse Public License, the same as Clojure.
@@ -0,0 +1,14 @@
+(defproject karmalet "1.0.0-SNAPSHOT"
+ :description "FIXME: write description"
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [compojure "1.0.1"]
+ [reddit.clj "0.3.3"]
+ [clj-http "0.3.2"]
+ [korma "0.3.0-beta4"]
+ [com.rabbitmq/amqp-client "2.7.1"]
+ [clj-time "0.3.7"]
+ [mysql/mysql-connector-java "5.1.8"]
+ [lobos "1.0.0-SNAPSHOT"]]
+ :dev-dependencies [[lein-ring "0.5.4"]
+ [lein-lobos "0.8.0-SNAPSHOT"]])
+
@@ -0,0 +1 @@
+(ns karmalet.core)
@@ -0,0 +1,12 @@
+(ns lobos.config
+ (:use [lobos.connectivity]))
+
+
+(def db
+ {:classname "com.mysql.jdbc.Driver"
+ :subprotocol "mysql"
+ :subname "//localhost:3306/karmalet"
+ :user "karmalet"
+ :password "karmalet"})
+
+
@@ -0,0 +1,32 @@
+(ns lobos.migrations
+ (:refer-clojure :exclude [alter drop
+ bigint boolean char double float time])
+ (:use (lobos [migration :only [defmigration]]
+ core
+ schema
+ config)))
+
+(defmigration add-user-table
+ (up []
+ (create
+ (table :kusers (integer :id :primary-key :auto-inc)
+ (varchar :email 100 :unique)
+ (timestamp :next-update)))
+ (index :kusers [:email])
+ (index :kusers [:next-update]))
+ (down []
+ (drop (table :kusers))))
+
+(defmigration add-karma-table
+ (up []
+ (create
+ (table :karma (integer :id :primary-key :auto-inc)
+ (integer :user-id :not-null)
+ (integer :service :not-null)
+ (integer :karma :not-null)
+ (integer :karma-alt)))
+ (index :karma [:user-id]))
+ (down []
+ (drop (table :karma))))
+
+
@@ -0,0 +1,6 @@
+(ns karmalet.test.core
+ (:use [karmalet.core])
+ (:use [clojure.test]))
+
+(deftest replace-me ;; FIXME: write
+ (is false "No tests have been written."))

0 comments on commit a695415

Please sign in to comment.