Permalink
Switch branches/tags
Commits on Jul 13, 2012
  1. Merge branch 'case-773254'

    joewalker committed Jul 13, 2012
  2. Merge branch 'helpsort-773174'

    joewalker committed Jul 13, 2012
Commits on Jul 12, 2012
  1. Merge branch 'master' into case-773254

    Conflicts:
    	lib/gclitest/testIncomplete.js
    joewalker committed Jul 12, 2012
  2. Merge branch 'complete-771992'

    joewalker committed Jul 12, 2012
  3. case-773254: 2 Tidyups

    1. Minor documentation clarification
    2. Only calculate value when we actually use it
    joewalker committed Jul 12, 2012
  4. case 773254: Add unit tests

    This checks that AA has a completion proposal to aaa, and that the
    text 'AA' gets to the assignment, but only as incomplete text, not as
    a completed value.
    joewalker committed Jul 12, 2012
  5. case-773254: Cache lower case versions

    match is the input that we're trying to match, in lower case, and we
    add a _gcliLowerName property to each option as a lower case version of
    the name.
    
    The options are provided by the commands or by gcli itself, so i think
    it's safe to add a _gcliLowerName property without causing damage.
    joewalker committed Jul 12, 2012
  6. helpsort-773174: Sort the commands properly

    The sort function needs a function to know how to compare two commands,
    this was missing.
    joewalker committed Jul 12, 2012
Commits on Jul 10, 2012
  1. complete-771992: Use requisition for current assignment

    During testing we call _getCompleterTemplateData before the events to
    update the inputter have had a chance to fire, so inputter.assignment is
    not correct. So we read it manually.
    joewalker committed Jul 10, 2012
  2. complete-771992: Fix incorrect status calculation

    We were assuming that any unassigned arguments implied an ERROR, but
    '-' is unassigned and INCOMPELTE, so we need to check to see if any are
    not incomplete before assigning status.
    joewalker committed Jul 10, 2012
  3. complete-771992: Calculate isIncompleteName

    We were passing it in as a parameter, but this is both unnecessary and
    wrong. We can calculate depending on an opening '-' and assuming that all
    params left over at the end are not incompleteNames is wrong.
    joewalker committed Jul 10, 2012
  4. complete-771992: s/names/unassignedParams/g

    unassignedParams is way clearer than just names. We're tracking the
    parameters that we've not assigned to yet.
    joewalker committed Jul 10, 2012
Commits on Jul 9, 2012
  1. asynctest-770929: Run tests asynchronously

    All we need to do is to use the built-in async test runner.
    joewalker committed Jul 4, 2012
  2. Merge branch 'focus-769234'

    joewalker committed Jul 9, 2012
Commits on Jul 4, 2012
  1. moremenu-731972: User interface changes

    Replace 11th item with a 'more' item. We do it this way because it means
    there is never any doubt about whether more items are there, and because
    it's simple. Better fixes to this problem will come with async types.
    joewalker committed Jul 4, 2012
  2. moremenu-731972: Move maxPredictions to Conversion

    We can now use this constant in other places in our code. This change also
    does some minor tidying to use 'exports' not 'types', and to move the
    export of Conversion to the end of the more conventional end-of-definition
    position rather than the start
    joewalker committed Jul 4, 2012
  3. tabbreak-767729: Check contents before doing compete

    Being able to complete 'nothing' is OK if there is some context, but when
    there is nothing on the command line it jsut looks bizarre.
    joewalker committed Jul 4, 2012
  4. Bug 720972 (optmenu): Add unit tests

    These test allow us to test the type of arguments, and allow testing of
    different ways to get the command line into any given position.
    joewalker committed Jun 30, 2012
  5. Bug 720972 (optmenu): Add checks for defaultValue

    Optional parameters must have a defaultValue (unless they are boolean), which
    is a check that we didn't make explicit before.
    joewalker committed Jul 3, 2012
  6. Bug 720972 (optmenu): Extract out setAssignment

    Extract out Requisition.setAssignment, so we can do the args checks properly.
    We were just adding the args if they were missing, now we're also replacing
    them if that needs doing too.
    joewalker committed Jul 3, 2012
  7. Bug 720972 (optmenu): Fix bad comparison logic

    Act if we've got something to act on, not if we haven't
    joewalker committed Jul 3, 2012
  8. Bug 720972 (optmenu): Basic menu support

    Create a ParamType. This also fixes a bug where an extra space was inserted in
    the empty parameters, which was caused by us mutating an argument rather than
    creating a new one.
    joewalker committed Jul 2, 2012
  9. Bug 720972 (optmenu): Support incomplete named args

    Previously we supported named arguments, but we didn't cope well with
    them being incorrect while they were being typed, which is clearly needed
    for a menu to help.
    This makes _unassigned to be an array to which we add dynamically created
    instances of UnassignedAssignment rather than merging them which was always a
    bit of a hack.
    joewalker committed Jul 3, 2012
  10. Bug 720972 (optmenu): Various minor changes

    Fix minor number parsing bug: '-' is an incomplete number, not an error
    We need to make it a special case because otherwise we try to parseInt it
    which errors.
    Remove inconsistent documentation, add thoughts on future Argument refactoring
    joewalker committed Jun 30, 2012
  11. Bug 720972 (optmenu): Swap isBlank() for .type and BlankArgument

    This gives us a bit more information about how the command line got to be
    in the state that it is, it's also more consistent with how Argument works
    in general. Also it means consumers of Argument do not need to import all the
    subtypes in order to get type information (and it's not going to break in a
    cross frame situation)
    joewalker committed Jun 30, 2012
  12. Bug 720972 (optmenu): Add _toSummaryJson

    _toSummaryJson alows us to see at a glance what the state of the command
    line it. This is useful partly in debugging because it saves digging down
    and could be useful in testing to check the state of a large number of
    things at the same time, however we will need to ensure that it's stable
    before using it in testing too much.
    This patch also changes a demo command that we use for debugging. This
    change does not reach Firefox.
    
    REBASE: make summaryJson a property
    
    tweak command
    joewalker committed Jun 30, 2012
  13. Bug 720972 (optmenu): Allow valueArg to be null

    Requisition uses it with null when there is only one part of a named
    argument, so we this code should accept that.
    Also tidy up the over-reaching docs.
    joewalker committed Jun 14, 2012