 
 (defn send-hipchat-build-notification [build]
   (let [project (build/get-project build)
-        message (build-message @build)
-        url (build-url @build)
+        message (build-message build)
+        url (build-url build)
         message (format "<a href='%s'>%s</a>" url message)
         success? (-> @build :failed not)
         color (if success? :green :red)]

  (ruby/send (ruby/->instance :Project project) :absolute_url))

(defn build-url [build]
  (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)]
    (when (and token room)
      (clipchat.rooms/message
       token

  (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))
