Sha256: fcd3c59b6f66dcfb7d4dd09d6ea47ee633732eb790554d9b0d4402bc08bf98a0

Contents?: true

Size: 619 Bytes

Versions: 19

Compression:

Stored size: 619 Bytes

Contents

require 'json'

# @summary Prints the args to STDOUT in Pretty JSON format.
#
# Prints the args to STDOUT in Pretty JSON format.
#
# Useful for debugging purposes only. Ideally you would use this in
# conjunction with a rspec-puppet unit test.  Otherwise the output will
# be shown during a puppet run when verbose/debug options are enabled.
Puppet::Functions.create_function(:'extlib::dump_args') do
  # @param args The data you want to dump as pretty JSON.
  # @return [Undef] Returns nothing.
  dispatch :dump_args do
    param 'Any', :args
  end

  def dump_args(args)
    puts JSON.pretty_generate(args)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
puppet-debugger-1.4.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-1.3.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-1.2.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-1.1.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-1.0.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.19.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.18.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.17.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.16.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.15.2 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.15.1 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.15.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.14.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.13.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.12.3 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.12.2 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.12.1 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.12.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
puppet-debugger-0.11.0 spec/fixtures/modules/extlib/lib/puppet/functions/extlib/dump_args.rb