class SRS::CLI::NextNew

Public Instance Methods

help() click to toggle source
# File lib/srs/cli/next-new.rb, line 18
                        def help()
                                puts <<-EOF
srs next-new

Prints out the id of the next untested schedule.  Prints nothing if there are no
pending schedules.
                                        EOF
                        end
run!(arguments) click to toggle source
# File lib/srs/cli/next-new.rb, line 4
def run!(arguments)
        if not SRS::Workspace.initialised? then
                puts "Current directory is not an SRS Workspace"
                return 3
        end

        new_schedules = Dir["schedule/pending/*"].sort
        if not new_schedules.empty?
                puts File.basename new_schedules.first
        end

        return 0
end