-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PDK-1333) command_spec rake task #644
Conversation
933f6ee
to
423eaea
Compare
423eaea
to
619673f
Compare
Hrmmm small issue and I'm not sure how you'd solve it e.g. As per https://github.com/puppetlabs/pdk/blob/master/lib/pdk/cli/new/class.rb#L15 it requires a class name however this is not expressed in the spec output
Apart from string interpolating for |
cri 2.12.x introduced explicitly defined parameters, so we can make use of that to define the parameters and then pull them out when introspecting. As we still currently have to support Ruby 2.1.9 which is limited to cri 2.10.x, we'll need to guard these definitions. Something like this should work: param :class_name if respond_to?(:param) We'd also need to change how we access the parameters as they'd change from an array to a hash (maybe |
I wonder if we could conditionally monkey patch basic |
Maybe... This is just metadata at the end of the day,.... |
I think if we cleaned up the commit message, this is ready for merge. As it's purely for development of (PDK) and not user facing, this won't require the same rigour or have the same blast radius if it's wrong. |
Introspects the populated Cri data structure to generate a JSON specification of the PDK command structure for use in generating the PowerShell cmdlets.
Initial stab at introspecting Cri to generate a JSON spec of the PDK command structure.
/cc @glennsarti @jpogran