lib/git-cleanup/branch.rb in git-cleanup-0.1.3 vs lib/git-cleanup/branch.rb in git-cleanup-0.2.0

- old
+ new

@@ -9,11 +9,11 @@ attr_reader :remote, :name, :ref def initialize(repo, ref) @repo = repo @ref = ref - @remote, @name = ref.name.split('/') + @remote, @name = ref.name.split('/', 2) end def to_s "#{remote}/#{name}" end @@ -29,18 +29,18 @@ def commit @ref.commit end def delete(local_branches = nil) - puts "Deleting..." + Formatador.display('[red]Deleting...[/]') @repo.git.native(:push, {}, @remote, ":#{@name}") - puts "Done" + Formatador.display_line('[red]done[/]') if local_branches && local_branches.include?(name) Helper.boolean "There is also a local branch called #{name}. Would you like to delete that too?" do - puts "Deleting..." - @repo.git.native(:branch, {}, '-d', name) - puts "Done" + Formatador.display('[red]Deleting...[/]') + @repo.git.native(:branch, {}, '-d', name) + Formatador.display_line('[red]done[/]') end end end def <=>(other)