tagrity 0.3.2 → 0.3.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba42a97fdd56521aac107e9adff40cbb296d1afa36d88906f48000bd10e874a0
4
- data.tar.gz: 042f1ea9fe546284aa2bd943cafde60cb098705e0451b2ca420c0a90c5766d92
3
+ metadata.gz: 23e7a19c450d56f1edfad77d0197b896a54bff22c1d93470f0f87ad73b39cad9
4
+ data.tar.gz: f4e895c3b71364b4aa2c19ec37ade02bc5e6d51501be21dd143058c89007b72c
5
5
  SHA512:
6
- metadata.gz: 134cd56085f5747952e3ffb51a524e47363e97f3f744a9a04c7e53feed830341a444dfea5c0da53f470af2ea1e511cb4c7e525e180931c83e4d7b4502496263c
7
- data.tar.gz: 3061e97a976898881cda0ec32e08c831b98d43336f8bf85b7ddd9182c180505ef7e19e2c7778d0ee839552d56cfa82bf485d188abe4d370465c140aef8d9407c
6
+ metadata.gz: 9f8877beea1429b73905cb96334134636999a5f262d54633c70a0e6f6ab9f5d90d729b81755d81ea226a4f6f8e4ecbfa262ff34c5820cc8f4436a4c22550a712
7
+ data.tar.gz: 037517b1bde73d9b067c64925576033cf75f055eafe56574b839625cb190d32ec4e25107bcc9ad25d2ee2da7b99826656fe4cd9d5330ddd0f4130c8085b8b0a5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tagrity (0.3.2)
4
+ tagrity (0.3.7)
5
5
  cli-ui (~> 1.3.0)
6
6
  listen (~> 3.2.1)
7
7
  pry (~> 0.9.9)
data/TODO.md CHANGED
@@ -1,5 +1,3 @@
1
1
  # TODO
2
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>`
3
+ * Document new changes for revive and stop
@@ -3,7 +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
+ require 'tagrity/commands/revive'
7
7
  require 'tagrity/version'
8
8
 
9
9
  module Tagrity
@@ -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"
@@ -37,9 +38,9 @@ module Tagrity
37
38
  Command::Logs::call(options['n'], options['debug'])
38
39
  end
39
40
 
40
- desc "init", "Restart any tagrity processes that died"
41
- def init
42
- Command::Init::call
41
+ desc "revive", "Restart any tagrity processes that died"
42
+ def revive
43
+ Command::Revive::call
43
44
  end
44
45
  end
45
46
  end
@@ -1,6 +1,6 @@
1
1
  module Tagrity
2
2
  module Command
3
- class Init
3
+ class Revive
4
4
  class << self
5
5
  def call
6
6
  PidFile.revive_dead_pids
@@ -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
@@ -44,7 +44,7 @@ module Tagrity
44
44
  if not Helper.alive?(pid)
45
45
  File.delete(path)
46
46
  Dir.chdir(File.realdirpath(dir)) do
47
- Process.spawn(['tagrity', 'start'])
47
+ Process.spawn('tagrity start')
48
48
  end
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module Tagrity
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tagrity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam P. Regasz-Rethy
@@ -147,8 +147,8 @@ files:
147
147
  - exe/tagrity
148
148
  - lib/tagrity.rb
149
149
  - lib/tagrity/cli.rb
150
- - lib/tagrity/commands/init.rb
151
150
  - lib/tagrity/commands/logs.rb
151
+ - lib/tagrity/commands/revive.rb
152
152
  - lib/tagrity/commands/start.rb
153
153
  - lib/tagrity/commands/status.rb
154
154
  - lib/tagrity/commands/stop.rb