From: ara.t.howard@... Date: 2006-10-10T03:46:52+09:00 Subject: Re: [ANN] SqlStatement 1.0.0 - hide the syntax of SQL behind familiar ruby syntax On Tue, 10 Oct 2006, Ken Bloom wrote: > I've got an example.rb file in the gem (in bin/). I wasn't sure where the > best place was to put it in the gem, so if you know of another more > visible place (where it won't get documented like it's part of the > library), I'll happily move it there. > > --Ken here's the gemspec i use. it's for directories named 'libname-x.x.x', but you can ignore that part if you wish. ~: > cat a.rb lib, version = File::basename(File::dirname(File::expand_path(__FILE__))).split %r/-/, 2 require 'rubygems' Gem::Specification::new do |spec| spec.name = lib spec.version = version spec.platform = Gem::Platform::RUBY spec.summary = lib # # the important part # spec.files = Dir::glob "**/**" spec.executables = Dir::glob("bin/*").map{|exe| File::basename exe} spec.require_path = "lib" spec.autorequire = lib spec.has_rdoc = File::exist? "doc" spec.test_suite_file = "test/#{ lib }.rb" if File::directory? "test" spec.author = "Ara T. Howard" spec.email = "ara.t.howard@noaa.gov" spec.homepage = "http://codeforpeople.com/lib/ruby/#{ lib }/" end so, this just grabs everything. then you can make a dir called samples/, examples/, or whatever and it gets included. regards. -a -- in order to be effective truth must penetrate like an arrow - and that is likely to hurt. -- wei wu wei