You now know the value of most home warranties....Bubkis! You are persistent enought that you MIGHT get some money out of them. ( Don't spend it until you see the check!),
As to the gas line, you will need to know if local codes allow flex line on the gas. Some do NOT, whereas here in Calif., it is REQUIRED. You will also be required to pipe the T/P discharge line. Here it must go outside the building. Your codes may be different. Finally, you must find out if your local code allows a homeowner to do gas work at all. And FINALLY, a permit is required almost always, to replace a water heater. Check with the local authorities on that.