tampon 0.6.4 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,62 +0,0 @@
1
- module Capistrano
2
- module Helpers
3
- module TamponHelper
4
-
5
- def who
6
- identity = (`git config user.name` || `whoami`)
7
- identity.chomp.to_url
8
- end
9
-
10
- def tags
11
- `git tag`.split("\n").compact
12
- end
13
-
14
- def non_release_tags
15
- tags - releases
16
- end
17
-
18
- def current_branch
19
- branches.select{|b| b =~ /^\*\s/}.first.gsub(/^\*\s/,"")
20
- end
21
-
22
- def branches
23
- `git branch --no-color`.split("\n")
24
- end
25
-
26
- def version_tag_prefix
27
- `git config gitflow.prefix.versiontag`.split("\n").first
28
- end
29
-
30
- def releases
31
- tags.select{|t| t =~ /^#{version_tag_prefix}(\d+)/}
32
- end
33
-
34
- def latest_release
35
- releases.sort{|x,y| x.split(version_tag_prefix).last <=> y.split(version_tag_prefix).last}.last
36
- end
37
-
38
- def available_tags
39
- Capistrano::CLI.ui.say "Available Tags:"
40
- Capistrano::CLI.ui.say "#{non_release_tags.join("\n")}"
41
- end
42
-
43
- def available_releases
44
- Capistrano::CLI.ui.say "\nAvailable Releases:"
45
- Capistrano::CLI.ui.say "#{releases.join("\n")}"
46
- end
47
-
48
- def banner
49
-
50
- <<-BANNER
51
- \nTampon for Gitflow
52
- ,-------------.
53
- (o) _ __ _____ )--.
54
- `-------------' )
55
- ( /
56
- `---'
57
- BANNER
58
- end
59
-
60
- end
61
- end
62
- end