Managing third-party javascript libraries

Hi guys,

I was wondering how I should manage external javascript libraries in Rails 3.1. For instance, say I want to use a jQuery plugin in my Rails project. Since it's not a native Rails plugin, but a generic javascript library, I would clone its github repository (e.g. GitHub - loopj/jquery-tokeninput: Tokeninput is a jQuery plugin which allows your users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook.), copy the necessary js files into vendor/assets/javascripts/. So far so good, but doing this every time I want to update those external plugins seems a bit like a hassle. Is there a nicer way of doing this, like automating the process? How do you do this?

Thanks.