watchcat 0.6.0 → 0.6.1
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/CHANGELOG.md +5 -0
- data/ext/watchcat/src/lib.rs +16 -1
- data/lib/watchcat/executor.rb +6 -0
- data/lib/watchcat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47d2f9766f1eed1bde9cf1a18359a6e0934affe0dcc478dfcacb324444d3b6cd
|
|
4
|
+
data.tar.gz: 10478a5fe06d51a8c0e357f5415dea6fbc8b99203aa2121bd8c080c43a141d09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81f5cefed399da9270bc610572108f88a2a72cca407c5c6d27bde0848bf3731f2aeced07220bde6bd0f83e02dd91ab1d8a564a3b4a4e83d8f014d865e402b537
|
|
7
|
+
data.tar.gz: ea0c45495eaa61bdbb6d440561e7e0a3bb996f2f31baaec1179cc85d7acf2ae27600e49cf40037d4bd0e38a5e6142e095021c7b0306d53b79c0cd9ae0e6eba48
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
* Add `#alive?` to the watcher returned by `Watchcat.watch` for checking whether the background watcher thread is still running.
|
|
6
|
+
* Fix `ignore_access` being a no-op on macOS: FSEvents has no `Access` event kind, so a plain read was surfacing as an unclassified `Modify(Metadata)` event instead and passing the filter unfiltered.
|
|
7
|
+
|
|
3
8
|
## 0.6.0
|
|
4
9
|
|
|
5
10
|
* Add `#watch`, `#unwatch`, and `#watched` to the watcher returned by `Watchcat.watch` for dynamically managing watched paths.
|
data/ext/watchcat/src/lib.rs
CHANGED
|
@@ -191,7 +191,22 @@ impl WatchcatWatcher {
|
|
|
191
191
|
if ignore_remove && matches!(event.kind, notify::event::EventKind::Remove(_)) {
|
|
192
192
|
continue;
|
|
193
193
|
}
|
|
194
|
-
|
|
194
|
+
|
|
195
|
+
let macos_ambiguous_metadata_touch = cfg!(target_os = "macos")
|
|
196
|
+
&& matches!(
|
|
197
|
+
event.kind,
|
|
198
|
+
notify::event::EventKind::Modify(
|
|
199
|
+
notify::event::ModifyKind::Metadata(
|
|
200
|
+
notify::event::MetadataKind::Any
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
);
|
|
204
|
+
if ignore_access
|
|
205
|
+
&& (matches!(
|
|
206
|
+
event.kind,
|
|
207
|
+
notify::event::EventKind::Access(_)
|
|
208
|
+
) || macos_ambiguous_metadata_touch)
|
|
209
|
+
{
|
|
195
210
|
continue;
|
|
196
211
|
}
|
|
197
212
|
if ignore_create && matches!(event.kind, notify::event::EventKind::Create(_)) {
|
data/lib/watchcat/executor.rb
CHANGED
|
@@ -71,6 +71,12 @@ module Watchcat
|
|
|
71
71
|
@paths.dup
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
+
# Whether the background watcher thread is still running. `false` before
|
|
75
|
+
# `#start` is called, after `#stop`, or if the thread died unexpectedly.
|
|
76
|
+
def alive?
|
|
77
|
+
!@watch_thread.nil? && @watch_thread.alive?
|
|
78
|
+
end
|
|
79
|
+
|
|
74
80
|
private
|
|
75
81
|
|
|
76
82
|
def start_watching
|
data/lib/watchcat/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchcat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yuji Yaginuma
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|