cruise 0.1.0 → 0.2.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/Cargo.lock +827 -0
- data/README.md +223 -0
- data/Rakefile +23 -6
- data/cruise.gemspec +12 -5
- data/ext/cruise/Cargo.toml +12 -6
- data/ext/cruise/build.rs +15 -0
- data/ext/cruise/cbindgen.toml +23 -0
- data/ext/cruise/cruise.c +158 -0
- data/ext/cruise/extconf.rb +109 -2
- data/ext/cruise/src/ffi.rs +124 -0
- data/ext/cruise/src/lib.rs +9 -211
- data/ext/cruise/src/watcher.rs +196 -0
- data/lib/cruise/event.rb +24 -0
- data/lib/cruise/version.rb +1 -1
- data/lib/cruise/watcher.rb +39 -0
- data/lib/cruise.rb +41 -8
- data/sig/cruise/event.rbs +18 -0
- data/sig/cruise/types.rbs +13 -0
- data/sig/cruise/version.rbs +5 -0
- data/sig/cruise/watcher.rbs +22 -0
- data/sig/cruise.rbs +17 -0
- metadata +19 -19
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Note: This file is hand written, `rbs-inline` does not generate this file.
|
|
2
|
+
|
|
3
|
+
module Cruise
|
|
4
|
+
type paths = String | Array[String]
|
|
5
|
+
|
|
6
|
+
type globs = String | Array[String]
|
|
7
|
+
|
|
8
|
+
type kinds = String | Symbol | Array[String | Symbol]
|
|
9
|
+
|
|
10
|
+
type debounce = _ToF
|
|
11
|
+
|
|
12
|
+
type callback = ^(Event) -> void
|
|
13
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Generated from lib/cruise/watcher.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Cruise
|
|
4
|
+
class Watcher
|
|
5
|
+
# : (*paths paths, ?glob: globs?, ?debounce: debounce, ?only: kinds?) -> void
|
|
6
|
+
def initialize: (*paths paths, ?glob: globs?, ?debounce: debounce, ?only: kinds?) -> void
|
|
7
|
+
|
|
8
|
+
# : () -> IO
|
|
9
|
+
def io: () -> IO
|
|
10
|
+
|
|
11
|
+
# : () -> Event?
|
|
12
|
+
def poll: () -> Event?
|
|
13
|
+
|
|
14
|
+
# : () -> void
|
|
15
|
+
def close: () -> void
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
# : (Array[String] paths, Float debounce, Array[String] globs, Array[String] only_kinds) -> void
|
|
20
|
+
def initialize_native: (Array[String] paths, Float debounce, Array[String] globs, Array[String] only_kinds) -> void
|
|
21
|
+
end
|
|
22
|
+
end
|
data/sig/cruise.rbs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Generated from lib/cruise.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Cruise
|
|
4
|
+
DEFAULT_DEBOUNCE: Float
|
|
5
|
+
|
|
6
|
+
# Watch one or more paths and yield a Cruise::Event for each change.
|
|
7
|
+
#
|
|
8
|
+
# Blocks until interrupted. Waiting happens on the watcher's pipe via
|
|
9
|
+
# IO#wait_readable, so this releases the GVL for other threads and, when a
|
|
10
|
+
# Fiber scheduler is set (e.g. inside Async), yields to other fibers instead
|
|
11
|
+
# of blocking the reactor.
|
|
12
|
+
# : (*paths paths, ?glob: globs?, ?debounce: debounce, ?only: kinds?, ?callback: callback?) ?{ (Event) -> void } -> void
|
|
13
|
+
def self.watch: (*paths paths, ?glob: globs?, ?debounce: debounce, ?only: kinds?, ?callback: callback?) ?{ (Event) -> void } -> void
|
|
14
|
+
|
|
15
|
+
# : (IO io) -> bool
|
|
16
|
+
private def self.drain_wakeups: (IO io) -> bool
|
|
17
|
+
end
|
metadata
CHANGED
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cruise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Roth
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
|
15
|
-
requirements:
|
|
16
|
-
- - ">="
|
|
17
|
-
- !ruby/object:Gem::Version
|
|
18
|
-
version: '0'
|
|
19
|
-
type: :runtime
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
23
|
-
- - ">="
|
|
24
|
-
- !ruby/object:Gem::Version
|
|
25
|
-
version: '0'
|
|
26
|
-
description: Cruise is a Rust-powered file system watcher with native OS integration.
|
|
27
|
-
Uses FSEvents on macOS and inotify on Linux.
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Cruise is a file system watcher built on native OS events. Uses FSEvents
|
|
13
|
+
on macOS and inotify on Linux.
|
|
28
14
|
email:
|
|
29
15
|
- marco.roth@intergga.ch
|
|
30
16
|
executables: []
|
|
@@ -32,15 +18,29 @@ extensions:
|
|
|
32
18
|
- ext/cruise/extconf.rb
|
|
33
19
|
extra_rdoc_files: []
|
|
34
20
|
files:
|
|
21
|
+
- Cargo.lock
|
|
35
22
|
- Cargo.toml
|
|
36
23
|
- LICENSE.txt
|
|
24
|
+
- README.md
|
|
37
25
|
- Rakefile
|
|
38
26
|
- cruise.gemspec
|
|
39
27
|
- ext/cruise/Cargo.toml
|
|
28
|
+
- ext/cruise/build.rs
|
|
29
|
+
- ext/cruise/cbindgen.toml
|
|
30
|
+
- ext/cruise/cruise.c
|
|
40
31
|
- ext/cruise/extconf.rb
|
|
32
|
+
- ext/cruise/src/ffi.rs
|
|
41
33
|
- ext/cruise/src/lib.rs
|
|
34
|
+
- ext/cruise/src/watcher.rs
|
|
42
35
|
- lib/cruise.rb
|
|
36
|
+
- lib/cruise/event.rb
|
|
43
37
|
- lib/cruise/version.rb
|
|
38
|
+
- lib/cruise/watcher.rb
|
|
39
|
+
- sig/cruise.rbs
|
|
40
|
+
- sig/cruise/event.rbs
|
|
41
|
+
- sig/cruise/types.rbs
|
|
42
|
+
- sig/cruise/version.rbs
|
|
43
|
+
- sig/cruise/watcher.rbs
|
|
44
44
|
homepage: https://github.com/marcoroth/cruise
|
|
45
45
|
licenses:
|
|
46
46
|
- MIT
|
|
@@ -67,5 +67,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
67
67
|
requirements: []
|
|
68
68
|
rubygems_version: 4.0.3
|
|
69
69
|
specification_version: 4
|
|
70
|
-
summary: A fast, native file watcher for Ruby
|
|
70
|
+
summary: A fast, OS-native file watcher for Ruby
|
|
71
71
|
test_files: []
|