rfusefs 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/History.txt +9 -0
- data/README.rdoc +108 -0
- data/Rakefile +25 -0
- data/TODO.txt +7 -0
- data/lib/fuse/rfusefs-fuse.rb +497 -0
- data/lib/fusefs/dirlink.rb +46 -0
- data/lib/fusefs/metadir.rb +244 -0
- data/lib/fusefs/pathmapper.rb +193 -0
- data/lib/fusefs.rb +8 -0
- data/lib/rfusefs.rb +318 -0
- data/samples/demo.rb +64 -0
- data/samples/dictfs.rb +84 -0
- data/samples/hello.rb +24 -0
- data/samples/openurifs.rb +53 -0
- data/samples/railsfs.rb +77 -0
- data/samples/sqlfs.rb +134 -0
- data/samples/yamlfs.rb +168 -0
- data/spec/rfusefs_spec.rb +400 -0
- data/spec/sample_spec.rb +29 -0
- data/spec/spec_helper.rb +41 -0
- data/spec-fusefs/fusefs_spec.rb +12 -0
- data.tar.gz.sig +0 -0
- metadata +166 -0
- metadata.gz.sig +1 -0
data/spec/sample_spec.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rfusefs'
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'pathname'
|
4
|
+
require 'samples/hello'
|
5
|
+
|
6
|
+
describe "Access Hello World sample from Ruby file operations" do
|
7
|
+
before(:all) do
|
8
|
+
tmpdir = Pathname.new(Dir.tmpdir) + "rfusefs"
|
9
|
+
tmpdir.mkdir unless tmpdir.directory?
|
10
|
+
@mountpoint = tmpdir + "sample_spec"
|
11
|
+
@mountpoint.mkdir unless @mountpoint.directory?
|
12
|
+
hello = HelloDir.new()
|
13
|
+
FuseFS.mount(@mountpoint,hello)
|
14
|
+
#Give FUSE some time to get started
|
15
|
+
sleep(1)
|
16
|
+
end
|
17
|
+
|
18
|
+
after(:all) do
|
19
|
+
FuseFS.unmount(@mountpoint)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should list expected root directory contents" do
|
23
|
+
Dir.entries(@mountpoint.to_s).should =~ [".","..","hello.txt"]
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should output the expected sample contents" do
|
27
|
+
(@mountpoint + "hello.txt").read().should == "Hello, World!\n"
|
28
|
+
end
|
29
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'rfusefs'
|
2
|
+
require 'fusefs/metadir'
|
3
|
+
require 'fcntl'
|
4
|
+
require 'tmpdir'
|
5
|
+
require 'pathname'
|
6
|
+
require 'fileutils'
|
7
|
+
|
8
|
+
module RFuseFSHelper
|
9
|
+
|
10
|
+
def pathnames(*args)
|
11
|
+
args.collect {|x| Pathname.new(x) }
|
12
|
+
end
|
13
|
+
|
14
|
+
def permissions(mode)
|
15
|
+
return (mode & 07777)
|
16
|
+
end
|
17
|
+
|
18
|
+
def filetype(mode)
|
19
|
+
return (mode & FuseFS::Stat::S_IFMT)
|
20
|
+
end
|
21
|
+
|
22
|
+
FuseContext = Struct.new(:uid,:gid)
|
23
|
+
def fuse_context(uid=Process.uid,gid=Process.gid)
|
24
|
+
FuseContext.new(uid,gid)
|
25
|
+
end
|
26
|
+
|
27
|
+
def pathmap(real_file,mapped_path)
|
28
|
+
File.open(real_file.to_s,"w") do |f|
|
29
|
+
f << mapped_path
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def mktmpdir(name)
|
34
|
+
tmpdir = Pathname.new(Dir.tmpdir) + "rfusefs"
|
35
|
+
tmpdir = tmpdir + name
|
36
|
+
FileUtils.mkdir_p(tmpdir.to_s) unless tmpdir.directory?
|
37
|
+
tmpdir
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
include RFuseFSHelper
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rfusefs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 63
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 0.8.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Grant Gardner
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain:
|
17
|
+
- |
|
18
|
+
-----BEGIN CERTIFICATE-----
|
19
|
+
MIIDYDCCAkigAwIBAgIBADANBgkqhkiG9w0BAQUFADBWMQ4wDAYDVQQDDAVncmFu
|
20
|
+
dDEbMBkGCgmSJomT8ixkARkWC2xhc3R3ZWVrZW5kMRMwEQYKCZImiZPyLGQBGRYD
|
21
|
+
Y29tMRIwEAYKCZImiZPyLGQBGRYCYXUwHhcNMTEwMzA0MDgyMDU4WhcNMTIwMzAz
|
22
|
+
MDgyMDU4WjBWMQ4wDAYDVQQDDAVncmFudDEbMBkGCgmSJomT8ixkARkWC2xhc3R3
|
23
|
+
ZWVrZW5kMRMwEQYKCZImiZPyLGQBGRYDY29tMRIwEAYKCZImiZPyLGQBGRYCYXUw
|
24
|
+
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZMivZ63DzwHyC2Zzk23fA
|
25
|
+
GbTwLVi1WY/X36F3YIss8rDG9iiIcgSjS1fwarbenTdbOenWtRkTgh5zQdg2gker
|
26
|
+
KlXCTdklILDYoSMlopnVXgnqbvwdGhylyWwIp6kkZxaSbRBht35x02RgQmaVEb1N
|
27
|
+
iHvfHSdsH7tc2mAi8C+fDP2QcJSSo50NXrpW/vis2oo8TcRGVIIp+Y/APZ4KJx1J
|
28
|
+
WVrZAZZAICviJCOhNLZiNT1npsllCEo3b+6sy591ijmEuPFjfJu0gEAjRt+kfptr
|
29
|
+
PrTm5zP5QPv5w5NS5gkkSjP1q0uqsrhSdm9ONIJc+e9287YbM3SqdWNc3whlOmhp
|
30
|
+
AgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBT+Vezp
|
31
|
+
3TzNqB1QggX4rz4LLrVNzjANBgkqhkiG9w0BAQUFAAOCAQEAWYauurgZeHF828KI
|
32
|
+
9BPEAdtGquNjl3XUNer8VffxYyTDp+coDEm2X8f25irMP8oeHcPu9MUjWHFC8Tlq
|
33
|
+
keYnjSdQ+TeJSsdehNbD57hyC4+jKrLzFIKvx7TVVn/Wqmd2JtYQgb+ebv/BVCFp
|
34
|
+
/da/vfFv5nceMQIfRAwBbCG0garjLvcyim7eIGECj3scJmpNuDuX44B8uDmV3sIG
|
35
|
+
TUJYDcP33dfa6DU4jou4EQ644VBbSuIt8+FAgg/EtkfUzR0n3ThCBZ3EpEVrjnE8
|
36
|
+
1ZkYUwzHrmKA8VmcjrJbpIWr9ZTqHbql73UDS7eRCxlWP+MDCegVMIXkUFQWvvuy
|
37
|
+
zheZVw==
|
38
|
+
-----END CERTIFICATE-----
|
39
|
+
|
40
|
+
date: 2011-03-04 00:00:00 +11:00
|
41
|
+
default_executable:
|
42
|
+
dependencies:
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rfuse-ng
|
45
|
+
prerelease: false
|
46
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
hash: 13
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
- 5
|
55
|
+
- 3
|
56
|
+
version: 0.5.3
|
57
|
+
type: :runtime
|
58
|
+
version_requirements: *id001
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: hoe-yard
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
hash: 31
|
68
|
+
segments:
|
69
|
+
- 0
|
70
|
+
- 1
|
71
|
+
- 2
|
72
|
+
version: 0.1.2
|
73
|
+
type: :development
|
74
|
+
version_requirements: *id002
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: hoe
|
77
|
+
prerelease: false
|
78
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
hash: 41
|
84
|
+
segments:
|
85
|
+
- 2
|
86
|
+
- 9
|
87
|
+
- 1
|
88
|
+
version: 2.9.1
|
89
|
+
type: :development
|
90
|
+
version_requirements: *id003
|
91
|
+
description: |-
|
92
|
+
RFuseFS is a port of the FuseFS[http://rubyforge.org/projects/fusefs]
|
93
|
+
library aimed at allowing Ruby programmers to quickly and easily create
|
94
|
+
virtual filesystems with little more than a few lines of code.
|
95
|
+
|
96
|
+
RFuseFS is api compatible with {FuseFS (0.7.0)}[https://github.com/duairc/fusefs]
|
97
|
+
email:
|
98
|
+
- grant@lastweekend.com.au
|
99
|
+
executables: []
|
100
|
+
|
101
|
+
extensions: []
|
102
|
+
|
103
|
+
extra_rdoc_files:
|
104
|
+
- TODO.txt
|
105
|
+
- History.txt
|
106
|
+
files:
|
107
|
+
- lib/rfusefs.rb
|
108
|
+
- README.rdoc
|
109
|
+
- Rakefile
|
110
|
+
- TODO.txt
|
111
|
+
- lib/fusefs.rb
|
112
|
+
- lib/fusefs/metadir.rb
|
113
|
+
- lib/fusefs/pathmapper.rb
|
114
|
+
- lib/fusefs/dirlink.rb
|
115
|
+
- lib/fuse/rfusefs-fuse.rb
|
116
|
+
- samples/demo.rb
|
117
|
+
- samples/dictfs.rb
|
118
|
+
- samples/hello.rb
|
119
|
+
- samples/openurifs.rb
|
120
|
+
- samples/railsfs.rb
|
121
|
+
- samples/sqlfs.rb
|
122
|
+
- samples/yamlfs.rb
|
123
|
+
- spec-fusefs/fusefs_spec.rb
|
124
|
+
- spec/rfusefs_spec.rb
|
125
|
+
- spec/sample_spec.rb
|
126
|
+
- spec/spec_helper.rb
|
127
|
+
- History.txt
|
128
|
+
- .gemtest
|
129
|
+
has_rdoc: true
|
130
|
+
homepage: https://github.com/lwoggardner/rfusefs
|
131
|
+
licenses: []
|
132
|
+
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options:
|
135
|
+
- --title
|
136
|
+
- Rfusefs Documentation
|
137
|
+
- --quiet
|
138
|
+
require_paths:
|
139
|
+
- lib
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 3
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
version: "0"
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
hash: 3
|
155
|
+
segments:
|
156
|
+
- 0
|
157
|
+
version: "0"
|
158
|
+
requirements: []
|
159
|
+
|
160
|
+
rubyforge_project: rfusefs
|
161
|
+
rubygems_version: 1.6.0
|
162
|
+
signing_key:
|
163
|
+
specification_version: 3
|
164
|
+
summary: RFuseFS is a port of the FuseFS[http://rubyforge.org/projects/fusefs] library aimed at allowing Ruby programmers to quickly and easily create virtual filesystems with little more than a few lines of code
|
165
|
+
test_files: []
|
166
|
+
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
��/� û���'�=��5,P1K��ۜ��wdj��ϧ�E�%����WN��D���+Oy�%�
|