Shindig does not accept relative URLs for template libraries
Review Request #4818 - Created April 20, 2012 and submitted
per spec, Gadget should be able to use relative URL to define the template-libray, but right now when it uses this approach, client side will end up making a /gadgets/makeRequest call and passes in the relative URL value and fails with an HTTP status of 400. Solution: At client side, the opensocial-template feature will get the template-library URL value from global variable "features", so in this patch it updates the process of generating the init JS which will be passed back to client side to init the "features" variable(in Class "org.apache.shindig.gadgets.config.CoreUtilConfigContributor"), adds some specific logic to handle "template-library" parameter, convert the relative url to an absolute one.
Posted (April 20, 2012, 12:32 p.m.)
In general I think this is OK. Please follow the Shindig style guidelines when creating patches. Most notably you are using tabs instead of spaces and there is trailing whitespace, which you can see in the diff viewer in red. If you are using Eclipse you should be using the Shindig formatter which you can find here: http://svn.apache.org/repos/asf/shindig/trunk/etc/eclipse/
Posted (April 20, 2012, 12:44 p.m.)
Overall looks good. Just a few minor things. Please also clean up your tabs, they should be spaces. If you are using Eclipse use the templates here http://svn.apache.org/repos/asf/shindig/trunk/etc/eclipse/. They will help make sure your formatting is correct.
Posted (April 25, 2012, 8:48 p.m.)
This seems the wrong approach for me. Each ConfigContributor responsible to add additional config from server. In this case the CoreUtilConfigContributor is used to add additional logic to push config to init function in the core.util feature. Not sure how the opensocial-templates JS code could read this new rewritten requireLibrary param.
Posted (April 26, 2012, 6:28 a.m.)