Permalink
Commits on Aug 7, 2016
  1. version_sorter 2.1.0

    mislav committed Aug 7, 2016
  2. Merge pull request #10 from eReGeBe/master

    Add optional block to allow sorting of arrays of arbitrary objects
    mislav committed on GitHub Aug 7, 2016
Commits on Jul 10, 2016
Commits on Oct 22, 2015
Commits on Feb 19, 2015
  1. Improve script/release

    Now handles creating the release commit
    mislav committed Feb 19, 2015
  2. Add script/release

    mislav committed Feb 19, 2015
  3. version_sorter 2.0.0

    mislav committed Feb 19, 2015
  4. Remove now unnecessary gitattributes file

    It remained from the era where an Xcode project was checked into the repo
    mislav committed Feb 19, 2015
  5. Nicer README

    mislav committed Feb 19, 2015
  6. Merge pull request #7 from github/enable-travis

    Enable travis
    mislav committed Feb 19, 2015
  7. Record a new benchmark baseline after C changes

    It seems like recent C changes might have reduced the standard deviation
    in `sort`, but not significantly, and it varied during runs:
    
        VersionSorter .sort
          Baseline: |                                                  X---------------|
          Current:  |                                                  X-----          |
                    0                                                         744.500 us
    
        VersionSorter .rsort
          Baseline: |                                                          X-------|
          Current:  |                                                           X------|
                    0                                                         642.000 us
    
    Recording the new baseline just in case.
    mislav committed Feb 19, 2015
  8. Add tests for `sort!` and `rsort!`

    mislav committed Feb 19, 2015
  9. Ensure we always have a string...

    vmg committed with mislav Feb 18, 2015
  10. Update extconf.rb

    vmg committed with mislav Feb 18, 2015
  11. Add sort! and rsort!

    vmg committed with mislav Feb 18, 2015
  12. Use safe Ruby setters

    vmg committed with mislav Feb 18, 2015
  13. Enable Travis CI

    mislav committed Feb 18, 2015
  14. Ruby 2.2 test compatibility

    I've picked the earliest test-unit version that doesn't define hoe as
    runtime dependency.
    mislav committed Feb 18, 2015
  15. Ruby 1.8 test compatibility

    Instead of using newer Array#sample, implement shuffling of an array manually.
    mislav committed Feb 19, 2015
Commits on Feb 18, 2015
  1. Merge pull request #5 from mislav/pre

    Project overhaul + proper sorting of prerelase strings
    mislav committed Feb 18, 2015
Commits on Feb 13, 2015
  1. Record the new baseline for benchmark

    Recent changes by vmg have massively improved performance, as evident in
    the benchmark comparison vs. the old baseline:
    
        VersionSorter .sort
          Baseline: |                                                           X------|
          Current:  |                    X--                                           |
                    0                                                           1.811 ms
    
        VersionSorter .rsort
          Baseline: |                                                        X---------|
          Current:  |                    X---                                          |
                    0                                                           1.825 ms
    
    Now, record the current performance stats as the new baseline for the benchmark.
    mislav committed Feb 13, 2015
  2. Merge pull request #2 from mislav/overflow

    Handle integer overflow by treating number component as string if too large
    mislav committed Feb 13, 2015
  3. Treat number components that overflow as strings

    If a number component is too large to be represented by uint32, simply
    start treating the component as a string instead of raising RuntimeError.
    mislav committed Feb 12, 2015
Commits on Feb 12, 2015
  1. Add rake-compiler back to gem bundle

    I tried to get rid of rake-compiler prematurely. It turned out that my
    simplistic approach to compiling the native extension only worked on Mac
    and not on Linux. These cross-platform differences are exactly what
    rake-compiler is set to solve.
    mislav committed Feb 12, 2015
  2. Whitespace fixes

    vmg switched to tabs for indentation in his recent changes.
    mislav committed Feb 6, 2015
Commits on Feb 10, 2015
  1. Merge pull request #1 from vmg/vmg/perf

    Rewrite with a more efficient algorithm
    mislav committed Feb 10, 2015
Commits on Feb 4, 2015
  1. Have prerelease versions sorted before final releases

    E.g. "1.3.0pre4" should be sorted before "1.3.0". This is essentially done
    with these steps:
    
    - Split versions strings into components that can only contain either
      digits or alphabetical characters. Now the components would be
      "1 3 0 pre 4" instead of "1 3 0pre4".
    
    - Treat a dash as a literal string "pre". So, "1.3.0-rc4" is split into
      components "1 3 0 pre rc 4".
    
    - When normalizing versions strings for sorting, pad everything with
      zeroes instead of spaces. Alphabetical components are prefixed with a
      dash so they get sorted before numbers. Finally, make all zero-padded
      strings the same length.
    
      So, versions "1.1.0a, 1.1, 1.2.0, 1.10.0" were previously normalized
      as (vertical bars added for readability):
    
        | 1| 1|0a|
        | 1| 1|  |
        | 1| 2| 0|
        | 1|10| 0|
    
      Now the same versions get normalized as:
    
        |001|001|000|-a0|
        |001|001|000|000|
        |001|002|000|000|
        |001|010|000|000|
    mislav committed Feb 4, 2015
  2. Avoid including VersionSorter as mixin

    Tests should use the module as it's meant to be used in the wild.
    mislav committed Feb 4, 2015
  3. Typos in tests

    mislav committed Feb 4, 2015