io-watch 0.6.2 → 0.6.3
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
- checksums.yaml.gz.sig +0 -0
- data/bin/io-watch +1 -0
- data/ext/configure +2 -2
- data/ext/io/watch/fsevent.c +2 -1
- data/lib/io/watch/monitor.rb +1 -0
- data/lib/io/watch/version.rb +1 -1
- data/lib/io/watch.rb +3 -0
- data/license.md +1 -0
- data/readme.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +2 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14f3ccb0d7a3066e70e3ab6e25221c585f1a17034e0e9731fe85637e6797b4d8
|
4
|
+
data.tar.gz: 35d7f43fd20d2ef7cf68558c787344cc49c614498e98e8ccfc25bfca08d5b5d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 045d52cf0bc46fcc1410af1eb75362b21584561350996baa58c0b87a8b0216d24013d18ed97542d9c987f4b457b828b115f10f0ad5848734842194b45f2b09a0
|
7
|
+
data.tar.gz: 1d1a110f3d8f85e1d4f74fd2b55d927d4c91a3b02bbf506ce4b1f20272b67ba6c8830d3e265fa4948feac4de1ee5d2531ca76c8f2211255b21cc9d5cab33644f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bin/io-watch
CHANGED
data/ext/configure
CHANGED
@@ -43,7 +43,7 @@ esac
|
|
43
43
|
cat > Makefile <<EOF
|
44
44
|
TARGET = io-watch
|
45
45
|
CC = $CC
|
46
|
-
CFLAGS = -Wall -Wextra
|
46
|
+
CFLAGS = -Wall -Wextra -Werror
|
47
47
|
LDFLAGS = $LDFLAGS
|
48
48
|
SOURCES = $SOURCES
|
49
49
|
OBJECTS = \$(SOURCES:.c=.o)
|
@@ -74,4 +74,4 @@ uninstall:
|
|
74
74
|
.PHONY: all clean install uninstall
|
75
75
|
EOF
|
76
76
|
|
77
|
-
echo "Configuration complete. Run 'make' to build the project."
|
77
|
+
echo "Configuration complete. Run 'make' to build the project."
|
data/ext/io/watch/fsevent.c
CHANGED
@@ -44,6 +44,7 @@ void IO_Watch_FSEvent_callback(
|
|
44
44
|
const FSEventStreamEventFlags eventFlags[],
|
45
45
|
const FSEventStreamEventId eventIds[]) {
|
46
46
|
|
47
|
+
(void)streamRef; // unused
|
47
48
|
const char **eventPaths = (const char**)eventData;
|
48
49
|
struct IO_Watch *watch = context;
|
49
50
|
|
@@ -104,4 +105,4 @@ void IO_Watch_run(struct IO_Watch *watch) {
|
|
104
105
|
}
|
105
106
|
free(pathsToWatch);
|
106
107
|
CFRelease(pathsToWatchArray);
|
107
|
-
}
|
108
|
+
}
|
data/lib/io/watch/monitor.rb
CHANGED
@@ -9,6 +9,7 @@ class IO
|
|
9
9
|
module Watch
|
10
10
|
# Represents a list of roots to watch for changes.
|
11
11
|
class Monitor
|
12
|
+
# The path to the compiled `io-watch` command.
|
12
13
|
def self.command_path
|
13
14
|
if extension_path = Gem.loaded_specs['io-watch']&.extension_dir
|
14
15
|
if File.exist?(extension_path)
|
data/lib/io/watch/version.rb
CHANGED
data/lib/io/watch.rb
CHANGED
data/license.md
CHANGED
data/readme.md
CHANGED
@@ -4,6 +4,10 @@ Monitor the file-system for changes.
|
|
4
4
|
|
5
5
|
[](https://github.com/socketry/io-watch/actions?workflow=Test)
|
6
6
|
|
7
|
+
## Motivation
|
8
|
+
|
9
|
+
Previously, I was using the `listen` gem in combination with `rb-inotify` or `rb-fsevent` to watch for file-system changes. However, those libraries have been around for an extremely long time and have accumulated a lot of cruft. In addition, I don't like having to multiplex in application code depending on the underlying platform. I created this library to provide a simple, unified interface for watching directories for changes. This is the most consistently supported behaviour across all platforms, and fits the needs of most applications without a huge amount of complexity.
|
10
|
+
|
7
11
|
## Usage
|
8
12
|
|
9
13
|
Please see the [project documentation](https://socketry.github.io/io-watch/) for more details.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|