mate 1.1.6 → 1.2.0
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/README.markdown +1 -1
- data/lib/mate/tmproj/ignores.rb +5 -3
- data/mate.gemspec +1 -1
- metadata +5 -5
data/README.markdown
CHANGED
@@ -4,7 +4,7 @@ TextMate project builder using git ignores for exclusions
|
|
4
4
|
|
5
5
|
You can add `alias mate='tm'` to your `.profile`, `.bash_profile` …
|
6
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`) and special `.tmignore` which works like other ignore files for project but doesn't affect git itself, also `.git` folder and certain files (images, archives, media files, logs and some other binary files) are filtered.
|
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`) and special `.tmignore` which works like other ignore files for project but doesn't affect git itself (you can use global `~/.tmignore` file), also `.git` folder and certain files (images, archives, media files, logs and some other binary files) are filtered.
|
8
8
|
|
9
9
|
## Copyright
|
10
10
|
|
data/lib/mate/tmproj/ignores.rb
CHANGED
@@ -14,14 +14,15 @@ module Mate
|
|
14
14
|
@file_pattern = ["#{DOUBLE_ASTERISK_R}.+\\.(?:#{BINARY_EXTENSIONS.flatten.join('|')})"]
|
15
15
|
@folder_pattern = ["#{DOUBLE_ASTERISK_R}.git"]
|
16
16
|
|
17
|
-
|
17
|
+
process(dir, Pathname(`git config --get core.excludesfile`.strip).expand_path)
|
18
|
+
process(dir, Pathname('~/.tmignore').expand_path)
|
18
19
|
|
19
20
|
dir.find do |path|
|
20
21
|
Find.prune if ignore?(path)
|
21
22
|
if path.directory?
|
22
23
|
%w[.gitignore .tmignore .git/info/exclude].each do |ignore_file_name|
|
23
24
|
if (ignore_file = path + ignore_file_name).file?
|
24
|
-
|
25
|
+
process(path, ignore_file)
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
@@ -46,7 +47,8 @@ module Mate
|
|
46
47
|
|
47
48
|
private
|
48
49
|
|
49
|
-
def
|
50
|
+
def process(parent, ignore_file)
|
51
|
+
return unless ignore_file.exist?
|
50
52
|
current_file_pattern = []
|
51
53
|
current_folder_pattern = []
|
52
54
|
ignore_file.readlines.map do |line|
|
data/mate.gemspec
CHANGED
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 1.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ivan Kuchin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: plist
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements: []
|
78
78
|
|
79
79
|
rubyforge_project: mate
|
80
|
-
rubygems_version: 1.8.
|
80
|
+
rubygems_version: 1.8.13
|
81
81
|
signing_key:
|
82
82
|
specification_version: 3
|
83
83
|
summary: TextMate project builder using git ignores for exclusions
|