git-cleanup 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/git-cleanup.gemspec +1 -1
- data/lib/git-cleanup.rb +2 -2
- data/lib/git-cleanup/helper.rb +2 -2
- metadata +3 -19
data/git-cleanup.gemspec
CHANGED
data/lib/git-cleanup.rb
CHANGED
@@ -9,13 +9,13 @@ class GitCleanup
|
|
9
9
|
|
10
10
|
master = repo.heads.find { |h| h.name == 'master' }
|
11
11
|
|
12
|
-
self.prune(repo)
|
12
|
+
# self.prune(repo)
|
13
13
|
|
14
14
|
local_branches = repo.branches.map { |b| b.name }
|
15
15
|
|
16
16
|
remote_branches = Branch.remote(repo).select { |b| b.commit.lazy_source }
|
17
17
|
|
18
|
-
remote_branches.sort.each_with_index do |branch, index|
|
18
|
+
remote_branches.sort.reverse.each_with_index do |branch, index|
|
19
19
|
next if branch.name == 'master'
|
20
20
|
|
21
21
|
# Diff of commit in branch which is not in master
|
data/lib/git-cleanup/helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class GitCleanup
|
2
2
|
module Helper
|
3
|
-
def self.boolean(question)
|
3
|
+
def self.boolean(question, &block)
|
4
4
|
puts "#{question} (y/n)"
|
5
5
|
answer = STDIN.gets.chomp
|
6
6
|
if answer == 'y'
|
@@ -8,7 +8,7 @@ class GitCleanup
|
|
8
8
|
elsif answer == 'n'
|
9
9
|
return false
|
10
10
|
else
|
11
|
-
boolean(question)
|
11
|
+
boolean(question, &block)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-cleanup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 31
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 2
|
10
|
-
version: 0.1.2
|
5
|
+
version: 0.1.3
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Martyn Loughran
|
@@ -15,7 +10,7 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-
|
13
|
+
date: 2011-07-06 00:00:00 +01:00
|
19
14
|
default_executable:
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
@@ -26,11 +21,6 @@ dependencies:
|
|
26
21
|
requirements:
|
27
22
|
- - ~>
|
28
23
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 7
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 2
|
33
|
-
- 0
|
34
24
|
version: 2.2.0
|
35
25
|
type: :runtime
|
36
26
|
version_requirements: *id001
|
@@ -70,23 +60,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
60
|
requirements:
|
71
61
|
- - ">="
|
72
62
|
- !ruby/object:Gem::Version
|
73
|
-
hash: 3
|
74
|
-
segments:
|
75
|
-
- 0
|
76
63
|
version: "0"
|
77
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
65
|
none: false
|
79
66
|
requirements:
|
80
67
|
- - ">="
|
81
68
|
- !ruby/object:Gem::Version
|
82
|
-
hash: 3
|
83
|
-
segments:
|
84
|
-
- 0
|
85
69
|
version: "0"
|
86
70
|
requirements: []
|
87
71
|
|
88
72
|
rubyforge_project:
|
89
|
-
rubygems_version: 1.
|
73
|
+
rubygems_version: 1.6.2
|
90
74
|
signing_key:
|
91
75
|
specification_version: 3
|
92
76
|
summary: Command line tool for interactively cleaning up old git branches (remotely and locally)
|