tagrity 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -4
- data/lib/tagrity/commands/status.rb +2 -15
- data/lib/tagrity/config_file.rb +0 -2
- data/lib/tagrity/version.rb +1 -1
- data/sample_config.yml +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a857a7e4ba200bc8058e9e862098e3de1b7e1058b5098f2e745a076e4ad04f57
|
4
|
+
data.tar.gz: 153d10c351c435f5cc518b851376e5c0b4d4720e00aabc64cd30ad26ec4272b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb823c4f06d08641055876347f0d1f8c79ff825ecd91e2f885acecff79ee5e181faf57dfea5b3eab464fe4d0852353ae99271e485cea1a8e73a803a4307774c
|
7
|
+
data.tar.gz: ca2dae1f92bc9a6430435436574a1fb61b45ad4d881ca240fde79f77cf94867ad0488ff062b46d526d232c4f42f5f62581d88eaf1befb8dbd01178f9070a81d7
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.com/RRethy/tagrity.svg?branch=master)](https://travis-ci.com/RRethy/tagrity)
|
4
4
|
|
5
|
-
Automatically regenerate tags on file changes.
|
5
|
+
Automatically regenerate your tags on file changes.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -34,12 +34,15 @@ tagrity status
|
|
34
34
|
|
35
35
|
Configuration can be done through use of a `tagrity_config.yml` file that looks like the following:
|
36
36
|
|
37
|
+
**NOTE:** Tagrity will look for a global config file at `$XDG_CONFIG_HOME/tagrity/tagrity_config.yml` (usually this will be `~/.config/tagrity/tagrity_config.yml`). This can be overridden by a local config in the current directory under the name `.tagrity_config.yml`.
|
38
|
+
|
37
39
|
[`tagrity_config.yml`](https://github.com/RRethy/tagrity/blob/master/sample_config.yml)
|
38
40
|
|
39
41
|
```yaml
|
40
42
|
# which command to use to generate tags for a specific file extension
|
41
43
|
# overrides default_command
|
42
|
-
# commands must support --append, -f, -L
|
44
|
+
# tag generation commands must support --append, -f, -L
|
45
|
+
# NOTE: Exuberant-ctags does NOT satisfy this, instead use Universal-ctags
|
43
46
|
#
|
44
47
|
# Default: empty
|
45
48
|
extension_commands:
|
@@ -87,8 +90,6 @@ git_strategy: TRACKED
|
|
87
90
|
excluded_paths: [vendor, node_modules]
|
88
91
|
```
|
89
92
|
|
90
|
-
Tagrity will look for a global config file at `$XDG_CONFIG_HOME/tagrity/tagrity_config.yml` (usually this will be `~/.config/tagrity/tagrity_config.yml`). This can be overridden by a local config file by the same name under pwd.
|
91
|
-
|
92
93
|
## Usage
|
93
94
|
|
94
95
|
```
|
@@ -5,21 +5,8 @@ module Tagrity
|
|
5
5
|
class Status
|
6
6
|
class << self
|
7
7
|
def call
|
8
|
-
|
9
|
-
pid_file
|
10
|
-
end
|
11
|
-
|
12
|
-
return if pid_files.empty?
|
13
|
-
|
14
|
-
max_pid_len = pid_files.max do |a, b|
|
15
|
-
a.pid.digits.count <=> b.pid.digits.count
|
16
|
-
end.pid.digits.count
|
17
|
-
max_dir_len = pid_files.max do |a, b|
|
18
|
-
a.dir.length <=> b.dir.length
|
19
|
-
end.dir.length
|
20
|
-
|
21
|
-
pid_files.each do |pid_file|
|
22
|
-
puts ::CLI::UI.fmt "{{cyan:#{pid_file.pid.to_s.ljust(max_pid_len)}}} {{green:#{pid_file.dir.ljust(max_dir_len)}}}"
|
8
|
+
PidFile.alive_pid_files.each do |pid_file|
|
9
|
+
puts ::CLI::UI.fmt "{{cyan:#{pid_file.pid}}} {{green:#{pid_file.dir}}}"
|
23
10
|
end
|
24
11
|
end
|
25
12
|
end
|
data/lib/tagrity/config_file.rb
CHANGED
@@ -9,8 +9,6 @@ module Tagrity
|
|
9
9
|
class ErrorTagFileNotWritable < StandardError; end
|
10
10
|
|
11
11
|
CONFIG_FNAME = 'tagrity_config.yml'
|
12
|
-
LOCAL_CONFIG_PATH = File.expand_path("./.#{CONFIG_FNAME}")
|
13
|
-
GLOBAL_CONFIG_PATH = File.expand_path("#{ENV['XDG_CONFIG_HOME'] || "#{ENV['HOME']}/.config"}/tagrity/#{CONFIG_FNAME}")
|
14
12
|
|
15
13
|
def reload_local
|
16
14
|
read_config(fname: local_config_path)
|
data/lib/tagrity/version.rb
CHANGED
data/sample_config.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# which command to use to generate tags for a specific file extension
|
2
2
|
# overrides default_command
|
3
|
-
# commands must support --append, -f, -L
|
3
|
+
# tag generation commands must support --append, -f, -L
|
4
|
+
# NOTE: Exuberant-ctags does NOT satisfy this, instead use Universal-ctags
|
4
5
|
#
|
5
6
|
# Default: empty
|
6
7
|
extension_commands:
|