sbonazzo pushed to ebay-cors-filter (f22). "Initial import (#1208816). (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 9 13:55:57 UTC 2015


>From 200b360848a9554bf3375483cf6c4d7bf77f55be Mon Sep 17 00:00:00 2001
From: Sandro Bonazzola <sbonazzo at redhat.com>
Date: Thu, 9 Apr 2015 15:45:14 +0200
Subject: Initial import (#1208816).

Resolves: BZ#1208816
Resolves: BZ#1186751

Signed-off-by: Sandro Bonazzola <sbonazzo at redhat.com>

diff --git a/.gitignore b/.gitignore
index e69de29..8e52fe0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cors-filter-1.0.1.tar.gz
diff --git a/ebay-cors-filter-1.0.1-servlet.patch b/ebay-cors-filter-1.0.1-servlet.patch
new file mode 100644
index 0000000..7d5e71a
--- /dev/null
+++ b/ebay-cors-filter-1.0.1-servlet.patch
@@ -0,0 +1,276 @@
+diff -Nru cors-filter-cors-filter-1.0.1/pom.xml cors-filter-cors-filter-1.0.1.servlet/pom.xml
+--- cors-filter-cors-filter-1.0.1/pom.xml	2013-07-31 18:23:35.000000000 +0200
++++ cors-filter-cors-filter-1.0.1.servlet/pom.xml	2015-04-04 00:57:21.864629582 +0200
+@@ -45,8 +45,8 @@
+ 	<dependencies>
+ 		<dependency>
+ 			<groupId>javax.servlet</groupId>
+-			<artifactId>servlet-api</artifactId>
+-			<version>2.5</version>
++			<artifactId>javax.servlet-api</artifactId>
++			<version>3.1.0</version>
+             <scope>provided</scope>
+ 		</dependency>
+ 		<dependency>
+diff -Nru cors-filter-cors-filter-1.0.1/src/test/java/org/ebaysf/web/cors/MockHttpServletRequest.java cors-filter-cors-filter-1.0.1.servlet/src/test/java/org/ebaysf/web/cors/MockHttpServletRequest.java
+--- cors-filter-cors-filter-1.0.1/src/test/java/org/ebaysf/web/cors/MockHttpServletRequest.java	2013-07-31 18:23:35.000000000 +0200
++++ cors-filter-cors-filter-1.0.1.servlet/src/test/java/org/ebaysf/web/cors/MockHttpServletRequest.java	2015-04-04 13:47:17.905807120 +0200
+@@ -20,6 +20,7 @@
+ import java.io.UnsupportedEncodingException;
+ import java.security.Principal;
+ import java.util.ArrayList;
++import java.util.Collection;
+ import java.util.Collections;
+ import java.util.Enumeration;
+ import java.util.HashMap;
+@@ -28,11 +29,20 @@
+ import java.util.Locale;
+ import java.util.Map;
+ 
++import javax.servlet.AsyncContext;
++import javax.servlet.DispatcherType;
+ import javax.servlet.RequestDispatcher;
++import javax.servlet.ServletContext;
++import javax.servlet.ServletException;
+ import javax.servlet.ServletInputStream;
++import javax.servlet.ServletRequest;
++import javax.servlet.ServletResponse;
+ import javax.servlet.http.Cookie;
+ import javax.servlet.http.HttpServletRequest;
++import javax.servlet.http.HttpServletResponse;
+ import javax.servlet.http.HttpSession;
++import javax.servlet.http.HttpUpgradeHandler;
++import javax.servlet.http.Part;
+ 
+ import org.ebaysf.web.cors.CORSFilter;
+ 
+@@ -324,4 +334,64 @@
+         throw new RuntimeException("Not implemented");
+     }
+ 
++    public <T extends HttpUpgradeHandler> T upgrade(Class<T> arg0) throws IOException, ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Part getPart(String name) throws IOException, IllegalStateException, ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Collection<Part> getParts() throws IOException, IllegalStateException, ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void logout() throws ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void login(String username, String password) throws ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public String changeSessionId() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public DispatcherType getDispatcherType() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public AsyncContext getAsyncContext() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public boolean isAsyncSupported() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public boolean isAsyncStarted() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public AsyncContext startAsync() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public ServletContext getServletContext() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public long getContentLengthLong() {
++        throw new RuntimeException("Not implemented");
++    }
++
+ }
+diff -Nru cors-filter-cors-filter-1.0.1/src/test/java/org/ebaysf/web/cors/MockHttpServletResponse.java cors-filter-cors-filter-1.0.1.servlet/src/test/java/org/ebaysf/web/cors/MockHttpServletResponse.java
+--- cors-filter-cors-filter-1.0.1/src/test/java/org/ebaysf/web/cors/MockHttpServletResponse.java	2013-07-31 18:23:35.000000000 +0200
++++ cors-filter-cors-filter-1.0.1.servlet/src/test/java/org/ebaysf/web/cors/MockHttpServletResponse.java	2015-04-04 13:09:03.822210136 +0200
+@@ -19,6 +19,7 @@
+ import java.io.PrintWriter;
+ import java.io.StringWriter;
+ import java.util.ArrayList;
++import java.util.Collection;
+ import java.util.List;
+ import java.util.Locale;
+ 
+@@ -189,4 +190,16 @@
+ 
+     }
+ 
++    public Collection<String> getHeaderNames() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Collection<String> getHeaders(String name) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void setContentLengthLong(long arg0) {
++        throw new RuntimeException("Not implemented");
++    }
++
+ }
+diff -Nru cors-filter-cors-filter-1.0.1/src/test/java/org/ebaysf/web/cors/MockServletContext.java cors-filter-cors-filter-1.0.1.servlet/src/test/java/org/ebaysf/web/cors/MockServletContext.java
+--- cors-filter-cors-filter-1.0.1/src/test/java/org/ebaysf/web/cors/MockServletContext.java	2013-07-31 18:23:35.000000000 +0200
++++ cors-filter-cors-filter-1.0.1.servlet/src/test/java/org/ebaysf/web/cors/MockServletContext.java	2015-04-04 14:08:01.200808538 +0200
+@@ -19,12 +19,20 @@
+ import java.net.MalformedURLException;
+ import java.net.URL;
+ import java.util.Enumeration;
++import java.util.EventListener;
++import java.util.Map;
+ import java.util.Set;
+ 
++import javax.servlet.Filter;
++import javax.servlet.FilterRegistration;
+ import javax.servlet.RequestDispatcher;
+ import javax.servlet.Servlet;
+ import javax.servlet.ServletContext;
+ import javax.servlet.ServletException;
++import javax.servlet.SessionCookieConfig;
++import javax.servlet.ServletRegistration;
++import javax.servlet.SessionTrackingMode;
++import javax.servlet.descriptor.JspConfigDescriptor;
+ 
+ public class MockServletContext implements ServletContext {
+ 
+@@ -140,4 +148,112 @@
+         throw new RuntimeException("Not implemented");
+     }
+ 
++    public String getVirtualServerName() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void declareRoles(String... roleNames) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public ClassLoader getClassLoader() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public JspConfigDescriptor getJspConfigDescriptor() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public <T extends EventListener> T createListener(Class<T> c) throws ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void addListener(Class<? extends EventListener> listenerClass) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public <T extends EventListener> void addListener(T t) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void addListener(String className) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public SessionCookieConfig getSessionCookieConfig() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Map<String,? extends FilterRegistration> getFilterRegistrations() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public FilterRegistration getFilterRegistration(String filterName) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public <T extends Filter> T createFilter(Class<T> c) throws ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public FilterRegistration.Dynamic addFilter(String filterName, Filter filter) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public FilterRegistration.Dynamic addFilter(String filterName, String className) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public Map<String,? extends ServletRegistration> getServletRegistrations() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public ServletRegistration getServletRegistration(String servletName) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public <T extends Servlet> T createServlet(Class<T> c) throws ServletException {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public ServletRegistration.Dynamic addServlet(String servletName, String className) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public boolean setInitParameter(String name, String value) {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public int getEffectiveMinorVersion() {
++        throw new RuntimeException("Not implemented");
++    }
++
++    public int getEffectiveMajorVersion() {
++        throw new RuntimeException("Not implemented");
++    }
++
+ }
diff --git a/ebay-cors-filter.spec b/ebay-cors-filter.spec
new file mode 100644
index 0000000..64c1b00
--- /dev/null
+++ b/ebay-cors-filter.spec
@@ -0,0 +1,59 @@
+Name:          ebay-cors-filter
+Version:       1.0.1
+Release:       3%{?dist}
+Summary:       eBay CORS filter
+License:       ASL 2.0
+URL:           https://github.com/eBay/cors-filter
+Source0:       https://github.com/eBay/cors-filter/archive/cors-filter-%{version}.tar.gz
+Patch0:        %{name}-1.0.1-servlet.patch
+
+BuildRequires: maven-local
+BuildRequires: mvn(javax.servlet:javax.servlet-api)
+BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
+
+BuildArch:     noarch
+
+%description
+CORS (Cross Origin Resource Sharing) is a mechanism supported by W3C to
+enable cross origin requests in web-browsers. CORS requires support from
+both browser and server to work. This is a Java servlet filter
+implementation of server-side CORS for web containers such as Apache
+Tomcat.
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains API documentation for %{name}.
+
+%prep
+%setup -q -n cors-filter-cors-filter-%{version}
+%patch0 -p1
+
+%build
+sed -i 's/\r//' LICENSE NOTICE README.md
+%mvn_build
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%license LICENSE NOTICE
+%doc README.md cors-flowchart.png
+%dir %{_javadir}/%{name}
+%dir %{_mavenpomdir}/%{name}
+
+%files javadoc -f .mfiles-javadoc
+%license LICENSE NOTICE
+
+%changelog
+* Wed Apr  8 2015 Sandro Bonazzola <sbonazzo at redhat.com> - 1.0.1-3
+- Fixed unowned directories
+- Fixed DOS newlines in license and doc files
+
+* Sat Apr  4 2015 Gil Cattaneo <puntogil at libero.it> - 1.0.1-2
+- Added NOTICE to licenses
+- Added servlet 3.1 apis support
+
+* Fri Apr  3 2015 Sandro Bonazzola <sbonazzo at redhat.com> - 1.0.1-1
+- Initial packaging.
diff --git a/sources b/sources
index e69de29..de26b77 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+b8b5a355f1f35bc146c73497c4fbed4b  cors-filter-1.0.1.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/ebay-cors-filter.git/commit/?h=f22&id=200b360848a9554bf3375483cf6c4d7bf77f55be


More information about the scm-commits mailing list