Permalink
Switch branches/tags
Commits on Oct 28, 2013
  1. Changelog for v0.3.0

    prydonius committed Oct 28, 2013
  2. Version bump to 0.3.0

    prydonius committed Oct 28, 2013
Commits on Sep 4, 2013
  1. Merge pull request #29 from abinoam/issue14

    prydonius committed Sep 4, 2013
    Fix Issue #14
  2. Merge pull request #28 from abinoam/issue15-rebased

    prydonius committed Sep 4, 2013
    Fix Issue #15 and add tests
Commits on Aug 18, 2013
  1. Split the setup part of the run method - #14 and #12

    abinoam committed Aug 18, 2013
    Now we can do like this:
    @num = 1
    sc = SpinningCursor.setup do
      banner "My banner"
      type :spinner
      delay 0.5
    end
    
    sc.start
    @num += 1
    sc.stop
    
    Now @num == 2 and the code make it clear that the @num instance variables are the same.
  2. Make #run alias of #start

    abinoam committed Aug 17, 2013
Commits on Aug 4, 2013
  1. Fix ruby 1.8 issue

    abinoam committed Aug 4, 2013
Commits on Jul 28, 2013
  1. Version bump to 0.2.1

    prydonius committed Jul 28, 2013
  2. Merge pull request #26 from abinoam/issue25

    prydonius committed Jul 28, 2013
    Fix Issue25
  3. Remove broken test

    abinoam committed Jul 28, 2013
  4. Split in 2 separate tests

    abinoam committed Jul 28, 2013
  5. Make delay instance variable

    abinoam committed Jul 28, 2013
  6. Move code to the setup block

    abinoam committed Jul 28, 2013
  7. Remove old assertions

    abinoam committed Jul 28, 2013
  8. Check the cycle intervals

    abinoam committed Jul 28, 2013
    Check to see if intervals is (almost) equal to the given delay.
    Interval should be equal of greater than delay (max 150% of given delay).
    This is because the delay time when threading is not 100% guaranteed.
  9. Wait for thread to exit

    abinoam committed Jul 28, 2013
  10. Stop iterating after 5 times

    abinoam committed Jul 28, 2013
  11. Make a fake 'reset_line' method

    abinoam committed Jul 28, 2013
    The fake reset_line now stores 'what' and 'when'.
Commits on Jul 27, 2013
  1. Remove JRuby from Travis CI tests

    prydonius committed Jul 27, 2013
    Upstream issues[1] with getting terminal size are causing tests to
    fail. Until this is fixed upstream, spinning_cursor will not work
    in JRuby.
    
    [1] https://jira.codehaus.org/browse/JRUBY-6693
  2. Add HighLine for platform independant shell width

    prydonius committed Jul 27, 2013
    The HighLine gem provides a platform independant way of obtaining
    the number of columsn in the terminal. This commit also changes
    the way the 'CLR' constant is initialised in Windows to account
    for the size of the terminal.
Commits on Jul 22, 2013
  1. Fast fix for #19 - yielding or instance_evaluating

    abinoam committed Jul 22, 2013
    Now if SpinningCursor#start is invoked without any params it will be instance_evaluated.
    If it's invoked with 1 param it will be yielded (with 'self' as param), so that
    instance variables from the main context will be available inside #start.
    
    Below it is a perfectly working code.
    
    @my_inst = "My Banner"
    SpinningCursor.start do |sc|
      sc.banner @my_inst
      sc.action { sleep 2 }
    end
    
    The 'old' way is preserved.
    But, as before, instance variables are not available.
    
    @my_inst = "My Banner"
    SpinningCursor.start do
      banner @my_inst     # Here @my_inst is from Parser and it's nil
      action { sleep 2 }
    end
    
    This simple and clever trick references:
    * http://rubylearning.com/blog/2010/11/30/how-do-i-build-dsls-with-yield-and-instance_eval/
    * http://erniemiller.org/2012/06/07/accessing-instance-variables-in-squeel-or-fun-with-bindings-and-instance_eval/