├── FUNDING.yml ├── SECURITY.md ├── CODE_OF_CONDUCT.md ├── workflow-templates ├── gem-release.properties.json ├── gem-release.svg └── gem-release.yml └── CONTRIBUTING.md /FUNDING.yml: -------------------------------------------------------------------------------- 1 | --- 2 | open_collective: vox-pupuli 3 | github: voxpupuli 4 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Vox Pupuli Security Policy 2 | 3 | Our vulnerabilities reporting process is at https://voxpupuli.org/security/ 4 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | You can find our Code of Conduct at [voxpupuli.org/coc/](https://voxpupuli.org/coc/). 4 | -------------------------------------------------------------------------------- /workflow-templates/gem-release.properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gem Release Workflow", 3 | "description": "Release a gem on tag push to Rubygems and Github.", 4 | "iconName": "gem-release", 5 | "categories": [ 6 | "Ruby" 7 | ], 8 | "filePatterns": [ 9 | ".+\\.gemspec$" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /workflow-templates/gem-release.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /workflow-templates/gem-release.yml: -------------------------------------------------------------------------------- 1 | name: Release Gem 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: read 13 | packages: write 14 | if: github.repository_owner == 'voxpupuli' 15 | steps: 16 | - uses: actions/checkout@v2 17 | - name: Install Ruby 3.0 18 | uses: ruby/setup-ruby@v1 19 | with: 20 | ruby-version: '3.0' 21 | - name: Build gem 22 | run: gem build *.gemspec 23 | - name: Publish gem to rubygems.org 24 | run: gem push *.gem 25 | env: 26 | GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}' 27 | - name: Setup GitHub packages access 28 | run: | 29 | mkdir -p $HOME/.gem 30 | touch $HOME/.gem/credentials 31 | chmod 0600 $HOME/.gem/credentials 32 | echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> $HOME/.gem/credentials 33 | - name: Publish gem to GitHub packages 34 | run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem 35 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | 3 | ## Table of contents 4 | 5 | * [Contributing](#contributing) 6 | * [Writing proper commits - short version](#writing-proper-commits-short-version) 7 | * [Writing proper commits - long version](#writing-proper-commits-long-version) 8 | * [Make separate commits for logically separate changes](#make-separate-commits-for-logically-separate-changes) 9 | * [Sending your patches](#sending-your-patches) 10 | * [Update the related GitHub issue](#update-the-related-gitHub-issue) 11 | * [Puppet development and testing](#puppet-development-and-testing) 12 | * [The test matrix](#the-test-matrix) 13 | * [Syntax and style](#syntax-and-style) 14 | * [Running the unit tests](#running-the-unit-tests) 15 | * [Integration tests](#integration-tests) 16 | * [Gem development and testing](#gem-development-and-testing) 17 | 18 | This project has grown over time based on a range of contributions from people using it. 19 | If you follow these contributing guidelines your patch will likely make it into a release a little more quickly. 20 | 21 | ## Contributing 22 | 23 | Please note that this project is released with a Contributor Code of Conduct. 24 | By participating in this project you agree to abide by its terms [Contributor Code of Conduct](https://voxpupuli.org/coc/). 25 | 26 | * Fork the repo. 27 | * Create a separate branch for your change. 28 | * We only take pull requests with passing tests, and documentation. [GitHub Actions](https://docs.github.com/en/actions) run the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix). 29 | * For Puppet Code: Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/latest/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request. 30 | * Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test. 31 | * Squash your commits down into logical components. Make sure to rebase against our current HEAD branch. You don't have to squash everything into a single commit. 32 | * Push the branch to your fork and submit a pull request. 33 | 34 | Please be prepared to repeat some of these steps as our contributors review your code. 35 | 36 | If this is a Puppet Module: Also consider sending in your profile code that calls this component module as an acceptance test or provide it via an issue. This helps reviewers a lot to test your use case and prevents future regressions! 37 | 38 | ## Writing proper commits - short version 39 | 40 | * Make commits of logical units. 41 | * Check for unnecessary whitespace with `git diff --check` before committing. 42 | * Commit using Unix line endings (check the settings around "crlf" in git-config(1)). 43 | * Do not check in commented out code or unneeded files. 44 | * The first line of the commit message should be a short description (50 characters is the soft limit, excluding ticket number(s)), and should skip the full stop. 45 | * The body should provide a meaningful commit message, which: 46 | * uses the imperative, present tense: `change`, not `changed` or `changes`. 47 | * includes motivation for the change, and contrasts its implementation with the previous behavior. 48 | * Make sure that you have tests for the bug you are fixing, or feature you are adding. 49 | * Make sure the test suites passes after your commit: 50 | * When introducing a new feature, make sure it is properly documented in the README.md 51 | * A detailed explanation is also available at [cbea.ms/git-commit](https://cbea.ms/git-commit/) 52 | 53 | ## Writing proper commits - long version 54 | 55 | ### Make separate commits for logically separate changes 56 | 57 | Please break your commits down into logically consistent units which include new or changed tests relevant to the rest of the change. 58 | The goal of doing this is to make the diff easier to read for whoever is reviewing your code. 59 | In general, the easier your diff is to read, the more likely someone will be happy to review it and get it into the code base. 60 | 61 | If you are going to refactor a piece of code, please do so as a separate commit from your feature or bug fix changes. 62 | 63 | We also really appreciate changes that include tests to make sure the bug is not re-introduced, and that the feature is not accidentally broken. 64 | 65 | Describe the technical detail of the change(s). If your description starts to get too long, that is a good sign that you probably need to split up your commit into more finely grained pieces. 66 | 67 | Commits which plainly describe the things which help reviewers check the patch and future developers understand the code are much more likely to be merged in with a minimum of bike-shedding or requested changes. 68 | Ideally, the commit message would include information, and be in a form suitable for inclusion in the release notes for the version of Puppet that includes them. 69 | 70 | Please also check that you are not introducing any trailing whitespace or other "whitespace errors". 71 | You can do this by running `git diff --check` on your changes before you commit. 72 | 73 | ### Sending your patches 74 | 75 | To submit your changes via a GitHub pull request, we _highly_ recommend that you have them on a topic branch, instead of directly on your default HEAD branch (usually `main` or `master`). 76 | It makes things much easier to keep track of, especially if you decide to work on another thing before your first change is merged in. 77 | Vox Pupuli Maintainers have the option to rebase the source branch of a pull request, and you don't want that to happen in your HEAD branch. 78 | 79 | GitHub has some pretty good [general documentation](http://support.github.com/) on using their site. 80 | They also have documentation on [creating pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). 81 | 82 | In general, after pushing your topic branch up to your repository on GitHub, you can switch to the branch in the GitHub UI and click "Pull Request" towards the top of the page in order to open a pull request. 83 | 84 | ### Update the related GitHub issue 85 | 86 | If there is a GitHub issue associated with the change you submitted, then you should update the ticket to include the location of your branch, along with any other commentary you may wish to make. 87 | 88 | ## Puppet testing 89 | 90 | [How to run the test suite](https://voxpupuli.org/docs/how_to_run_tests/) 91 | 92 | ## Gem development and testing 93 | 94 | At the moment Vox Pupuli does not have a unified test setup for gems. 95 | The majority of them use [rspec](https://rspec.info/) tests. 96 | Some also [cucumber](https://cucumber.io/). 97 | 98 | Our goal is that running `bundle exec rake` always executes the whole test matrix. 99 | If this isn't yet the case for a project you're working on, please [let us know](https://voxpupuli.org/contributing/). 100 | Usually there's also a rake task named `test` or `spec`. 101 | You can list all available rake tasks with `bundle exec rake --tasks`. 102 | All our gems run tests in GitHub Actions. 103 | You can always check `.github/workflows/` and check what the CI does. 104 | --------------------------------------------------------------------------------