cruise 0.1.0-arm-linux-gnu
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 +7 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +82 -0
- data/cruise.gemspec +38 -0
- data/lib/cruise/3.2/cruise.so +0 -0
- data/lib/cruise/3.3/cruise.so +0 -0
- data/lib/cruise/3.4/cruise.so +0 -0
- data/lib/cruise/4.0/cruise.so +0 -0
- data/lib/cruise/version.rb +5 -0
- data/lib/cruise.rb +34 -0
- metadata +62 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 534bfd8e989377da9077297927e12e4bc5c3cf8ad5da44ea90e39bb463f4cb0e
|
|
4
|
+
data.tar.gz: ded19ac7229b720a56b33db042667f778ed4451e44dad6f9147f3857be89edfb
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 8f75cf2d41e69bacb750ab9ed87dc3ec2b54514ab97f7f8fd092486f2191fe1ff36c5cc3edfdb52a09ccae3239189b2752b7b1efe5b301a7f7070504ddb21629
|
|
7
|
+
data.tar.gz: afd2e3feffe97e0201945375d9f97f9edc5addf8de1f1951cc7969503e1b765b3feacda5559a4f50b332910319b6771598a12b5e5f625f954847b3a50969a89a
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marco Roth
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "bundler/gem_tasks"
|
|
4
|
+
require "rake/testtask"
|
|
5
|
+
|
|
6
|
+
Rake::TestTask.new(:test) do |t|
|
|
7
|
+
t.libs << "test"
|
|
8
|
+
t.libs << "lib"
|
|
9
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
begin
|
|
13
|
+
require "rake/extensiontask"
|
|
14
|
+
require "rb_sys"
|
|
15
|
+
require "rb_sys/extensiontask"
|
|
16
|
+
|
|
17
|
+
PLATFORMS = [
|
|
18
|
+
"aarch64-linux-gnu",
|
|
19
|
+
"aarch64-linux-musl",
|
|
20
|
+
"arm-linux-gnu",
|
|
21
|
+
"arm64-darwin",
|
|
22
|
+
"x86_64-darwin",
|
|
23
|
+
"x86_64-linux-gnu",
|
|
24
|
+
"x86_64-linux-musl"
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
RB_SYS_PLATFORM_MAP = {
|
|
28
|
+
"aarch64-linux-gnu" => "aarch64-linux",
|
|
29
|
+
"aarch64-linux-musl" => "aarch64-linux-musl",
|
|
30
|
+
"arm-linux-gnu" => "arm-linux",
|
|
31
|
+
"arm64-darwin" => "arm64-darwin",
|
|
32
|
+
"x86_64-darwin" => "x86_64-darwin",
|
|
33
|
+
"x86_64-linux-gnu" => "x86_64-linux",
|
|
34
|
+
"x86_64-linux-musl" => "x86_64-linux-musl"
|
|
35
|
+
}.freeze
|
|
36
|
+
|
|
37
|
+
RbSys::ExtensionTask.new("cruise", Gem::Specification.load("cruise.gemspec")) do |ext|
|
|
38
|
+
ext.lib_dir = "lib/cruise"
|
|
39
|
+
ext.cross_compile = true
|
|
40
|
+
ext.cross_platform = PLATFORMS
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
namespace "gem" do
|
|
44
|
+
task "prepare" do
|
|
45
|
+
require "rake_compiler_dock"
|
|
46
|
+
|
|
47
|
+
sh "bundle config set cache_all true"
|
|
48
|
+
|
|
49
|
+
gemspec_path = File.expand_path("./cruise.gemspec", __dir__)
|
|
50
|
+
spec = eval(File.read(gemspec_path), binding, gemspec_path)
|
|
51
|
+
|
|
52
|
+
RakeCompilerDock.set_ruby_cc_version(spec.required_ruby_version.as_list)
|
|
53
|
+
rescue LoadError
|
|
54
|
+
abort "rake_compiler_dock is required for this task"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
PLATFORMS.each do |platform|
|
|
58
|
+
desc "Build all native binary gems in parallel"
|
|
59
|
+
multitask "native" => platform
|
|
60
|
+
|
|
61
|
+
desc "Build the native gem for #{platform}"
|
|
62
|
+
task platform => "prepare" do
|
|
63
|
+
rb_sys_platform = RB_SYS_PLATFORM_MAP.fetch(platform)
|
|
64
|
+
|
|
65
|
+
RakeCompilerDock.sh(
|
|
66
|
+
"bundle install && bundle exec rake native:#{platform} gem RUBY_CC_VERSION='#{ENV.fetch("RUBY_CC_VERSION", nil)}'",
|
|
67
|
+
platform: platform,
|
|
68
|
+
image: "rbsys/#{rb_sys_platform}:#{RbSys::VERSION}"
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
rescue LoadError => e
|
|
74
|
+
warn "WARNING: Failed to load extension tasks: #{e.message}"
|
|
75
|
+
|
|
76
|
+
desc "Compile task not available (rake-compiler not installed)"
|
|
77
|
+
task :compile do
|
|
78
|
+
abort "rake-compiler is required: #{e.message}\n\nRun: bundle install"
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
task default: [:compile, :test]
|
data/cruise.gemspec
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/cruise/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "cruise"
|
|
7
|
+
spec.version = Cruise::VERSION
|
|
8
|
+
spec.authors = ["Marco Roth"]
|
|
9
|
+
spec.email = ["marco.roth@intergga.ch"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "A fast, native file watcher for Ruby"
|
|
12
|
+
spec.description = "Cruise is a Rust-powered file system watcher with native OS integration. Uses FSEvents on macOS and inotify on Linux."
|
|
13
|
+
spec.homepage = "https://github.com/marcoroth/cruise"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.required_ruby_version = ">= 3.2.0"
|
|
17
|
+
spec.require_paths = ["lib"]
|
|
18
|
+
|
|
19
|
+
spec.files = Dir[
|
|
20
|
+
"cruise.gemspec",
|
|
21
|
+
"LICENSE.txt",
|
|
22
|
+
"Cargo.toml",
|
|
23
|
+
"Rakefile",
|
|
24
|
+
"lib/**/*.rb",
|
|
25
|
+
"ext/**/*.{rs,toml,rb,lock}"
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
spec.extensions = ["ext/cruise/extconf.rb"]
|
|
29
|
+
|
|
30
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
31
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
|
32
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
33
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/releases"
|
|
34
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
|
35
|
+
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
|
36
|
+
|
|
37
|
+
spec.add_dependency "rb_sys"
|
|
38
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/cruise.rb
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "cruise/version"
|
|
4
|
+
|
|
5
|
+
begin
|
|
6
|
+
ruby_version = RUBY_VERSION.split(".")[0..1].join(".")
|
|
7
|
+
|
|
8
|
+
begin
|
|
9
|
+
require "cruise/#{ruby_version}/cruise"
|
|
10
|
+
rescue LoadError
|
|
11
|
+
require "cruise/cruise"
|
|
12
|
+
end
|
|
13
|
+
rescue LoadError => e
|
|
14
|
+
raise LoadError, "Failed to load Cruise native extension: #{e.message}"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
module Cruise
|
|
18
|
+
DEFAULT_DEBOUNCE = 0.1
|
|
19
|
+
|
|
20
|
+
class << self
|
|
21
|
+
def watch(*args, glob: nil, debounce: DEFAULT_DEBOUNCE, only: nil, callback: nil, &block)
|
|
22
|
+
callback = block || callback
|
|
23
|
+
paths = args.flatten.grep(String)
|
|
24
|
+
|
|
25
|
+
raise ArgumentError, "Cruise.watch requires at least one path" if paths.empty?
|
|
26
|
+
raise ArgumentError, "Cruise.watch requires a block or callback" unless callback
|
|
27
|
+
|
|
28
|
+
glob_patterns = glob ? Array(glob) : []
|
|
29
|
+
only_kinds = only ? Array(only).map(&:to_s) : []
|
|
30
|
+
|
|
31
|
+
_watch(paths, callback, debounce.to_f, glob_patterns, only_kinds)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: cruise
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: arm-linux-gnu
|
|
6
|
+
authors:
|
|
7
|
+
- Marco Roth
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-03-24 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Cruise is a Rust-powered file system watcher with native OS integration.
|
|
14
|
+
Uses FSEvents on macOS and inotify on Linux.
|
|
15
|
+
email:
|
|
16
|
+
- marco.roth@intergga.ch
|
|
17
|
+
executables: []
|
|
18
|
+
extensions: []
|
|
19
|
+
extra_rdoc_files: []
|
|
20
|
+
files:
|
|
21
|
+
- LICENSE.txt
|
|
22
|
+
- Rakefile
|
|
23
|
+
- cruise.gemspec
|
|
24
|
+
- lib/cruise.rb
|
|
25
|
+
- lib/cruise/3.2/cruise.so
|
|
26
|
+
- lib/cruise/3.3/cruise.so
|
|
27
|
+
- lib/cruise/3.4/cruise.so
|
|
28
|
+
- lib/cruise/4.0/cruise.so
|
|
29
|
+
- lib/cruise/version.rb
|
|
30
|
+
homepage: https://github.com/marcoroth/cruise
|
|
31
|
+
licenses:
|
|
32
|
+
- MIT
|
|
33
|
+
metadata:
|
|
34
|
+
allowed_push_host: https://rubygems.org
|
|
35
|
+
rubygems_mfa_required: 'true'
|
|
36
|
+
homepage_uri: https://github.com/marcoroth/cruise
|
|
37
|
+
changelog_uri: https://github.com/marcoroth/cruise/releases
|
|
38
|
+
source_code_uri: https://github.com/marcoroth/cruise
|
|
39
|
+
bug_tracker_uri: https://github.com/marcoroth/cruise/issues
|
|
40
|
+
post_install_message:
|
|
41
|
+
rdoc_options: []
|
|
42
|
+
require_paths:
|
|
43
|
+
- lib
|
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '3.2'
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: 4.1.dev
|
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
54
|
+
- - ">="
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: 3.3.22
|
|
57
|
+
requirements: []
|
|
58
|
+
rubygems_version: 3.5.23
|
|
59
|
+
signing_key:
|
|
60
|
+
specification_version: 4
|
|
61
|
+
summary: A fast, native file watcher for Ruby
|
|
62
|
+
test_files: []
|