I tried to modify the rake_base.rb and fruit_gem_processor.rb to make it work with .f95 extension files. However, I could not build fruit_gem_processor.rb. There is always an error with "unitialized constant Gem" and the line with error in rakefile is #2
Gem::manage_gems
I hope someone can give me a hint. Thanks
Tuan
It's probably not fruit_gem_processor.rb or rake_base.rb problem. I have modified rakefile.rb in order to install it with modern rubygems.
require 'rubygems'
require 'rubygems/package_task'
require 'rake/clean'
CLEAN.include(FileList['pkg/*.gem'])
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "fruit_processor"
s.version = "2.7"
s.author = "Andrew Chen"
s.email = "meihome meihome.com"
s.summary = "A package for fortranxunit (fruit)."
s.files = FileList['lib/*.rb', 'test/*'].to_a
s.require_path = "lib"
s.autorequire = "fruit_processor"
s.test_files = Dir.glob('tests/*.rb')
s.has_rdoc = true
s.extra_rdoc_files = ["README"]
end
Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
task :default => [:clean, "pkg/#{spec.name}-#{spec.version}.gem"] do
puts "generated latest version"
end
task :install => :default do
sh "gem install pkg/#{spec.name}-#{spec.version}.gem"
end