def init
@dir ||= ( File.directory?('../leaf') ? '../leaf' : 'pkg')
@name ||= master['name']
@status ||= master['status'] || 'beta/stable'
@date ||= master['date'] || Time.now.strftime("%Y-%m-%d")
@series ||= master['series']
@version ||= master['version']
unless @series || @version
puts "Series or Version is a required field."
exit 0
end
if @version
@package_name ||= @name + '-' + @version
else
@package_name ||= @name + ',' + @date
end
@author ||= master['author']
@email ||= master['email']
@summary ||= master['summary']
@project ||= master['rubyforge']['project']
@homepage ||= master['homepage'] || master['rubyforge']['homepage']
@exclude ||= []
@exclude |= MUST_EXCLUDE
@types ||= master['distribute'] || [ 'gem', 'tar.gz', 'zip' ]
@types.collect! { |t| t.to_s.strip.downcase }
@include ||= ['**/*']
if defined?(Gem)
if @platform
begin
@gem_platform = ::Gem.const_get(@platform)
rescue NameError
@platform = nil
end
end
@platform = ::Gem::Platform::RUBY unless @plaform
@requirements ||= master['requirements'] || []
@dependencies ||= master['dependencies'] || []
@executables ||= master['executables'] || []
end
end