gemology

gem·ol·o·gy noun -jē_ _:__ The science of gems.

Documentation

Gem GitHub

What this is

Gemology is a command line utlity that helps with day to day Ruby gem development.

How to install

gem install gemology

How to use

Commands

init

Create a new directory, open up your terminal, and run

gemology init

This will create a Gemology file in the directory.
If you have a ~/.gemology file, we simply copy that into the current directory.

init

project = Gemology::Project.new
project.setup do # THIS IS WHAT IS IN 'Gemology' FILE

  # No default! User must set.
  #
  # This method enables the following commands:
  #   gemology build gemspec # Generates the gemspec
  #   gemology build gem # Builds gemspec from specification below
  #   gemology push gem # Push the gem to rubygems.org
  # 
  # This also adds the following to `.gitignore` if it exists and none  
  # of the following lines (without the comments) are already included in it:
  #   pkg # Where .gem files compile to. Can override by setting :build_dir.
  #   *.gemspec # Some people prefer to hide it... some don't. 
  #             # Set :gitignore_gemspec to false to not include in gitignore.
  specification :build_dir => "pkg", :gitignore_gemspec => true do
    # Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
    name        "my_proj_name"
    summary     "A one-line summary of your project"
    description "A longer description of your project"
    email       "my_email@my_domain.com"
    homepage    "http://github.com/my_username/my_proj_name"
    authors     ["John Doe"]
  end
  # Same as:
  # 
  #   specification :name        => "my_proj_name", 
  #                 :summary     => "A one-line summary of your project",
  #                 :description => "A longer description of your project",
  #                 :email       => "my_email@my_domain.com",
  #                 :homepage    => "http://github.com/my_username/my_proj_name",
  #                 :authors     => ["John Doe"]
  # 
  # The gist? All method's arguments here can have a Hash as an argument or a block.. or both!
  # 
  #   my_spec = { :name        => "my_proj_name", 
  #               :summary     => "A one-line summary of your project",
  #               :description => "A longer description of your project" }
  #   
  #   specification(my_spec) do
  #       email       "my_email@my_domain.com"
  #       homepage    "http://github.com/my_username/my_proj_name"
  #       authors     ["John Doe"]
  #   end

  #++
  # Version
  #--

  # This method enables the following commands:
  #   gemology version # Prints the current project.version
  #   gemology version /\d\.\d\.\d/ # Sets the version manually
  #   gemology version bump /( (?:M|major)|(?:m|minor)|(?:p|patch) )/ # Bumps the selected version section up by 1
  #     version bump major
  #     version bump M
  #     version bump minor
  #     version bump m
  #     version bump patch
  #     version bump p
  # 
  # This also adds the following to `.gitignore` if the file `VERSION` exists and none  
  # of the following lines (without the comments) are already included in it:
  #   VERSION # 
  # 

  has_version :format = "%M.%m.%p" # Will check for Library::VERSION, otherwise generate './VERSION'
  # Same as:
  # 
  #   has_version do
  #     format "%M.%m.%p"
  #   end


  # https://github.com/fcoury/octopi 
  # Creates a repo is it doesnt exist
  # usually uses project.specification.name but can use custom
  has_github
end

How to set defaults

Create the file ~/.gemology and set it up as a normal Gemology file.
It's as simple as that! The default is just an instance of Gemology::Project.

Contributing to gemology

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright (c) 2011 Ryan Scott Lewis. See LICENSE for further details.