jeweler snippets

Reading gem version from YAML

Tagged gem, rubygem, version, jeweler  Languages ruby

From Jekyll:

module YerGem
  def self.version
    yml = YAML.load(File.read(File.join(File.dirname(__FILE__), *%w[.. VERSION.yml])))
    "#{yml[:major]}.#{yml[:minor]}.#{yml[:patch]}"
  end
end