Writes the .gemspec specification (in Ruby) to the gem home’s specifications
directory.
# File lib/rubygems/installer.rb, line 257
def write_spec
file_name = spec.spec_file.untaint
File.open(file_name, "w") do |file|
file.puts spec.to_ruby_for_cache
end
end