Book list
63 |64 |67 |The screen shows the list of available books
65 | The Helper 66 |
Id | 71 |Author | 72 |Title | 73 |Actions | 74 |
---|
80 | 81 |
82 |├── .gitignore ├── .travis.yml ├── Procfile ├── README.md ├── project.clj ├── resources └── public │ ├── admin.html │ ├── book.html │ ├── css │ ├── bootstrap-responsive.min.css │ └── bootstrap.min.css │ ├── ember-0.9.3.min.js │ ├── img │ ├── glyphicons-halflings-white.png │ └── glyphicons-halflings.png │ ├── index.html │ ├── js │ ├── bootstrap.min.js │ └── librarian.js │ ├── login_form.chtml │ ├── logout-form.html │ └── tests │ ├── index.html │ ├── js │ ├── jquery.mockjax.js │ └── qunit.js │ └── qunit.css ├── src-cljs └── librarian_clojure │ └── frontend.cljs ├── src └── librarian_clojure │ ├── books.clj │ ├── config.clj │ ├── core.clj │ ├── db.clj │ ├── friend.clj │ ├── page.clj │ ├── repl.clj │ ├── routes.clj │ ├── run.clj │ └── security.clj ├── test-cljs └── librarian_clojure │ └── test │ ├── frontend.cljs │ ├── macro_utils.clj │ └── test_helpers.cljs └── test └── librarian_clojure └── test ├── core.clj ├── security.clj └── t_page.clj /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .settings 4 | .lein-cljsbuild* 5 | /bin 6 | /pom.xml 7 | *jar 8 | /lib 9 | /classes 10 | /native 11 | /.lein-failures 12 | /checkouts 13 | /.lein-deps-sum 14 | /multi-lib 15 | /data 16 | /target 17 | /resources/public/tests/js/librarian-tests.js 18 | /resources/public/js/librarian-cljs.js 19 | .lein-repl-history 20 | 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: clojure 2 | 3 | lein: lein2 4 | script: lein2 all midje 5 | 6 | # http://about.travis-ci.org/blog/august-2012-upcoming-ci-environment-updates/ 7 | services: 8 | - mongodb 9 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: lein trampoline with-profile production run $PORT 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # librarian-clojure [](http://travis-ci.org/jaceklaskowski/librarian-clojure) 2 | 3 | Book manager for [Warszawa Java User Group](http://warszawa.jug.pl) written in [Clojure](http://clojure.org). 4 | 5 | The views (and perhaps other parts, too) are heavily inspired by the [mametipsum](https://github.com/tvaughan/mametipsum) and the [Basic marketing site from Bootstrap's Examples](http://twitter.github.com/bootstrap/examples/hero.html) projects. 6 | 7 | The project is developed with [Leiningen 2.0.0](https://github.com/technomancy/leiningen). 8 | 9 | ## Running the project 10 | 11 | 1. Install [leiningen](https://github.com/technomancy/leiningen) 12 | 2. Install [MongoDB](http://www.mongodb.org/) 13 | 3. Run MongoDB, e.g. `mongod --dbpath ~/oss/librarian-clojure/data/db` 14 | 4. Go into project's directory and execute `lein run-local` 15 | 16 | A browser window shows up with the welcome page of the application. 17 | 18 | ## Running the project in REPL (with `lein repl`) 19 | 20 | 1. Go into project's directory 21 | 2. Execute `lein repl` 22 | 3. In REPL, execute `(go)` to start a server and open the welcome page. 23 | 4. To stop the server, execute `(stop)`. 24 | 25 | When you make changes to the templates, follow [Template out of date](https://github.com/swannodette/enlive-tutorial#template-out-of-date) and execute `(load "page")` at the REPL. 26 | 27 | ## How to contribute (test first, please) 28 | 29 | 1. Open a terminal and fire up `lein midje --lazytest` 30 | 2. Write a test that fails (see [Issues](https://github.com/jaceklaskowski/librarian-clojure/issues) for ideas) 31 | 3. Fix, commit and send a pull request 32 | 4. Rinse and repeat 33 | 34 | ## License 35 | 36 | Copyright (C) 2012 [Konrad Garus](https://github.com/konrad-garus), [Adrian Gruntkowski](https://github.com/zoldar), [Jacek Laskowski](https://github.com/jaceklaskowski), and 37 | [contributors](https://github.com/jaceklaskowski/librarian-clojure/graphs/contributors) 38 | 39 | Distributed under the Eclipse Public License, the same as Clojure. 40 | -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject librarian-clojure "0.0.1-SNAPSHOT" 2 | :description "Book manager in Clojure" 3 | :url "http://github.com/jaceklaskowski/librarian-clojure" 4 | :min-lein-version "2.0.0" 5 | :license {:name "Eclipse Public License"} 6 | :dependencies [[ring/ring-jetty-adapter "1.1.6" :exclusions [org.clojure/clojure]] 7 | [ring/ring-devel "1.1.6" :exclusions [org.clojure/clojure]] 8 | [compojure "1.1.3" :exclusions [org.clojure/clojure 9 | ring/ring-core]] 10 | [hiccup "1.0.2" :exclusions [org.clojure/clojure]] 11 | [congomongo "0.3.3" :exclusions [org.clojure/clojure]] 12 | [org.clojure/data.json "0.2.1" :exclusions [org.clojure/clojure]] 13 | [jbcrypt "0.3" :exclusions [org.clojure/clojure]] 14 | [com.cemerick/friend "0.1.3" :exclusions [org.clojure/clojure]] 15 | [lib-noir "0.3.1" :exclusions [org.clojure/clojure]] 16 | [enlive "1.0.1" :exclusions [org.clojure/clojure]] 17 | [jayq "2.0.0" :exclusions [org.clojure/clojure]] 18 | [org.clojure/clojure "1.4.0"]] 19 | :plugins [[lein-cljsbuild "0.3.0"]] 20 | :hooks [leiningen.cljsbuild] 21 | :repl-init librarian-clojure.repl 22 | :ring {:handler librarian-clojure.core/app 23 | :init librarian-clojure.run/run-local-ring} 24 | :main librarian-clojure.run 25 | :profiles {;; https://devcenter.heroku.com/articles/clojure-support#runtime-behavior 26 | :production {:misc "configuration" 27 | :main librarian-clojure.run/run-heroku 28 | :mirrors {#"central|clojars" 29 | "http://s3pository.herokuapp.com/clojure"} 30 | :aot :all} 31 | :dev {:main librarian-clojure.run/run-local 32 | :dependencies [[ring-mock "0.1.1" :exclusions [org.clojure/clojure 33 | hiccup]] 34 | [midje "1.5-alpha3" :exclusions [org.clojure/clojure]] 35 | [com.stuartsierra/lazytest "1.2.3" :exclusions [org.clojure/clojure]]] 36 | :plugins [[lein-midje "2.0.3"]] 37 | :hooks [leiningen.cljsbuild] 38 | :repl-options {:init-ns librarian-clojure.repl} 39 | :warn-on-reflection true} 40 | ;; FIXME deps copied from the dev profile 41 | :1.5 {:dependencies [[org.clojure/clojure "1.5.0-master-SNAPSHOT"] 42 | [ring-mock "0.1.1" :exclusions [org.clojure/clojure 43 | hiccup]] 44 | [midje "1.5-alpha3" 45 | :exclusions [org.clojure/clojure]] 46 | [com.stuartsierra/lazytest "1.2.3" :exclusions [org.clojure/clojure]]] 47 | :plugins [[lein-midje "2.0.3"]]}} 48 | :cljsbuild {:builds 49 | [{:source-paths ["src-cljs"] 50 | :id "dev" 51 | :compiler {:pretty-print true 52 | :output-to "resources/public/js/librarian-cljs.js" 53 | :optimizations :whitespace} 54 | :jar true} 55 | ;; :id "production" TBD 56 | {:source-paths ["src-cljs" "test-cljs"] 57 | :id "test" 58 | :compiler {:pretty-print true 59 | :output-to "resources/public/tests/js/librarian-tests.js" 60 | :optimizations :whitespace}}]} 61 | :aliases {"run-local" ["with-profile" "dev" "run"] 62 | "all" ["with-profile" "dev:1.5"]} 63 | :repositories [["sonatype-snapshots" 64 | "http://oss.sonatype.org/content/repositories/snapshots/"] 65 | ["stuart" "http://stuartsierra.com/maven2"] 66 | ["stuart-snapshots" "http://stuartsierra.com/m2snapshots"]]) 67 | -------------------------------------------------------------------------------- /resources/public/admin.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 |
9 | 10 |64 |67 |The screen shows the list of available books
65 | The Helper 66 |
Id | 71 |Author | 72 |Title | 73 |Actions | 74 |
---|
80 | 81 |
82 |64 |67 |The screen shows the book's details
65 | The Helper 66 |
Book manager for Warszawa Java User Group written in Clojure.
68 | 69 |76 |79 |The screen shows the list of available books
77 | The Helper 78 |
Id | 83 |Author | 84 |Title | 85 |Actions | 86 |
---|---|---|---|
id | 91 |author | 92 |{{title}} | 93 |94 | 97 | 1 98 | | 99 |