felipedmesquita / power-tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PowerTools

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.

Packages πŸ“¦

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.

rubocop-powerhome πŸ’Ž

This gem is focused on providing standard rubocop configuration for Power Home Remodeling ruby apps. See more in rubocop-powerhome.

rubocop-cobra πŸ’Ž

This gem is focused on providing Cops to support a healthy cobra app development. See more in rubocop-cobra.

@powerhome/eslint-config β˜•οΈ

Shared eslint-config and Prettier formatting from Power Home Remodeling.

cygnet πŸ’Ž

Helping ruby developers implement easy patterns.

rabbet πŸ’Ž

A shared layout so that your suite of applications can have the same look and feel.

edgestitch πŸ’Ž

Edgestitch allows engines to define partial structure-self.sql files to be stitched into a single structure.sql file by the umbrella application.

Installation πŸ› 

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"
}

Local Development πŸ‘©πŸ½β€πŸ’»

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"
}

⚠️ Please note that such a change should never be committed, as other users would not have access to the same path your computer. ⚠️

Testing πŸ”

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>",

Release πŸš€

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 πŸ€–

Maintenance 🚧

These packages are maintained by Power's Heroes for Hire team.

Contributing πŸ’™

Contributions are welcome! Feel free to open a ticket or a PR.

About

License:MIT License


Languages

Language:Ruby 97.5%Language:JavaScript 1.1%Language:HTML 0.7%Language:Shell 0.3%Language:SCSS 0.3%