mate 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/bin/tm +1 -1
- data/lib/mate/tmproj/ignores.rb +7 -2
- data/mate.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
TextMate project builder using git ignores for exclusions
|
4
4
|
|
5
|
+
You can add alias `mate='tm'` to your .profile, .bash_profile …
|
5
6
|
|
7
|
+
When tm command (or mate if aliased) is called with one or more paths and any of them is a directory, than project is created in ~/.tmprojs/ and opened. Its file and folder filters are built based on all types of git ignores (global, .gitignore and .git/info/exclude), also .git folder and certain files (images, archives, media files, logs and some other binary files) are filtered.
|
6
8
|
|
7
9
|
== Copyright
|
8
10
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/bin/tm
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
|
10
10
|
mate = (IO.popen('which -a mate', &:readlines).map(&:strip) - [__FILE__]).first
|
11
11
|
|
12
|
-
if !ARGV.empty? && ARGV.all?
|
12
|
+
if !ARGV.empty? && ARGV.all?(&File.method(:exist?)) && ARGV.any?(&File.method(:directory?))
|
13
13
|
Mate::Tmproj.new(ARGV).open
|
14
14
|
else
|
15
15
|
system mate, *ARGV
|
data/lib/mate/tmproj/ignores.rb
CHANGED
@@ -18,8 +18,13 @@ module Mate
|
|
18
18
|
|
19
19
|
dir.find do |path|
|
20
20
|
Find.prune if ignore?(path)
|
21
|
-
if path.directory?
|
22
|
-
|
21
|
+
if path.directory?
|
22
|
+
if (ignore_file = path + '.gitignore').file?
|
23
|
+
add(path, ignore_file)
|
24
|
+
end
|
25
|
+
if (ignore_file = path + '.git/info/exclude').file?
|
26
|
+
add(path, ignore_file)
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
25
30
|
end
|
data/mate.gemspec
CHANGED
metadata
CHANGED