[Rubygems-developers] required_ruby_version

Chad Fowler chad at chadfowler.com
Mon Jun 7 22:12:10 EDT 2004


Notice the #require_ruby_version line.  I added that this evening from 
the TODO list.  We had originally talked about having a "magic" ruby 
gem that would look like a normal dependency, but it grossed me out 
when I started to program it that way.  So, I decided to make it 
explicit and special-case.  Please give it a try if you get a chance.


spec = Gem::Specification.new do |s|
   s.name = 'an-app'
   s.version = "0.0.3"
   s.required_ruby_version = ">= 1.8.1"  #  HERE
   s.platform = Gem::Platform::RUBY
   s.summary = "This gem demonstrates executable scripts"
   s.requirements << 'a computer processor'
   s.files = Dir.glob("lib/**/*").delete_if {|item| item.include?("CVS")}
   s.files.concat Dir.glob("bin/**/*").delete_if {|item| 
item.include?("CVS")}
   s.require_path = 'lib'
   s.autorequire = 'somefunctionality'
   s.executables = ["myapp"]
   s.extra_rdoc_files = ["README", "Changes.rdoc"]
   #s.default_executable = "myapp"
   s.bindir = "bin"
end


Chad



More information about the Rubygems-developers mailing list