-
Notifications
You must be signed in to change notification settings - Fork 30
Development
This gem was developed using the CLI Template, a generator tool that builds a starter CLI project.
Review and install required development dependencies in the .gemspec
. In addition you will need git-lfs
to checkout the project.
To run xlsx2inspec or pdf2inspec you'll need to generate the CIS mapping by running rake generate_mapping
from the project root.
To Be Determined
A complete pull request should include the following core elements if it contains new user-facing functionality (i.e. an API change):
- Updates to the documentation and examples in the project's
README.md
anddocs/
- New or additional unit tests for the functionality
- Example and/or template files (
metadata.yml
,example.yml
, etc.) if required - Scripts and/or scaffolding code for the example and/or template files (
CliCommand#generate_map
is an example) - Example output of the new functionality if it produces an artifact
We would prefer to see commits and pull requests with the following elements:
- GPG signed commits
- A hint to the maintainers about how to increment the project's version. See https://semver.org/ for more information about how this project is versioned. You can also include a
#major
,#minor
, or#patch
somewhere within the final commit message and pull request to automatically tell the version workflow what to do. - When working on a new feature or bugfix and there are multiple test or experimental commits, squash into a single commit or rebase them logically with
git rebase -i HEAD~<num_commits_back_to_edit>
. - Commit messages that are descriptive enough to make sense in the
CHANGELOG.md
- A hint for the maintainers to assign the appropriate label to the pull request.
The changelog is generated automatically by github-changelog-generator. It depends on pull request labels to properly format the change log.
There are a set of unit tests. Run bundle exec rake test
to run the tests locally. These tests also run automatically within the Continuous Integration/Continuous Deployment pipeline as part of every push to master and new pull request. Pull requests that are merged without passing tests are considered on a case-by-case basis.
Releases are managed by the project maintainers. "As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready" thanks to the Release Drafter. To release a new version, go to the releases and locate the latest draft release. Confirm and review the contents of the release and publish it.
Now a release must be published to https://rubygems.org/:
- Build the gem:
gem build inspec_tools.gemspec
- Publish the gem:
gem push inspec_tools-<current_version>.gem
There is a plan to automate this release process with GitHub actions in the future so that after a release is published, the gem build and push happens automatically in the background.