Class: Gsbb
- Inherits:
-
Thor
- Object
- Thor
- Gsbb
- Defined in:
- lib/gsbb.rb,
lib/gsbb/version.rb
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Method Summary collapse
Instance Method Details
#email ⇒ Object
46 47 48 49 50 |
# File 'lib/gsbb.rb', line 46 def email stale_branches.each do |branch| puts branch.commit.to_hash['committer']['email'] # win! end end |
#prune ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/gsbb.rb', line 29 def prune puts "Pruning:" stale_branches.each do |branch| name = branch.name.split("/").last # Grit breaks here: # puts repo.git.native(:push, {:raise => true}, "origin :#{name}") puts `git push origin :#{name}` if repo.heads.map(&:name).include?(name) puts `git branch -D #{name}` end end end |
#show ⇒ Object
21 22 23 24 25 26 |
# File 'lib/gsbb.rb', line 21 def show puts "Stale Branches:" stale_branches.each do |branch| puts "#{branch.name} - #{branch.commit.}, #{(Date.today - branch.commit..to_date).to_i} days old - #{branch.commit..to_date}" end end |