lib/bib/opsworks/qafoo.rb in BibOpsworks-0.1.7 vs lib/bib/opsworks/qafoo.rb in BibOpsworks-0.1.8
- old
+ new
@@ -1,6 +1,7 @@
require 'net/http'
+require 'bib/opsworks/logging'
module Bib
module Opsworks
class Qafoo
include Logging
@@ -28,14 +29,14 @@
end
def prepare_publishing_data(app_name, deploy_data)
scm_revision = deploy_data['scm']['revision']
- if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
- deployment_user = 'opsworks'
- else
- deployment_user = deploy_data['deploying_user'].split('/')[1]
- end
+ deployment_user = if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
+ 'opsworks'
+ else
+ deploy_data['deploying_user'].split('/')[1]
+ end
name_text = "#{scm_revision} by #{deployment_user}"
qafoo_params = {}
qafoo_params['name'] = name_text