Verning
Versioning for methods, modules or classes
Install
gem install verning
Reference
versioned_method
Select a method that matches the conditions given with block.
require "verning"
class Klass
RELEASE_DATE = Date.parse("2014-3-26")
def foo
:foo
end
def foo_fearture
:foo_feature
end
versioned_method :foo, :foo_feature do
Date.today >= RELEASE_DATE
end
end
versioned_module/versioned_class
Select a module/class that matches the conditions given with block.
require "verning"
RELEASE_DATE = Date.parse("2014-3-26")
class Foo; end
class FooFeature; end
versioned_module Foo, FooFeature do
Date.today >= RELEASE_DATE
end
Releaser
Releaser release if the conditions are releaseable. The conditions defined with YAML.
super_pop_campaing:
date:
start: "2014-02-07"
end: "2014-02-07"
Use this like :
require "verning"
# Load releaser from yaml
Verning.releaser = YAML.file_load "releaser.yml"
class Klass
def :foo; end
def :foo_feature; end
# set release name
versioned_method :foo, :foo_feature, :super_pop_campaing
end
License
Verning is released under the MIT license: