diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-14 10:34:33 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-14 10:34:33 -0700 |
commit | 6705acbd7f301d1b04388043a3dfa0308655f120 (patch) | |
tree | 1e8a43b35ef1684a4b90578f1a6374758aa7e3c7 /lib/chef/policy_builder | |
parent | 365064280c93d519fdacbf032c0c21057e5549c9 (diff) | |
download | chef-6705acbd7f301d1b04388043a3dfa0308655f120.tar.gz |
chefstyle Style/AndOr fixes
this is part of our informal style guide, lets make it formal since
clearly its not getting followed very well.
Diffstat (limited to 'lib/chef/policy_builder')
-rw-r--r-- | lib/chef/policy_builder/dynamic.rb | 2 | ||||
-rw-r--r-- | lib/chef/policy_builder/policyfile.rb | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/policy_builder/dynamic.rb b/lib/chef/policy_builder/dynamic.rb index c6c7deeee6..389f124f84 100644 --- a/lib/chef/policy_builder/dynamic.rb +++ b/lib/chef/policy_builder/dynamic.rb @@ -139,7 +139,7 @@ class Chef # # @return [PolicyBuilder::Policyfile, PolicyBuilder::ExpandNodeObject] def implementation - @implementation or raise Exceptions::InvalidPolicybuilderCall, "#load_node must be called before other policy builder methods" + @implementation || raise(Exceptions::InvalidPolicybuilderCall, "#load_node must be called before other policy builder methods") end # @api private diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index 8f35c66cab..e2238d4a73 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -256,10 +256,10 @@ class Chef # @api private def run_list if named_run_list_requested? - named_run_list or - raise ConfigurationError, + named_run_list || + raise(ConfigurationError, "Policy '#{retrieved_policy_name}' revision '#{revision_id}' does not have named_run_list '#{named_run_list_name}'" + - "(available named_run_lists: [#{available_named_run_lists.join(', ')}])" + "(available named_run_lists: [#{available_named_run_lists.join(', ')}])") else policy["run_list"] end @@ -321,17 +321,17 @@ class Chef # @api private def deployment_group - Chef::Config[:deployment_group] or - raise ConfigurationError, "Setting `deployment_group` is not configured." + Chef::Config[:deployment_group] || + raise(ConfigurationError, "Setting `deployment_group` is not configured.") end # @api private def validate_policy_config! - policy_group or - raise ConfigurationError, "Setting `policy_group` is not configured." + policy_group || + raise(ConfigurationError, "Setting `policy_group` is not configured.") - policy_name or - raise ConfigurationError, "Setting `policy_name` is not configured." + policy_name || + raise(ConfigurationError, "Setting `policy_name` is not configured.") end # @api private |