Skip to content

TwilightCoders/gemplate

Repository files navigation

Dynamic Version Badge CI Maintainability Test Coverage GitHub License

Gemplate

Gemplate is a Ruby gem generator that creates new gems with established best practices, testing setup, and CI configuration. Install it once and generate as many gems as you need!

Installation

Install from GitHub Packages:

# Configure GitHub Packages as a gem source (one-time setup)
bundle config set --global https://rubygems.pkg.github.com/twilightcoders <your_github_token>

# Install the gem
gem install gemplate --source https://rubygems.pkg.github.com/twilightcoders

Or add to your Gemfile:

source "https://rubygems.pkg.github.com/twilightcoders" do
  gem "gemplate"
end

Usage

Create a new gem:

gemplate new my_awesome_gem
cd my_awesome_gem
bundle install
rake spec

Generated Gem Features

Each generated gem includes:

  • Modern Ruby gem structure following current conventions
  • RSpec testing framework with sample tests
  • Rake tasks for common development operations
  • Bundler integration for dependency management
  • CI/CD ready with placeholder badge configuration
  • Git repository with sensible .gitignore
  • MIT License template
  • Development dependencies pre-configured

Commands

gemplate new GEM_NAME    # Create a new gem
gemplate version         # Show version
gemplate help            # Show help

Generated Gem Structure

my_awesome_gem/
├── lib/
│   ├── my_awesome_gem.rb           # Main gem file
│   └── my_awesome_gem/
│       └── version.rb              # Version specification
├── spec/
│   ├── spec_helper.rb              # RSpec configuration
│   └── my_awesome_gem/
│       └── my_awesome_gem_spec.rb  # Sample tests
├── my_awesome_gem.gemspec          # Gem specification
├── Gemfile                         # Dependencies
├── Rakefile                        # Rake tasks
├── README.md                       # Documentation
├── LICENSE.txt                     # MIT License
└── .gitignore                      # Git ignore rules

Development

After generating a gem, customize it:

  1. Update the gemspec with your details, description, and dependencies
  2. Implement your functionality in the main lib file
  3. Write tests using the included RSpec setup
  4. Update README with usage instructions
  5. Release when ready using rake release

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/TwilightCoders/gemplate.

License

The gem is available as open source under the terms of the MIT License.

About

Self-referencing Ruby Gem templating... gem

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages