rfusefs 1.0.2.RC1 → 1.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 660236e6a6dc3a765736e122e3e08d449685839332ec45d29afc0dc8a7420a00
4
+ data.tar.gz: 8e5bcffceda937d6e5e35fca6a0f6f407a85160e867167ff21a4fd42aa917496
5
+ SHA512:
6
+ metadata.gz: 915e78c9df89edfa7b0bd4155f3348e9ae80a9e0063dfb5eaf1210c4bd5ee0646cf6a417e511ec5304442d033c0bc17a81907855bb977f043be03e77ab54c287
7
+ data.tar.gz: 9f871748305c9c7da9b58c2ccdb161dd065fa1a029ad4037ccb8b591f9da4bb9199a40d2d33e7fa2c81ae826bbbd6fa84d5cf4ff1ecefcfecaf901ca3fe07315
@@ -0,0 +1,2 @@
1
+ -
2
+ CHANGES.md
@@ -0,0 +1,40 @@
1
+
2
+ 1.1.0 / 2020-10
3
+ ---------------
4
+
5
+ * With rfuse ~> 1.2
6
+ * Requires Ruby 2.5+
7
+ * Release via Travis CI
8
+
9
+ 1.0.3 / 2014-12-22
10
+ ----------------------
11
+
12
+ * Pushed some internals up to RFuse
13
+ * Allow filesystems to implement signal handlers
14
+
15
+ 1.0.1 / 2013-12-19
16
+ ------------------
17
+
18
+ * Add FuseFS.main to create pretty usage messages
19
+ * Support extended attributes in filesystems
20
+ * Updates and cleanup of PathMapperFS
21
+ * Provide SqliteMapperFS
22
+
23
+ 1.0.0 / 2012-08-07
24
+ ------------------
25
+
26
+ * Depend on new rfuse 1.0.0, Ruby 1.9
27
+ * API breaking changes
28
+ * order of arguments to {FuseFS.mount}, {FuseFS.start} changed
29
+ to account for better option handling in RFuse
30
+
31
+ 0.8.0 / 2011-02-19
32
+ ------------------
33
+
34
+ * Initial port from fusefs
35
+
36
+ * Improved raw methods
37
+ * new "times" api for including atime,mtime,ctime in stat results
38
+ * metadir allow mv directories
39
+ * includes PathMapperFS
40
+
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ (The MIT License)
2
+
3
+ * Copyright (c) 2005 Greg Millam. (FuseFS)
4
+ * Copyright (c) 2009 Kyle Maxwell. (FuseFS)
5
+ * Copyright (c) 2012 - 2020 Grant Gardner. (RFuseFS)
6
+
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the 'Software'), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
@@ -0,0 +1,83 @@
1
+ # rfusefs
2
+
3
+ * https://rubygems.org/gems/rfusefs
4
+ * https://github.com/lwoggardner/rfusefs
5
+
6
+ [<img src="https://badge.fury.io/rb/rfusefs.png" alt="Gem Version"
7
+ />](http://badge.fury.io/rb/rfusefs)
8
+ ## DESCRIPTION
9
+
10
+ RFuseFS is a port of the [FuseFS](http://rubygems.org/gems/fusefs/) library
11
+ aimed at allowing Ruby programmers to quickly and easily create virtual
12
+ filesystems with little more than a few lines of code.
13
+
14
+ RFuseFS is api compatible with FuseFS (0.7.0)
15
+
16
+ ## SYNOPSIS
17
+
18
+ FuseFS provides a layer of abstraction to a programmer who wants to create a
19
+ virtual filesystem via FUSE.
20
+
21
+ First define a virtual directory by subclassing {FuseFS::FuseDir}
22
+
23
+ See samples under /samples and also the following starter classes
24
+
25
+ * {FuseFS::FuseDir}
26
+ * {FuseFS::MetaDir}
27
+ * {FuseFS::DirLink}
28
+ * {FuseFS::PathMapperFS}
29
+ * {FuseFS::SqliteMapperFS}
30
+
31
+
32
+ Then start your filesystem with
33
+
34
+ * {FuseFS.main} or {FuseFS.start}
35
+
36
+
37
+ Finally to use the filesystem open up your favourite file browser/terminal and
38
+ explore the contents under <mountpoint>
39
+
40
+ Happy Filesystem Hacking!
41
+
42
+ ### the hello world filesystem in 14 LOC
43
+
44
+ require 'rfusefs'
45
+
46
+ class HelloDir
47
+
48
+ def contents(path)
49
+ ['hello.txt']
50
+ end
51
+
52
+ def file?(path)
53
+ path == '/hello.txt'
54
+ end
55
+
56
+ def read_file(path)
57
+ "Hello, World!\n"
58
+ end
59
+
60
+ end
61
+
62
+ # Usage: #{$0} mountpoint [mount_options]
63
+ FuseFS.main() { |options| HelloDir.new }
64
+
65
+ ## REQUIREMENTS:
66
+
67
+ * FUSE (http://fuse.sourceforge.net)
68
+ * Ruby (>= 2.5)
69
+ * rfuse (~> 1.2)
70
+
71
+
72
+ ## INSTALL:
73
+
74
+ * gem install rfusefs
75
+
76
+ ## DEVELOPERS:
77
+
78
+ After checking out the source, run:
79
+
80
+ $ bundle install # install dependencies
81
+ $ rake spec # run tests
82
+ $ rake yard # generate docs
83
+
data/TODO.md ADDED
@@ -0,0 +1,7 @@
1
+
2
+ TODO
3
+ --------------
4
+
5
+ * Test (or remove) samples
6
+
7
+
@@ -45,28 +45,14 @@ module FuseFS
45
45
  # end
46
46
  #
47
47
  def FuseFS.main(argv=ARGV,options=[],option_usage="",device=nil,exec=File.basename($0))
48
- options = RFuse.parse_options(argv,*options)
49
-
50
- if options[:mountpoint]
51
- begin
52
- fs = yield options
53
- rescue StandardError => ex
54
- puts ex.message
55
- puts ex.backtrace.join("\n")
56
- end
57
-
58
- puts RFuse.usage(device,exec) if options[:help] || !fs
59
- puts "Options:\n" if options[:help]
60
-
61
- FuseFS.start(fs,*argv) if fs || options[:help]
62
-
63
- puts option_usage if options[:help]
64
- else
65
- puts "rfusefs: failed, no mountpoint provided",RFuse.usage(device,exec)
48
+ RFuse.main(argv,options,option_usage,device,exec) do |options,argv|
49
+ root = yield options
50
+ FuseFS.set_root(root)
51
+ FuseFS.mount_under(*argv)
66
52
  end
67
53
  end
68
54
 
69
- # Start the FuseFS root at mountpoint with opts.
55
+ # Start the FuseFS root at mountpoint with opts.
70
56
  #
71
57
  # If not previously set, Signal traps for "TERM" and "INT" are added
72
58
  # to exit the filesystem
@@ -77,7 +63,6 @@ module FuseFS
77
63
  # @note RFuseFS extension
78
64
  # @return [void]
79
65
  def FuseFS.start(root,mountpoint,*opts)
80
- set_default_traps("TERM","INT") { FuseFS.exit }
81
66
  FuseFS.set_root(root)
82
67
  begin
83
68
  FuseFS.mount_under(mountpoint,*opts)
@@ -88,7 +73,7 @@ module FuseFS
88
73
  end
89
74
 
90
75
  # Forks {FuseFS.start} so you can access your filesystem with ruby File
91
- # operations (eg for testing).
76
+ # operations (eg for testing).
92
77
  # @note This is an *RFuseFS* extension
93
78
  # @return [void]
94
79
  def FuseFS.mount(root,mountpoint,*opts)
@@ -126,43 +111,40 @@ module FuseFS
126
111
  end
127
112
  end
128
113
 
129
- # Set the root virtual directory
114
+ # Set the root virtual directory
130
115
  # @param root [Object] an object implementing a subset of {FuseFS::API}
131
116
  # @return [void]
132
117
  def FuseFS.set_root(root)
133
- @fs=RFuseFS.new(root)
118
+ @fs=Fuse::Root.new(root)
134
119
  end
135
120
 
136
121
  # This will cause FuseFS to virtually mount itself under the given path. {set_root} must have
137
122
  # been called previously.
138
123
  # @param [String] mountpoint an existing directory where the filesystem will be virtually mounted
139
124
  # @param [Array<String>] args
125
+ # @return [Fuse] the mounted fuse filesystem
140
126
  # These are as expected by the "mount" command. Note in particular that the first argument
141
127
  # is expected to be the mount point. For more information, see http://fuse.sourceforge.net
142
128
  # and the manual pages for "mount.fuse"
143
- def FuseFS.mount_under(mountpoint, *args)
144
- @fuse = RFuse::FuseDelegator.new(@fs,mountpoint,*args)
129
+ def FuseFS.mount_under(mountpoint, *args)
130
+ @fuse = Fuse.new(@fs,mountpoint,*args)
145
131
  end
146
132
 
147
- # This is the main loop waiting on then executing filesystem operations from the
148
- # kernel.
149
- #
133
+ # This is the main loop waiting on, then executing, filesystem operations from the
134
+ # kernel.
135
+ #
150
136
  # Note: Running in a separate thread is generally not useful. In particular
151
- # you cannot access your filesystem using ruby File operations.
137
+ # you cannot use Ruby File operations to access your filesystem from
138
+ # within the ruby process that calls run.
152
139
  # @note RFuseFS extension
153
140
  def FuseFS.run
154
- @fs.mounted()
155
- @fuse.loop if @fuse.mounted?
156
- ensure
157
- @fs.unmounted()
141
+ @fuse.run()
158
142
  end
159
143
 
160
- # Exit the run loop and teardown FUSE
161
- # Most useful from Signal.trap() or Kernel.at_exit()
144
+ # Exit the run loop and teardown FUSE
145
+ # Most useful from Signal.trap() or Kernel.at_exit()
162
146
  def FuseFS.exit
163
- if @fuse
164
- @fuse.exit
165
- end
147
+ @fuse.exit if @fuse
166
148
  end
167
149
 
168
150
  # @return [Fixnum] the calling process uid
@@ -188,15 +170,5 @@ module FuseFS
188
170
  #do nothing
189
171
  end
190
172
 
191
- private
192
-
193
- def self.set_default_traps(*signals,&block)
194
- signals.each do |sig|
195
- old_proc = Signal.trap(sig,block)
196
- unless "DEFAULT".eql?(old_proc)
197
- Signal.trap(sig,old_proc)
198
- end
199
- end
200
- end
201
173
  end
202
174
 
metadata CHANGED
@@ -1,142 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfusefs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2.RC1
5
- prerelease: 6
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Grant Gardner
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2020-10-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rfuse
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 1.0.5RC0
19
+ version: '1.2'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 1.0.5RC0
26
+ version: '1.2'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0'
47
+ version: '3'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: '0'
54
+ version: '3'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: yard
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: redcarpet
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: sqlite3
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: sys-filesystem
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: ffi-xattr
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - ">="
132
116
  - !ruby/object:Gem::Version
133
117
  version: 0.1.1
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - ">="
140
123
  - !ruby/object:Gem::Version
141
124
  version: 0.1.1
142
125
  description: A more Ruby like way to write FUSE filesystems - inspired by (compatible
@@ -145,63 +128,37 @@ email:
145
128
  - grant@lastweekend.com.au
146
129
  executables: []
147
130
  extensions: []
148
- extra_rdoc_files: []
131
+ extra_rdoc_files:
132
+ - CHANGES.md
149
133
  files:
150
- - .gitignore
151
- - .travis.yml
152
- - Gemfile
153
- - History.rdoc
154
- - README.rdoc
155
- - Rakefile
156
- - TODO.txt
157
- - lib/fuse/fusedir.rb
158
- - lib/fuse/rfusefs-fuse.rb
134
+ - ".yardopts"
135
+ - CHANGES.md
136
+ - LICENSE
137
+ - README.md
138
+ - TODO.md
159
139
  - lib/fusefs.rb
160
- - lib/fusefs/dirlink.rb
161
- - lib/fusefs/metadir.rb
162
- - lib/fusefs/pathmapper.rb
163
- - lib/fusefs/sqlitemapper.rb
164
140
  - lib/rfusefs.rb
165
- - lib/rfusefs/version.rb
166
- - rfusefs.gemspec
167
- - samples/demo.rb
168
- - samples/dictfs.rb
169
- - samples/hello.rb
170
- - samples/openurifs.rb
171
- - samples/railsfs.rb
172
- - samples/sqlfs.rb
173
- - samples/yamlfs.rb
174
- - spec-fusefs/fusefs_spec.rb
175
- - spec/metadir_spec.rb
176
- - spec/mount_unmount_spec.rb
177
- - spec/pathmapper_spec.rb
178
- - spec/rfusefs_spec.rb
179
- - spec/sample_spec.rb
180
- - spec/spec_helper.rb
181
- - spec/sqlitemapper_spec.rb
182
141
  homepage: http://rubygems.org/gems/rfusefs
183
- licenses: []
142
+ licenses:
143
+ - MIT
144
+ metadata: {}
184
145
  post_install_message:
185
146
  rdoc_options: []
186
147
  require_paths:
187
148
  - lib
188
149
  required_ruby_version: !ruby/object:Gem::Requirement
189
- none: false
190
150
  requirements:
191
- - - ! '>='
151
+ - - ">="
192
152
  - !ruby/object:Gem::Version
193
- version: '0'
153
+ version: '2.5'
194
154
  required_rubygems_version: !ruby/object:Gem::Requirement
195
- none: false
196
155
  requirements:
197
- - - ! '>'
156
+ - - ">="
198
157
  - !ruby/object:Gem::Version
199
- version: 1.3.1
158
+ version: '0'
200
159
  requirements: []
201
- rubyforge_project:
202
- rubygems_version: 1.8.23
160
+ rubygems_version: 3.0.8
203
161
  signing_key:
204
- specification_version: 3
162
+ specification_version: 4
205
163
  summary: Filesystem in Ruby Userspace
206
164
  test_files: []
207
- has_rdoc: yard