How can I make a texture flow along a bent mesh? My Goal is to create a texture that flows along a path.
An analogy would be like liquid flowing through a crazy straw.

As an example, I've created a Texture Coordinate. This links to a Checker Texture node. Then plugs into a Material Output

To animate the texture, I animate an Empty to move along it's Y axis. This Empty is linked to the Object selector in the Texture Coordinate node and the Checker Texture's Vector input is hooked up to the Object output from the Texture Coordinate node.



This works pretty well on a stretched out cube:



But fails when I bend that geometry. Technically, it's doing exactly what we might expect given the order of the nodes, but my goal is to have the pattern flow down the geometry and through deformations.



The solution that comes to mind is to change the node order, but Texture Coordinates doesn't have an input.

I get this when I remove the Texture Coordinate node, but lose the ability to manipulate the texture position along the mesh:



If anyone can help me figure this out, I'd appreciate it.

Note: controlling the texture with an Empty isn't a requirement. I just need something that can be key framed, such as a Math node.
Edit: It looks like the problem has been fixed in the last version.

Old answer:

In 2.8 it looks like you need to mark seams and unwrap, then in the Shader Editor use the Texture Coordinate UV socket, play with the Location values of the Mapping node to make the texture move along the object. In the UV Editor you need to make sure that the UV is well placed if you want the texture to go in the right direction.

In 2.79 you can use the Texture Coordinate > Generated output socket instead of the Object output, then plug it into a Mapping node, play with the Mapping > Scale value to have the right proportion. Now with the Mapping > Location value you can make it move.