summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2016-02-05 12:40:55 -0800
committerdanielsdeleo <dan@chef.io>2016-02-16 11:41:03 -0800
commitb3c7c0cee659bf35ed919870ce28dc5d5327510d (patch)
tree868cbab0b48c66589edae7f53e3ad7401a62d009
parent54d71868fffc94f0f062ac7efd5f94f7751b8601 (diff)
downloadchef-b3c7c0cee659bf35ed919870ce28dc5d5327510d.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.rb52
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