Texture along the shape of the mesh
You should use Follow Active Quads.  The problem you're seeing is because the geometry doesn't have a lot of detail so it's not giving you nice curves.  Add a Subdivision Surface modifier and you'll get better results:



You may need to tweak the UVs a bit still in a couple of spots but I think you'll get really close with this.