Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Apr 26, 2010
  1. bumping version.

    authored
  2. Version bump to 0.1.1

    authored
  3. Wrapping lines to 100 chars or so.

    authored
Commits on Apr 22, 2010
  1. Tweaking summary.

    authored
  2. bumping version.

    authored
  3. Version bump to 0.1.0

    authored
  4. Version bump to 0.0.0

    authored
  5. Move versionable out into a library.

    authored
    The jist:
    
    class Versioned
      include Versionable
    
      def foo; :past_foo; end
      def baz; :baz; end
    
      version "1"
    
      def foo; :foo; end
      def self.bar; :bar; end
    
      version "2" do
        def foo; :future_foo; end
      end
    
      version "3" do
        def foo; :far_future_foo; end
      end
    end
    
    Versioned['0'].new.foo                  # => :past_foo
    Versioned['1'].new.foo                  # => :foo
    Versioned['2'].new.foo                  # => :future_foo
    Versioned['3'].new.foo                  # => :far_future_foo
    Versioned == Versioned['1']             # => true
    Versioned['>= 1'] == Versioned['3']     # => true
    Versioned['< 3'] == Versioned['2']      # => true
    
    Turns out Class#dup can do some crazy things.
    
    The default version (the one you get without a [requirement]) is
    determined by the use of blocks passed to the .version calls.  The
    last call without a block is the default one.
  6. Initial commit to versionable.

    authored
Something went wrong with that request. Please try again.