Might not be quite what you're after, but Rails 3.2 has an entirely new router called Journey (<a href="https://github.com/rails/journey">https://github.com/rails/journey</a>) which is fairly well decoupled from Rails, and you could perhaps use that and feed it your routes file? Might be worth a look. <br>
<br>hope that helps a little. <br><br>Tom <br><br><div class="gmail_quote">On 25 January 2012 14:52, Lee Henson <span dir="ltr"><<a href="mailto:lee.m.henson@gmail.com">lee.m.henson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Hi list</div><div><br></div><div>I've got a ruby daemon chugging along doing all kinds of interesting offline-processingy things for me, but one thing I need it to do is be able to generate a url to a page in one of my rails websites:</div>


<div><br></div><div>url_to_widget_page = "<a href="http://doodah.com/some/path/here" target="_blank">http://doodah.com/some/path/here</a>"</div><div><br></div><div>...but that explicit path might go mouldy as the system evolves. It would be nice to be able to do:</div>


<div><br></div><div>url_to_widget_page = "<a href="http://doodah.com#%7Bwidget_path%7D" target="_blank">http://doodah.com#{widget_path}</a>"</div><div><br></div><div>much in the same way that you can do in rails. I'm already using the js-routes gem to generate a "file cache" of the routes in my web app, so I can do:</div>


<div><br></div><div>Router.widget_path()    // returns '/some/path/here'</div><div><br></div><div>from js, and the file is regenerated on every request in dev mode. I'd like the same capability from non-rails ruby code. </div>


<div><br></div><div>My google-fu seems weak in this area - has anyone seen a gem like this or have any alternative ideas on how this goal might be achieved? I don't think porting the js-routes gem would be too hard, but I'd rather not reinvent the wheel.</div>


<div><br></div><div>Cheers</div><span class="HOEnZb"><font color="#888888"><div>Lee</div>
</font></span><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br>