Class: KnifeSpork::SporkDataBagCreate
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- KnifeSpork::SporkDataBagCreate
- Includes:
- Runner
- Defined in:
- lib/chef/knife/spork-databag-create.rb
Instance Method Summary collapse
Methods included from Runner
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/chef/knife/spork-databag-create.rb', line 24 def run self.config = Chef::Config.merge!(config) if @name_args.nil? ui.error "You must specify a data bag name" ui.error opt_parser exit 1 end @object_name = @name_args.first run_plugins(:before_databagcreate) pre_databag = {} databag_create post_databag = load_databag(@object_name) @object_difference = json_diff(pre_databag,post_databag).to_s run_plugins(:after_databagcreate) end |