# this method adds a new address record or saves changes def creategemspecrecord require 'fileutils' if @a_gemspecfilename newname = "%s" % [@a_gemspecfilename] # grab the new filename to create newdata = @a_gemspecline1.to_s + "\n" + @a_gemspecline2.to_s + "\n" + @a_gemspecline3.to_s + "\n" + @a_gemspecline4.to_s + "\n" + @a_gemspecline5.to_s + "\n" + @a_gemspecline6.to_s + "\n" + @a_gemspecline7.to_s + "\n" + @a_gemspecline8.to_s + "\n" + @a_gemspecline9.to_s + "\n" + @a_gemspecline10.to_s + "\n" + @a_gemspecline11.to_s + "\n" + @a_gemspecline12 .to_s + "\n" + @a_gemspecline13.to_s + "\n" + @a_gemspecline14.to_s + "\n" + @a_gemspecline15.to_s + "\n" + @a_gemspecline16.to_s + "\n" + @a_gemspecline17.to_s + "\n" fullnewname = newname + ".gemspec" begin # exception trapped block fileName = File.join($gemspec_directory, fullnewname ) fd = File.open(fileName,"w") fd.print(newdata) # save the record info to the file fd.close @createnewgemspecrecorddisplay=newdata # show the record info in the browser rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end end