Permalink
Commits on Oct 28, 2013
  1. Changelog for v0.3.0

    committed Oct 28, 2013
  2. Version bump to 0.3.0

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

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

    Fix Issue #15 and add tests
    committed Sep 4, 2013
Commits on Aug 18, 2013
  1. @abinoam

    Split the setup part of the run method - #14 and #12

    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.
    abinoam committed Aug 18, 2013
  2. @abinoam

    Make #run alias of #start

    abinoam committed Aug 17, 2013
Commits on Aug 4, 2013
  1. @abinoam

    Fix ruby 1.8 issue

    abinoam committed Aug 4, 2013
  2. @abinoam
  3. @abinoam
  4. @abinoam
  5. @abinoam
  6. @abinoam
Commits on Jul 28, 2013
  1. Version bump to 0.2.1

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

    Fix Issue25
    committed Jul 28, 2013
  3. @abinoam
  4. @abinoam

    Remove broken test

    abinoam committed Jul 28, 2013
  5. @abinoam

    Split in 2 separate tests

    abinoam committed Jul 28, 2013
  6. @abinoam

    Make delay instance variable

    abinoam committed Jul 28, 2013
  7. @abinoam

    Move code to the setup block

    abinoam committed Jul 28, 2013
  8. @abinoam
  9. @abinoam

    Remove old assertions

    abinoam committed Jul 28, 2013
  10. @abinoam
  11. @abinoam

    Check the cycle intervals

    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.
    abinoam committed Jul 28, 2013
  12. @abinoam

    Wait for thread to exit

    abinoam committed Jul 28, 2013
  13. @abinoam

    Stop iterating after 5 times

    abinoam committed Jul 28, 2013
  14. @abinoam

    Make a fake 'reset_line' method

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

    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
    committed Jul 27, 2013
  2. Add HighLine for platform independant shell width

    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.
    committed Jul 27, 2013
Commits on Jul 22, 2013
  1. @abinoam

    Fast fix for #19 - yielding or instance_evaluating

    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/
    abinoam committed Jul 22, 2013
  2. @abinoam
  3. @abinoam