You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/12/14 19:13:52 UTC

[1/2] git commit: Fix broken logic related to skinning of virtual resources - a virtual resource is one component of the global MessageCatalog

Updated Branches:
  refs/heads/5.4-js-rewrite 40f3fef11 -> 646b25f3b


Fix broken logic related to skinning of virtual resources
- a virtual resource is one component of the global MessageCatalog


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/646b25f3
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/646b25f3
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/646b25f3

Branch: refs/heads/5.4-js-rewrite
Commit: 646b25f3bafc02d0e61f9b2f781e27f7c86f6efc
Parents: c40c71d
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Dec 14 10:06:58 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Dec 14 10:06:58 2012 -0800

----------------------------------------------------------------------
 .../tapestry5/internal/util/VirtualResource.java   |    2 +-
 tapestry-core/src/test/conf/testng.xml             |    1 -
 .../integration/app5/SkinningTests.groovy          |    4 +++-
 .../java/org/apache/tapestry5/ioc/Resource.java    |    2 ++
 4 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/646b25f3/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/VirtualResource.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/VirtualResource.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/VirtualResource.java
index c353db5..099acf9 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/VirtualResource.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/VirtualResource.java
@@ -64,7 +64,7 @@ public abstract class VirtualResource implements Resource
     @Override
     public Resource forFile(String relativePath)
     {
-        return unsupported("forFile");
+        return this;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/646b25f3/tapestry-core/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/conf/testng.xml b/tapestry-core/src/test/conf/testng.xml
index 1eb2b7d..0807d32 100644
--- a/tapestry-core/src/test/conf/testng.xml
+++ b/tapestry-core/src/test/conf/testng.xml
@@ -78,7 +78,6 @@
     </test>
 
     <test name="App Skinning Tests" enabled="true">
-        <parameter name="tapestry.web-app-folder" value="src/test/app5"/>
         <packages>
             <package name="org.apache.tapestry5.integration.app5"/>
         </packages>

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/646b25f3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app5/SkinningTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app5/SkinningTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app5/SkinningTests.groovy
index b4ad7f0..16a3558 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app5/SkinningTests.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app5/SkinningTests.groovy
@@ -1,4 +1,4 @@
-// Copyright 2011 The Apache Software Foundation
+// Copyright 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,11 +15,13 @@
 package org.apache.tapestry5.integration.app5
 
 import org.apache.tapestry5.integration.TapestryCoreTestCase
+import org.apache.tapestry5.test.TapestryTestConfiguration
 import org.testng.annotations.Test
 
 /**
  * Tests for the "skinning support" added in 5.3.
  */
+@TapestryTestConfiguration(webAppFolder = "src/test/app5")
 class SkinningTests extends TapestryCoreTestCase
 {
     @Test

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/646b25f3/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/Resource.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/Resource.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/Resource.java
index 8b154c9..ae4f439 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/Resource.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/Resource.java
@@ -62,6 +62,8 @@ public interface Resource
     /**
      * Returns a Resource based on a relative path, relative to the folder containing the resource. Understands the "."
      * (current folder) and ".." (parent folder) conventions, and treats multiple sequential slashes as a single slash.
+     * <p/>
+     * Virtual resources (resources fabricated at runtime) return themselves.
      */
     Resource forFile(String relativePath);