https://github.com/twilightcoders/gemplate
Self-referencing Ruby Gem templating... gem
https://github.com/twilightcoders/gemplate
Last synced: 10 months ago
JSON representation
Self-referencing Ruby Gem templating... gem
- Host: GitHub
- URL: https://github.com/twilightcoders/gemplate
- Owner: TwilightCoders
- License: mit
- Created: 2025-07-24T20:29:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-25T20:15:36.000Z (about 1 year ago)
- Last Synced: 2025-08-07T21:48:52.669Z (about 1 year ago)
- Language: Ruby
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Dynamic Version Badge]()](https://github.com/TwilightCoders/gemplate/pkgs/rubygems/gemplate)
[](https://github.com/TwilightCoders/gemplate/actions/workflows/ci.yml)
[](https://qlty.sh/TwilightCoders/gemplate)
[](https://qlty.sh/gh/TwilightCoders/projects/gemplate/metrics/code?sort=coverageRating)

# 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:
```bash
# Configure GitHub Packages as a gem source (one-time setup)
bundle config set --global https://rubygems.pkg.github.com/twilightcoders
# Install the gem
gem install gemplate --source https://rubygems.pkg.github.com/twilightcoders
```
Or add to your Gemfile:
```ruby
source "https://rubygems.pkg.github.com/twilightcoders" do
gem "gemplate"
end
```
## Usage
Create a new gem:
```bash
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
```bash
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](http://opensource.org/licenses/MIT).