diff options
author | danielsdeleo <dan@chef.io> | 2016-02-05 12:40:55 -0800 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2016-02-16 15:26:43 -0800 |
commit | 5a787bcbebac7a3b9a134b557055b814c0e981bb (patch) | |
tree | 2a683c272871668de1483e65dd2e579a96a6bc6d | |
parent | 2feea79b1046b09eed1d9193608c38b71a74452e (diff) | |
download | chef-5a787bcbebac7a3b9a134b557055b814c0e981bb.tar.gz |
Remove unused functionality from 1 level inlined
-rw-r--r-- | lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb index 079fb1ff1b..1777a8982f 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb @@ -57,19 +57,27 @@ class Chef end ############################## - # Inlined + # Inlined from ChefRepositoryFileSystemEntry ############################## - def write_pretty_json=(value) - @write_pretty_json = value - end + # Inherited from ChefRepositoryFileSystemEntry, but apparently unused + ## def write_pretty_json=(value) + ## @write_pretty_json = value + ## end - def write_pretty_json - @write_pretty_json.nil? ? root.write_pretty_json : @write_pretty_json - end + # Inherited from ChefRepositoryFileSystemEntry, but apparently unused + ## def write_pretty_json + ## @write_pretty_json.nil? ? root.write_pretty_json : @write_pretty_json + ## end + # Inherited from ChefRepositoryFileSystemEntry, but has different behavior here: + ## def data_handler + ## @data_handler || parent.data_handler + ## end + + # Inlined version of the above def data_handler - @data_handler || parent.data_handler + @data_handler end def chef_object @@ -86,26 +94,30 @@ class Chef ## !is_dir && name[-5..-1] == ".json" ## end - def write(file_contents) - if file_contents && write_pretty_json && name[-5..-1] == ".json" - file_contents = minimize(file_contents, self) - end - super(file_contents) - end + # Inherited from ChefRepositoryFileSystemEntry, but apparently unused + ## def write(file_contents) + ## if file_contents && write_pretty_json && name[-5..-1] == ".json" + ## file_contents = minimize(file_contents, self) + ## end + ## super(file_contents) + ## end - def minimize(file_contents, entry) - object = Chef::JSONCompat.parse(file_contents) - object = data_handler.normalize(object, entry) - object = data_handler.minimize(object, entry) - Chef::JSONCompat.to_json_pretty(object) - end + # Inherited from ChefRepositoryFileSystemEntry, but apparently unused + ## def minimize(file_contents, entry) + ## object = Chef::JSONCompat.parse(file_contents) + ## object = data_handler.normalize(object, entry) + ## object = data_handler.minimize(object, entry) + ## Chef::JSONCompat.to_json_pretty(object) + ## end protected def make_child_entry(child_name) ChefRepositoryFileSystemEntry.new(child_name, self) end + end + end end end |