diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-11-15 15:03:32 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:08:26 -0800 |
commit | db85ca494a484024404f1090c493613cc9521662 (patch) | |
tree | cc655fce7e3bfaa450a697889f2e8f2e5c80d38d /lib/chef/data_collector.rb | |
parent | d218f942628da9a7302f1cc166abec0ea4fdeba2 (diff) | |
download | chef-db85ca494a484024404f1090c493613cc9521662.tar.gz |
fix Style/MultilineIfModifier
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/data_collector.rb')
-rw-r--r-- | lib/chef/data_collector.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index 0e676145eb..df3bce6167 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -462,8 +462,10 @@ class Chef end def validate_data_collector_server_url! - raise Chef::Exceptions::ConfigurationError, - "Chef::Config[:data_collector][:server_url] is empty. Please supply a valid URL." if data_collector_server_url.empty? + if data_collector_server_url.empty? + raise Chef::Exceptions::ConfigurationError, + "Chef::Config[:data_collector][:server_url] is empty. Please supply a valid URL." + end begin uri = URI(data_collector_server_url) @@ -471,8 +473,10 @@ class Chef raise Chef::Exceptions::ConfigurationError, "Chef::Config[:data_collector][:server_url] (#{data_collector_server_url}) is not a valid URI." end - raise Chef::Exceptions::ConfigurationError, - "Chef::Config[:data_collector][:server_url] (#{data_collector_server_url}) is a URI with no host. Please supply a valid URL." if uri.host.nil? + if uri.host.nil? + raise Chef::Exceptions::ConfigurationError, + "Chef::Config[:data_collector][:server_url] (#{data_collector_server_url}) is a URI with no host. Please supply a valid URL." + end end end end |