0.0
No commit activity in last 3 years
No release in over 3 years
Using simple namespacing Versions.rb lets you load versions of your code on-demand.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 0.7
~> 0.10
~> 10.0
~> 1.1
~> 3.1
~> 0.9
 Project Readme

Versions.rb

"Ruby class versioning made simple."

Gem Version Build Status Code Climate Coverage Status

Ruby 1.9, 2.0, 2.1, and JRuby supported.

Quickstart

Install it:

gem install versions.rb

Create a version (lib/v1.0/awesome_feature.rb):

module V1_0
  class AwesomeFeature
    def foo
      :bar
    end
  end
end

Use it:

require 'versions'

VersionedFeature = Versions.for(:awesome_feature).select('1.0')
feature          = VersionedFeature.new

Configuration

File locations

By default Versions.rb will try to use a lib/ directory within the project root, you can override this:

Versions.config.base_dir = 'dir_path_of_your_choosing'

Alternatively you can override the base_dir for a single call as such:

Versions.for(:awesome_feature).at('./other/location').select('1.0')

Contributing

Please make appropriate use of Issues and Pull Requests. All code should have accompanying tests.

Author/Contact

Versions.rb is written and maintained by @doomspork

License

Versions.rb is made available under the MIT license.