todorb 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +11 -0
- data/README.markdown +4 -0
- data/Rakefile +3 -2
- data/VERSION +1 -1
- data/lib/common/cmdapp.rb +11 -2
- data/lib/todorb.rb +14 -12
- data/tests/recreate.sh +4 -1
- data/tests/rtest2.sh +12 -4
- data/tests/t0001-help.sh +6 -6
- data/tests/t0010-copyunder.sh +43 -0
- data/tests/t0011-redo.sh +91 -0
- data/tests/t0012-renumber.sh +44 -0
- data/tests/t0013-add_opt.sh +79 -0
- data/tests/t0014-grep.sh +37 -0
- data/todorb.gemspec +14 -6
- metadata +26 -5
    
        data/CHANGELOG.rdoc
    CHANGED
    
    | @@ -1,3 +1,14 @@ | |
| 1 | 
            +
            = todorb 1.1.1, 2010-06-24 
         | 
| 2 | 
            +
            * fixed --show-actions option
         | 
| 3 | 
            +
            = todorb 1.1.0, 2010-06-23 
         | 
| 4 | 
            +
            * sort folds subtasks so they remain together
         | 
| 5 | 
            +
            * added switches so archived tasks can be seen also
         | 
| 6 | 
            +
              - show_arch
         | 
| 7 | 
            +
            * reverse sort option: --reverse
         | 
| 8 | 
            +
            * copyunder won't delete, use --delete option to delete also
         | 
| 9 | 
            +
            * changed alias for pri to p, earlier priority
         | 
| 10 | 
            +
             | 
| 11 | 
            +
             | 
| 1 12 | 
             
            = todorb 1.0.0, 2010-06-22 16:16
         | 
| 2 13 | 
             
            * using subcommand gem
         | 
| 3 14 | 
             
            * suboptions will come *after* command but before arguments
         | 
    
        data/README.markdown
    CHANGED
    
    | @@ -60,6 +60,10 @@ After this, I will port over my bug tracker, [bugzy.txt](http://github.com/rkuma | |
| 60 60 | 
             
            1. The file format is almost identical to the output except that there is a TAB after the task number.
         | 
| 61 61 | 
             
            2. Notes are saved on same line as task, but displayed on another line with asterisk prefix.
         | 
| 62 62 |  | 
| 63 | 
            +
            ## RDOC
         | 
| 64 | 
            +
             | 
| 65 | 
            +
            http://todorb.rubyforge.org/doc/
         | 
| 66 | 
            +
             | 
| 63 67 | 
             
            ## Copyright
         | 
| 64 68 |  | 
| 65 69 | 
             
            Copyright (c) 2010 Rahul Kumar. See LICENSE for details.
         | 
    
        data/Rakefile
    CHANGED
    
    | @@ -6,13 +6,14 @@ begin | |
| 6 6 | 
             
              Jeweler::Tasks.new do |gem|
         | 
| 7 7 | 
             
                gem.name = "todorb"
         | 
| 8 8 | 
             
                gem.summary = %Q{comprehensive command-line todo list manager with subtasks and more }
         | 
| 9 | 
            -
                gem.description = %Q{command-line program that manages a todo list text file, incl subtasks }
         | 
| 9 | 
            +
                gem.description = %Q{command-line program that manages a todo list text file, incl subtasks, status, priorities etc }
         | 
| 10 10 | 
             
                gem.email = "sentinel1879@gmail.com"
         | 
| 11 11 | 
             
                gem.homepage = "http://github.com/rkumar/todorb"
         | 
| 12 12 | 
             
                gem.authors = ["Rahul Kumar"]
         | 
| 13 13 | 
             
                gem.rubyforge_project = "todorb"
         | 
| 14 14 | 
             
                #gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
         | 
| 15 | 
            -
                gem.add_development_dependency "subcommand", ">= 0"
         | 
| 15 | 
            +
                gem.add_development_dependency "subcommand", ">= 1.0.4"
         | 
| 16 | 
            +
                gem.add_dependency "subcommand", ">= 1.0.4"
         | 
| 16 17 | 
             
                # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
         | 
| 17 18 | 
             
              end
         | 
| 18 19 | 
             
              Jeweler::GemcutterTasks.new
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            1.1. | 
| 1 | 
            +
            1.1.1
         | 
    
        data/lib/common/cmdapp.rb
    CHANGED
    
    | @@ -67,13 +67,22 @@ module Cmdapp | |
| 67 67 | 
             
              end
         | 
| 68 68 | 
             
              # not required if using Subcommand
         | 
| 69 69 | 
             
              def help args
         | 
| 70 | 
            +
                if @actions.nil? 
         | 
| 71 | 
            +
                  if defined? @commands
         | 
| 72 | 
            +
                    unless @commands.empty?
         | 
| 73 | 
            +
                      @actions = @commands
         | 
| 74 | 
            +
                    end
         | 
| 75 | 
            +
                  end
         | 
| 76 | 
            +
                end
         | 
| 70 77 | 
             
                if @actions
         | 
| 71 78 | 
             
                  puts "Actions are "
         | 
| 72 79 | 
             
                  @actions.each_pair { |name, val| puts "#{name}\t#{val}" }
         | 
| 73 80 | 
             
                end
         | 
| 74 81 | 
             
                puts " "
         | 
| 75 | 
            -
                 | 
| 76 | 
            -
             | 
| 82 | 
            +
                if @aliases
         | 
| 83 | 
            +
                  puts "Aliases are "
         | 
| 84 | 
            +
                  @aliases.each_pair { |name, val| puts "#{name}:\t#{val.join(' ')}" }
         | 
| 85 | 
            +
                end
         | 
| 77 86 | 
             
                0
         | 
| 78 87 | 
             
              end
         | 
| 79 88 | 
             
              ## 
         | 
    
        data/lib/todorb.rb
    CHANGED
    
    | @@ -23,8 +23,8 @@ PRI_A = YELLOW + BOLD | |
| 23 23 | 
             
            PRI_B = WHITE  + BOLD
         | 
| 24 24 | 
             
            PRI_C = GREEN  + BOLD
         | 
| 25 25 | 
             
            PRI_D = CYAN  + BOLD
         | 
| 26 | 
            -
            VERSION = "1. | 
| 27 | 
            -
            DATE = "2010-06- | 
| 26 | 
            +
            VERSION = "1.1.1"
         | 
| 27 | 
            +
            DATE = "2010-06-24"
         | 
| 28 28 | 
             
            APPNAME = File.basename($0)
         | 
| 29 29 | 
             
            AUTHOR = "rkumar"
         | 
| 30 30 | 
             
            TABSTOP = 4 # indentation of subtasks
         | 
| @@ -420,7 +420,6 @@ class Todo | |
| 420 420 | 
             
              end
         | 
| 421 421 | 
             
              ##
         | 
| 422 422 | 
             
              # Appends a tag to task
         | 
| 423 | 
            -
              # FIXME: check with subtasks
         | 
| 424 423 | 
             
              #
         | 
| 425 424 | 
             
              # @param [Array] items and tag, or tag and items
         | 
| 426 425 | 
             
              # @return [0,1] success or fail
         | 
| @@ -467,7 +466,6 @@ class Todo | |
| 467 466 | 
             
                  end
         | 
| 468 467 | 
             
                end
         | 
| 469 468 | 
             
                totalitems.each { |item| 
         | 
| 470 | 
            -
                  # FIXME: TODO: if --force used then don'y prompt
         | 
| 471 469 | 
             
                  puts "#{item[0]} #{item[1]}"
         | 
| 472 470 | 
             
                  ans = nil
         | 
| 473 471 | 
             
                  if @options[:force]
         | 
| @@ -880,7 +878,7 @@ class Todo | |
| 880 878 | 
             
                  if row[1] =~ //
         | 
| 881 879 | 
             
                    #puts "row #{row[0]} contains ^B"
         | 
| 882 880 | 
             
                    line = row.join "\t"
         | 
| 883 | 
            -
                    lines = line.split | 
| 881 | 
            +
                    lines = line.split(//)
         | 
| 884 882 | 
             
                    #puts " #{lines.count} lines "
         | 
| 885 883 | 
             
                    lines.each { |e| newarray << e.split("\t") }
         | 
| 886 884 | 
             
                  else
         | 
| @@ -908,7 +906,7 @@ class Todo | |
| 908 906 | 
             
                  end
         | 
| 909 907 |  | 
| 910 908 | 
             
              Subcommands::global_options do |opts|
         | 
| 911 | 
            -
                opts.banner = "Usage: #{ | 
| 909 | 
            +
                opts.banner = "Usage: #{APPNAME} [options] [subcommand [options]]"
         | 
| 912 910 | 
             
                opts.description = "Todo list manager"
         | 
| 913 911 | 
             
                #opts.separator ""
         | 
| 914 912 | 
             
                #opts.separator "Global options are:"
         | 
| @@ -930,8 +928,9 @@ class Todo | |
| 930 928 | 
             
                  end
         | 
| 931 929 | 
             
                end
         | 
| 932 930 | 
             
                opts.on("--show-actions", "show actions ") do |v|
         | 
| 933 | 
            -
                  todo = Todo.new(options, ARGV)
         | 
| 934 | 
            -
                  todo.help nil
         | 
| 931 | 
            +
                  #todo = Todo.new(options, ARGV)
         | 
| 932 | 
            +
                  #todo.help nil - not working now that we've moved to subcommand
         | 
| 933 | 
            +
                  puts Subcommands::print_actions
         | 
| 935 934 | 
             
                  exit 0
         | 
| 936 935 | 
             
                end
         | 
| 937 936 |  | 
| @@ -943,10 +942,13 @@ class Todo | |
| 943 942 | 
             
                end
         | 
| 944 943 | 
             
                # No argument, shows at tail.  This will print an options summary.
         | 
| 945 944 | 
             
                # Try it and see!
         | 
| 946 | 
            -
                opts.on("-h", "--help", "Show this message") do
         | 
| 947 | 
            -
                  puts opts
         | 
| 948 | 
            -
                  exit 0
         | 
| 949 | 
            -
                end
         | 
| 945 | 
            +
                #opts.on("-h", "--help", "Show this message") do
         | 
| 946 | 
            +
                  #puts opts
         | 
| 947 | 
            +
                  #exit 0
         | 
| 948 | 
            +
                #end
         | 
| 949 | 
            +
              end
         | 
| 950 | 
            +
              Subcommands::add_help_option
         | 
| 951 | 
            +
              Subcommands::global_options do |opts|
         | 
| 950 952 | 
             
                    opts.separator ""
         | 
| 951 953 | 
             
                    opts.separator "Common Usage:"
         | 
| 952 954 | 
             
                    opts.separator <<TEXT
         | 
    
        data/tests/recreate.sh
    CHANGED
    
    | @@ -24,10 +24,13 @@ echo "Using suffix:$str" | |
| 24 24 | 
             
            read -p "press enter "
         | 
| 25 25 | 
             
            grep '^>>> ' "$oldfile" | sed 's/^>>> //' 
         | 
| 26 26 | 
             
            read -p "press enter "
         | 
| 27 | 
            +
            cp serial_numbers serial_numbers.xxx
         | 
| 27 28 | 
             
            grep '^>>> ' "$oldfile" | sed 's/^>>> //' | ./rtest2.sh $LOADSTR "$str"
         | 
| 28 29 |  | 
| 29 30 | 
             
            echo
         | 
| 30 31 | 
             
            echo renaming old file with O prefix
         | 
| 31 32 | 
             
            mv "$oldfile" O$oldfile
         | 
| 32 33 | 
             
            echo "If you don't find a test case, then rename transcript.txt to $oldfile"
         | 
| 33 | 
            -
             | 
| 34 | 
            +
             | 
| 35 | 
            +
            cp serial_numbers.xxx serial_numbers
         | 
| 36 | 
            +
            echo cp transcript.txt $oldfile
         | 
    
        data/tests/rtest2.sh
    CHANGED
    
    | @@ -20,6 +20,12 @@ case "$1" in | |
| 20 20 | 
             
                  shift
         | 
| 21 21 | 
             
                  shift
         | 
| 22 22 | 
             
                  ;;
         | 
| 23 | 
            +
               -F|--file)
         | 
| 24 | 
            +
               # use this as filename don't generate, useful when recreateing
         | 
| 25 | 
            +
               filename=$2
         | 
| 26 | 
            +
                  shift
         | 
| 27 | 
            +
                  shift
         | 
| 28 | 
            +
                  ;;
         | 
| 23 29 | 
             
               *)
         | 
| 24 30 | 
             
                  echo "Error: Unknown option: $1" >&2   # rem _
         | 
| 25 31 | 
             
                  exit 1
         | 
| @@ -118,10 +124,12 @@ echo "" >> "$out" | |
| 118 124 | 
             
            echo "EOF" >> "$out"
         | 
| 119 125 | 
             
            echo "test_done" >> "$out"
         | 
| 120 126 |  | 
| 121 | 
            -
             | 
| 122 | 
            -
             | 
| 123 | 
            -
            serno=$(  | 
| 124 | 
            -
             | 
| 127 | 
            +
            if [[ -z "$filename" ]]; then
         | 
| 128 | 
            +
                # try to create a decent file name
         | 
| 129 | 
            +
                serno=$( get_serial_number -a "$APP" -d "../"  )
         | 
| 130 | 
            +
                serno=$( printf "%04s" "$serno" )
         | 
| 131 | 
            +
                filename="../t${serno}-${filesuffix}.sh"
         | 
| 132 | 
            +
            fi
         | 
| 125 133 | 
             
            echo "trying to copy $out to $filename"
         | 
| 126 134 | 
             
            chmod +x "$out"
         | 
| 127 135 | 
             
            cp -i "$out" "$filename" < /dev/tty
         | 
    
        data/tests/t0001-help.sh
    CHANGED
    
    | @@ -1,20 +1,20 @@ | |
| 1 1 | 
             
            #!/bin/sh
         | 
| 2 | 
            -
            test_description="Testing out  | 
| 2 | 
            +
            test_description="Testing out help "
         | 
| 3 3 | 
             
            . ./test-lib.sh
         | 
| 4 4 |  | 
| 5 5 |  | 
| 6 6 |  | 
| 7 7 |  | 
| 8 | 
            -
            test_todo_session "Testing of  | 
| 8 | 
            +
            test_todo_session "Testing of help" <<EOF
         | 
| 9 9 | 
             
            >>> todorb help
         | 
| 10 | 
            -
            Usage: | 
| 10 | 
            +
            Usage: todorb [options] [subcommand [options]]
         | 
| 11 11 | 
             
            Todo list manager
         | 
| 12 12 | 
             
                -v, --[no-]verbose               Run verbosely
         | 
| 13 13 | 
             
                -f, --file FILENAME              CSV filename
         | 
| 14 14 | 
             
                -d, --dir DIR                    Use TODO file in this directory
         | 
| 15 15 | 
             
                    --show-actions               show actions 
         | 
| 16 16 | 
             
                    --version                    Show version
         | 
| 17 | 
            -
                -h, --help                        | 
| 17 | 
            +
                -h, --help                       Print this help
         | 
| 18 18 |  | 
| 19 19 | 
             
            Common Usage:
         | 
| 20 20 | 
             
                    todorb add "Text ...."
         | 
| @@ -50,14 +50,14 @@ Aliases: | |
| 50 50 | 
             
            See '/opt/local/bin/todorb help COMMAND' for more information on a specific command.
         | 
| 51 51 | 
             
            >>> end
         | 
| 52 52 | 
             
            >>> todorb --help
         | 
| 53 | 
            -
            Usage: | 
| 53 | 
            +
            Usage: todorb [options] [subcommand [options]]
         | 
| 54 54 | 
             
            Todo list manager
         | 
| 55 55 | 
             
                -v, --[no-]verbose               Run verbosely
         | 
| 56 56 | 
             
                -f, --file FILENAME              CSV filename
         | 
| 57 57 | 
             
                -d, --dir DIR                    Use TODO file in this directory
         | 
| 58 58 | 
             
                    --show-actions               show actions 
         | 
| 59 59 | 
             
                    --version                    Show version
         | 
| 60 | 
            -
                -h, --help                        | 
| 60 | 
            +
                -h, --help                       Print this help
         | 
| 61 61 |  | 
| 62 62 | 
             
            Common Usage:
         | 
| 63 63 | 
             
                    todorb add "Text ...."
         | 
| @@ -0,0 +1,43 @@ | |
| 1 | 
            +
            #!/bin/sh
         | 
| 2 | 
            +
            test_description="Testing out copyunder "
         | 
| 3 | 
            +
            . ./test-lib.sh
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            cat > TODO2.txt <<CATEOF
         | 
| 7 | 
            +
              1	[ ] if no TODO file give proper message to add task (2010-06-14)
         | 
| 8 | 
            +
              2	[ ] what if no serial_number file? (2010-06-14)
         | 
| 9 | 
            +
              3	[ ] Add a close for status close (2010-06-14)
         | 
| 10 | 
            +
              4	[ ] start rubyforge project for todorb (2010-06-14)
         | 
| 11 | 
            +
              5	[ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14)
         | 
| 12 | 
            +
              6	[ ] allow for ENV VARS such as verbose, plain, force (2010-06-15)
         | 
| 13 | 
            +
              7	[ ] list: search terms with - + and = (2010-06-15)
         | 
| 14 | 
            +
            CATEOF
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            test_todo_session "Testing of copyunder" <<EOF
         | 
| 17 | 
            +
            >>> todorb copyunder 2 3
         | 
| 18 | 
            +
              2	[ ] what if no serial_number file? (2010-06-14)
         | 
| 19 | 
            +
            [ ] what if no serial_number file? (2010-06-14)
         | 
| 20 | 
            +
            Adding:
         | 
| 21 | 
            +
                3.1	[ ] what if no serial_number file? (2010-06-14)
         | 
| 22 | 
            +
            >>> end
         | 
| 23 | 
            +
            >>> todorb copyunder --delete 4 5
         | 
| 24 | 
            +
              4	[ ] start rubyforge project for todorb (2010-06-14)
         | 
| 25 | 
            +
            [ ] start rubyforge project for todorb (2010-06-14)
         | 
| 26 | 
            +
            Adding:
         | 
| 27 | 
            +
                5.1	[ ] start rubyforge project for todorb (2010-06-14)
         | 
| 28 | 
            +
            >>> end
         | 
| 29 | 
            +
            >>> todorb
         | 
| 30 | 
            +
               1 [ ] if no TODO file give proper message to add task (2010-06-14) 
         | 
| 31 | 
            +
               2 [ ] what if no serial_number file? (2010-06-14) 
         | 
| 32 | 
            +
               3 [ ] Add a close for status close (2010-06-14) 
         | 
| 33 | 
            +
                 3.1 [ ] what if no serial_number file? (2010-06-14) 
         | 
| 34 | 
            +
               5 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 35 | 
            +
                 5.1 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 36 | 
            +
               6 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 37 | 
            +
               7 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 38 | 
            +
             
         | 
| 39 | 
            +
             8 of 8 rows displayed from TODO2.txt 
         | 
| 40 | 
            +
            >>> end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            EOF
         | 
| 43 | 
            +
            test_done
         | 
    
        data/tests/t0011-redo.sh
    ADDED
    
    | @@ -0,0 +1,91 @@ | |
| 1 | 
            +
            #!/bin/sh
         | 
| 2 | 
            +
            test_description="Testing out redo "
         | 
| 3 | 
            +
            . ./test-lib.sh
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            cat > TODO2.txt <<CATEOF
         | 
| 7 | 
            +
              1	[x] if no TODO file give proper message to add task (2010-06-14)
         | 
| 8 | 
            +
              2	[x] what if no serial_number file? (2010-06-14)
         | 
| 9 | 
            +
              3	[x] Add a close for status close (2010-06-14)
         | 
| 10 | 
            +
                3.1	[ ] hello there new a u 3 (2010-06-15)
         | 
| 11 | 
            +
                    3.1.1	[ ] hello there new a u 3 (2010-06-15)
         | 
| 12 | 
            +
                    3.1.2	[ ] hello there new a u 3 (2010-06-15)
         | 
| 13 | 
            +
                    3.1.3	[ ] hello there new a u 3 (2010-06-15)
         | 
| 14 | 
            +
                3.2	[ ] hello there new a u 3.2 (2010-06-15)
         | 
| 15 | 
            +
                    3.2.1	[ ] hello there new a u 3.2.1 (2010-06-15)
         | 
| 16 | 
            +
                        3.2.1.1	[ ] hello there new a u 3.2.1.1 (2010-06-15)
         | 
| 17 | 
            +
              4	[ ] start rubyforge project for todorb (2010-06-14)
         | 
| 18 | 
            +
              5	[ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14)
         | 
| 19 | 
            +
              6	[ ] allow for ENV VARS such as verbose, plain, force (2010-06-15)
         | 
| 20 | 
            +
              7	[ ] list: search terms with - + and = (2010-06-15)
         | 
| 21 | 
            +
            CATEOF
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            test_todo_session "Testing of redo" <<EOF
         | 
| 24 | 
            +
            >>> todorb close 3
         | 
| 25 | 
            +
             [32m  3 : [x] Add a close for status close (2010-06-14) [0m
         | 
| 26 | 
            +
             [32m    3.1 : [x] hello there new a u 3 (2010-06-15) [0m
         | 
| 27 | 
            +
             [32m        3.1.1 : [x] hello there new a u 3 (2010-06-15) [0m
         | 
| 28 | 
            +
             [32m        3.1.2 : [x] hello there new a u 3 (2010-06-15) [0m
         | 
| 29 | 
            +
             [32m        3.1.3 : [x] hello there new a u 3 (2010-06-15) [0m
         | 
| 30 | 
            +
             [32m    3.2 : [x] hello there new a u 3.2 (2010-06-15) [0m
         | 
| 31 | 
            +
             [32m        3.2.1 : [x] hello there new a u 3.2.1 (2010-06-15) [0m
         | 
| 32 | 
            +
             [32m            3.2.1.1 : [x] hello there new a u 3.2.1.1 (2010-06-15) [0m
         | 
| 33 | 
            +
            Changed 8 task/s
         | 
| 34 | 
            +
            >>> end
         | 
| 35 | 
            +
            >>> todorb list --show-all
         | 
| 36 | 
            +
               1 [x] if no TODO file give proper message to add task (2010-06-14) 
         | 
| 37 | 
            +
               2 [x] what if no serial_number file? (2010-06-14) 
         | 
| 38 | 
            +
               3 [x] Add a close for status close (2010-06-14) 
         | 
| 39 | 
            +
                 3.1 [x] hello there new a u 3 (2010-06-15) 
         | 
| 40 | 
            +
                     3.1.1 [x] hello there new a u 3 (2010-06-15) 
         | 
| 41 | 
            +
                     3.1.2 [x] hello there new a u 3 (2010-06-15) 
         | 
| 42 | 
            +
                     3.1.3 [x] hello there new a u 3 (2010-06-15) 
         | 
| 43 | 
            +
                 3.2 [x] hello there new a u 3.2 (2010-06-15) 
         | 
| 44 | 
            +
                     3.2.1 [x] hello there new a u 3.2.1 (2010-06-15) 
         | 
| 45 | 
            +
                         3.2.1.1 [x] hello there new a u 3.2.1.1 (2010-06-15) 
         | 
| 46 | 
            +
               4 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 47 | 
            +
               5 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 48 | 
            +
               6 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 49 | 
            +
               7 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 50 | 
            +
             
         | 
| 51 | 
            +
             14 of 14 rows displayed from TODO2.txt 
         | 
| 52 | 
            +
            >>> end
         | 
| 53 | 
            +
            >>> todorb archive
         | 
| 54 | 
            +
            Archived 10 tasks.
         | 
| 55 | 
            +
            >>> end
         | 
| 56 | 
            +
            >>> todorb list --show-all
         | 
| 57 | 
            +
               4 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 58 | 
            +
               5 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 59 | 
            +
               6 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 60 | 
            +
               7 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 61 | 
            +
             
         | 
| 62 | 
            +
             4 of 4 rows displayed from TODO2.txt 
         | 
| 63 | 
            +
            >>> end
         | 
| 64 | 
            +
            >>> todorb redo
         | 
| 65 | 
            +
            Saved TODO2.txt as TODO2.txt.org
         | 
| 66 | 
            +
            Redone numbering
         | 
| 67 | 
            +
            >>> end
         | 
| 68 | 
            +
            >>> todorb list --show-all
         | 
| 69 | 
            +
               1 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 70 | 
            +
               2 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 71 | 
            +
               3 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 72 | 
            +
               4 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 73 | 
            +
             
         | 
| 74 | 
            +
             4 of 4 rows displayed from TODO2.txt 
         | 
| 75 | 
            +
            >>> end
         | 
| 76 | 
            +
            >>> todorb add "adding a task after redo"
         | 
| 77 | 
            +
            Adding:
         | 
| 78 | 
            +
              5	[ ] adding a task after redo (2009-02-13)
         | 
| 79 | 
            +
            >>> end
         | 
| 80 | 
            +
            >>> todorb list --show-all
         | 
| 81 | 
            +
               1 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 82 | 
            +
               2 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 83 | 
            +
               3 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 84 | 
            +
               4 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 85 | 
            +
               5 [ ] adding a task after redo (2009-02-13) 
         | 
| 86 | 
            +
             
         | 
| 87 | 
            +
             5 of 5 rows displayed from TODO2.txt 
         | 
| 88 | 
            +
            >>> end
         | 
| 89 | 
            +
             | 
| 90 | 
            +
            EOF
         | 
| 91 | 
            +
            test_done
         | 
| @@ -0,0 +1,44 @@ | |
| 1 | 
            +
            #!/bin/sh
         | 
| 2 | 
            +
            test_description="Testing out renumber "
         | 
| 3 | 
            +
            . ./test-lib.sh
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            cat > TODO2.txt <<CATEOF
         | 
| 7 | 
            +
              4	[ ] start rubyforge project for todorb (2010-06-14)
         | 
| 8 | 
            +
              5	[ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14)
         | 
| 9 | 
            +
              6	[ ] allow for ENV VARS such as verbose, plain, force (2010-06-15)
         | 
| 10 | 
            +
              7	[ ] list: search terms with - + and = (2010-06-15)
         | 
| 11 | 
            +
            CATEOF
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            test_todo_session "Testing of renumber" <<EOF
         | 
| 14 | 
            +
            >>> todorb list --renumber
         | 
| 15 | 
            +
               1 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 16 | 
            +
               2 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 17 | 
            +
               3 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 18 | 
            +
               4 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 19 | 
            +
             
         | 
| 20 | 
            +
             4 of 4 rows displayed from TODO2.txt 
         | 
| 21 | 
            +
            >>> end
         | 
| 22 | 
            +
            >>> todorb
         | 
| 23 | 
            +
               4 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 24 | 
            +
               5 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 25 | 
            +
               6 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 26 | 
            +
               7 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 27 | 
            +
             
         | 
| 28 | 
            +
             4 of 4 rows displayed from TODO2.txt 
         | 
| 29 | 
            +
            >>> end
         | 
| 30 | 
            +
            >>> todorb redo
         | 
| 31 | 
            +
            Saved TODO2.txt as TODO2.txt.org
         | 
| 32 | 
            +
            Redone numbering
         | 
| 33 | 
            +
            >>> end
         | 
| 34 | 
            +
            >>> todorb
         | 
| 35 | 
            +
               1 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 36 | 
            +
               2 [ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14) 
         | 
| 37 | 
            +
               3 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 38 | 
            +
               4 [ ] list: search terms with - + and = (2010-06-15) 
         | 
| 39 | 
            +
             
         | 
| 40 | 
            +
             4 of 4 rows displayed from TODO2.txt 
         | 
| 41 | 
            +
            >>> end
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            EOF
         | 
| 44 | 
            +
            test_done
         | 
| @@ -0,0 +1,79 @@ | |
| 1 | 
            +
            #!/bin/sh
         | 
| 2 | 
            +
            test_description="Testing out add_opt "
         | 
| 3 | 
            +
            . ./test-lib.sh
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
             | 
| 7 | 
            +
             | 
| 8 | 
            +
            test_todo_session "Testing of add_opt" <<EOF
         | 
| 9 | 
            +
            >>> todorb add --project rbcurse --component Table --priority A "test with colored data"
         | 
| 10 | 
            +
            Adding:
         | 
| 11 | 
            +
              1	[ ] (A) +rbcurse @Table test with colored data (2009-02-13)
         | 
| 12 | 
            +
            >>> end
         | 
| 13 | 
            +
            >>> todorb add --project rbcurse --component Textarea --priority B "test with tabular data"
         | 
| 14 | 
            +
            Adding:
         | 
| 15 | 
            +
              2	[ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13)
         | 
| 16 | 
            +
            >>> end
         | 
| 17 | 
            +
            >>> todorb add --project rbcurse --component Textarea --priority C "test with jumbled data"
         | 
| 18 | 
            +
            Adding:
         | 
| 19 | 
            +
              3	[ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13)
         | 
| 20 | 
            +
            >>> end
         | 
| 21 | 
            +
            >>> todorb
         | 
| 22 | 
            +
            [33m[1m   1 [ ] (A) +rbcurse @Table test with colored data (2009-02-13) [0m
         | 
| 23 | 
            +
            [37m[1m   2 [ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13) [0m
         | 
| 24 | 
            +
            [32m[1m   3 [ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13) [0m
         | 
| 25 | 
            +
             
         | 
| 26 | 
            +
             3 of 3 rows displayed from TODO2.txt 
         | 
| 27 | 
            +
            >>> end
         | 
| 28 | 
            +
            >>> todorb add --project todorb "cleanup of code"
         | 
| 29 | 
            +
            Adding:
         | 
| 30 | 
            +
              4	[ ] +todorb cleanup of code (2009-02-13)
         | 
| 31 | 
            +
            >>> end
         | 
| 32 | 
            +
            >>> todorb list --project rbcurse
         | 
| 33 | 
            +
            [33m[1m   1 [ ] (A) +rbcurse @Table test with colored data (2009-02-13) [0m
         | 
| 34 | 
            +
            [37m[1m   2 [ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13) [0m
         | 
| 35 | 
            +
            [32m[1m   3 [ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13) [0m
         | 
| 36 | 
            +
             
         | 
| 37 | 
            +
             3 of 4 rows displayed from TODO2.txt 
         | 
| 38 | 
            +
            >>> end
         | 
| 39 | 
            +
            >>> todorb list --component Textarea
         | 
| 40 | 
            +
            [37m[1m   2 [ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13) [0m
         | 
| 41 | 
            +
            [32m[1m   3 [ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13) [0m
         | 
| 42 | 
            +
             
         | 
| 43 | 
            +
             2 of 4 rows displayed from TODO2.txt 
         | 
| 44 | 
            +
            >>> end
         | 
| 45 | 
            +
            >>> todorb list --priority A
         | 
| 46 | 
            +
            [33m[1m   1 [ ] (A) +rbcurse @Table test with colored data (2009-02-13) [0m
         | 
| 47 | 
            +
             
         | 
| 48 | 
            +
             1 of 4 rows displayed from TODO2.txt 
         | 
| 49 | 
            +
            >>> end
         | 
| 50 | 
            +
            >>> todorb list --priority [A-C]
         | 
| 51 | 
            +
            [33m[1m   1 [ ] (A) +rbcurse @Table test with colored data (2009-02-13) [0m
         | 
| 52 | 
            +
            [37m[1m   2 [ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13) [0m
         | 
| 53 | 
            +
            [32m[1m   3 [ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13) [0m
         | 
| 54 | 
            +
             
         | 
| 55 | 
            +
             3 of 4 rows displayed from TODO2.txt 
         | 
| 56 | 
            +
            >>> end
         | 
| 57 | 
            +
            >>> todorb pri D 4
         | 
| 58 | 
            +
               4 : [ ] +todorb cleanup of code (2009-02-13) 
         | 
| 59 | 
            +
             [32m  4 : [ ] (D) +todorb cleanup of code (2009-02-13) [0m
         | 
| 60 | 
            +
            Changed priority of 1 task/s
         | 
| 61 | 
            +
            >>> end
         | 
| 62 | 
            +
            >>> todorb list --priority [A-C]
         | 
| 63 | 
            +
            [33m[1m   1 [ ] (A) +rbcurse @Table test with colored data (2009-02-13) [0m
         | 
| 64 | 
            +
            [37m[1m   2 [ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13) [0m
         | 
| 65 | 
            +
            [32m[1m   3 [ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13) [0m
         | 
| 66 | 
            +
             
         | 
| 67 | 
            +
             3 of 4 rows displayed from TODO2.txt 
         | 
| 68 | 
            +
            >>> end
         | 
| 69 | 
            +
            >>> todorb list
         | 
| 70 | 
            +
            [33m[1m   1 [ ] (A) +rbcurse @Table test with colored data (2009-02-13) [0m
         | 
| 71 | 
            +
            [37m[1m   2 [ ] (B) +rbcurse @Textarea test with tabular data (2009-02-13) [0m
         | 
| 72 | 
            +
            [32m[1m   3 [ ] (C) +rbcurse @Textarea test with jumbled data (2009-02-13) [0m
         | 
| 73 | 
            +
            [36m[1m   4 [ ] (D) +todorb cleanup of code (2009-02-13) [0m
         | 
| 74 | 
            +
             
         | 
| 75 | 
            +
             4 of 4 rows displayed from TODO2.txt 
         | 
| 76 | 
            +
            >>> end
         | 
| 77 | 
            +
             | 
| 78 | 
            +
            EOF
         | 
| 79 | 
            +
            test_done
         | 
    
        data/tests/t0014-grep.sh
    ADDED
    
    | @@ -0,0 +1,37 @@ | |
| 1 | 
            +
            #!/bin/sh
         | 
| 2 | 
            +
            test_description="Testing out grep "
         | 
| 3 | 
            +
            . ./test-lib.sh
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            cat > TODO2.txt <<CATEOF
         | 
| 7 | 
            +
              1	[ ] if no TODO file give proper message to add task (2010-06-14)
         | 
| 8 | 
            +
              2	[ ] what if no serial_number file? (2010-06-14)
         | 
| 9 | 
            +
              3	[ ] Add a close for status close (2010-06-14)
         | 
| 10 | 
            +
              4	[ ] start rubyforge project for todorb (2010-06-14)
         | 
| 11 | 
            +
              5	[ ] list: if dir given then show full path of TODO2.txt at end (2010-06-14)
         | 
| 12 | 
            +
              6	[ ] allow for ENV VARS such as verbose, plain, force (2010-06-15)
         | 
| 13 | 
            +
              7	[ ] list: search terms with - + and = (2010-06-15)
         | 
| 14 | 
            +
              8	[ ] (A) +rbcurse @Table test with colored data (2010-06-23)
         | 
| 15 | 
            +
              9	[ ] (B) +rbcurse @Textarea enter tabular data (2010-06-23)
         | 
| 16 | 
            +
            CATEOF
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            test_todo_session "Testing of grep" <<EOF
         | 
| 19 | 
            +
            >>> todorb list --grep 'rb|ruby'
         | 
| 20 | 
            +
               4 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 21 | 
            +
               6 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 22 | 
            +
            [33m[1m   8 [ ] (A) +rbcurse @Table test with colored data (2010-06-23) [0m
         | 
| 23 | 
            +
            [37m[1m   9 [ ] (B) +rbcurse @Textarea enter tabular data (2010-06-23) [0m
         | 
| 24 | 
            +
             
         | 
| 25 | 
            +
             4 of 9 rows displayed from TODO2.txt 
         | 
| 26 | 
            +
            >>> end
         | 
| 27 | 
            +
            >>> todorb list --grep 'rb|ruby' --renumber
         | 
| 28 | 
            +
               1 [ ] start rubyforge project for todorb (2010-06-14) 
         | 
| 29 | 
            +
               2 [ ] allow for ENV VARS such as verbose, plain, force (2010-06-15) 
         | 
| 30 | 
            +
            [33m[1m   3 [ ] (A) +rbcurse @Table test with colored data (2010-06-23) [0m
         | 
| 31 | 
            +
            [37m[1m   4 [ ] (B) +rbcurse @Textarea enter tabular data (2010-06-23) [0m
         | 
| 32 | 
            +
             
         | 
| 33 | 
            +
             4 of 9 rows displayed from TODO2.txt 
         | 
| 34 | 
            +
            >>> end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            EOF
         | 
| 37 | 
            +
            test_done
         | 
    
        data/todorb.gemspec
    CHANGED
    
    | @@ -5,13 +5,13 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{todorb}
         | 
| 8 | 
            -
              s.version = "1.1. | 
| 8 | 
            +
              s.version = "1.1.1"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Rahul Kumar"]
         | 
| 12 | 
            -
              s.date = %q{2010-06- | 
| 12 | 
            +
              s.date = %q{2010-06-24}
         | 
| 13 13 | 
             
              s.default_executable = %q{todorb}
         | 
| 14 | 
            -
              s.description = %q{command-line program that manages a todo list text file, incl subtasks }
         | 
| 14 | 
            +
              s.description = %q{command-line program that manages a todo list text file, incl subtasks, status, priorities etc }
         | 
| 15 15 | 
             
              s.email = %q{sentinel1879@gmail.com}
         | 
| 16 16 | 
             
              s.executables = ["todorb"]
         | 
| 17 17 | 
             
              s.extra_rdoc_files = [
         | 
| @@ -48,6 +48,11 @@ Gem::Specification.new do |s| | |
| 48 48 | 
             
                 "tests/t0007-status.sh",
         | 
| 49 49 | 
             
                 "tests/t0008-addsub.sh",
         | 
| 50 50 | 
             
                 "tests/t0009-del.sh",
         | 
| 51 | 
            +
                 "tests/t0010-copyunder.sh",
         | 
| 52 | 
            +
                 "tests/t0011-redo.sh",
         | 
| 53 | 
            +
                 "tests/t0012-renumber.sh",
         | 
| 54 | 
            +
                 "tests/t0013-add_opt.sh",
         | 
| 55 | 
            +
                 "tests/t0014-grep.sh",
         | 
| 51 56 | 
             
                 "tests/test-lib.sh",
         | 
| 52 57 | 
             
                 "todorb.gemspec"
         | 
| 53 58 | 
             
              ]
         | 
| @@ -63,12 +68,15 @@ Gem::Specification.new do |s| | |
| 63 68 | 
             
                s.specification_version = 3
         | 
| 64 69 |  | 
| 65 70 | 
             
                if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
         | 
| 66 | 
            -
                  s.add_development_dependency(%q<subcommand>, [">= 0"])
         | 
| 71 | 
            +
                  s.add_development_dependency(%q<subcommand>, [">= 1.0.4"])
         | 
| 72 | 
            +
                  s.add_runtime_dependency(%q<subcommand>, [">= 1.0.4"])
         | 
| 67 73 | 
             
                else
         | 
| 68 | 
            -
                  s.add_dependency(%q<subcommand>, [">= 0"])
         | 
| 74 | 
            +
                  s.add_dependency(%q<subcommand>, [">= 1.0.4"])
         | 
| 75 | 
            +
                  s.add_dependency(%q<subcommand>, [">= 1.0.4"])
         | 
| 69 76 | 
             
                end
         | 
| 70 77 | 
             
              else
         | 
| 71 | 
            -
                s.add_dependency(%q<subcommand>, [">= 0"])
         | 
| 78 | 
            +
                s.add_dependency(%q<subcommand>, [">= 1.0.4"])
         | 
| 79 | 
            +
                s.add_dependency(%q<subcommand>, [">= 1.0.4"])
         | 
| 72 80 | 
             
              end
         | 
| 73 81 | 
             
            end
         | 
| 74 82 |  | 
    
        metadata
    CHANGED
    
    | @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version | |
| 5 5 | 
             
              segments: 
         | 
| 6 6 | 
             
              - 1
         | 
| 7 7 | 
             
              - 1
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 1.1. | 
| 8 | 
            +
              - 1
         | 
| 9 | 
            +
              version: 1.1.1
         | 
| 10 10 | 
             
            platform: ruby
         | 
| 11 11 | 
             
            authors: 
         | 
| 12 12 | 
             
            - Rahul Kumar
         | 
| @@ -14,7 +14,7 @@ autorequire: | |
| 14 14 | 
             
            bindir: bin
         | 
| 15 15 | 
             
            cert_chain: []
         | 
| 16 16 |  | 
| 17 | 
            -
            date: 2010-06- | 
| 17 | 
            +
            date: 2010-06-24 00:00:00 +05:30
         | 
| 18 18 | 
             
            default_executable: todorb
         | 
| 19 19 | 
             
            dependencies: 
         | 
| 20 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -25,11 +25,27 @@ dependencies: | |
| 25 25 | 
             
                - - ">="
         | 
| 26 26 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 27 27 | 
             
                    segments: 
         | 
| 28 | 
            +
                    - 1
         | 
| 28 29 | 
             
                    - 0
         | 
| 29 | 
            -
                     | 
| 30 | 
            +
                    - 4
         | 
| 31 | 
            +
                    version: 1.0.4
         | 
| 30 32 | 
             
              type: :development
         | 
| 31 33 | 
             
              version_requirements: *id001
         | 
| 32 | 
            -
             | 
| 34 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 35 | 
            +
              name: subcommand
         | 
| 36 | 
            +
              prerelease: false
         | 
| 37 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 38 | 
            +
                requirements: 
         | 
| 39 | 
            +
                - - ">="
         | 
| 40 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 41 | 
            +
                    segments: 
         | 
| 42 | 
            +
                    - 1
         | 
| 43 | 
            +
                    - 0
         | 
| 44 | 
            +
                    - 4
         | 
| 45 | 
            +
                    version: 1.0.4
         | 
| 46 | 
            +
              type: :runtime
         | 
| 47 | 
            +
              version_requirements: *id002
         | 
| 48 | 
            +
            description: "command-line program that manages a todo list text file, incl subtasks, status, priorities etc "
         | 
| 33 49 | 
             
            email: sentinel1879@gmail.com
         | 
| 34 50 | 
             
            executables: 
         | 
| 35 51 | 
             
            - todorb
         | 
| @@ -68,6 +84,11 @@ files: | |
| 68 84 | 
             
            - tests/t0007-status.sh
         | 
| 69 85 | 
             
            - tests/t0008-addsub.sh
         | 
| 70 86 | 
             
            - tests/t0009-del.sh
         | 
| 87 | 
            +
            - tests/t0010-copyunder.sh
         | 
| 88 | 
            +
            - tests/t0011-redo.sh
         | 
| 89 | 
            +
            - tests/t0012-renumber.sh
         | 
| 90 | 
            +
            - tests/t0013-add_opt.sh
         | 
| 91 | 
            +
            - tests/t0014-grep.sh
         | 
| 71 92 | 
             
            - tests/test-lib.sh
         | 
| 72 93 | 
             
            - todorb.gemspec
         | 
| 73 94 | 
             
            has_rdoc: true
         |