Sha256: 6bd508274bb62a76801fc9f367a0742c509feb8528878f5a76cc3052fbf3aed3

Contents?: true

Size: 605 Bytes

Versions: 14

Compression:

Stored size: 605 Bytes

Contents

module DevFlow
  class Cleanup < 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

14 entries across 14 versions & 1 rubygems

Version Path
dev_flow-0.5.0 lib/dev_flow/commands/clean.rb
dev_flow-0.4.2 lib/dev_flow/commands/clean.rb
dev_flow-0.4.1 lib/dev_flow/commands/clean.rb
dev_flow-0.4.0 lib/dev_flow/commands/clean.rb
dev_flow-0.3.1 lib/dev_flow/commands/clean.rb
dev_flow-0.3.0 lib/dev_flow/commands/clean.rb
dev_flow-0.2.4 lib/dev_flow/commands/cleanup.rb
dev_flow-0.2.3 lib/dev_flow/commands/cleanup.rb
dev_flow-0.2.2 lib/dev_flow/commands/cleanup.rb
dev_flow-0.2.1 lib/dev_flow/commands/cleanup.rb
dev_flow-0.2.0 lib/dev_flow/commands/cleanup.rb
dev_flow-0.1.6 lib/dev_flow/commands/cleanup.rb
dev_flow-0.1.5 lib/dev_flow/commands/cleanup.rb
dev_flow-0.1.4 lib/dev_flow/commands/cleanup.rb