diff options
author | Thom May <thom@chef.io> | 2016-01-13 10:09:06 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-13 10:09:06 +0000 |
commit | 3fa247386be7523a2b488d65dfe35cf753bd9802 (patch) | |
tree | 1fa913d87ed22ceb156e4700de2bf2ede0871d60 | |
parent | 556e5f2d78b5c6de2f34d8dd655ee515ff317296 (diff) | |
download | chef-3fa247386be7523a2b488d65dfe35cf753bd9802.tar.gz |
Correct uses of fail to raisetm/fix_fail
Style/SignalException - 3
-rw-r--r-- | chef-config/lib/chef-config/package_task.rb | 2 | ||||
-rw-r--r-- | lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/windows.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/chef-config/lib/chef-config/package_task.rb b/chef-config/lib/chef-config/package_task.rb index 0aa063a2ff..2e9b36d939 100644 --- a/chef-config/lib/chef-config/package_task.rb +++ b/chef-config/lib/chef-config/package_task.rb @@ -105,7 +105,7 @@ module ChefConfig end def define - fail 'Need to provide package root and module name' if root_path.nil? || module_name.nil? + raise 'Need to provide package root and module name' if root_path.nil? || module_name.nil? desc 'Build Gems of component dependencies' task :package_components do diff --git a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb index 4391bdbfcd..ded390fa8d 100644 --- a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb @@ -37,7 +37,7 @@ class Chef # want to spend a lot of time adding code to the main Chef libraries if root.versioned_cookbooks canonical_name = canonical_cookbook_name(File.basename(file_path)) - fail "When versioned_cookbooks mode is on, cookbook #{file_path} must match format <cookbook_name>-x.y.z" unless canonical_name + raise "When versioned_cookbooks mode is on, cookbook #{file_path} must match format <cookbook_name>-x.y.z" unless canonical_name # KLUDGE: We shouldn't have to use instance_variable_set loader.instance_variable_set(:@cookbook_name, canonical_name) diff --git a/lib/chef/provider/package/windows.rb b/lib/chef/provider/package/windows.rb index 43972c933c..f9ff50dcc6 100644 --- a/lib/chef/provider/package/windows.rb +++ b/lib/chef/provider/package/windows.rb @@ -115,7 +115,7 @@ class Chef if basename == 'setup.exe' :installshield else - fail Chef::Exceptions::CannotDetermineWindowsInstallerType, "Installer type for Windows Package '#{new_resource.name}' not specified and cannot be determined from file extension '#{file_extension}'" + raise Chef::Exceptions::CannotDetermineWindowsInstallerType, "Installer type for Windows Package '#{new_resource.name}' not specified and cannot be determined from file extension '#{file_extension}'" end end end |