bundler-gem_bytes gem
This gem is a bundler plugin that can add testing, linting, and security frameworks to a Ruby gem project.
This project is similar to the RailsBytes project which helps add configuration to a Rails project.
GemBytes scripts are run via the bundler gem-bytes
command:
bundler gem-bytes PATH_OR_URI
where PATH_OR_URI
identifies a gem-bytes script.
See the repository of GemBytes scripts for publicly available GemBytes scripts.
NOTE: the GemBytes repository is not yet active. For now, you will have to bring your own script
- Installation
- Usage
- Example
- Handling Errors
- Development
- Contributing
- Commit message guidelines
- Pull request guidelines
- License
- Code of Conduct
Installation
Install this bundler plugin as follows:
bundle plugin install bunder-gem_bytes
Usage
The bundler gem-bytes
command requires exactly one argument, which can either be a
file path or a URI to a script. The script will be loaded and executed within the
context of your project.
Example
- Find a template script for a feature you'd like to add to your gem and make a note of its URI.
- Run
bundler gem-bytes PATH_OR_URI
wherePATH_OR_URI
is either a local file path or a remote URI. - The script will be executed to add the relevant feature to your project.
Handling Errors
If the file or URI cannot be loaded, an error message will be printed to stderr
,
and the command will exit with a status code of 1
.
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run
rake
to run all the tests that will be run in the continuous-integration
workflow. You can also run bin/console
for an interactive prompt that will allow
you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To
release a new version, update the version number in version.rb
, and then run
bundle exec rake release
, which will create a git tag for the version, push git
commits and the created tag, and push the .gem
file to
rubygems.org.
To install this bundler plugin from the source code, run the following command from the project's root directory:
bundler plugin install --path . bundler-gem_bytes
and then run bundler plugin list
to make sure it was installed correctly:
$ bundler plugin list
bundler-gem_bytes
-----
gem-bytes
$
Once installed, the bundler plugin can be run with the following command:
bundler gem-bytes
To uninstall the plugin, run:
bundler uninstall bundler-gem_bytes
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/main-branch/bundler-gem_bytes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Commit message guidelines
All commit messages must follow the Conventional Commits standard. This helps us maintain a clear and structured commit history, automate versioning, and generate changelogs effectively.
To ensure compliance, this project includes:
-
A git commit-msg hook that validates your commit messages before they are accepted.
To activate the hook, you must have node installed and run
npm install
. -
A GitHub Actions workflow that will enforce the Conventional Commit standard as part of the continuous integration pipeline.
Any commit message that does not conform to the Conventional Commits standard will cause the workflow to fail and not allow the PR to be merged.
Pull request guidelines
All pull requests must be merged using rebase merges. This ensures that commit messages from the feature branch are preserved in the release branch, keeping the history clean and meaningful.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Bundler::GemBytes project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.