At Power Home Remodeling, we have created foundational bits of code that we use to configure our applications, several of which are cobra-based. We have packaged these individually inside a mono-repo to help engineers more easily maintain and consume them among our suite of applications, products and features.
power-tools currently contains the following packages (marked for release to rubygems ๐ or npm โ๏ธ):
nitro_config ๐
When included in a Rails application, NitroConfig loads the configuration file at config/config.yml
within the application directory and makes its values available at NitroConfig.config
. Config values are loaded based on the Rails environment, permitting the specification of multiple environments' configurations in a single file.
audit_tracker ๐
AuditTracker helps you centralize data tracking configuration to be used across different models.
lumberaxe ๐
Lumberaxe handles logging output formatting.
consent ๐
Consent provides permission-based authorization.
These packages are all meant to install inside of an application and aren't intended to stand alone; currently, they are all published to RubyGems and you can use standard Bundler methods to install them.
# Gemfile
gem "nitro_config"
If a change needs to be made to a package, the easiest way to develop and test locally would be to temporarily change your Gemfile to point to your local version of the package:
# Gemfile
gem "nitro_config", path: "~/path/to/gems/nitro_config"
The expectation for these packages is that additions/modifications should be covered in the specs.
UI testing will be done by opening a PR/branch, and then opening a PR for a client application that points to the version on the corresponding branch.
# Gemfile
gem "nitro_config", git: "https://github.com/powerhome/power-tools", glob: "packages/nitro_config/nitro_config.gemspec", branch: "example-branch"
Releases will be published according to Semantic Versioning and it is the responsibility of the consumers to keep their application dependencies up to date. We recommend leveraging renovatebot ๐ค
These packages are maintained by Power's Heroes for Hire team.
Contributions are welcome! Feel free to open a ticket or a PR.