tagrity 0.3.1 → 0.3.2
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 +1 -1
- data/TODO.md +0 -3
- data/lib/tagrity/cli.rb +6 -0
- data/lib/tagrity/commands/init.rb +11 -0
- data/lib/tagrity/pid_file.rb +14 -0
- data/lib/tagrity/tag_generator.rb +1 -1
- data/lib/tagrity/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba42a97fdd56521aac107e9adff40cbb296d1afa36d88906f48000bd10e874a0
|
4
|
+
data.tar.gz: 042f1ea9fe546284aa2bd943cafde60cb098705e0451b2ca420c0a90c5766d92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 134cd56085f5747952e3ffb51a524e47363e97f3f744a9a04c7e53feed830341a444dfea5c0da53f470af2ea1e511cb4c7e525e180931c83e4d7b4502496263c
|
7
|
+
data.tar.gz: 3061e97a976898881cda0ec32e08c831b98d43336f8bf85b7ddd9182c180505ef7e19e2c7778d0ee839552d56cfa82bf485d188abe4d370465c140aef8d9407c
|
data/Gemfile.lock
CHANGED
data/TODO.md
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# TODO
|
2
2
|
|
3
3
|
* Better error handling
|
4
|
-
* Delete old tags before doing --append (similar to ripper-tags funtionality, but do it for all ctags-alikes)
|
5
4
|
* Restart process which were terminated due to a system shutdown
|
6
5
|
* Will have to add `tagrity stop <pid>` instead of forcing users to use `kill <pid>`
|
7
|
-
* Watch local and global config for changes and reload automatically
|
8
|
-
* Better --fresh for git repos
|
data/lib/tagrity/cli.rb
CHANGED
@@ -3,6 +3,7 @@ require 'tagrity/commands/start'
|
|
3
3
|
require 'tagrity/commands/stop'
|
4
4
|
require 'tagrity/commands/status'
|
5
5
|
require 'tagrity/commands/logs'
|
6
|
+
require 'tagrity/commands/init'
|
6
7
|
require 'tagrity/version'
|
7
8
|
|
8
9
|
module Tagrity
|
@@ -35,5 +36,10 @@ module Tagrity
|
|
35
36
|
def logs
|
36
37
|
Command::Logs::call(options['n'], options['debug'])
|
37
38
|
end
|
39
|
+
|
40
|
+
desc "init", "Restart any tagrity processes that died"
|
41
|
+
def init
|
42
|
+
Command::Init::call
|
43
|
+
end
|
38
44
|
end
|
39
45
|
end
|
data/lib/tagrity/pid_file.rb
CHANGED
@@ -36,6 +36,20 @@ module Tagrity
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
def revive_dead_pids
|
40
|
+
Dir.glob("#{Helper.run_dir}/*").reduce([]) do |pid_files, path|
|
41
|
+
pid = pid_from_path(path)
|
42
|
+
dir = File.read(path)
|
43
|
+
|
44
|
+
if not Helper.alive?(pid)
|
45
|
+
File.delete(path)
|
46
|
+
Dir.chdir(File.realdirpath(dir)) do
|
47
|
+
Process.spawn(['tagrity', 'start'])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
39
53
|
private
|
40
54
|
|
41
55
|
def same_dirs?(dir1, dir2)
|
@@ -52,7 +52,7 @@ module Tagrity
|
|
52
52
|
if $?.exitstatus == 0
|
53
53
|
@logger.info("{#{cmd}} generated tags for #{fnames} into #{tagf}")
|
54
54
|
else
|
55
|
-
@logger.
|
55
|
+
@logger.error("{#{cmd}} failed (#{$?.exitstatus}) to generate tags for #{fnames} into #{tagf}")
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
data/lib/tagrity/version.rb
CHANGED
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.3.
|
4
|
+
version: 0.3.2
|
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-08-
|
11
|
+
date: 2020-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- exe/tagrity
|
148
148
|
- lib/tagrity.rb
|
149
149
|
- lib/tagrity/cli.rb
|
150
|
+
- lib/tagrity/commands/init.rb
|
150
151
|
- lib/tagrity/commands/logs.rb
|
151
152
|
- lib/tagrity/commands/start.rb
|
152
153
|
- lib/tagrity/commands/status.rb
|