Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

CHEF-14268-Update inspec init template with gem dependency#7311

Open
balasubramanian-s wants to merge7 commits intoinspec-7
base:inspec-7
Choose a base branch
Loading
frombs/inspec-init-template

Conversation

balasubramanian-s
Copy link
Contributor

@balasubramanian-sbalasubramanian-s commentedFeb 25, 2025
edited
Loading

Updateinspec init profile with new gem-based resource dependency template

Description

inspec init profile --resource-dependency / inspec init profile -r will generate a profile template depending on the inspec gem-based resource

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read theCONTRIBUTING document.

Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
@balasubramanian-sbalasubramanian-s marked this pull request as ready for reviewMarch 12, 2025 06:58
@balasubramanian-sbalasubramanian-s requested a review froma team as acode ownerMarch 12, 2025 06:58
@balasubramanian-sbalasubramanian-s changed the titleUpdate inspec init template with gem dependencyCHEF-14268-Update inspec init template with gem dependencyMar 12, 2025
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
@@ -24,14 +24,24 @@ def valid_profile_platforms
desc: "Which platform to generate a profile for: choose from #{valid_profile_platforms.join(", ")}"
option :overwrite, type: :boolean, default: false,
desc: "Overwrites existing directory"
option :resource_dependency, default: nil, type: :string, aliases: [:r],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are we supporting passing multiple resource pack dependencies in this? If not then simplyaliases: :r should be used here.


# Check if "--resource-dependency" exists but has no argument
if resource_index && (resource_index + 1 == ARGV.size || ARGV[resource_index + 1].start_with?("--"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Instead of using ARGV, can you instead try taking the approach of usingoptions[:resource_dependency] fornil handling?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Also check, that even though this new key has a default value ofnil it seems to be returning"resource_dependency"=>"resource_dependency" in thor options when nothing is passed in resource dependency. Please have a check on this behaviour.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Nik08Nik08Nik08 left review comments

@sathish-progresssathish-progressAwaiting requested review from sathish-progresssathish-progress is a code owner automatically assigned from inspec/inspec-core-team

At least 1 approving review is required to merge this pull request.

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@balasubramanian-s@Nik08

[8]ページ先頭

©2009-2025 Movatter.jp