tagrity 0.2.7 → 0.2.12
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +7 -6
- data/lib/tagrity/config_file.rb +3 -3
- data/lib/tagrity/tag_generator.rb +5 -5
- data/lib/tagrity/version.rb +1 -1
- data/sample_config.yml +3 -3
- data/tagrity.gemspec +1 -1
- data/test_files/barbaz.barbaz.c +7 -0
- data/test_files/expected_after_delete +2 -0
- data/test_files/expected_genall_git_tags +2 -0
- data/test_files/expected_genall_nongit_tags +2 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 751e6ca1493dafdfc6e8ee60da9244bbf5e25baabbc789a316ae6f9835b2dec2
|
4
|
+
data.tar.gz: 4e66d699d351df6b15b880ef6dc5b8d6e65178c4214ff8c801fab40c5c453686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 944fa0185b9095ee8903a3d009cae641961087e4d0294f6a6be892b86d98b4ba7bd3681b869984ad9113b36c9c1ab9a4bcb9209a3e1b5264e41b0f71c61a218c
|
7
|
+
data.tar.gz: 9d6e72900f8e3b01bd8f9b32de500d2513d087cbc7452031dd1c6820a434d14624714b1e2ad9911f659af899c46877b4e4d275eef0a8809f6efac8ea7235137c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tagrity (0.2.
|
4
|
+
tagrity (0.2.11)
|
5
5
|
cli-ui (~> 1.3.0)
|
6
6
|
listen (~> 3.0)
|
7
7
|
pry (~> 0.9.9)
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
cli-ui (1.3.0)
|
14
14
|
coderay (1.1.2)
|
15
15
|
diff-lcs (1.3)
|
16
|
-
ffi (1.
|
16
|
+
ffi (1.12.2)
|
17
17
|
listen (3.2.1)
|
18
18
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
19
19
|
rb-inotify (~> 0.9, >= 0.9.10)
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
coderay (~> 1.0)
|
23
23
|
method_source (~> 0.8)
|
24
24
|
slop (~> 3.4)
|
25
|
-
rake (
|
25
|
+
rake (13.0.1)
|
26
26
|
rb-fsevent (0.10.3)
|
27
27
|
rb-inotify (0.10.1)
|
28
28
|
ffi (~> 1.0)
|
@@ -48,10 +48,10 @@ PLATFORMS
|
|
48
48
|
|
49
49
|
DEPENDENCIES
|
50
50
|
bundler (~> 2.0)
|
51
|
-
rake (~>
|
51
|
+
rake (~> 13.0)
|
52
52
|
ripper-tags (~> 0.8.0)
|
53
53
|
rspec (~> 3.0)
|
54
54
|
tagrity!
|
55
55
|
|
56
56
|
BUNDLED WITH
|
57
|
-
2.
|
57
|
+
2.1.4
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ $ gem install tagrity
|
|
16
16
|
tagrity start
|
17
17
|
```
|
18
18
|
|
19
|
-
That's it! It will monitor pwd and
|
19
|
+
That's it! It will monitor pwd and index any files which change. Check out [Configuration](#configuration) to restrict which files get indexed.
|
20
20
|
|
21
21
|
To stop watching pwd, use
|
22
22
|
|
@@ -78,11 +78,11 @@ extensions_blacklist: [erb, html, txt]
|
|
78
78
|
# how to integrate with git
|
79
79
|
# git_strategy: TRACKED | IGNORED | NA
|
80
80
|
# TRACKED: only index files tracked by git
|
81
|
-
# IGNORED:
|
81
|
+
# IGNORED: only index files which are not ignored by git
|
82
82
|
# NA: don't use git, index all files under pwd
|
83
83
|
#
|
84
|
-
# Default:
|
85
|
-
git_strategy:
|
84
|
+
# Default: NA
|
85
|
+
git_strategy: IGNORED
|
86
86
|
|
87
87
|
# which paths (relative to pwd) to ignore
|
88
88
|
# It's usually better to avoid this since tagrity integrates with git by
|
@@ -141,8 +141,9 @@ Usage:
|
|
141
141
|
tagrity logs
|
142
142
|
|
143
143
|
Options:
|
144
|
-
[-n=N]
|
145
|
-
|
144
|
+
[-n=N] # the number of log lines to print
|
145
|
+
# Default: 10
|
146
|
+
[--debug], [--no-debug] # if debug logs be printed too
|
146
147
|
|
147
148
|
Print the logs for pwd
|
148
149
|
```
|
data/lib/tagrity/config_file.rb
CHANGED
@@ -111,15 +111,15 @@ module Tagrity
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def ensure_extensions_whitelist
|
114
|
-
ensure_option('
|
114
|
+
ensure_option('extensions_whitelist', [])
|
115
115
|
end
|
116
116
|
|
117
117
|
def ensure_extensions_blacklist
|
118
|
-
ensure_option('
|
118
|
+
ensure_option('extensions_blacklist', [])
|
119
119
|
end
|
120
120
|
|
121
121
|
def ensure_git_strategy
|
122
|
-
ensure_option('git_strategy', '
|
122
|
+
ensure_option('git_strategy', 'NA')
|
123
123
|
end
|
124
124
|
|
125
125
|
def ensure_excluded_paths
|
@@ -20,7 +20,7 @@ module Tagrity
|
|
20
20
|
cmd = if check_git?
|
21
21
|
'git ls-files 2> /dev/null'
|
22
22
|
else
|
23
|
-
'find * 2> /dev/null'
|
23
|
+
'find * -type f 2> /dev/null'
|
24
24
|
end
|
25
25
|
files = `#{cmd}`.split("\n")
|
26
26
|
if $?.exitstatus == 0
|
@@ -33,12 +33,12 @@ module Tagrity
|
|
33
33
|
def generate(files)
|
34
34
|
return if files.empty?
|
35
35
|
files
|
36
|
-
.select { |file| generate_tags?(file)
|
37
|
-
.group_by { |file| @config.command_for_extension(file.
|
36
|
+
.select { |file| generate_tags?(file)}
|
37
|
+
.group_by { |file| @config.command_for_extension(file.split('.').last) }
|
38
38
|
.each do |cmd, fnames|
|
39
39
|
Tempfile.create do |tmpf|
|
40
40
|
IO::write(tmpf.path, fnames.join("\n"))
|
41
|
-
system(cmd, '-f', tagf, '--append', '-L', tmpf.path, out: File::NULL)
|
41
|
+
system(cmd, '-f', tagf, '--append', '-L', tmpf.path, out: File::NULL, err: File::NULL)
|
42
42
|
if $?.exitstatus == 0
|
43
43
|
@logger.info("{#{cmd}} generated tags for #{fnames} into #{tagf}")
|
44
44
|
else
|
@@ -91,7 +91,7 @@ module Tagrity
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def file_excluded?(fname)
|
94
|
-
@config.ignore_extension?(fname.
|
94
|
+
@config.ignore_extension?(fname.split('.').last) || @config.path_ignored?(fname)
|
95
95
|
end
|
96
96
|
|
97
97
|
def tagf
|
data/lib/tagrity/version.rb
CHANGED
data/sample_config.yml
CHANGED
@@ -35,11 +35,11 @@ extensions_blacklist: [erb, html, txt]
|
|
35
35
|
# how to integrate with git
|
36
36
|
# git_strategy: TRACKED | IGNORED | NA
|
37
37
|
# TRACKED: only index files tracked by git
|
38
|
-
# IGNORED:
|
38
|
+
# IGNORED: only index files which are not ignored by git
|
39
39
|
# NA: don't use git, index all files under pwd
|
40
40
|
#
|
41
|
-
# Default:
|
42
|
-
git_strategy:
|
41
|
+
# Default: NA
|
42
|
+
git_strategy: IGNORED
|
43
43
|
|
44
44
|
# which paths (relative to pwd) to ignore
|
45
45
|
# It's usually better to avoid this since tagrity integrates with git by
|
data/tagrity.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency 'cli-ui', '~> 1.3.0'
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 2.0"
|
34
|
-
spec.add_development_dependency "rake", "~>
|
34
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
36
36
|
spec.add_development_dependency "ripper-tags", "~> 0.8.0"
|
37
37
|
spec.add_dependency "pry", "~> 0.9.9"
|
@@ -1,6 +1,8 @@
|
|
1
1
|
barbaz_fun_one foo/barbaz.rb /^def barbaz_fun_one$/;" f class:Object
|
2
2
|
barbaz_fun_two foo/barbaz.rb /^def barbaz_fun_two$/;" f class:Object
|
3
|
+
barbaz_one barbaz.barbaz.c /^int barbaz_one() {$/;" f typeref:typename:int
|
3
4
|
barbaz_one barbaz.c /^int barbaz_one() {$/;" f typeref:typename:int
|
5
|
+
barbaz_two barbaz.barbaz.c /^int barbaz_two() {$/;" f typeref:typename:int
|
4
6
|
barbaz_two barbaz.c /^int barbaz_two() {$/;" f typeref:typename:int
|
5
7
|
foobar_fun_one foo/foobar.rb /^def foobar_fun_one$/;" f class:Object
|
6
8
|
foobar_fun_two foo/foobar.rb /^def foobar_fun_two$/;" f class:Object
|
@@ -1,6 +1,8 @@
|
|
1
1
|
barbaz_fun_one foo/barbaz.rb /^def barbaz_fun_one$/;" f class:Object
|
2
2
|
barbaz_fun_two foo/barbaz.rb /^def barbaz_fun_two$/;" f class:Object
|
3
|
+
barbaz_one barbaz.barbaz.c /^int barbaz_one() {$/;" f typeref:typename:int
|
3
4
|
barbaz_one barbaz.c /^int barbaz_one() {$/;" f typeref:typename:int
|
4
5
|
barbaz_one foo/foobar.c /^int barbaz_one() {$/;" f typeref:typename:int
|
6
|
+
barbaz_two barbaz.barbaz.c /^int barbaz_two() {$/;" f typeref:typename:int
|
5
7
|
barbaz_two barbaz.c /^int barbaz_two() {$/;" f typeref:typename:int
|
6
8
|
barbaz_two foo/foobar.c /^int barbaz_two() {$/;" f typeref:typename:int
|
@@ -1,7 +1,9 @@
|
|
1
1
|
barbaz_fun_one foo/barbaz.rb /^def barbaz_fun_one$/;" f class:Object
|
2
2
|
barbaz_fun_two foo/barbaz.rb /^def barbaz_fun_two$/;" f class:Object
|
3
|
+
barbaz_one barbaz.barbaz.c /^int barbaz_one() {$/;" f typeref:typename:int
|
3
4
|
barbaz_one barbaz.c /^int barbaz_one() {$/;" f typeref:typename:int
|
4
5
|
barbaz_one foo/foobar.c /^int barbaz_one() {$/;" f typeref:typename:int
|
6
|
+
barbaz_two barbaz.barbaz.c /^int barbaz_two() {$/;" f typeref:typename:int
|
5
7
|
barbaz_two barbaz.c /^int barbaz_two() {$/;" f typeref:typename:int
|
6
8
|
barbaz_two foo/foobar.c /^int barbaz_two() {$/;" f typeref:typename:int
|
7
9
|
foobar_fun_one foo/foobar.rb /^def foobar_fun_one$/;" f class:Object
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tagrity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam P. Regasz-Rethy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '13.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '13.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,6 +161,7 @@ files:
|
|
161
161
|
- tagrity.gemspec
|
162
162
|
- test_files/.gitignore
|
163
163
|
- test_files/.tagrity_config.yml
|
164
|
+
- test_files/barbaz.barbaz.c
|
164
165
|
- test_files/barbaz.c
|
165
166
|
- test_files/expected_after_delete
|
166
167
|
- test_files/expected_genall_git_tags
|