# File lib/chef/knife/core/node_editor.rb, line 35 def edit_node abort "You specified the --disable_editing option, nothing to edit" if config[:disable_editing] assert_editor_set! updated_node_data = @ui.edit_data(view) apply_updates(updated_node_data) @updated_node end
# File lib/chef/knife/core/node_editor.rb, line 44 def updated? pristine_copy = Chef::JSONCompat.from_json(Chef::JSONCompat.to_json(node), :create_additions => false) updated_copy = Chef::JSONCompat.from_json(Chef::JSONCompat.to_json(@updated_node), :create_additions => false) unless pristine_copy == updated_copy updated_properties = %{name normal chef_environment run_list default override automatic}.reject do |key| pristine_copy[key] == updated_copy[key] end end ( pristine_copy != updated_copy ) && updated_properties end
Generated with the Darkfish Rdoc Generator 2.