Revision 9d43fc71
Added by Michael Moll almost 6 years ago
db/migrate/20131104132542_update_foreman_url.rb | ||
---|---|---|
def up
|
||
return unless (val = Setting.find_by_name('foreman_url').try(:value))
|
||
if URI.parse(val).host.nil?
|
||
protocol=SETTINGS[:require_ssl] ? 'https' : 'http'
|
||
Setting[:foreman_url]="#{protocol}://#{val}"
|
||
protocol = SETTINGS[:require_ssl] ? 'https' : 'http'
|
||
Setting[:foreman_url] = "#{protocol}://#{val}"
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
Fixes #19789 - fix Layout/SpaceAroundOperators cop