diff options
author | Ben Somers <somers.ben@gmail.com> | 2014-06-08 18:30:58 -0700 |
---|---|---|
committer | Ben Somers <somers.ben@gmail.com> | 2014-06-08 18:30:58 -0700 |
commit | c60d99a017cf73839628dca4401e3773efadf9b5 (patch) | |
tree | 14413ac12e72c06405ef6e722da2aefc67fc1411 /lib/chef/role.rb | |
parent | d9c897c0fe92a747d64c4cf0b90933ff9b64238b (diff) | |
download | chef-c60d99a017cf73839628dca4401e3773efadf9b5.tar.gz |
removed Chef::Role.from_disk 'force' option
Option was unused and did not work in any case.
Diffstat (limited to 'lib/chef/role.rb')
-rw-r--r-- | lib/chef/role.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb index a299a1a2d0..64952c6ab2 100644 --- a/lib/chef/role.rb +++ b/lib/chef/role.rb @@ -232,7 +232,7 @@ class Chef # Load a role from disk - prefers to load the JSON, but will happily load # the raw rb files as well. Can search within directories in the role_path. - def self.from_disk(name, force=nil) + def self.from_disk(name) paths = Array(Chef::Config[:role_path]) paths.each do |path| roles_files = Dir.glob(File.join(path, "**", "**")) @@ -243,10 +243,10 @@ class Chef end js_path, rb_path = js_files.first, rb_files.first - if js_path && (File.exists?(js_path) || force == "json") + if js_path && File.exists?(js_path) # from_json returns object.class => json_class in the JSON. return Chef::JSONCompat.from_json(IO.read(js_path)) - elsif rb_path && (File.exists?(rb_path) || force == "ruby") + elsif rb_path && File.exists?(rb_path) role = Chef::Role.new role.name(name) role.from_file(rb_path) |