Permalink
Switch branches/tags
Nothing to show
Commits on Apr 26, 2010
  1. bumping version.

    phs committed Apr 26, 2010
  2. Version bump to 0.1.1

    phs committed Apr 26, 2010
  3. Wrapping lines to 100 chars or so.

    phs committed Apr 26, 2010
Commits on Apr 22, 2010
  1. Tweaking summary.

    phs committed Apr 22, 2010
  2. bumping version.

    phs committed Apr 22, 2010
  3. Version bump to 0.1.0

    phs committed Apr 22, 2010
  4. Version bump to 0.0.0

    phs committed Apr 22, 2010
  5. Toss on some docs, rename VersionNumber::REGEX to VERSION_NUMBER_REGE…

    phs committed Apr 22, 2010
    …X, tighten it up.
  6. Move versionable out into a library.

    phs committed Apr 22, 2010
    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.
  7. Initial commit to versionable.

    phs committed Apr 22, 2010