Skip to content

Commit

Permalink
merge with upstream 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantxu committed Aug 22, 2012
1 parent 7af264a commit fb4ed40
Show file tree
Hide file tree
Showing 14 changed files with 387 additions and 418 deletions.
52 changes: 30 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
1.5 (Next Release)
==================

This release unifies support for various Java platforms in a single released package and significantly improves development infrastructure.
This release unifies support for various Java platforms within a single package and significantly improves development infrastructure.

Features
--------

* Waffle now requires Java 1.6 or newer, uses generics where possible - [@hazendaz](https://github.com/hazendaz).
* Using JNA 3.4.2 (currently private build) - [@dblock](https://github.com/dblock).
* Refactored `waffle-jna.jar` into several distinct packages - [@dblock](https://github.com/dblock).
* Waffle now requires JNA 3.4.2 (currently private build) - [@dblock](https://github.com/dblock).
* The `waffle-jna.jar` has been split into separate packages - [@dblock](https://github.com/dblock).
* `waffle-api.jar`: API interfaces.
* `waffle-core.jar` : Core JNA-based implementation.
* `waffle-mock.jar` : Minimal HTTP Servlet mocks, used in tests.
* `waffle-jaas.jar` : JAAS support.
* `waffle-servlet.jar`: Generic Servlet filters.
* `waffle-servlet3.jar`: Generic Servlet3 filters.
* `waffle-spring-security2.jar`: Spring-security 2.
* `waffle-spring-security3.jar`: Spring-security 3.
* `waffle-tomcat-5.jar` : Tomcat 5 valves.
* `waffle-tomcat-6.jar` : Tomcat 6 valves.
* `waffle-tomcat-7.jar` : Tomcat 7 valves.
* Rewritten documentation in Markdown, the CHM documentation has been removed - [@dblock](https://github.com/dblock).
* [#3](https://github.com/dblock/waffle/pull/3): Replaced `commons-logging` with `slf4j` and `logback` - [@hazendaz](https://github.com/hazendaz).
* Use jcl over slf4j for Spring, as it uses `commons-logging`.
* Jacob-based COM interfaces and implementation have been removed - [@dblock](https://github.com/dblock).
* [#1](https://github.com/dblock/waffle/pull/1): Adjusted logging from info to debug to reduce noise level - [@mcfly83](https://github.com/mcfly83).
* [#17](https://github.com/dblock/waffle/pull/17): JAR manifest information includes specification and implementation details, such as GIT revision - [@ryantxu](https://github.com/ryantxu).
* [#23] Added `waffle.util.WaffleInfo` which collects system information useful for debugging - [@ryantxu](https://github.com/ryantxu).

Interface Changes
-----------------

* Waffle `boolean` getters now use `is*` java standard - [@hazendaz](https://github.com/hazendaz).
* `getContinue` is now `isContinue`
* `getDebug` is now `isDebug`
* `getAllowGuestLogin` is now `isAllowGuestLogin`
* `getImpersonate` is now `isImpersonate`
* Fixed case of `RevertToSelf`, now `revertToSelf` - [@hazendaz](https://github.com/hazendaz).
* All array getters now return empty arrays rather than `null` - [@hazendaz](https://github.com/hazendaz).

Development
-----------

* Upgraded thirdparty dependencies, using Ivy - [@hazendaz](https://github.com/hazendaz).
* tomcat 5.5.35
* tomcat 6.0.35
Expand All @@ -26,28 +50,12 @@ This release unifies support for various Java platforms in a single released pac
* spring 2.5.6.SEC03
* spring-security 2.0.7
* spring-security 3.1.1
* junit 4.10 - all tests now use junit 4 style rather than junit 3 style
* junit 4.10
* emma 2.1.5320
* Documentation has been rewritten in Markdown, R.I.P. CHM - [@dblock](https://github.com/dblock).
* [#3](https://github.com/dblock/waffle/pull/3): Converted commons-logging to slf4j logging - [@hazendaz](https://github.com/hazendaz).
* Added slf4j.
* Added jcl over slf4j jar for spring as it still uses commons-logging.
* Added logback for native slf4j solution.
* Added sample xml files for logback solution to all demos.
* [#1](https://github.com/dblock/waffle/pull/1): Adjusted logging from info to debug to reduce noise level - [@mcfly83](https://github.com/mcfly83).
* Removed previously deprecated Jacob-based COM interfaces and implementation - [@dblock](https://github.com/dblock).
* [#17](https://github.com/dblock/waffle/pull/17): JAR manifest information includes specification and implementation details, such as GIT revision - [@ryantxu](https://github.com/ryantxu).
* Reworked development version to use ivy - [@hazendaz](https://github.com/hazendaz).
* Removed all third party included jars.
* Retained tomcat 5.5.35 due to ivy/maven only having 5.5.23 available.
* Waffle `boolean` getters now use `is*` java standard - [@hazendaz](https://github.com/hazendaz).
* `getContinue` is now `isContinue`
* `getDebug` is now `isDebug`
* `getAllowGuestLogin` is now `isAllowGuestLogin`
* `getImpersonate` is now `isImpersonate`
* `RevertToSelf` case fix, is now `revertToSelf` - [@hazendaz](https://github.com/hazendaz).
* All array getters now return empty arrays rather than `null` - [@hazendaz](https://github.com/hazendaz).
* [#24](https://github.com/dblock/waffle/pull/24): Using mockito for waffle-mock - [@ryantxu](https://github.com/ryantxu).
* [#24](https://github.com/dblock/waffle/pull/24): Use mockito for waffle-mock - [@ryantxu](https://github.com/ryantxu).

1.4 (6/21/2011)
===============
Expand Down
1 change: 0 additions & 1 deletion Source/JNA/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
<fileset dir="${waffle.test.lib}">
<include name="**/*Tests.class" />
<exclude name="**/*LoadTests.class" />
<exclude name="**/*All*Tests.class" />
</fileset>
</batchtest>
<formatter type="xml" />
Expand Down
76 changes: 76 additions & 0 deletions Source/JNA/waffle-core/src-test/waffle/util/WaffleInfoTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*******************************************************************************
* Waffle (https://github.com/dblock/waffle)
*
* Copyright (c) 2010 Application Security, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http:https://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Application Security, Inc.
*******************************************************************************/
package waffle.util;

import static org.junit.Assert.assertEquals;

import javax.xml.parsers.ParserConfigurationException;

import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import waffle.windows.auth.IWindowsAccount;
import waffle.windows.auth.IWindowsAuthProvider;
import waffle.windows.auth.IWindowsComputer;
import waffle.windows.auth.impl.WindowsAccountImpl;
import waffle.windows.auth.impl.WindowsAuthProviderImpl;

import com.sun.jna.Platform;

/**
* Build an info document and check that it has the right values
*/
public class WaffleInfoTests {

@Test
public void testWaffleInfo() throws ParserConfigurationException {
WaffleInfo helper = new WaffleInfo();
Document info = helper.getWaffleInfo();

// Make sure JNA Version is properly noted
assertEquals(Platform.class.getPackage().getImplementationVersion(),
info.getDocumentElement().getAttribute("jna"));

Node node = info.getDocumentElement() // waffle
.getFirstChild() // auth
.getFirstChild() // currentUser
.getNextSibling(); // computer

assertEquals("computer", node.getNodeName());

IWindowsAuthProvider auth = new WindowsAuthProviderImpl();
IWindowsComputer computer = auth.getCurrentComputer();

NodeList nodes = node.getChildNodes();
assertEquals(computer.getComputerName(), nodes.item(0).getTextContent());
assertEquals(computer.getMemberOf(), nodes.item(1).getTextContent());
assertEquals(computer.getJoinStatus(), nodes.item(2).getTextContent());

// Add Lookup Info for Various accounts
String lookup = WindowsAccountImpl.getCurrentUsername();
IWindowsAccount account = new WindowsAccountImpl(lookup);
Element elem = helper.getLookupInfo(info, lookup);
assertEquals(lookup, elem.getAttribute("name"));
assertEquals(account.getName(), elem.getFirstChild().getTextContent());

// Report an error when unknown name
lookup = "__UNKNOWN_ACCOUNT_NAME___";
elem = helper.getLookupInfo(info, lookup);
assertEquals(lookup, elem.getAttribute("name"));
assertEquals("exception", elem.getFirstChild().getNodeName());
}
}
Loading

0 comments on commit fb4ed40

Please sign in to comment.