Best Way to Distribute Non-Code Files

Z

Zed A. Shaw

Hi,

I was just wondering what other folks have done when distributing files
that aren't code with their Ruby applications? I have about 5-6 very
small files that are data which get read into the application.

Any suggestions would be great. Thanks.

Zed A. Shaw
 
A

Aredridel

Hi,

I was just wondering what other folks have done when distributing files
that aren't code with their Ruby applications? I have about 5-6 very
small files that are data which get read into the application.

Any suggestions would be great. Thanks.

What sort of data? /usr/share/yourapp sorts? Icons? Config files?
 
B

B. K. Oxley (binkley)

Aredridel said:
What sort of data? /usr/share/yourapp sorts? Icons? Config files?

In general, is there a JAR-like format well-supported by Ruby? Most
folks think of JARs for distributing code, but it is excellent as a
resource and configuration storage format.


Cheers,
--binkley
 
A

Aredridel

In general, is there a JAR-like format well-supported by Ruby? Most
folks think of JARs for distributing code, but it is excellent as a
resource and configuration storage format.

Heh. There's tarballs and their variants (gems, rps and such)

Jars are one thing that always made me feel ill working with Java.
They don't integrate well into a greater system particularly
gracefully.

Ari
 
E

Erik Veenstra

I was just wondering what other folks have done when
In general, is there a JAR-like format well-supported by
Ruby? Most folks think of JARs for distributing code, but it
is excellent as a resource and configuration storage format.

You might want to have a look at Tar2RubyScript:

http://www.erikveen.dds.nl/tar2rubyscript/index.html

It's the third entry when searching with Google: ruby jar.

gegroet,
Erik V.
 
D

Dido Sevilla

Hi,

I was just wondering what other folks have done when distributing files
that aren't code with their Ruby applications? I have about 5-6 very
small files that are data which get read into the application.

Well, I recently wrote a small program in FXRuby that would have
otherwise loaded GIF icons from a certain path, all of which were
under 4K in size, and I made the entire program totally self-contained
by base64 encoding these GIFs and embedding them as strings inside the
program. I don't know if this trick will work for your application
though. It has the advantage of making it dead easy to distribute the
program, as only the script file was required provided that the user
already has a working version of Ruby and FXRuby available (as the
target was Windows, the one-click installer made this certain).

Frankly, I don't see any problem with embodying non-code data as Ruby
code as I have done, provided there's a good reason to do so.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top