Glad you got your bike working again and I hope you found the source of the water intrusion. I am on an extended camping vacation and my bike has been rained on twelve of the past fourteen days! I ride the bike everyday and today was the first time I got caught in a heavy thunderstorm. The bike and I both got a good soaking before we found a covered shelter to wait out the storm. So far, I have had no issues, maybe I have just been lucky, but I will be disappointed if my bike quits working because it got rained on.
I am curious as to how old your bike is and if this is the first time it has gotten wet. If it is still under warranty, I would be talking to the vendor/manufacturer/LBS about the source of the water intrusion and available remedies.