lib/conjur/command/variables.rb in conjur-cli-4.3.0 vs lib/conjur/command/variables.rb in conjur-cli-4.4.0
- old
+ new
@@ -26,14 +26,14 @@
desc "Create and store a variable"
arg_name "id?"
command :create do |c|
c.arg_name "mime_type"
- c.flag [:m, :"mime-type"]
+ c.flag [:m, :"mime-type"], default_value: "text/plain"
c.arg_name "kind"
- c.flag [:k, :"kind"]
+ c.flag [:k, :"kind"], default_value: "secret"
acting_as_option(c)
c.action do |global_options,options,args|
id = args.shift
@@ -42,11 +42,11 @@
mime_type = options.delete(:m)
kind = options.delete(:k)
options.delete(:"mime-type")
options.delete(:"kind")
-
+
var = api.create_variable(mime_type, kind, options)
display(var, options)
end
end
@@ -80,6 +80,6 @@
c.action do |global_options,options,args|
id = require_arg(args, 'variable')
$stdout.write api.variable(id).value(options[:version])
end
end
-end
\ No newline at end of file
+end