tagrity 0.3.4 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7490444ad7659b555e29f61c09d8bee1536a608345113245ea54f1f85fcb5002
4
- data.tar.gz: e28e9d0d61c936ae89379913bd6b64d2e177431e985371c81b27bb2b77f287d4
3
+ metadata.gz: e58265edc0966bca3bec8c06593f3f565474608719eefbeb32e5430a91c9cf1b
4
+ data.tar.gz: e962278ba7856b479f5e5989857c356f5a24aed51a076ac633e275e7b7384676
5
5
  SHA512:
6
- metadata.gz: fdd57aeb20e34e8f224d07fb893fe44ebc3bd02364dcf79c12bb404ac293e11333b7941967356ac4999b8105f22c5f7541df519265d3cced834cc4b71f6dea67
7
- data.tar.gz: 80ac84ad3477f8d03275e2e814c36c668ab237cfa1bb9fb95628b0a60cc32eef554a49117871368fae9a2d5eee37ff9dbd6ab94176b89d263eaa413e3191f094
6
+ metadata.gz: 321f570b3fa8e9c84f2309ead1afb2d76f9975fe82ea98f3fdcfb607873bc088581e496a96c126e26146c0d5e696978b4089ea28b6557620d21250d333b39bbb
7
+ data.tar.gz: 60eab2019359a6016dcf8b78b65b47ce47e51f41a0589572a7df064ef2aeb424198717efbedf2c2b6987133f312f8111a4a6936a7fa6bcba2530d62c4c1c9299
data/Gemfile.lock CHANGED
@@ -1,10 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tagrity (0.3.2)
4
+ tagrity (0.3.8)
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 pwd and index any files which change. Check out [Configuration](#configuration) to restrict which files get indexed.
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 pwd, use
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
- # It's usually better to avoid this since tagrity integrates with git by
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
- Stop watching pwd
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
- puts ::CLI::UI.fmt "{{green:#{"Successfully killed #{pid_file.pid}"}}}"
18
- logger.info("Successfully killed #{pid_file.pid}")
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
@@ -2,7 +2,6 @@ require 'tmpdir'
2
2
  require 'tempfile'
3
3
  require 'fileutils'
4
4
  require 'tagrity/helper'
5
- require 'pry'
6
5
 
7
6
  module Tagrity
8
7
  class TagGenerator
@@ -1,3 +1,3 @@
1
1
  module Tagrity
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.9"
3
3
  end
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
- # It's usually better to avoid this since tagrity integrates with git by
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.add_dependency "pry", "~> 0.9.9"
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
4
+ version: 0.3.9
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-29 00:00:00.000000000 Z
11
+ date: 2021-06-07 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: :runtime
118
+ type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
@@ -128,7 +128,6 @@ email:
128
128
  - rethy.spud@gmail.com
129
129
  executables:
130
130
  - tagrity
131
- - tagrity_revive
132
131
  extensions: []
133
132
  extra_rdoc_files: []
134
133
  files:
@@ -142,11 +141,9 @@ files:
142
141
  - LICENSE.txt
143
142
  - README.md
144
143
  - Rakefile
145
- - TODO.md
146
144
  - bin/console
147
145
  - bin/setup
148
146
  - exe/tagrity
149
- - exe/tagrity_revive
150
147
  - lib/tagrity.rb
151
148
  - lib/tagrity/cli.rb
152
149
  - lib/tagrity/commands/logs.rb
data/TODO.md DELETED
@@ -1,5 +0,0 @@
1
- # TODO
2
-
3
- * Better error handling
4
- * Restart process which were terminated due to a system shutdown
5
- * Will have to add `tagrity stop <pid>` instead of forcing users to use `kill <pid>`
data/exe/tagrity_revive DELETED
@@ -1,3 +0,0 @@
1
- #! /bin/sh
2
-
3
- echo "Hello, World!"