Method: InspecPlugins::InspecToolsPlugin::CliCommand#generate_inspec_metadata

Defined in:
lib/inspec_tools/plugin_cli.rb

#generate_inspec_metadataObject



185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/inspec_tools/plugin_cli.rb', line 185

def 
   = {}

  ['maintainer'] = ask('Maintainer: ')
  ['copyright'] = ask('Copyright: ')
  ['copyright_email'] = ask('Copyright Email: ')
  ['license'] = ask('License: ')
  ['version'] = ask('Version: ')

  .delete_if { |_key, value| value.empty? }
  File.open('metadata.json', 'w') do |f|
    f.write(.to_json)
  end
end