Code Monkey home page Code Monkey logo

gem_bootstrap's Introduction

gem_bootstrap

[Gem Version][gem] [Dependency Status][gemnasium] [Code Climate][codeclimate]

[gem]: http://badge.fury.io/rb/gem_bootstrap) [gemnasium]: https://gemnasium.com/agilecreativity/gem_bootstrap [codeclimate]: https://codeclimate.com/github/agilecreativity/gem_bootstrap

Generate the starting template for creating ruby gem in ruby in just one command.

First install the gem

gem install gem_bootstrap

then generate the new gem

gem_bootstrap awesome_gem --github-id awesome_developer --email [email protected] --author 'John Guru II'

or the short version

gem_bootstrap awesome_gem -g awesome_developer -e [email protected] -a 'John Guru II'

rather use rspec instead of the default minitest

gem_bootstrap awesome_gem -g awesome_developer -e [email protected] -a 'John Guru II' -t rspec

Note: this gem will be release following the Semantic Versioning start from 0.1.0

Features:

  • Test framework using Minitest or Rspec
  • Document with Yard
  • Style check with Rubocop
  • Debug with Pry
  • TDD/BDD with Guard
  • Initial git commit with Grit gem
  • Build on top of the most popular Thor framework
  • Give you simple working structure that you can build upon but not dictate on how you should do it
  • Templates files are customizable to suite your specific need

Requirements

Mandatory

  • Git the free and opensource distributed version control system.

Optional

  • Valid Github account so that you can share your awesome gem with the community.

Installation

Install the ruby gem

gem install gem_bootstrap

Then just run the gem_bootstrap without any argument for list of help

# Usage/Synopsis:
gem_bootstrap [GEM_NAME] -g, --github-id [GITHUB_ID] -e, --email [EMAIL] -a, --author [AUTHOR] --test-framework [FRAMEWORK]

# Create a gem name 'awesome_gem' with minitest as a testing framework (default)
gem_bootstrap awesome_gem -g awesome_developer -e [email protected] -a 'John Guru II'

# Create a gem name 'awesome_gem' with rspec as a testing framework
gem_bootstrap awesome_gem -g awesome_developer -e [email protected] -a 'John Guru II' -t rspec

Basic Usage

  • For testing with Minitest (default test framework)
gem_bootstrap awesome_gem --github-id awesome_developer --email [email protected] --author 'John Guru II'

Should see the output like:

create  awesome_gem/README.md
create  awesome_gem/CHANGELOG.md
create  awesome_gem/.yardopts
create  awesome_gem/.gitignore
create  awesome_gem/Gemfile
create  awesome_gem/.rubocop.yml
create  awesome_gem/bin/awesome_gem
create  awesome_gem/lib/awesome_gem.rb
create  awesome_gem/lib/awesome_gem/version.rb
create  awesome_gem/lib/awesome_gem/cli.rb
create  awesome_gem/lib/awesome_gem/awesome_gem.rb
create  awesome_gem/Rakefile
create  awesome_gem/Guardfile
create  awesome_gem/awesome_gem.gemspec
create  awesome_gem/test/test_helper.rb
create  awesome_gem/test/lib/awesome_gem/test_awesome_gem.rb
create  awesome_gem/LICENSE
gem_bootstrap awesome_gem --github-id awesome_developer --email [email protected] --author 'John Guru II' --test-framework rspec

Should see the output like:

create  awesome_gem/README.md
create  awesome_gem/CHANGELOG.md
create  awesome_gem/.yardopts
create  awesome_gem/.gitignore
create  awesome_gem/Gemfile
create  awesome_gem/.rubocop.yml
create  awesome_gem/bin/awesome_gem
create  awesome_gem/lib/awesome_gem.rb
create  awesome_gem/lib/awesome_gem/version.rb
create  awesome_gem/lib/awesome_gem/cli.rb
create  awesome_gem/lib/awesome_gem/awesome_gem.rb
create  awesome_gem/Rakefile
create  awesome_gem/Guardfile
create  awesome_gem/awesome_gem.gemspec
create  awesome_gem/spec/spec_helper.rb
create  awesome_gem/spec/lib/awesome_gem/awesome_gem_spec.rb
create  awesome_gem/LICENSE
# Change directory to the generated gem
cd awesome_gem

# Build the gem
bundle

# Run the default rake task (minitest and rubocop)
rake

# Install the gem to your local system
rake install

# You should have the basic command line that you can run like
awesome_gem
  • Now you are ready to add your own logic/implementation in ./awesome_gem/lib/awesome_gem.rb

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

gem_bootstrap's People

Contributors

agilecreativity avatar nicka avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nicka

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.