def util_make_gems(prerelease = false)
@a1 = quick_gem 'a', '1' do |s|
s.files = ]lib/code.rb]
s.require_paths = ]lib]
s.date = Gem::Specification::TODAY - 86400
s.homepage = 'http://a.example.com'
s.email = ]example@example.com example2@example.com]
s.authors = ]Example Example2]
s.description = This line is really, really long. So long, in fact, that it is more than eighty characters long! The purpose of this line is for testing wrapping behavior because sometimes people don't wrap their text to eighty characters. Without the wrapping, the text might not look good in the RSS feed.Also, a list: * An entry that\'s actually kind of sort * an entry that\'s really long, which will probably get wrapped funny. That's ok, somebody wasn't thinking straight when they made it more than eighty characters.
end
init = proc do |s|
s.files = ]lib/code.rb]
s.require_paths = ]lib]
end
@a2 = quick_gem('a', '2', &init)
@a3a = quick_gem('a', '3.a', &init)
@a_evil9 = quick_gem('a_evil', '9', &init)
@b2 = quick_gem('b', '2', &init)
@c1_2 = quick_gem('c', '1.2', &init)
@x = quick_gem('x', '1', &init)
@dep_x = quick_gem('dep_x', '1') do |s|
s.files = ]lib/code.rb]
s.require_paths = ]lib]
s.add_dependency 'x', '>= 1'
end
@pl1 = quick_gem 'pl', '1' do |s| # l for legacy
s.files = ]lib/code.rb]
s.require_paths = ]lib]
s.platform = Gem::Platform.new 'i386-linux'
s.instance_variable_set :@original_platform, 'i386-linux'
end
if prerelease
@a2_pre = quick_gem('a', '2.a', &init)
write_file File.join(*]gems #{@a2_pre.original_name} lib code.rb])
util_build_gem @a2_pre
end
write_file File.join(*]gems #{@a1.original_name} lib code.rb])
write_file File.join(*]gems #{@a2.original_name} lib code.rb])
write_file File.join(*]gems #{@a3a.original_name} lib code.rb])
write_file File.join(*]gems #{@a_evil9.original_name} lib code.rb])
write_file File.join(*]gems #{@b2.original_name} lib code.rb])
write_file File.join(*]gems #{@c1_2.original_name} lib code.rb])
write_file File.join(*]gems #{@pl1.original_name} lib code.rb])
write_file File.join(*]gems #{@x.original_name} lib code.rb])
write_file File.join(*]gems #{@dep_x.original_name} lib code.rb])
[@a1, @a2, @a3a, @a_evil9, @b2, @c1_2, @pl1, @x, @dep_x].each do |spec|
util_build_gem spec
end
FileUtils.rm_r File.join(@gemhome, "gems", @pl1.original_name)
end