-
Notifications
You must be signed in to change notification settings - Fork 3
Rename to OpenFact #20
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ef4432f
Rename to OpenFact
smortex 9f71210
grammar correction
jessereynolds 99a232b
one sentence per line
jessereynolds 288c113
one sentence per line
jessereynolds 788dfd0
Merge branch 'main' into openfact
jessereynolds b2fb510
Update and fix the `rake changelog` task
smortex ae79ca0
Pet rubocop
smortex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: Gem Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
name: Release gem | ||
runs-on: ubuntu-24.04 | ||
# Optional but recommended to use a specific environment | ||
environment: release | ||
# Prevent releases from forked repositories | ||
if: github.repository_owner == 'OpenVoxProject' | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- uses: voxpupuli/ruby-release@v0 | ||
- name: Setup GitHub packages access | ||
run: | | ||
mkdir -p ~/.gem | ||
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
- name: Publish gem to GitHub packages | ||
run: gem push --key github --host https://rubygems.pkg.github.com/openvoxproject *.gem | ||
- name: Create Release Page | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh release create ${{ github.ref_name }} --generate-notes | ||
- name: Attach gem to GitHub Release | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh release upload ${{ github.ref_name }} *.gem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Prepare Release' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to be released.' | ||
required: false | ||
default: '' | ||
type: string | ||
base-branch: | ||
description: 'The branch that will be used as the origin for the release branch.' | ||
required: false | ||
default: '' | ||
type: string | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
prepare_release: | ||
uses: OpenVoxProject/shared-actions/.github/workflows/prepare_release.yml@main | ||
with: | ||
allowed_owner: 'OpenVoxProject' | ||
base-branch: ${{ github.event.inputs.base-branch }} | ||
version: ${{ github.event.inputs.version }} | ||
secrets: | ||
github_pat: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} | ||
ssh_private_key: ${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,28 @@ | ||
--- | ||
name: Gem Release | ||
name: 'Release' | ||
bastelfreak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to be released.' | ||
required: false | ||
default: '' | ||
type: string | ||
base-branch: | ||
description: 'The branch where we do this release.' | ||
required: false | ||
default: '' | ||
type: string | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
name: Release gem | ||
runs-on: ubuntu-24.04 | ||
# Optional but recommended to use a specific environment | ||
environment: release | ||
# Prevent releases from forked repositories | ||
if: github.repository_owner == 'OpenVoxProject' | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
# we cannot publish to rubygems.org until we rename the project | ||
# https://rubygems.org/gems/vanagon owned by Perforce | ||
# - uses: voxpupuli/ruby-release@v0 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.4' | ||
env: | ||
BUNDLE_WITHOUT: integration:documentation:development:test | ||
- name: Build gem | ||
run: gem build --strict --verbose *.gemspec | ||
- name: Setup GitHub packages access | ||
run: | | ||
mkdir -p ~/.gem | ||
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
- name: Publish gem to GitHub packages | ||
run: gem push --key github --host https://rubygems.pkg.github.com/openvoxproject *.gem | ||
- name: Create Release Page | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh release create ${{ github.ref_name }} --generate-notes | ||
uses: OpenVoxProject/shared-actions/.github/workflows/release.yml@main | ||
with: | ||
allowed_owner: 'OpenVoxProject' | ||
base-branch: ${{ github.event.inputs.base-branch }} | ||
version: ${{ github.event.inputs.version }} | ||
secrets: | ||
github_pat: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} | ||
ssh_private_key: ${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# facter | ||
# openfact | ||
|
||
[](https://badge.fury.io/rb/facter) | ||
[<img src="https://img.shields.io/badge/slack-puppet--dev-brightgreen?logo=slack">](https://puppetcommunity.slack.com/messages/C0W1X7ZAL) | ||
[](https://badge.fury.io/rb/openfact) | ||
|
||
[](https://github.com/puppetlabs/facter/actions) | ||
[](https://github.com/puppetlabs/facter/actions) | ||
[](https://github.com/puppetlabs/facter/actions) | ||
|
||
Facter is a command-line tool that gathers basic facts about nodes (systems) | ||
OpenFact is a community implementation of [Facter](https://github.com/puppetlabs/facter/), a command-line tool that gathers basic facts about nodes (systems) | ||
such as hardware details, network settings, OS type and version, and more. | ||
These facts are made available as variables in your Puppet manifests and can be | ||
used to inform conditional expressions in Puppet. | ||
|
@@ -17,6 +12,10 @@ used to inform conditional expressions in Puppet. | |
Documentation for the Facter project can be found on the [Puppet Docs | ||
site](https://puppet.com/docs/puppet/latest/facter.html). | ||
|
||
At the time of writing, the OpenVoxProject does not have a documentation website. | ||
But your help is very welcome! | ||
Reach out to the [Documentation Special Interest Group](https://github.com/voxpupuli/community-triage/wiki/SIG.Documentation) if you want to help. | ||
|
||
## Supported platforms | ||
* Linux | ||
* macOS | ||
|
@@ -32,7 +31,7 @@ site](https://puppet.com/docs/puppet/latest/facter.html). | |
The project has three main parts, the framework, facts and resolvers. | ||
In the framework we implement functionality that is agnostic of specific facts like parsing user input, formatting output, etc. | ||
|
||
Facts are the nuggets of information that will be provided by facter e.g. `os.name`, `networking.interfaces`, etc. | ||
Facts are the nuggets of information that will be provided by openfact e.g. `os.name`, `networking.interfaces`, etc. | ||
|
||
Resolvers have the role of gathering data from the system. | ||
For example a resolver can execute a command on the system, can read a file or any operation that retrieves some data from a single source on the system. | ||
|
@@ -54,17 +53,14 @@ sequenceDiagram | |
## Getting started | ||
After cloning the project, run `bundle install` to install all dependencies. | ||
|
||
You can run facter by executing `./bin/facter`. | ||
The command will output all the facts that facter detected for the current OS. | ||
You can run openfact by executing `./bin/facter`. | ||
The command will output all the facts that openfact detected for the current OS. | ||
|
||
The implementation can be validated locally by running `bundle exec rake check`. | ||
|
||
## Goals - fast, easy, compatible | ||
* Gain performance similar to the C++ version of Facter. We plan to achieve this goal by gathering multiple facts with only one call and by using the faster Win32 API rather than WMI for the Windows implementation. | ||
* Facilitate community contribution. At the moment, C++ presents a possible impediment for community contributions. | ||
* Enable native integration with other Ruby-based projects such as Bolt and puppet. | ||
* Enable native integration for custom facts. | ||
* Provide 100% compatibility with C++ Facter (drop-in replacement). | ||
|
||
## Licensing | ||
See [LICENSE](https://github.com/puppetlabs/facter/blob/main/LICENSE) file. Puppet is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: [email protected] | ||
See [LICENSE](LICENSE) file. | ||
OpenFact is licensed by the OpenVox Project as a community maintained implementation of Facter. | ||
The OpenVox Project can be contacted at: [email protected]. | ||
Puppet itself is licensed by Puppet, Inc. under the Apache license. | ||
Puppet, Inc. can be contacted at: [email protected]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ lib = File.expand_path('lib', __dir__) | |
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'facter' | ||
spec.name = 'openfact' | ||
spec.version = '4.11.0' | ||
spec.authors = ['Puppet'] | ||
spec.email = ['[email protected]'] | ||
spec.homepage = 'https://github.com/puppetlabs/facter' | ||
spec.authors = ['OpenVox Project'] | ||
spec.email = ['[email protected]'] | ||
spec.homepage = 'https://github.com/OpenVoxProject/openfact/' | ||
|
||
spec.summary = 'Facter, a system inventory tool' | ||
spec.summary = 'OpenFact, a system inventory tool' | ||
spec.description = 'You can prove anything with facts!' | ||
spec.license = 'Apache-2.0' | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.