[ANN] FileSystem 0.1.0: Beta for me, Alpha for you

M

Martin DeMello

Francis Hwang said:
Aw, for Pete's sake. I guess that's what I guess for not checking RAA
..

So I guess I better rename my FileSystem to something else. Suggestions?

Mock::FileSystem?

martin
 
M

Martin DeMello

Francis Hwang said:
Well, it's interesting, I think some of us would like something like
this to be really distracting, and others would like it to be
completely transparent. The two are pretty opposite in my mind, but I
suppose there's no reason I couldn't support both, with an option to
use one or the other depending on what files get included. Maybe by
default we'd use, say MockFS.file and MockFS.file_utils to get the
classes, but then if you wanted you could have your code simply use
File and FileUtils, your test code could require 'mockfs/voodoo' or
some such file to redefine those constants. I'll have to look into the
details.

Or you could tuck it into a module, e.g. Mock::FileSystem, and then
include Mock or not depending.

martin
 
F

Francis Hwang

FileSystem is the wrong name anyhow - since many operating systems can
have more than one type of filesystem, where the differences matter at
the file *service* layer. Consider differences in valid name
characters,
path lengths, etc, for filesystems like iso9660, SMBFS, NTFS, etc.

I'm in the process of renaming this to MockFS, I'll have another
release out in a day or two. But, yeah, I'd considered that.
We have had a FileService class in our C++ code for years, not only for
mocking but also for impersonation and remoting. I suggest that might
be a good name for a Ruby class also.

It has been suggested to me that a fully robust simulation of a
disk-based file-system (say, the standard one on Linux & OS X, whatever
that is) is useful for other things. Makes lots of sense to me, though
for the short term I'm personally focusing on just the main usage of
mocking things out.

Francis Hwang
http://fhwang.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top