lib/engineyard-jenkins/appcloud_env.rb in engineyard-jenkins-0.4.0 vs lib/engineyard-jenkins/appcloud_env.rb in engineyard-jenkins-0.5.0
- old
+ new
@@ -40,10 +40,12 @@
end
# Currently the engineyard gem has badly formed URLs in its same data
# This method cleans app_master_hostname.compute-1.amazonaws.com -> app-master-hostname.compute-1.amazonaws.com
def clean_host_name(environment)
- environment.instances.first.public_hostname.gsub!(/_/,'-') if environment.instances.first
+ if environment.instances.first && environment.instances.first.public_hostname
+ environment.instances.first.public_hostname.gsub!(/_/,'-')
+ end
end
end
end
end
\ No newline at end of file