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 βοΈ):
api_chai π
ApiChai provides a simple integration with net-http around a lightweight layer for reporting and graceful error handling.
audit_tracker π
AuditTracker helps you centralize data tracking configuration to be used across different models.
camel_trail π
CamelTrail makes it easy to keep a history of attribute changes on a model.
consent π
Consent provides permission-based authorization.
cygnet π
Helping ruby developers implement easy patterns.
data_taster π
Delicious and sanitized data samples for development and testing.
dep_shield π
Enable alerts about deprecated features & prevent new ones from being introduced.
edgestitch π
Edgestitch allows engines to define partial structure-self.sql files to be stitched into a single structure.sql file by the umbrella application.
lumberaxe π
Lumberaxe handles logging output formatting.
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.
ostruct-sanitizer π
Rails-like sanitization hooks to be applied to OpenStruct fields.
@powerhome/eslint-config βοΈ
Shared eslint-config and Prettier formatting from Power Home Remodeling.
rabbet π
A shared layout so that your suite of applications can have the same look and feel.
rubocop-cobra π
This gem is focused on providing Cops to support a healthy cobra app development. See more in rubocop-cobra
.
rubocop-powerhome π
This gem is focused on providing standard rubocop configuration for Power Home Remodeling ruby apps. See more in rubocop-powerhome
.
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 or npm and you can use standard methods to install them.
For ruby gems:
# Gemfile
gem "nitro_config"
For JS modules:
# package.json
"devDependencies": {
"@powerhome/eslint-config": "0.1.0"
}
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"
For JS modules you can point your package.json to the local version of the package:
# package.json
"devDependencies": {
"@powerhome/eslint-config": "file:../path/to/eslint-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"
For JS modules you will need to use gitpkg.now.sh to point to a subfolder within a repository since NPM/Yarn doesn't support subfolder packages yet. Add to your package.json:
"@powerhome/eslint-config": "https://gitpkg.now.sh/powerhome/power-tools/packages/eslint-config?<branch-name>",
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.