Git Product home page Git Product logo

simple_gem's Introduction

Simple Gem

Contains tools, libraries, and rake tasks for creating gems.

Attempts to be as lightweight and non-intrusive as possible, minimizing code-gen

Creating a new gem

Synopsis:

gem skeleton my_gem

Note the output of the command - it will tell you to update the gemspec among a couple other things to get you started.

The new gem may be built and tested out of the box.

Environment variables

By default, the gem will be populated with a LICENSE.txt file containing the MIT license and a copyright with your global git user.name config value. You can override the copyright by setting the SIMPLE_GEM_LICENSE_COPYRIGHT environment variable.

Building a gem

There are two rake tasks–build and build_dev–that let you create either a new permenant versioned build of the gem or a temporary development build.

rake build

To build a new permanent version, first update the lib/gem_name/version.rb file appropriately (major, minor, or build version) and/or CHANGELOG if there is one, then commit it and tag it with the new version number (you can do this with “rake tag”). Build the gem using “rake build” which will create a gem file in the gems/ directory. Then simply deploy it to the desired repository (ie. “gem push gems/my_gem-version.gem”, or “gem inabox gems/my_gem-version.gem”) and install it locally.

Here’s a quick synopsis:

vim lib/gem_name/version.rb  # update version number appropriately
vim CHANGELOG                # add change info
git add .
git commit
rake tag
git push origin master
git push --tags origin
rake build
gem push gems/gem_name-0.0.0.gem  # alternatively, "gem inabox gems/gem_name-0.0.0.gem"
gem install gem_name

Note that once you build and deploy a gem, you shouldn’t try to undo it - that should be a released version forever. If you need to fix an error, patch it, increment its build version, and deploy it using these same steps.

rake build_dev

At any time, you can run rake build_dev, which will add a patch version to the current version number and build a gem file into the gems_dev folder. Install it with “gem install gems_dev/my_gem-version.gem,” and then you can use it in other projects to try it out before permanently versioning it.

simple_gem's People

Contributors

daws avatar

Watchers

 avatar

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.