You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/04/19 11:55:46 UTC
svn commit: r935505 - in /shindig/trunk: config/ content/ content/container/
content/samplecontainer/ content/samplecontainer/examples/
content/samplecontainer/examples/rewriter/ content/sampledata/
features/src/main/javascript/features/flash/ features...
Author: lindner
Date: Mon Apr 19 09:55:45 2010
New Revision: 935505
URL: http://svn.apache.org/viewvc?rev=935505&view=rev
Log:
content refactor - adjust paths
Modified:
shindig/trunk/config/container.js
shindig/trunk/config/oauth.json
shindig/trunk/content/README
shindig/trunk/content/container/rpctest_container.html
shindig/trunk/content/container/rpctest_gadget.xml
shindig/trunk/content/container/sample-metadata.html
shindig/trunk/content/container/sample-pubsub.html
shindig/trunk/content/container/sample1.html
shindig/trunk/content/container/sample2.html
shindig/trunk/content/container/sample3.html
shindig/trunk/content/container/sample4.html
shindig/trunk/content/container/sample5.html
shindig/trunk/content/container/sample6.html
shindig/trunk/content/container/sample7.html
shindig/trunk/content/samplecontainer/examples/SocialActivitiesWorld.xml
shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml
shindig/trunk/content/samplecontainer/examples/oauth.xml
shindig/trunk/content/samplecontainer/examples/rewriter/rewriteroff.xml
shindig/trunk/content/samplecontainer/examples/shindigoauth.xml
shindig/trunk/content/samplecontainer/samplecontainer.html
shindig/trunk/content/samplecontainer/samplecontainer.js
shindig/trunk/content/sampledata/canonicaldb.json
shindig/trunk/features/src/main/javascript/features/flash/taming.js
shindig/trunk/features/src/main/javascript/features/shindig.container/shindig-container.js
shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/BasicOAuthStoreTest.java
shindig/trunk/java/server/pom.xml
shindig/trunk/java/server/src/test/java/org/apache/shindig/server/JettyLauncher.java
shindig/trunk/java/social-api/pom.xml
shindig/trunk/php/index.php
Modified: shindig/trunk/config/container.js
URL: http://svn.apache.org/viewvc/shindig/trunk/config/container.js?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/config/container.js (original)
+++ shindig/trunk/config/container.js Mon Apr 19 09:55:45 2010
@@ -122,7 +122,7 @@
// parameter if it passes input validation and is not null.
// This should never be on the same host in a production environment!
// Only use this for TESTING!
- "parentRelayUrl" : "/gadgets/files/container/rpc_relay.html",
+ "parentRelayUrl" : "/container/rpc_relay.html",
// If true, this will use the legacy ifpc wire format when making rpc
// requests.
Modified: shindig/trunk/config/oauth.json
URL: http://svn.apache.org/viewvc/shindig/trunk/config/oauth.json?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/config/oauth.json (original)
+++ shindig/trunk/config/oauth.json Mon Apr 19 09:55:45 2010
@@ -18,16 +18,16 @@
*/
{
- "http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml" : {
+ "http://localhost:8080/samplecontainer/examples/oauth.xml" : {
"" : {
"consumer_key" : "gadgetConsumer",
"consumer_secret" : "gadgetSecret",
"key_type" : "HMAC_SYMMETRIC"
}
},
- "http://localhost:8080/gadgets/files/samplecontainer/examples/shindigoauth.xml" : {
+ "http://localhost:8080/samplecontainer/examples/shindigoauth.xml" : {
"shindig" : {
- "consumer_key" : "http://localhost:8080/gadgets/files/samplecontainer/examples/shindigoauth.xml",
+ "consumer_key" : "http://localhost:8080/samplecontainer/examples/shindigoauth.xml",
"consumer_secret" : "secret",
"key_type" : "HMAC_SYMMETRIC"
}
Modified: shindig/trunk/content/README
URL: http://svn.apache.org/viewvc/shindig/trunk/content/README?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/README (original)
+++ shindig/trunk/content/README Mon Apr 19 09:55:45 2010
@@ -26,13 +26,13 @@
(Note: yourserver:yourport defaults to localhost:8080 for the java server,
and just localhost for the php server)
- * http://yourserver:yourport/gadgets/files/container/sample1.html - basic container
- * http://yourserver:yourport/gadgets/files/container/sample2.html - custom rendering
- * http://yourserver:yourport/gadgets/files/container/sample3.html - custom layouts
- * http://yourserver:yourport/gadgets/files/container/sample4.html - set pref
- * http://yourserver:yourport/gadgets/files/container/sample5.html - set pref
- * http://yourserver:yourport/gadgets/files/container/sample6.html - dynamic height
- * http://yourserver:yourport/gadgets/files/container/sample7.html - set title
+ * http://yourserver:yourport/container/sample1.html - basic container
+ * http://yourserver:yourport/container/sample2.html - custom rendering
+ * http://yourserver:yourport/container/sample3.html - custom layouts
+ * http://yourserver:yourport/container/sample4.html - set pref
+ * http://yourserver:yourport/container/sample5.html - set pref
+ * http://yourserver:yourport/container/sample6.html - dynamic height
+ * http://yourserver:yourport/container/sample7.html - set title
These samples are very basic and aren't production-ready. Shindig will
include a more advanced container at a later date but it hasn't been
@@ -86,10 +86,10 @@
are using the java based server make sure you run with mvn jetty:run-war)
B) Hit the sample container at
- http://yourserver:yourport/gadgets/files/samplecontainer/samplecontainer.html
+ http://yourserver:yourport/samplecontainer/samplecontainer.html
C) See the sample container help document for more details on how it works:
- http://yourserver:yourport/gadgets/files/samplecontainer/getting-started.html
+ http://yourserver:yourport/samplecontainer/getting-started.html
D) Get, and try to run, coderunner.xml and compliancetests.xml from the project
http://opensocial-resources.googlecode.com/
Modified: shindig/trunk/content/container/rpctest_container.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/rpctest_container.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/rpctest_container.html (original)
+++ shindig/trunk/content/container/rpctest_container.html Mon Apr 19 09:55:45 2010
@@ -32,7 +32,7 @@
If your container on localhost:8080 with gadget on localhost:8081,
then to load the test load the following in your browser:
- http://localhost:8080/gadgets/files/container/rpctest_container.html?localhost:8081
+ http://localhost:8080/container/rpctest_container.html?localhost:8081
This test container/gadget pair is configurable via two other options:
* &gadgetdeferred=1 - tests early-message queueing from container to
@@ -54,10 +54,10 @@
var uabackward = window.location.search.indexOf('&uabackward=1') !== -1;
// Useful per-page variables.
- var gadgeturl = gadgethost + '/gadgets/files/container/rpctest_gadget.xml';
+ var gadgeturl = gadgethost + '/container/rpctest_gadget.xml';
var cachebust = 'cachebust=' + Math.random();
var gadgetrenderingurl = gadgethost + '/gadgets/ifr?url=' + gadgeturl + '&libs=rpc&parent=' + window.location.protocol + '//' + window.location.host + '&debug=1&' + cachebust;
- var gadgetrelay = gadgethost + '/gadgets/files/container/rpc_relay.uncompressed.html';
+ var gadgetrelay = gadgethost + '/container/rpc_relay.uncompressed.html';
// Set up faux gadgets.config(...)
var gadgets = {};
@@ -76,7 +76,7 @@
// Include rpctest_perf.js JS test helper, also with cachebusting.
document.write('<scr' + 'ipt language="JavaScript" type="text/javascript" src="' +
- '/gadgets/files/container/rpctest_perf.js?' + cachebust + '"></scr' + 'ipt>');
+ '/container/rpctest_perf.js?' + cachebust + '"></scr' + 'ipt>');
</script>
<!-- need a script break to allow rpc.js to load before calling referenced methods -->
<script>
Modified: shindig/trunk/content/container/rpctest_gadget.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/rpctest_gadget.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/rpctest_gadget.xml (original)
+++ shindig/trunk/content/container/rpctest_gadget.xml Mon Apr 19 09:55:45 2010
@@ -28,7 +28,7 @@
gadgets.rpc.call(null, 'initial_gadget_message', null, 'Hello there! Pre-onload message sent successfully.');
var cachebust = 'cachebust=' + Math.random();
- document.write('<scr' + 'ipt language="JavaScript" type="text/javascript" src="/gadgets/files/container/rpctest_perf.js?' + cachebust + '"></scr' + 'ipt>');
+ document.write('<scr' + 'ipt language="JavaScript" type="text/javascript" src="/container/rpctest_perf.js?' + cachebust + '"></scr' + 'ipt>');
</script>
<script>
// Register ping handler.
@@ -46,7 +46,7 @@
var parentDomain = gadgets.rpc.getOrigin(gadgets.util.getUrlParameters().parent);
var myDomain = gadgets.rpc.getOrigin(window.location.href);
var rpctoken = Math.round(Math.random() * 10000000);
- var childGadgetUrl = parentDomain + '/gadgets/ifr?url=' + parentDomain + '/gadgets/files/container/rpctest_childgadget.xml&parent=' + myDomain + '&libs=rpc&debug=1#rpctoken=' + rpctoken;
+ var childGadgetUrl = parentDomain + '/gadgets/ifr?url=' + parentDomain + '/container/rpctest_childgadget.xml&parent=' + myDomain + '&libs=rpc&debug=1#rpctoken=' + rpctoken;
childgadgetdiv.innerHTML = '<div><input type="button" value="Ping Parent (Container)" onclick="callGadgetServicePing();"/><hr/>' +
'<div>Who-am-I query count: <span id="queryconsole">0</span>, last q from: <span id="whoasked"></span></div>' +
'<div><iframe id="childgadget" name="childgadget" height=100 width=200 src="about:blank"></iframe></div>';
Modified: shindig/trunk/content/container/sample-metadata.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample-metadata.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample-metadata.html (original)
+++ shindig/trunk/content/container/sample-metadata.html Mon Apr 19 09:55:45 2010
@@ -40,7 +40,7 @@
}
</style>
</head>
-<script src="../../js/core.js?c=1"></script>
+<script src="/gadgets/js/core.js?c=1"></script>
<body>
<script>
function makeXhr() {
@@ -111,7 +111,7 @@
};
var xhr = makeXhr();
- xhr.open("POST", "../../metadata", true);
+ xhr.open("POST", "/gadgets/metadata", true);
xhr.onreadystatechange = function(xobj) {
return function() {
processResp(xobj);
Modified: shindig/trunk/content/container/sample-pubsub.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample-pubsub.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample-pubsub.html (original)
+++ shindig/trunk/content/container/sample-pubsub.html Mon Apr 19 09:55:45 2010
@@ -22,14 +22,14 @@
<title>Sample: PubSub</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="http://localhost:8080/gadgets/js/shindig-container:pubsub.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:pubsub.js?c=1&debug=1"></script>
<script type="text/javascript">
var my = {};
my.gadgetSpecUrls = [
- 'http://localhost:8080/gadgets/files/container/sample-pubsub-publisher.xml',
- 'http://localhost:8080/gadgets/files/container/sample-pubsub-subscriber.xml',
- 'http://localhost:8080/gadgets/files/container/sample-pubsub-subscriber.xml'
+ 'http://localhost:8080/container/sample-pubsub-publisher.xml',
+ 'http://localhost:8080/container/sample-pubsub-subscriber.xml',
+ 'http://localhost:8080/container/sample-pubsub-subscriber.xml'
];
my.LayoutManager = function() {
Modified: shindig/trunk/content/container/sample1.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample1.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample1.html (original)
+++ shindig/trunk/content/container/sample1.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: Simple Container</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="../gadgets/js/shindig-container:rpc.js?c=1&debug=1&nocache=1"></script>
<script type="text/javascript">
var specUrl0 = 'http://www.google.com/ig/modules/horoscope.xml';
var specUrl1 = 'http://www.labpixies.com/campaigns/todo/todo.xml';
Modified: shindig/trunk/content/container/sample2.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample2.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample2.html (original)
+++ shindig/trunk/content/container/sample2.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: Dynamic Height</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:rpc.js?c=1&debug=1"></script>
<script type="text/javascript">
var my = {};
@@ -52,7 +52,7 @@ my.init = function() {
my.renderGadgets = function() {
for (var i = 0; i < my.gadgetSpecUrls.length; ++i) {
- var gadget = gadgets.container.createGadget(
+ var gadget = shindig.container.createGadget(
{specUrl: my.gadgetSpecUrls[i]});
shindig.container.addGadget(gadget);
shindig.container.renderGadget(gadget);
Modified: shindig/trunk/content/container/sample3.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample3.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample3.html (original)
+++ shindig/trunk/content/container/sample3.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: Container with FloatLeft Layout</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:rpc.js?c=1&debug=1"></script>
<script type="text/javascript">
var specUrl0 = 'http://www.google.com/ig/modules/horoscope.xml';
Modified: shindig/trunk/content/container/sample4.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample4.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample4.html (original)
+++ shindig/trunk/content/container/sample4.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: set-pref support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:rpc.js?c=1&debug=1"></script>
<script type="text/javascript">
var specUrl0 = 'http://www.google.com/ig/modules/test_setprefs_multiple_ifpc.xml';
Modified: shindig/trunk/content/container/sample5.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample5.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample5.html (original)
+++ shindig/trunk/content/container/sample5.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: set-pref support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:rpc.js?c=1&debug=1"></script>
<script type="text/javascript">
var specUrl0 = 'http://www.google.com/ig/modules/test_setprefs_multiple_ifpc.xml';
Modified: shindig/trunk/content/container/sample6.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample6.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample6.html (original)
+++ shindig/trunk/content/container/sample6.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: dynamic-height support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:rpc.js?c=1&debug=1"></script>
<script type="text/javascript">
var specUrl0 = 'http://www.google.com/ig/modules/aue07otr.xml';
Modified: shindig/trunk/content/container/sample7.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample7.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/container/sample7.html (original)
+++ shindig/trunk/content/container/sample7.html Mon Apr 19 09:55:45 2010
@@ -22,7 +22,7 @@
<title>Sample: settitle support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/shindig-container:rpc.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/shindig-container:rpc.js?c=1&debug=1"></script>
<script type="text/javascript">
var specUrl0 = 'http://www.google.com/ig/modules/test_settitle_html.xml';
Modified: shindig/trunk/content/samplecontainer/examples/SocialActivitiesWorld.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/SocialActivitiesWorld.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/SocialActivitiesWorld.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/SocialActivitiesWorld.xml Mon Apr 19 09:55:45 2010
@@ -19,7 +19,7 @@
-->
<Module>
<ModulePrefs title="Social Activities World"
- icon="http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png">
+ icon="http://localhost:8080/samplecontainer/examples/icon.png">
<Require feature="opensocial-0.7"></Require>
<Require feature="settitle"/>
<Require feature="dynamic-height"></Require>
Modified: shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml Mon Apr 19 09:55:45 2010
@@ -21,7 +21,7 @@
<ModulePrefs title="Social Hello World"
description="The Social Hello World Application Displays multilingual hello messages"
thumbnail="http://localhost:8080/"
- icon="http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png">
+ icon="http://localhost:8080/samplecontainer/examples/icon.png">
<Require feature="osapi"></Require>
<Require feature="settitle"/>
<Require feature="dynamic-height"></Require>
@@ -40,7 +40,7 @@
}
div.bubble {
- background-image: url(/gadgets/files/samplecontainer/examples/bubble.gif);
+ background-image: url(/samplecontainer/examples/bubble.gif);
background-repeat: no-repeat;
width: 202px;
height: 66px;
@@ -107,7 +107,7 @@
&& allPeople[i].thumbnailUrl.indexOf('null') == -1) {
html += '<img src="' + allPeople[i].thumbnailUrl + '"/>';
} else {
- html += '<img src="/gadgets/files/samplecontainer/examples/nophoto.gif"/>';
+ html += '<img src="/samplecontainer/examples/nophoto.gif"/>';
}
html += '<br style="clear:both"></div>';
}
Modified: shindig/trunk/content/samplecontainer/examples/oauth.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/oauth.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/oauth.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/oauth.xml Mon Apr 19 09:55:45 2010
@@ -19,7 +19,7 @@
-->
<Module>
<ModulePrefs title="Demo OAuth Gadget"
- icon="http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png">
+ icon="http://localhost:8080/samplecontainer/examples/icon.png">
<OAuth>
<Service>
<Request url="http://localhost:9090/oauth-provider/request_token" />
@@ -45,7 +45,7 @@
</div>
<div id="approval" style="display: none">
- <img src="http://localhost:8080/gadgets/files/samplecontainer/examples/new.gif">
+ <img src="http://localhost:8080/samplecontainer/examples/new.gif">
<a href="#" id="personalize">Personalize this gadget</a>
</div>
Modified: shindig/trunk/content/samplecontainer/examples/rewriter/rewriteroff.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/rewriter/rewriteroff.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/rewriter/rewriteroff.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/rewriter/rewriteroff.xml Mon Apr 19 09:55:45 2010
@@ -26,8 +26,8 @@
</ModulePrefs>
<Content type="html">
<![CDATA[
-<style type="text/css"> @import url( http://localhost:8080/gadgets/files/samplecontainer/examples/rewriter/rewriter1.css ); </style>
-<link rel="stylesheet" type="text/css" href="http://localhost:8080/gadgets/files/samplecontainer/examples/rewriter/rewriter2.css"/>
+<style type="text/css"> @import url( http://localhost:8080/samplecontainer/examples/rewriter/rewriter1.css ); </style>
+<link rel="stylesheet" type="text/css" href="http://localhost:8080/samplecontainer/examples/rewriter/rewriter2.css"/>
<p>Demostrates what happens when the rewriter is off</p>
<div>
This is a URL in content that was not rewritten http://www.notrewritten.com
@@ -41,8 +41,8 @@
<img id="rewriteimg" src="feather.png" alt="You can read this because without rewrite paths are not resolved relative to the gadget spec on render"/>
<p id="jstarget1">If you can read this there is a problem</p>
<p id="jstarget2">If you can read this there is a problem</p>
-<script type="text/javascript" src="http://localhost:8080/gadgets/files/samplecontainer/examples/rewriter/rewriter1.js"></script>
-<script type="text/javascript" src="http://localhost:8080/gadgets/files/samplecontainer/examples/rewriter/rewriter2.js"></script>
+<script type="text/javascript" src="http://localhost:8080/samplecontainer/examples/rewriter/rewriter1.js"></script>
+<script type="text/javascript" src="http://localhost:8080/samplecontainer/examples/rewriter/rewriter2.js"></script>
<p>Rendering this gadget will have loaded the resources directly.
Without the rewriter caching headers have not been set and there are
more requests because javascript files have not been concatenated</p>
Modified: shindig/trunk/content/samplecontainer/examples/shindigoauth.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/shindigoauth.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/shindigoauth.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/shindigoauth.xml Mon Apr 19 09:55:45 2010
@@ -19,7 +19,7 @@
-->
<Module>
<ModulePrefs title="Demo 3-legged OAuth to Shindig"
- icon="http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png">
+ icon="http://localhost:8080/samplecontainer/examples/icon.png">
<OAuth>
<Service name="shindig">
<Request url="http://localhost:8080/oauth/requestToken" />
@@ -44,7 +44,7 @@
</div>
<div id="approval" style="display: none">
- <img src="http://localhost:8080/gadgets/files/samplecontainer/examples/new.gif">
+ <img src="http://localhost:8080/samplecontainer/examples/new.gif">
<a href="#" id="personalize">Personalize this gadget</a>
</div>
Modified: shindig/trunk/content/samplecontainer/samplecontainer.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/samplecontainer.html?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/samplecontainer.html (original)
+++ shindig/trunk/content/samplecontainer/samplecontainer.html Mon Apr 19 09:55:45 2010
@@ -51,7 +51,7 @@
</style>
-<script type="text/javascript" src="../../js/core:rpc:pubsub:shindig-container.js?c=1&debug=1"></script>
+<script type="text/javascript" src="/gadgets/js/core:rpc:pubsub:shindig-container.js?c=1&debug=1"></script>
<script type="text/javascript" src="samplecontainer.js"></script>
</head>
Modified: shindig/trunk/content/samplecontainer/samplecontainer.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/samplecontainer.js?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/samplecontainer.js (original)
+++ shindig/trunk/content/samplecontainer/samplecontainer.js Mon Apr 19 09:55:45 2010
@@ -154,7 +154,7 @@ shindig.samplecontainer = {};
// Shindigs rpc code uses direct javascript calls when running on the same domain
// to simulate cross-domain when running sample container we replace
// 'localhost' with '127.0.0.1'
- var iframeBaseUrl = baseUrl.replace("localhost", "127.0.0.1") + '../../';
+ var iframeBaseUrl = baseUrl.replace("localhost", "127.0.0.1") + '../../gadgets/';
gadget.setServerBase(iframeBaseUrl);
gadget.secureToken = escape(generateSecureToken());
Modified: shindig/trunk/content/sampledata/canonicaldb.json
URL: http://svn.apache.org/viewvc/shindig/trunk/content/sampledata/canonicaldb.json?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/content/sampledata/canonicaldb.json (original)
+++ shindig/trunk/content/sampledata/canonicaldb.json Mon Apr 19 09:55:45 2010
@@ -437,31 +437,31 @@
// Gadgets/App information. OAuth Consumer Key defaults to the app url.
//
"apps" : {
- "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml":
+ "http://localhost:8080/samplecontainer/examples/SocialHelloWorld.xml":
{ "title" : "Social Hello World",
"consumerSecret" : "secret",
- "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"},
- "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialActivitiesWorld.xml" :
+ "icon" : "http://localhost:8080/samplecontainer/examples/icon.png"},
+ "http://localhost:8080/samplecontainer/examples/SocialActivitiesWorld.xml" :
{ "title" : "Social Activities World",
"consumerSecret" : "secret",
- "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"},
- "http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml" :
+ "icon" : "http://localhost:8080/samplecontainer/examples/icon.png"},
+ "http://localhost:8080/samplecontainer/examples/oauth.xml" :
{ "title" : "Demo OAuth Gadget",
"consumerSecret" : "secret",
- "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"},
- "http://localhost:8080/gadgets/files/samplecontainer/examples/shindigoauth.xml" :
+ "icon" : "http://localhost:8080/samplecontainer/examples/icon.png"},
+ "http://localhost:8080/samplecontainer/examples/shindigoauth.xml" :
{ "title" : "Demo OAuth Gadget",
"consumerSecret" : "secret",
- "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"}
+ "icon" : "http://localhost:8080/samplecontainer/examples/icon.png"}
},
// duplicates userApplications as above..
"permissions": {
- "john.doe" : { "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml" : { "installed" : true},
- "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialActivitiesWorld.xml" : { "installed" : true}
+ "john.doe" : { "http://localhost:8080/samplecontainer/examples/SocialHelloWorld.xml" : { "installed" : true},
+ "http://localhost:8080/samplecontainer/examples/SocialActivitiesWorld.xml" : { "installed" : true}
},
- "canonical" :{ "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml" : { "installed" : true},
- "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialActivitiesWorld.xml" : { "installed" : true}
+ "canonical" :{ "http://localhost:8080/samplecontainer/examples/SocialHelloWorld.xml" : { "installed" : true},
+ "http://localhost:8080/samplecontainer/examples/SocialActivitiesWorld.xml" : { "installed" : true}
}
},
// Passwords for authenticaiton service
Modified: shindig/trunk/features/src/main/javascript/features/flash/taming.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/flash/taming.js?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/flash/taming.js (original)
+++ shindig/trunk/features/src/main/javascript/features/flash/taming.js Mon Apr 19 09:55:45 2010
@@ -62,7 +62,7 @@ tamings___.push(function(imports) {
document.body.appendChild(d);
gadgets.flash.embedFlash(
- "/gadgets/files/container/Bridge.swf",
+ "/container/Bridge.swf",
d,
10,
{
Modified: shindig/trunk/features/src/main/javascript/features/shindig.container/shindig-container.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/shindig.container/shindig-container.js?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/shindig.container/shindig-container.js (original)
+++ shindig/trunk/features/src/main/javascript/features/shindig.container/shindig-container.js Mon Apr 19 09:55:45 2010
@@ -472,7 +472,7 @@ shindig.Gadget.prototype.getAdditionalPa
shindig.IfrGadget = function(opt_params) {
shindig.Gadget.call(this, opt_params);
- this.serverBase_ = '../../'; // default gadget server
+ this.serverBase_ = '/gadgets/'; // default gadget server
};
shindig.IfrGadget.inherits(shindig.Gadget);
@@ -493,7 +493,7 @@ shindig.IfrGadget.prototype.cssClassGadg
shindig.IfrGadget.prototype.cssClassTitleButton = 'gadgets-gadget-title-button';
shindig.IfrGadget.prototype.cssClassGadgetContent = 'gadgets-gadget-content';
shindig.IfrGadget.prototype.rpcToken = (0x7FFFFFFF * Math.random()) | 0;
-shindig.IfrGadget.prototype.rpcRelay = 'files/container/rpc_relay.html';
+shindig.IfrGadget.prototype.rpcRelay = '../container/rpc_relay.html';
shindig.IfrGadget.prototype.getTitleBarContent = function(continuation) {
var settingsButton = this.hasViewablePrefs_() ?
Modified: shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/BasicOAuthStoreTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/BasicOAuthStoreTest.java?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/BasicOAuthStoreTest.java (original)
+++ shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/oauth/BasicOAuthStoreTest.java Mon Apr 19 09:55:45 2010
@@ -38,7 +38,7 @@ public class BasicOAuthStoreTest {
private static final String SAMPLE_FILE =
'{' +
- "'http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml' : {" +
+ "'http://localhost:8080/samplecontainer/examples/oauth.xml' : {" +
"'' : {" +
"'consumer_key' : 'gadgetConsumer'," +
"'consumer_secret' : 'gadgetSecret'," +
@@ -68,7 +68,7 @@ public class BasicOAuthStoreTest {
@Test
public void testInit() throws Exception {
FakeGadgetToken t = new FakeGadgetToken();
- t.setAppUrl("http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml");
+ t.setAppUrl("http://localhost:8080/samplecontainer/examples/oauth.xml");
OAuthServiceProvider provider = new OAuthServiceProvider("req", "authorize", "access");
ConsumerInfo consumerInfo = store.getConsumerKeyAndSecret(t, "", provider);
OAuthConsumer consumer = consumerInfo.getConsumer();
@@ -95,7 +95,7 @@ public class BasicOAuthStoreTest {
public void testGetAndSetAndRemoveToken() {
FakeGadgetToken t = new FakeGadgetToken();
ConsumerInfo consumer = new ConsumerInfo(null, null, null);
- t.setAppUrl("http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml");
+ t.setAppUrl("http://localhost:8080/samplecontainer/examples/oauth.xml");
t.setViewerId("viewer-one");
assertNull(store.getTokenInfo(t, consumer, "", ""));
@@ -107,7 +107,7 @@ public class BasicOAuthStoreTest {
assertEquals("secret", info.getTokenSecret());
FakeGadgetToken t2 = new FakeGadgetToken();
- t2.setAppUrl("http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml");
+ t2.setAppUrl("http://localhost:8080/samplecontainer/examples/oauth.xml");
t2.setViewerId("viewer-two");
assertNull(store.getTokenInfo(t2, consumer, "service", "token"));
@@ -154,7 +154,7 @@ public class BasicOAuthStoreTest {
store.initFromConfigString(SAMPLE_FILE);
FakeGadgetToken t = new FakeGadgetToken();
- t.setAppUrl("http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml");
+ t.setAppUrl("http://localhost:8080/samplecontainer/examples/oauth.xml");
OAuthServiceProvider provider = new OAuthServiceProvider("req", "authorize", "access");
ConsumerInfo consumerInfo = store.getConsumerKeyAndSecret(t, "", provider);
OAuthConsumer consumer = consumerInfo.getConsumer();
Modified: shindig/trunk/java/server/pom.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/java/server/pom.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/java/server/pom.xml (original)
+++ shindig/trunk/java/server/pom.xml Mon Apr 19 09:55:45 2010
@@ -51,8 +51,7 @@
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
- <directory>${basedir}/../../javascript/</directory>
- <targetPath>gadgets/files</targetPath>
+ <directory>${basedir}/../../content/</directory>
<includes>
<include>**/*.*</include>
</includes>
@@ -71,16 +70,18 @@
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
- <webAppSourceDirectory>${basedir}/target/shindig-server-${pom.version}</webAppSourceDirectory>
- <contextPath>/</contextPath>
- <webXml>${basedir}/target/shindig-server-${pom.version}/WEB-INF/web.${runType}.xml</webXml>
+ <webAppConfig>
+ <contextPath>/</contextPath>
+ <baseResource implementation="org.mortbay.resource.ResourceCollection">
+ <resourcesAsCSV>src/main/webapp,${basedir}/../../content</resourcesAsCSV>
+ </baseResource>
+ </webAppConfig>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
- <directory>${basedir}/../../javascript/</directory>
- <targetPath>gadgets/files</targetPath>
+ <directory>${basedir}/../../content/</directory>
<includes>
<include>**/*.*</include>
</includes>
Modified: shindig/trunk/java/server/src/test/java/org/apache/shindig/server/JettyLauncher.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/server/src/test/java/org/apache/shindig/server/JettyLauncher.java?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/java/server/src/test/java/org/apache/shindig/server/JettyLauncher.java (original)
+++ shindig/trunk/java/server/src/test/java/org/apache/shindig/server/JettyLauncher.java Mon Apr 19 09:55:45 2010
@@ -41,7 +41,9 @@ import org.mortbay.jetty.servlet.Servlet
import org.mortbay.resource.Resource;
import java.io.IOException;
+import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import com.google.common.base.Joiner;
@@ -61,7 +63,7 @@ public class JettyLauncher {
private static final String REST_BASE = "/social/rest/*";
private static final String JSON_RPC_BASE = "/social/rpc/*";
private static final String CONCAT_BASE = "/gadgets/concat";
- private static final String GADGETS_FILES = "/gadgets/files/*";
+ private static final List<String> FILES = Arrays.asList("/container/*", "/samplecontainer/*");
private static final String JS_BASE = "/gadgets/js/*";
private static final String METADATA_BASE = "/gadgets/metadata/*";
@@ -148,19 +150,20 @@ public class JettyLauncher {
// Skip Gzip
if (s.endsWith(".gz")) return null;
- String stripped = s.substring("/gadgets/files/".length());
try {
- Resource resource = Resource.newResource(trunk + "/javascript/" + stripped);
+ Resource resource = Resource.newResource(trunk + "/content/" + s);
// Try to open it.
resource.getInputStream();
return resource;
} catch (IOException ioe) {
- return Resource.newClassPathResource(stripped);
+ return Resource.newClassPathResource(s);
}
}
};
ServletHolder gadgetFiles = new ServletHolder(defaultServlet);
- context.addServlet(gadgetFiles, GADGETS_FILES);
+ for (String pattern : FILES) {
+ context.addServlet(gadgetFiles, pattern);
+ }
}
public void start() throws Exception {
Modified: shindig/trunk/java/social-api/pom.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/pom.xml?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/java/social-api/pom.xml (original)
+++ shindig/trunk/java/social-api/pom.xml Mon Apr 19 09:55:45 2010
@@ -44,7 +44,7 @@
<directory>conf</directory>
</resource>
<resource>
- <directory>${basedir}/../../javascript/sampledata/</directory>
+ <directory>${basedir}/../../content/sampledata/</directory>
<targetPath>sampledata</targetPath>
<includes>
<include>**/*.*</include>
Modified: shindig/trunk/php/index.php
URL: http://svn.apache.org/viewvc/shindig/trunk/php/index.php?rev=935505&r1=935504&r2=935505&view=diff
==============================================================================
--- shindig/trunk/php/index.php (original)
+++ shindig/trunk/php/index.php Mon Apr 19 09:55:45 2010
@@ -76,7 +76,8 @@ function __autoload($className) {
}
}
-$servletMap = array(Config::get('web_prefix') . '/gadgets/files' => 'FilesServlet',
+$servletMap = array(Config::get('web_prefix') . '/container' => 'FilesServlet',
+ Config::get('web_prefix') . '/samplecontainer' => 'FilesServlet',
Config::get('web_prefix') . '/gadgets/js' => 'JsServlet',
Config::get('web_prefix') . '/gadgets/proxy' => 'ProxyServlet',
Config::get('web_prefix') . '/gadgets/makeRequest' => 'MakeRequestServlet',