tagrity 0.3.3 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +35 -6
- data/lib/tagrity/cli.rb +3 -2
- data/lib/tagrity/commands/stop.rb +4 -4
- data/lib/tagrity/version.rb +1 -1
- data/sample_config.yml +1 -2
- data/tagrity.gemspec +1 -1
- metadata +3 -4
- data/TODO.md +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 108ca29640e9678892135b56715e996495c083991290da7b85417b46d9919515
|
4
|
+
data.tar.gz: bb470e250abdcbd3c8279e993e116214ef744b4511ffd0a36015263491bb1aa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d84b1309bde87b1e08d506c6fed445fe82be16ae7a0cbdedae184b552b5a3a54598982819914a3930b8b422d9147d50da9d0688538efabc4e4a4f5eb46a0a51a
|
7
|
+
data.tar.gz: 3aaffa2a8cf6dd66fcf85de6312cf3865f20a7688193479f1945f53cf8be936fe28f83c01d01f79ee9c3f8c715d44c773a37ce68f0639aab0046e158045ad029
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tagrity (0.3.
|
4
|
+
tagrity (0.3.7)
|
5
5
|
cli-ui (~> 1.3.0)
|
6
6
|
listen (~> 3.2.1)
|
7
|
-
pry (~> 0.9.9)
|
8
7
|
thor (~> 0.20)
|
9
8
|
|
10
9
|
GEM
|
@@ -48,6 +47,7 @@ PLATFORMS
|
|
48
47
|
|
49
48
|
DEPENDENCIES
|
50
49
|
bundler (~> 2.0)
|
50
|
+
pry (~> 0.9.9)
|
51
51
|
rake (~> 13.0)
|
52
52
|
ripper-tags (~> 0.8.0)
|
53
53
|
rspec (~> 3.0)
|
data/README.md
CHANGED
@@ -16,9 +16,9 @@ $ gem install tagrity
|
|
16
16
|
tagrity start
|
17
17
|
```
|
18
18
|
|
19
|
-
That's it! It will monitor
|
19
|
+
That's it! It will monitor the current directory and generate tags for any files which change and are not ignored by git.
|
20
20
|
|
21
|
-
To stop watching
|
21
|
+
To stop watching the current directory, use
|
22
22
|
|
23
23
|
```sh
|
24
24
|
tagrity stop
|
@@ -30,6 +30,30 @@ To view directories being watched, use
|
|
30
30
|
tagrity status
|
31
31
|
```
|
32
32
|
|
33
|
+
## Less Quick Start
|
34
|
+
|
35
|
+
When your computer is restarted, the process watching the directories will be killed. Add the following to your `~/.bashrc` (or `~/.zshrc`, etc.) to revive any killed processes automatically.
|
36
|
+
|
37
|
+
```sh
|
38
|
+
(tagrity revive &) &> /dev/null
|
39
|
+
```
|
40
|
+
|
41
|
+
To stop watching a directory that isn't the current working directory (but shows up in `tagrity status`), you can use:
|
42
|
+
|
43
|
+
```sh
|
44
|
+
tagrity stop --dir <path>
|
45
|
+
```
|
46
|
+
|
47
|
+
Where `<path>` is a relative or absolute path. You may be tempted to run `tagrity status` to get the pid and then kill it with `kill <pid>`. However, while this will work, `tagrity revive` will restart these processes (with different pids of course). `tagrity stop` will kill the process and stop `tagrity revive` from starting it up again.
|
48
|
+
|
49
|
+
To get info on what tags are being generated, you can run:
|
50
|
+
|
51
|
+
```sh
|
52
|
+
tagrity logs
|
53
|
+
```
|
54
|
+
|
55
|
+
For a full set of subcommands, try `tagrity help`.
|
56
|
+
|
33
57
|
## Configuration
|
34
58
|
|
35
59
|
Configuration can be done through use of a local `.tagrity_config.yml` file that looks like the following:
|
@@ -76,8 +100,7 @@ extensions_whitelist: [rb, c, h, js]
|
|
76
100
|
extensions_blacklist: [erb, html, txt]
|
77
101
|
|
78
102
|
# which paths (relative to pwd) to ignore
|
79
|
-
#
|
80
|
-
# default using the strategy specified by git_strategy
|
103
|
+
# this is usually not needed since tagrity doesn't index files ignored by git
|
81
104
|
#
|
82
105
|
# Default: []
|
83
106
|
excluded_paths: [vendor, node_modules]
|
@@ -89,9 +112,11 @@ excluded_paths: [vendor, node_modules]
|
|
89
112
|
Commands:
|
90
113
|
tagrity help [COMMAND] # Describe available commands or one specific command
|
91
114
|
tagrity logs # Print the logs for pwd
|
115
|
+
tagrity revive # Restart any tagrity processes that died
|
92
116
|
tagrity start # Start watching pwd
|
93
117
|
tagrity status # List running tagrity processes and the directories being watched
|
94
|
-
tagrity stop # Stop watching pwd
|
118
|
+
tagrity stop # Stop watching a directory (default to pwd)
|
119
|
+
tagrity version # print tagrity version
|
95
120
|
```
|
96
121
|
|
97
122
|
### start
|
@@ -113,7 +138,11 @@ Start watching pwd
|
|
113
138
|
Usage:
|
114
139
|
tagrity stop
|
115
140
|
|
116
|
-
|
141
|
+
Options:
|
142
|
+
[--dir=DIR] # directory to stop watching.
|
143
|
+
# Default: /Users/rethy/ruby/tagrity
|
144
|
+
|
145
|
+
Stop watching a directory (default to pwd)
|
117
146
|
```
|
118
147
|
|
119
148
|
### status
|
data/lib/tagrity/cli.rb
CHANGED
@@ -20,9 +20,10 @@ module Tagrity
|
|
20
20
|
Command::Start::call(options['fg'], options['fresh'])
|
21
21
|
end
|
22
22
|
|
23
|
-
desc "stop", "Stop watching pwd"
|
23
|
+
desc "stop", "Stop watching a directory (default to pwd)"
|
24
|
+
option :dir, type: :string, default: Dir.pwd, desc: "directory to stop watching."
|
24
25
|
def stop()
|
25
|
-
Command::Stop::call
|
26
|
+
Command::Stop::call(options['dir'])
|
26
27
|
end
|
27
28
|
|
28
29
|
desc "status", "List running tagrity processes and the directories being watched"
|
@@ -6,16 +6,16 @@ module Tagrity
|
|
6
6
|
module Command
|
7
7
|
class Stop
|
8
8
|
class << self
|
9
|
-
def call
|
10
|
-
dir = Dir.pwd
|
9
|
+
def call(dir)
|
11
10
|
pid_files = PidFile.alive_pid_files(dir: dir)
|
12
11
|
if pid_files.empty?
|
13
12
|
puts ::CLI::UI.fmt "{{red:#{"😕 tagrity doesn't seem to be watching #{dir}"}}}"
|
14
13
|
else
|
15
14
|
pid_files.each do |pid_file|
|
16
15
|
pid_file.delete
|
17
|
-
|
18
|
-
|
16
|
+
msg = "Successfully killed #{pid_file.pid} for dir #{dir}"
|
17
|
+
puts ::CLI::UI.fmt "{{green:#{msg}}}"
|
18
|
+
logger.info(msg)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/tagrity/version.rb
CHANGED
data/sample_config.yml
CHANGED
@@ -33,8 +33,7 @@ extensions_whitelist: [rb, c, h, js]
|
|
33
33
|
extensions_blacklist: [erb, html, txt]
|
34
34
|
|
35
35
|
# which paths (relative to pwd) to ignore
|
36
|
-
#
|
37
|
-
# default using the strategy specified by git_strategy
|
36
|
+
# this is usually not needed since tagrity doesn't index files ignored by git
|
38
37
|
#
|
39
38
|
# Default: []
|
40
39
|
excluded_paths: [vendor, node_modules]
|
data/tagrity.gemspec
CHANGED
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
|
|
34
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
|
-
spec.
|
37
|
+
spec.add_development_dependency "pry", "~> 0.9.9"
|
38
38
|
end
|
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.8
|
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-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -115,7 +115,7 @@ dependencies:
|
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 0.9.9
|
118
|
-
type: :
|
118
|
+
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
@@ -141,7 +141,6 @@ files:
|
|
141
141
|
- LICENSE.txt
|
142
142
|
- README.md
|
143
143
|
- Rakefile
|
144
|
-
- TODO.md
|
145
144
|
- bin/console
|
146
145
|
- bin/setup
|
147
146
|
- exe/tagrity
|