Table of Contents
- Why use gbud?
- Why not bundler?
- Getting started
- Code Style
This project aims to simplify the initialization of a Ruby project by setting up the appropriate directories and files needed. By default, projects created by
gbud are GPL-3.0 compliant, although support for the LGPL-3.0 is on the way;
gbud will never support instantiating non-free projects.
Documentation can be found here.
Why Use gbud?
gbud rapidly scaffolds a new gem for you, allowing you to skip the tedious part of building out a gem manually. It automatically protects the freedom of your code by including the GPL with your project, providing command-line options for users to get copyright and warranty information for your project, as well as inserting boilerplate GPL copyright notices on each of the source files for the project. Future efforts will allow selection of the LGPL as an alternative to the GPL.
Why Not bundler?
gbud does not aim to solve the same problem that
bundler solves, and there is no reason why you can't instantiate a project with
gbud and use
bundler for dependency management. However,
bundler did not meet my requirements for creating a project from scratch (i.e. the way I want it done), thus I produced this gem to meet my own need. I hope it also proves useful to you, and anyone is welcome to recommending or implementing reasonable changes and enhancements to
To install from RubyGems, execute:
gem install gbud
Alternatively, you could build from source:
git clone https://github.com/d3d1rty/gbud.git cd gbud gem build gbud.gemspec gem install ./gbud-0.0.4.gem
Navigate to the directory you want to hold the project
gbud -n NAME where
NAME is the name for your project
Answer the prompts to set the required information for the project
Based off your input, gbud will generate
- a skeleton directory for the project
- an executable (if CLI is specified)
- main script
- library file
- namespace file
- test script
Navigate to the generated project directory
Get the dependencies with
rake test to verify everything is good to go
# Run rubocop for the entire project bundle exec rubocop # Run rubocop for a specific file bundle exec rubocop foo/bar.rb
Comment any code contributions according to the existing conventions within the project. Reference the examples listed below:
Example top-level comment:
## # = ClassNameGoesHere # Author:: Dick Davis (+/- individual contributors) # Copyright:: Copyright 2017 Dick Davis # License:: GNU Public License 3 # # This is a class that is something and does something.
Example method comment:
## # This is a method that does something
# Run custom rake task to regenerate RDoc documentation rake rdoc
Integration tests should be written for all classes and methods. The test suite
can be run manually
bundle exec rake test or automatically using guard
bundle exec guard.
--lgploption for generating LGPL protected code
- Increase test coverage.
- Updated to version
- Upgraded Ruby version to
- Fixed namespace file generation.
- Various style fixes for compliance with Rubocop.
- Made helper methods of ProjectBuilder to make code more DRY.
- Refactored templates to take advantage of new helpers and partials.
- Added error handling for optparse.
- Updated gem dependencies.
- Removed guard dependency.
- ...and more.
- Upgraded to version
- Upgraded Ruby version to
- Decoupled asset and template logic.
- Enforced commenting consistency across templates and files.
- Corrected dependencies in