Sha256: 3b75cdec1b63852c4a7642f3485dbb4fcbdaa80b1e9bb6cd0fce8d25fefda579

Contents?: true

Size: 603 Bytes

Versions: 8

Compression:

Stored size: 603 Bytes

Contents

module DevFlow
  class Clean < App

    def process!
      completed_branches = Array.new
      @roadmap.tasks.each {|t| completed_branches << t.branch_name if t.is_completed?}
      
      @git.branches.each do |t|
        if completed_branches.include? t
          print "delete completed branch #{t}? [Y/n]:"
          ans = STDIN.gets.chomp!
          unless ans == 'n'
            `git branch -d #{t}`
          end
        end
      end

      info "prune git remote (delete zoombie remote refs)"
      `git remote prune #{@config["git_remote"]}`
    end

  end # class
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dev_flow-0.6.2 lib/dev_flow/commands/clean.rb
dev_flow-0.6.1 lib/dev_flow/commands/clean.rb
dev_flow-0.6.0 lib/dev_flow/commands/clean.rb
dev_flow-0.5.5 lib/dev_flow/commands/clean.rb
dev_flow-0.5.4 lib/dev_flow/commands/clean.rb
dev_flow-0.5.3 lib/dev_flow/commands/clean.rb
dev_flow-0.5.2 lib/dev_flow/commands/clean.rb
dev_flow-0.5.1 lib/dev_flow/commands/clean.rb