Factor out getResource().
Factor out getResource().

kat-co/juju,marcmolla/juju,bz2/juju,bac/juju,mjs/juju,frankban/juju,AdamIsrael/juju,mikemccracken/juju,AdamIsrael/juju,anastasiamac/juju,howbazaar/juju,axw/juju,howbazaar/juju,gabriel-samfira/juju,macgreagoir/juju,reedobrien/juju,axw/juju,gabriel-samfira/juju,marcmolla/juju,reedobrien/juju,frankban/juju,mjs/juju,gabriel-samfira/juju,AdamIsrael/juju,perrito666/juju,ericsnowcurrently/juju,howbazaar/juju,dooferlad/juju,mikemccracken/juju,reedobrien/juju,dimitern/juju,axw/juju,bac/juju,anastasiamac/juju,mjs/juju,macgreagoir/juju,kat-co/juju,bac/juju,alesstimec/juju,waigani/juju,alesstimec/juju,axw/juju,makyo/juju,waigani/juju,alesstimec/juju,marcmolla/juju,bz2/juju,reedobrien/juju,dooferlad/juju,dooferlad/juju,waigani/juju,marcmolla/juju,anastasiamac/juju,macgreagoir/juju,bz2/juju,mikemccracken/juju,reedobrien/juju,dooferlad/juju,macgreagoir/juju,waigani/juju,marcmolla/juju,bz2/juju,bz2/juju,mikemccracken/juju,kat-co/juju,ericsnowcurrently/juju,mjs/juju,anastasiamac/juju,bogdanteleaga/juju,dooferlad/juju,bogdanteleaga/juju,perrito666/juju,dimitern/juju,makyo/juju,bogdanteleaga/juju,ericsnowcurrently/juju,kat-co/juju,bac/juju,AdamIsrael/juju,dimitern/juju,gabriel-samfira/juju,mikemccracken/juju,bac/juju,mjs/juju,frankban/juju,ericsnowcurrently/juju,perrito666/juju,bogdanteleaga/juju,macgreagoir/juju,howbazaar/juju,mjs/juju,perrito666/juju,makyo/juju,alesstimec/juju,frankban/juju,makyo/juju,dimitern/juju,frankban/juju,gabriel-samfira/juju,dimitern/juju,howbazaar/juju,alesstimec/juju,ericsnowcurrently/juju,axw/juju,perrito666/juju,mjs/juju,kat-co/juju,anastasiamac/juju