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 2013/05/17 19:14:51 UTC

[2/3] Remove tapestry-yuicompressor Build improved/overridable infrastructure for tapestry-wro4j

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy b/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
deleted file mode 100644
index 76757f8..0000000
--- a/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2011-2013 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.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package org.apache.tapestry5.yuicompressor.itest
-
-import org.apache.tapestry5.test.SeleniumTestCase
-import org.apache.tapestry5.test.TapestryTestConfiguration
-import org.testng.annotations.Test
-
-@TapestryTestConfiguration(webAppFolder = "src/test/webapp")
-class YUICompressorIntegrationTests extends SeleniumTestCase {
-
-    def AVAILABLE_OPTIONS = "css=.t-palette-available select";
-
-    def SELECT_BUTTON = "css=.t-palette [data-action=select]";
-
-    @Test
-    void basic_functionality() {
-
-        openBaseURL()
-
-        // Added this sleep in 5.4; necessary since JS is compressed
-        // during initial page render, not on subsequent request to
-        // load the JS.
-        sleep 500
-
-        waitForPageInitialized()
-
-        addSelection AVAILABLE_OPTIONS, "label=Clojure"
-        click SELECT_BUTTON
-
-        addSelection AVAILABLE_OPTIONS, "label=Java"
-        click SELECT_BUTTON
-
-        clickAndWait SUBMIT
-
-        waitForPageInitialized()
-
-        assertText "selected", "CLOJURE, JAVA"
-    }
-
-    @Test
-    void bad_js_is_reported() {
-        openLinks "Bad JavaScript Demo"
-
-        // We still get there, no the exception page.
-
-        assertTitle "Tapestry 5: Bad JavaScript Demo"
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/BadJavaScript.java
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/BadJavaScript.java b/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/BadJavaScript.java
deleted file mode 100644
index c259f9c..0000000
--- a/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/BadJavaScript.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package yuicompressor.testapp.pages;
-
-
-import org.apache.tapestry5.annotations.Import;
-
-@Import(library = "bad.js")
-public class BadJavaScript
-{
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/Index.java
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/Index.java b/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/Index.java
deleted file mode 100644
index 00b6c5a..0000000
--- a/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/pages/Index.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package yuicompressor.testapp.pages;
-
-import org.apache.tapestry5.SelectModel;
-import org.apache.tapestry5.ValueEncoder;
-import org.apache.tapestry5.annotations.Persist;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.ioc.Messages;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-import org.apache.tapestry5.services.ValueEncoderSource;
-import org.apache.tapestry5.util.EnumSelectModel;
-
-import java.util.List;
-
-public class Index
-{
-    static enum Languages
-    {
-        JAVA, SCALA, RUBY, CLOJURE, HASKELL, C, JAVASCRIPT
-    }
-
-    @Property
-    @Persist
-    private List<Languages> languages;
-
-    @Inject
-    private Messages messages;
-
-    void onActivate()
-    {
-        if (languages == null)
-        {
-            languages = CollectionFactory.newList();
-        }
-    }
-
-    @Inject
-    private ValueEncoderSource vec;
-
-    public ValueEncoder<Languages> getLanguagesEncoder()
-    {
-        return vec.getValueEncoder(Languages.class);
-    }
-
-    public String getSelectedLanguages()
-    {
-        return InternalUtils.join(languages);
-    }
-
-    public SelectModel getLanguagesModel()
-    {
-        return new EnumSelectModel(Languages.class, messages);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/services/AppModule.java
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/services/AppModule.java b/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/services/AppModule.java
deleted file mode 100644
index 9f1f15a..0000000
--- a/tapestry-yuicompressor/src/test/java/yuicompressor/testapp/services/AppModule.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package yuicompressor.testapp.services;
-
-import org.apache.tapestry5.SymbolConstants;
-import org.apache.tapestry5.internal.t5internal.modules.InternalTestModule;
-import org.apache.tapestry5.ioc.MappedConfiguration;
-import org.apache.tapestry5.ioc.annotations.Contribute;
-import org.apache.tapestry5.ioc.annotations.SubModule;
-import org.apache.tapestry5.ioc.services.ApplicationDefaults;
-import org.apache.tapestry5.ioc.services.SymbolProvider;
-import org.apache.tapestry5.yuicompressor.modules.YuiCompressorModule;
-
-@SubModule({YuiCompressorModule.class, InternalTestModule.class})
-public class AppModule
-{
-    @Contribute(SymbolProvider.class)
-    @ApplicationDefaults
-    public static void setupConfiguration(MappedConfiguration<String, Object> configuration)
-    {
-        configuration.add(SymbolConstants.COMBINE_SCRIPTS, true);
-        configuration.add(SymbolConstants.MINIFICATION_ENABLED, true);
-        configuration.add(SymbolConstants.PRODUCTION_MODE, false);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/resources/log4j.properties b/tapestry-yuicompressor/src/test/resources/log4j.properties
deleted file mode 100644
index 09921a9..0000000
--- a/tapestry-yuicompressor/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-log4j.rootCategory=INFO, A1
-
-# A1 is set to be a ConsoleAppender. 
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=[%p] %c{1} %m%n
-
-# log4j.category.tapestry.render=debug
-
-log4j.category.org.apache.tapestry5.modules.AssetsModule.ResourceMinimizer=debug
-#log4j.category.org.apache.tapestry5.modules.AssetsModule.ResourceMinimizer=error
-log4j.category.org.apache.tapestry5.yuicompressor=debug
-log4j.category.org.apache.tapestry5.internal.yuicompressor=info
-
-

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/BadJavaScript.tml
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/BadJavaScript.tml b/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/BadJavaScript.tml
deleted file mode 100644
index 5c9752b..0000000
--- a/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/BadJavaScript.tml
+++ /dev/null
@@ -1,6 +0,0 @@
-<i:internallayout title="Bad JavaScript Demo" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
-                  xmlns:p="tapestry:parameter" xmlns:i="tapestry-library:t5internal">
-
-
-
-</i:internallayout>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/Index.tml
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/Index.tml b/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/Index.tml
deleted file mode 100644
index 8561b22..0000000
--- a/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/Index.tml
+++ /dev/null
@@ -1,26 +0,0 @@
-<i:internallayout title="YUICompressor Test" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
-                  xmlns:p="tapestry:parameter" xmlns:i="tapestry-library:t5internal">
-
-    <p:leftnav>
-        <t:pagelink page="badJavaScript">Bad JavaScript Demo</t:pagelink>
-    </p:leftnav>
-
-    <t:form>
-        <t:errors/>
-        <t:palette t:id="languages" selected="languages" model="languagesModel" encoder="languagesEncoder"
-                   reorder="true"/>
-        <br/>
-        <input type="submit"/>
-    </t:form>
-
-    <hr/>
-
-    <t:if test="languages">
-        <p>
-            Selected languages:
-            <span id="selected">${selectedLanguages}</span>
-        </p>
-    </t:if>
-
-
-</i:internallayout>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/bad.js
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/bad.js b/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/bad.js
deleted file mode 100644
index d84d163..0000000
--- a/tapestry-yuicompressor/src/test/resources/yuicompressor/testapp/pages/bad.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * This file contains bad JavaScript.
- */
-
-function ok() { return null; }
-
-
-
-// Lots of space here, to exercise the code that shows only
-// a snippet
-// of the source
-// around the failed code.
-
-
-
-
-
-// Ok, back to where we put the syntax error.
-
-function name with spaces() { this.will not.compile(); }
-
-
-
-// Meanwhile, down here,
-// we have code that is OK again.
-
-
-function also_ok() {
-    return "no worries, mate!";
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32beedda/tapestry-yuicompressor/src/test/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/webapp/WEB-INF/web.xml b/tapestry-yuicompressor/src/test/webapp/WEB-INF/web.xml
deleted file mode 100644
index 09dbc39..0000000
--- a/tapestry-yuicompressor/src/test/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app
-        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-        "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
-  <display-name>Tapestry/YUICompressor Integration Test</display-name>
-  <context-param>
-    <param-name>tapestry.app-package</param-name>
-    <param-value>yuicompressor.testapp</param-value>
-  </context-param>
-  <filter>
-    <filter-name>app</filter-name>
-    <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
-  </filter>
-  <filter-mapping>
-    <filter-name>app</filter-name>
-    <url-pattern>/*</url-pattern>
-  </filter-mapping>
-</web-app>