io-watch 0.6.2 → 0.6.3

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: 0d6ca67070f5fe227f2e06b5c5fa8bc2498a640aa88fb7e21a21da0bf5a09434
4
- data.tar.gz: 8973b98b3412da62ddcca9850ab04c3c69b1e00ab15e35e2bddf275a99f20823
3
+ metadata.gz: 14f3ccb0d7a3066e70e3ab6e25221c585f1a17034e0e9731fe85637e6797b4d8
4
+ data.tar.gz: 35d7f43fd20d2ef7cf68558c787344cc49c614498e98e8ccfc25bfca08d5b5d6
5
5
  SHA512:
6
- metadata.gz: db38f21e23045fb052299ee4974ee4cecd283ea406f32dd5a5e453ef7125c8d0a9086589ed6d0b8c0977311071367b2ba2429f93f71127f7e335b8f451208de4
7
- data.tar.gz: c6c6af9a7975ea6912b582bddc8b52ac0ef480de0a30c83d70c1781036e46eb93d97b87c58b0e12a558d29bff57955c8a75db483d97b427775b2da13ad557481
6
+ metadata.gz: 045d52cf0bc46fcc1410af1eb75362b21584561350996baa58c0b87a8b0216d24013d18ed97542d9c987f4b457b828b115f10f0ad5848734842194b45f2b09a0
7
+ data.tar.gz: 1d1a110f3d8f85e1d4f74fd2b55d927d4c91a3b02bbf506ce4b1f20272b67ba6c8830d3e265fa4948feac4de1ee5d2531ca76c8f2211255b21cc9d5cab33644f
checksums.yaml.gz.sig CHANGED
Binary file
data/bin/io-watch CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'console'
4
5
  require 'io/watch'
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."
@@ -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
+ }
@@ -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)
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Watch
8
- VERSION = '0.6.2'
8
+ VERSION = '0.6.3'
9
9
  end
10
10
  end
data/lib/io/watch.rb CHANGED
@@ -6,8 +6,11 @@
6
6
  require_relative 'watch/version'
7
7
  require_relative 'watch/monitor'
8
8
 
9
+ # @namespace
9
10
  class IO
11
+ # @namespace
10
12
  module Watch
13
+ # Create a new monitor.
11
14
  def self.new(...)
12
15
  Monitor.new(...)
13
16
  end
data/license.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # MIT License
2
2
 
3
3
  Copyright, 2024, by Samuel Williams.
4
+ Copyright, 2024, by Étienne Barrié.
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -4,6 +4,10 @@ Monitor the file-system for changes.
4
4
 
5
5
  [![Development Status](https://github.com/socketry/io-watch/workflows/Test/badge.svg)](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
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Étienne Barrié
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain:
metadata.gz.sig CHANGED
Binary file