Browse files

Update to Clojure 1.4.0.

  • Loading branch information...
1 parent d54a813 commit 87daea26b866d7e8522afe35c9989cce4e45a023 @technomancy committed May 21, 2012
Showing with 19 additions and 18 deletions.
  1. +1 −0 .gitignore
  2. +5 −4 README.markdown
  3. +4 −4 project.clj
  4. +3 −3 src/mire/player.clj
  5. +1 −1 src/mire/server.clj
  6. +2 −3 test/test_commands.clj
  7. +3 −3 test/test_rooms.clj
View
1 .gitignore
@@ -1,3 +1,4 @@
mire-*.jar
lib/
classes/
+target/
View
9 README.markdown
@@ -4,13 +4,12 @@ It's a nonviolent MUD. (Multi-User Dungeon)
## Usage
-Install [Leiningen](http://github.com/technomancy/leiningen) if you
-haven't already:
+Install [Leiningen](http://leiningen.org) if you haven't already:
$ curl -O ~/bin/lein http://github.com/technomancy/leiningen/raw/stable/bin/lein
$ chmod 755 bin/lein
-Then do "lein run" inside the Mire directory to launch the Mire
+Then do `lein run` inside the Mire directory to launch the Mire
server. Then players can connect by telnetting to port 3333.
## Motivation
@@ -30,6 +29,8 @@ and continue from there.
While you can learn from Mire on its own, it has been written
specifically for the [PeepCode screencast on
Clojure](http://peepcode.com/products/functional-programming-with-clojure).
+A [blog post](http://technomancy.us/136) steps through the codebase
+and shows how to make minor updates for a more recent version of Clojure.
-Copyright © 2009-2011 Phil Hagelberg
+Copyright © 2009-2012 Phil Hagelberg
Licensed under the same terms as Clojure.
View
8 project.clj
@@ -1,5 +1,5 @@
-(defproject mire "0.13"
+(defproject mire "0.13.1"
:description "A multiuser text adventure game/learning project."
- :main mire.server
- :dependencies [[org.clojure/clojure "1.2.0"]
- [org.clojure/clojure-contrib "1.2.0"]])
+ :main ^:skip-aot mire.server
+ :dependencies [[org.clojure/clojure "1.4.0"]
+ [server-socket "1.0.0"]])
View
6 src/mire/player.clj
@@ -1,8 +1,8 @@
(ns mire.player)
-(def *current-room*)
-(def *inventory*)
-(def *player-name*)
+(def ^:dynamic *current-room*)
+(def ^:dynamic *inventory*)
+(def ^:dynamic *player-name*)
(def prompt "> ")
(def player-streams (ref {}))
View
2 src/mire/server.clj
@@ -3,7 +3,7 @@
[mire.commands :only [discard look execute]]
[mire.rooms :only [add-rooms rooms]])
(:use [clojure.java.io :only [reader writer]]
- [clojure.contrib.server-socket :only [create-server]]))
+ [server.socket :only [create-server]]))
(defn- cleanup []
"Drop all inventory and remove player from room and player list."
View
5 test/test_commands.clj
@@ -1,10 +1,9 @@
(ns test-commands
- (:use [mire.commands]
- :reload-all)
(:use [mire.player]
+ [mire.commands]
[mire.rooms :only [add-rooms rooms]]
[clojure.test]
- [clojure.contrib.io :only [writer]]))
+ [clojure.java.io :only [writer]]))
(add-rooms "resources/rooms/")
View
6 test/test_rooms.clj
@@ -1,9 +1,9 @@
(ns test-rooms
- (:use [mire.rooms] :reload-all)
- (:use [clojure.test]))
+ (:use [mire.rooms]
+ [clojure.test]))
(defn room-fixture [f]
- (binding [rooms (atom (load-rooms {} "resources/rooms/"))]
+ (with-redefs [rooms (atom (load-rooms {} "resources/rooms/"))]
(f)))
(use-fixtures :each room-fixture)

0 comments on commit 87daea2

Please sign in to comment.