Whoops you are right. I should use build_url then? Away from my comp, will
fix later tnight. Also, do I need the first two "require"s up top?
On Aug 3, 2013 1:53 PM, "Malik Ahmed" <notifications@github.com> wrote:

> In responder_callbacks/code_metrics_notifier.rb:
>
> > @@ -0,0 +1,19 @@
> > +require 'net/http'
> > +require 'nokogiri'
> > +require 'uri'
> > +require 'responder_callback'
> > +require 'hipchat'
> > +
> > +# Callback class that posts the code metrics of a successful build to hipchat
> > +class CodeMetricsNotifier < ResponderCallback
> > +
> > +	# On successful cruise build, send code metrics link to hipchat.
> > +	def after_response(status_hash, responder)
> > +		if responder.activity =~ /Success/i
> > +			build_url = URI.parse(status_hash[:build_url])
> > +			code_metrics_url = "#{build_url.path}/artifacts/code_metrics/html/index.html"
>
> I don't think you want build_url.path here. If status_hash[:build_url] is
> something like http://builder.net/1337deadbeef/, then path will only give
> you /1337deadbeef/, which means the link in hipchat won't take you where
> you want it to go.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mahmed-mdsol/cruisecontrolrb_to_hipchat/pull/6/files#r5567513>
> .
>