Sha256: 5c55d81f77059cbfbc48dcb9a98090dbf98ae67ad0b06bcbfe8c165a1571a19d

Contents?: true

Size: 1.01 KB

Versions: 16

Compression:

Stored size: 1.01 KB

Contents

module DevFlow
  class Progress < App

    def process!
      self.hello

      # whether I am working on a proper task branch
      current_task = self.task
      error "Not on a known task branch. Can not continue." unless current_task
      
      self.ask_rebase
      puts hr

      # commit you current branch and push
      progress = ARGV[1]
      progress = progress.to_i if progress
      unless (progress and progress > 0 and progress < 99)
        error "invalid progress. Use percentage between 1 to 98."
      end
      message = ARGV[2] || "update progress to #{progress}"
      message = "[progress] " + message

      info "commit your progress"
      `git commit -am '#{message}'`
      if @config[:git_remote]
        info "push your progress to remote server"
        `git push #{@config[:git_remote]} #{current_task.branch_name}`
      end
      
      # rewrite progress in ROADMAP file under develop trunk
      upload_progress! current_task, progress
    end

  end # class
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dev_flow-0.1.5 lib/dev_flow/commands/progress.rb
dev_flow-0.1.4 lib/dev_flow/commands/progress.rb
dev_flow-0.1.3 lib/dev_flow/commands/progress.rb
dev_flow-0.1.2 lib/dev_flow/commands/progress.rb
dev_flow-0.1.1 lib/dev_flow/commands/progress.rb
dev_flow-0.1.0 lib/dev_flow/commands/progress.rb
dev_flow-0.0.13 lib/dev_flow/commands/progress.rb
dev_flow-0.0.12 lib/dev_flow/commands/progress.rb
dev_flow-0.0.11 lib/dev_flow/commands/progress.rb
dev_flow-0.0.10 lib/dev_flow/commands/progress.rb
dev_flow-0.0.9 lib/dev_flow/commands/progress.rb
dev_flow-0.0.8 lib/dev_flow/commands/progress.rb
dev_flow-0.0.7 lib/dev_flow/commands/progress.rb
dev_flow-0.0.6 lib/dev_flow/commands/progress.rb
dev_flow-0.0.5 lib/dev_flow/commands/progress.rb
dev_flow-0.0.4 lib/dev_flow/commands/progress.rb