   (ruby/send (ruby/->instance :Project project) :absolute_url))
 
 (defn build-url [build]
-  (ruby/send (ruby/->instance :Build build) :absolute_url))
+  (ruby/send (ruby/->instance :Build @build) :absolute_url))
 
 (defn send-hipchat-message [project message & {:keys [color]
                                                :or {color :yellow}}]
-  (let [token (-> :hipchat_api_token project)
-        room (-> :hipchat_room project)]
+  (let [token (-> project :hipchat_api_token)
+        room (-> project :hipchat_room)]
     (when (and token room)
       (clipchat.rooms/message
        token

  (:require [circle.ruby :as ruby])
  (:use [clojure.tools.logging :only (info)])
  (:use [circle.util.straight-jacket])
  (:require [clipchat.rooms])
  (:require [circle.model.build :as build])
  (:require [circle.model.project :as project])

  (let [build (ruby/->instance :Build @build)
        class (ruby/get-class :SimpleMailer)]
    (assert build)
    (assert class)
    (ruby/send class :post_build_email_hook build)))

(defn build-message [build]
  {:pre [(ref? build)]}
  (ruby/send (ruby/->instance :Build @build) :as_email_subject))

(defn github-project-name [project]
  (ruby/send (ruby/->instance :Project project) :github_project_name))
