Permalink
Browse files

Initialer Commit für die Baseline zu Kapitel 8.

  • Loading branch information...
1 parent e90151a commit 91bc4fd60a656a44a053b5c158d68db5ce5be5e0 Stefan Scheidt committed Jun 21, 2012
Showing with 46,660 additions and 0 deletions.
  1. +2 −0 jstd-server.sh
  2. +13 −0 jstd-ui.conf
  3. +2 −0 jstd-ui.sh
  4. +23 −0 jstd-unit.conf
  5. +2 −0 jstd-unit.sh
  6. +526 −0 misc/jetty-webapp/webdefault.xml
  7. +153 −0 pom.xml
  8. +24 −0 src/main/webapp/WEB-INF/services.xml
  9. +40 −0 src/main/webapp/WEB-INF/web.xml
  10. +5 −0 src/main/webapp/app/application.js
  11. +150 −0 src/main/webapp/app/controllers.js
  12. +37 −0 src/main/webapp/app/markup.js
  13. +296 −0 src/main/webapp/app/services.js
  14. +228 −0 src/main/webapp/index.html
  15. +141 −0 src/main/webapp/lib/Base64.js
  16. +21 −0 src/main/webapp/lib/JSONParseDate.js
  17. +13,961 −0 src/main/webapp/lib/angular.js
  18. BIN src/main/webapp/lib/images/ajax-loader.gif
  19. BIN src/main/webapp/lib/images/icons-18-black.png
  20. BIN src/main/webapp/lib/images/icons-18-white.png
  21. BIN src/main/webapp/lib/images/icons-36-black.png
  22. BIN src/main/webapp/lib/images/icons-36-white.png
  23. +1,632 −0 src/main/webapp/lib/jquery-mobile-angular-adapter.js
  24. +9,266 −0 src/main/webapp/lib/jquery.js
  25. +1,871 −0 src/main/webapp/lib/jquery.mobile.css
  26. +7,422 −0 src/main/webapp/lib/jquery.mobile.js
  27. +28 −0 src/main/webapp/rylc.css
  28. +37 −0 src/test/webapp/UiSpecRunner.html
  29. +44 −0 src/test/webapp/UnitSpecRunner.html
  30. +189 −0 src/test/webapp/lib/JasmineAdapter.js
  31. +1,719 −0 src/test/webapp/lib/angular-mocks.js
  32. +616 −0 src/test/webapp/lib/jasmine-html.js
  33. +4,034 −0 src/test/webapp/lib/jasmine-ui.js
  34. +81 −0 src/test/webapp/lib/jasmine.css
  35. +2,529 −0 src/test/webapp/lib/jasmine.js
  36. +224 −0 src/test/webapp/lib/testutils.js
  37. +69 −0 src/test/webapp/ui/loginUiSpec.js
  38. +29 −0 src/test/webapp/ui/logoutUiSpec.js
  39. +43 −0 src/test/webapp/ui/profileUiSpec.js
  40. +180 −0 src/test/webapp/ui/rental1UiSpec.js
  41. +113 −0 src/test/webapp/ui/rental2UiSpec.js
  42. +88 −0 src/test/webapp/ui/rental3UiSpec.js
  43. +73 −0 src/test/webapp/ui/rentalHistoryUiSpec.js
  44. +84 −0 src/test/webapp/ui/welcomeUiSpec.js
  45. +75 −0 src/test/webapp/unit/AuthenticationControllerSpec.js
  46. +34 −0 src/test/webapp/unit/JSONParseDateSpec.js
  47. +438 −0 src/test/webapp/unit/backendServiceSpec.js
  48. +23 −0 src/test/webapp/unit/rentalServiceSpec.js
  49. +95 −0 src/test/webapp/unit/utilsServiceSpec.js
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+mvn exec:java -Dexec.classpathScope=test -Dexec.mainClass=com.google.jstestdriver.JsTestDriver -Dexec.args="--port 9876 --runnerMode INFO"
View
@@ -0,0 +1,13 @@
+server: http://localhost:9876
+
+load:
+ # Test-Libraries
+ - src/test/webapp/lib/jasmine-ui.js
+ - src/test/webapp/lib/testutils.js
+
+test:
+ # Tests
+ - src/test/webapp/ui/*.js
+
+proxy:
+ - {matcher: "/*", server: "http://localhost:8585/"}
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+mvn exec:java -Dexec.classpathScope=test -Dexec.mainClass=com.google.jstestdriver.JsTestDriver -Dexec.args="--config jstd-ui.conf --reset --tests all --testOutput target/jstd-reports"
View
@@ -0,0 +1,23 @@
+server: http://localhost:9876
+
+load:
+ # Libraries
+ - src/main/webapp/lib/JSONParseDate.js
+ - src/main/webapp/lib/Base64.js
+ - src/main/webapp/lib/jquery.js
+ - src/main/webapp/lib/angular.js
+
+ # Test-Libraries
+ - src/test/webapp/lib/jasmine.js
+ - src/test/webapp/lib/angular-mocks.js
+ - src/test/webapp/lib/JasmineAdapter.js
+
+ # Application
+ - src/main/webapp/app/application.js
+ - src/main/webapp/app/controllers.js
+ - src/main/webapp/app/markup.js
+ - src/main/webapp/app/services.js
+
+test:
+ # Tests
+ - src/test/webapp/unit/*.js
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+mvn exec:java -Dexec.classpathScope=test -Dexec.mainClass=com.google.jstestdriver.JsTestDriver -Dexec.args="--config jstd-unit.conf --reset --tests all --testOutput target/jstd-reports"

Large diffs are not rendered by default.

Oops, something went wrong.
View
153 pom.xml
@@ -0,0 +1,153 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.opitzconsulting.mjswa.rylc</groupId>
+ <artifactId>rylc-html5</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+
+ <properties>
+ <!-- misc -->
+ <browser>chrome</browser>
+ <jetty.contextPath>/${project.artifactId}</jetty.contextPath>
+ <jetty.port>8585</jetty.port>
+ <jetty.stopPort>9595</jetty.stopPort>
+ <jetty.version>7.6.4.v20120524</jetty.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- datasource properties -->
+ <jdbc.driverClassName>org.h2.Driver</jdbc.driverClassName>
+ <jdbc.url>jdbc:h2:mem:rylc-backend</jdbc.url>
+ <jdbc.username>rylc</jdbc.username>
+ <jdbc.password>rylc</jdbc.password>
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jetty.version}</version>
+ <configuration>
+ <scanIntervalSeconds>5</scanIntervalSeconds>
+ <stopKey>STOPJETTY</stopKey>
+ <stopPort>${jetty.stopPort}</stopPort>
+ <connectors>
+ <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <port>${jetty.port}</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ <webAppConfig>
+ <contextPath>${jetty.contextPath}</contextPath>
+ <defaultsDescriptor>${basedir}/misc/jetty-webapp/webdefault.xml</defaultsDescriptor>
+ <resourceBases>
+ <resourceBase>${basedir}/src/main/webapp</resourceBase>
+ <resourceBase>${basedir}/src/test/webapp</resourceBase>
+ </resourceBases>
+ </webAppConfig>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>rylc-backend-jar</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>com.googlecode.jstd-maven-plugin</groupId>
+ <artifactId>jstd-maven-plugin</artifactId>
+ <version>1.3.2.5</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>jstd-maven-plugin</id>
+ <name>JsTestDriver Maven Plugin Repository</name>
+ <url>http://jstd-maven-plugin.googlecode.com/svn/maven2</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jstd-maven-plugin</id>
+ <name>JsTestDriver Maven Plugin Repository</name>
+ <url>http://jstd-maven-plugin.googlecode.com/svn/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <profiles>
+ <profile>
+ <id>integration</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.googlecode.jstd-maven-plugin</groupId>
+ <artifactId>jstd-maven-plugin</artifactId>
+ <version>1.3.2.5</version>
+ <configuration>
+ <browser>${browser}</browser>
+ <port>9876</port>
+ <reset>true</reset>
+ <runnerMode>INFO</runnerMode>
+ <testOutput>${project.build.directory}/jstd-reports</testOutput>
+ <tests>all</tests>
+ </configuration>
+ <executions>
+ <execution>
+ <id>run-unit-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <config>jstd-unit.conf</config>
+ </configuration>
+ </execution>
+ <execution>
+ <id>run-integration-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <config>jstd-ui.conf</config>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>start-jetty</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <scanIntervalSeconds>0</scanIntervalSeconds>
+ <daemon>true</daemon>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-jetty</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
+ ">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml"/>
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
+
+ <context:component-scan base-package="com.opitzconsulting.rylc.endpoints"/>
+
+ <jaxrs:server id="customerService" address="/">
+ <jaxrs:serviceBeans>
+ <ref bean="customerServiceEndpoint"/>
+ <ref bean="rentalServiceEndpoint"/>
+ </jaxrs:serviceBeans>
+ </jaxrs:server>
+
+</beans>
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <filter>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath:/rylc-bootstrap.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+ <init-param>
+ <param-name>config-location</param-name>
+ <param-value>/WEB-INF/services.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/api/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
@@ -0,0 +1,5 @@
+(function (angular) {
+
+ angular.module("rylc", ["rylc-controllers", "rylc-markup", "rylc-services"]);
+
+})(angular);
Oops, something went wrong.

0 comments on commit 91bc4fd

Please sign in to comment.