latest_branch 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/bin/latest_branch +3 -3
- data/lib/latest_branch/version.rb +2 -1
- data/website/index.txt +5 -3
- metadata +1 -1
data/History.txt
CHANGED
data/bin/latest_branch
CHANGED
@@ -10,7 +10,7 @@ default_path ||= File.join(ENV['HOME'], 'rails_apps') if ENV['HOME']
|
|
10
10
|
OPTIONS = {
|
11
11
|
:app => nil,
|
12
12
|
:path => default_path,
|
13
|
-
:ignore => 'pkg'
|
13
|
+
:ignore => 'pkg,vendor,template'
|
14
14
|
}
|
15
15
|
parser = OptionParser.new do |opts|
|
16
16
|
opts.banner = <<BANNER
|
@@ -37,7 +37,7 @@ BANNER
|
|
37
37
|
opts.on("-i", "--ignore=IGNORE1[,IGNORE2]", String,
|
38
38
|
"Paths that contain IGNORE1 or IGNORE2, etc, will not be included",
|
39
39
|
"E.g. --ignore=pkg will ignore pkg folders generated when building gems",
|
40
|
-
"Default: pkg,vendor") { |OPTIONS[:ignore]| }
|
40
|
+
"Default: pkg,vendor,template") { |OPTIONS[:ignore]| }
|
41
41
|
opts.on("-h", "--help",
|
42
42
|
"Show this help message.") { puts opts; exit }
|
43
43
|
opts.parse!(ARGV)
|
@@ -49,7 +49,7 @@ end
|
|
49
49
|
app = OPTIONS[:app]
|
50
50
|
path = File.expand_path OPTIONS[:path]
|
51
51
|
|
52
|
-
folders = Dir["#{path}
|
52
|
+
folders = Dir["#{path}/**/#{app}*/**/Rakefile"].map {|folder| folder.gsub('/Rakefile','')}.uniq
|
53
53
|
OPTIONS[:ignore].split(',').each do |ignore_me|
|
54
54
|
folders.reject! { |folder| folder =~ /#{ignore_me}/ }
|
55
55
|
end
|
data/website/index.txt
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
h1. latest_branch
|
2
2
|
|
3
|
-
h2. →
|
3
|
+
h2. → latest_branch -a <proj_name>
|
4
|
+
|
5
|
+
h2. → alias_all_projects
|
4
6
|
|
5
7
|
|
6
8
|
h2. What
|
@@ -9,7 +11,7 @@ Return the most-recently-updated folder starting with a common prefix.
|
|
9
11
|
This is useful where your project branches all start with the same name as the project, e.g.
|
10
12
|
|
11
13
|
* /path/to/wizzo -- trunk
|
12
|
-
* /path/to/wizzo_feature1 -- branch for feature1
|
14
|
+
* /path/to/wizzo_feature1 -- branch for feature1 *Last touched*
|
13
15
|
* /path/to/wizzo_feature2 -- branch for feature2
|
14
16
|
|
15
17
|
<pre>
|
@@ -20,7 +22,7 @@ $ latest_branch --app=wizzo --path=/path/to
|
|
20
22
|
|
21
23
|
Or, where all your branches and trunk appear as subfolders, e.g.
|
22
24
|
|
23
|
-
* /path/to/booya/trunk -- trunk
|
25
|
+
* /path/to/booya/trunk -- trunk *Last touched*
|
24
26
|
* /path/to/booya/branches/feature1 -- branch for feature1
|
25
27
|
* /path/to/booya/branches/feature2 -- branch for feature2
|
26
28
|
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: latest_branch
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
6
|
+
version: 1.0.1
|
7
7
|
date: 2007-04-15 00:00:00 +02:00
|
8
8
|
summary: Return the most-recently-updated folder starting with a common prefix.
|
9
9
|
require_paths:
|