Sha256: bed4ebb00e46602cd482a266ef9070de079fd368ca6155c544d5c97ede06f33f

Contents?: true

Size: 492 Bytes

Versions: 14

Compression:

Stored size: 492 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
    end

  end # class
end

Version data entries

14 entries across 14 versions & 1 rubygems

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