ffi-libfuse 0.0.1.rctest12 → 0.1.0.rc20220550
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -1
- data/CHANGES.md +14 -0
- data/LICENSE +21 -0
- data/README.md +127 -44
- data/lib/ffi/accessors.rb +6 -6
- data/lib/ffi/boolean_int.rb +27 -0
- data/lib/ffi/devt.rb +23 -0
- data/lib/ffi/encoding.rb +38 -0
- data/lib/ffi/gnu_extensions.rb +1 -1
- data/lib/ffi/libfuse/ackbar.rb +3 -3
- data/lib/ffi/libfuse/adapter/context.rb +12 -10
- data/lib/ffi/libfuse/adapter/fuse2_compat.rb +52 -51
- data/lib/ffi/libfuse/adapter/fuse3_support.rb +0 -1
- data/lib/ffi/libfuse/adapter/ruby.rb +499 -148
- data/lib/ffi/libfuse/adapter/safe.rb +1 -1
- data/lib/ffi/libfuse/adapter.rb +1 -2
- data/lib/ffi/libfuse/callbacks.rb +1 -1
- data/lib/ffi/libfuse/filesystem/accounting.rb +116 -0
- data/lib/ffi/libfuse/filesystem/mapped_dir.rb +74 -0
- data/lib/ffi/libfuse/filesystem/mapped_files.rb +141 -0
- data/lib/ffi/libfuse/filesystem/pass_through_dir.rb +55 -0
- data/lib/ffi/libfuse/filesystem/pass_through_file.rb +45 -0
- data/lib/ffi/libfuse/filesystem/utils.rb +102 -0
- data/lib/ffi/libfuse/filesystem/virtual_dir.rb +306 -0
- data/lib/ffi/libfuse/filesystem/virtual_file.rb +94 -0
- data/lib/ffi/libfuse/filesystem/virtual_fs.rb +188 -0
- data/lib/ffi/libfuse/filesystem/virtual_node.rb +101 -0
- data/lib/ffi/libfuse/filesystem.rb +25 -0
- data/lib/ffi/libfuse/fuse2.rb +21 -21
- data/lib/ffi/libfuse/fuse3.rb +12 -12
- data/lib/ffi/libfuse/fuse_args.rb +69 -34
- data/lib/ffi/libfuse/fuse_buffer.rb +128 -26
- data/lib/ffi/libfuse/fuse_callbacks.rb +1 -5
- data/lib/ffi/libfuse/fuse_common.rb +55 -61
- data/lib/ffi/libfuse/fuse_config.rb +134 -143
- data/lib/ffi/libfuse/fuse_conn_info.rb +310 -134
- data/lib/ffi/libfuse/fuse_context.rb +45 -3
- data/lib/ffi/libfuse/fuse_operations.rb +43 -19
- data/lib/ffi/libfuse/fuse_version.rb +10 -6
- data/lib/ffi/libfuse/main.rb +80 -37
- data/lib/ffi/libfuse/version.rb +1 -1
- data/lib/ffi/libfuse.rb +13 -4
- data/lib/ffi/ruby_object.rb +1 -1
- data/lib/ffi/stat/constants.rb +9 -0
- data/lib/ffi/stat/native.rb +36 -6
- data/lib/ffi/stat/time_spec.rb +26 -10
- data/lib/ffi/stat.rb +111 -22
- data/lib/ffi/stat_vfs.rb +59 -1
- data/lib/ffi/struct_wrapper.rb +22 -1
- data/sample/hello_fs.rb +54 -0
- data/sample/memory_fs.rb +5 -181
- data/sample/no_fs.rb +20 -21
- data/sample/pass_through_fs.rb +30 -0
- metadata +77 -4
- data/lib/ffi/libfuse/adapter/thread_local_context.rb +0 -36
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-libfuse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.1.0.rc20220550
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant Gardner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -24,6 +24,62 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler-audit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest-reporters
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
27
83
|
- !ruby/object:Gem::Dependency
|
28
84
|
name: rubocop
|
29
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,9 +130,13 @@ extensions: []
|
|
74
130
|
extra_rdoc_files: []
|
75
131
|
files:
|
76
132
|
- ".yardopts"
|
133
|
+
- CHANGES.md
|
134
|
+
- LICENSE
|
77
135
|
- README.md
|
78
136
|
- lib/ffi/accessors.rb
|
137
|
+
- lib/ffi/boolean_int.rb
|
79
138
|
- lib/ffi/devt.rb
|
139
|
+
- lib/ffi/encoding.rb
|
80
140
|
- lib/ffi/flock.rb
|
81
141
|
- lib/ffi/gnu_extensions.rb
|
82
142
|
- lib/ffi/libfuse.rb
|
@@ -90,8 +150,18 @@ files:
|
|
90
150
|
- lib/ffi/libfuse/adapter/pathname.rb
|
91
151
|
- lib/ffi/libfuse/adapter/ruby.rb
|
92
152
|
- lib/ffi/libfuse/adapter/safe.rb
|
93
|
-
- lib/ffi/libfuse/adapter/thread_local_context.rb
|
94
153
|
- lib/ffi/libfuse/callbacks.rb
|
154
|
+
- lib/ffi/libfuse/filesystem.rb
|
155
|
+
- lib/ffi/libfuse/filesystem/accounting.rb
|
156
|
+
- lib/ffi/libfuse/filesystem/mapped_dir.rb
|
157
|
+
- lib/ffi/libfuse/filesystem/mapped_files.rb
|
158
|
+
- lib/ffi/libfuse/filesystem/pass_through_dir.rb
|
159
|
+
- lib/ffi/libfuse/filesystem/pass_through_file.rb
|
160
|
+
- lib/ffi/libfuse/filesystem/utils.rb
|
161
|
+
- lib/ffi/libfuse/filesystem/virtual_dir.rb
|
162
|
+
- lib/ffi/libfuse/filesystem/virtual_file.rb
|
163
|
+
- lib/ffi/libfuse/filesystem/virtual_fs.rb
|
164
|
+
- lib/ffi/libfuse/filesystem/virtual_node.rb
|
95
165
|
- lib/ffi/libfuse/fuse2.rb
|
96
166
|
- lib/ffi/libfuse/fuse3.rb
|
97
167
|
- lib/ffi/libfuse/fuse_args.rb
|
@@ -122,13 +192,16 @@ files:
|
|
122
192
|
- lib/ffi/stat_vfs.rb
|
123
193
|
- lib/ffi/struct_array.rb
|
124
194
|
- lib/ffi/struct_wrapper.rb
|
195
|
+
- sample/hello_fs.rb
|
125
196
|
- sample/memory_fs.rb
|
126
197
|
- sample/no_fs.rb
|
198
|
+
- sample/pass_through_fs.rb
|
127
199
|
homepage:
|
128
200
|
licenses:
|
129
201
|
- MIT
|
130
202
|
metadata:
|
131
203
|
source_code_uri: http://github.com/lwoggardner/ffi-libfuse
|
204
|
+
rubygems_mfa_required: 'true'
|
132
205
|
post_install_message:
|
133
206
|
rdoc_options: []
|
134
207
|
require_paths:
|
@@ -137,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
210
|
requirements:
|
138
211
|
- - ">="
|
139
212
|
- !ruby/object:Gem::Version
|
140
|
-
version: 2.
|
213
|
+
version: 2.7.0
|
141
214
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
215
|
requirements:
|
143
216
|
- - ">"
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../fuse_context'
|
4
|
-
|
5
|
-
module FFI
|
6
|
-
module Libfuse
|
7
|
-
module Adapter
|
8
|
-
# Injects a wrapper via #{FuseCallbacks#fuse_wrappers} make the current {FuseContext} object available to
|
9
|
-
# callbacks (except :destroy) via thread local variable :fuse_context
|
10
|
-
module ThreadLocalContext
|
11
|
-
# @!visibility private
|
12
|
-
def fuse_wrappers(*wrappers)
|
13
|
-
wrappers.unshift(
|
14
|
-
{
|
15
|
-
wrapper: proc { |_fm, *args, **_, &b| self.class.thread_local_context(*args, &b) },
|
16
|
-
excludes: %i[destroy]
|
17
|
-
}
|
18
|
-
)
|
19
|
-
return wrappers unless defined?(super)
|
20
|
-
|
21
|
-
super(*wrappers)
|
22
|
-
end
|
23
|
-
|
24
|
-
module_function
|
25
|
-
|
26
|
-
# Stores {FuseContext} in thread local variable :fuse_context before yielding
|
27
|
-
def thread_local_context(*args)
|
28
|
-
Thread.current[:fuse_context] = FuseContext.get
|
29
|
-
yield(*args)
|
30
|
-
ensure
|
31
|
-
Thread.current[:fuse_context] = nil
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|