Changes between Initial Version and Version 1 of WikiOutputStreamPlugin


Ignore:
Timestamp:
Oct 20, 2006, 7:28:00 AM (18 years ago)
Author:
aldrinleal
Comment:

New hack WikiOutputStreamPlugin, created by aldrinleal

Legend:

Unmodified
Added
Removed
Modified
  • WikiOutputStreamPlugin

    v1 v1  
     1= WikiOutputStream =
     2
     3== Description ==
     4
     5Do you love Continuous Integration? Want to better integrate either [http://junit.org/ JUnit], [http://cruisecontrol.sourceforge.net/ CruiseControl] along with [http://trac.edgewall.com/ Trac]? Sometimes you want to either publish your test reports directly into Trac's Wiki (why not?). Perhaps you want to also let you directly hyperlink your Java class names direcly into the source browser, right?
     6
     7If you answered 'yes' to some of the questions, there is an answer right here!
     8
     9WikiOutputStream is a !OutputStream for Java which lets you easily publish direcly into Trac as an Wiki Article. It accomplishes this by running trac-admin over an ssh-pki-authenticated-remote-shell-connection. It also contains goodies for hyperlinking class names directly into trac's source browser.
     10
     11
     12== Bugs/Feature Requests ==
     13
     14Existing bugs and feature requests for WikiOutputStreamPlugin are
     15[report:9?COMPONENT=WikiOutputStreamPlugin here].
     16
     17If you have any issues, create a
     18[http://trac-hacks.org/newticket?component=WikiOutputStreamPlugin&owner=aldrinleal new ticket].
     19
     20== Download ==
     21
     22Download the zipped source from [download:wikioutputstreamplugin here].
     23
     24== Source ==
     25
     26You can check out WikiOutputStreamPlugin from [http://trac-hacks.org/svn/wikioutputstreamplugin here] using Subversion, or [source:wikioutputstreamplugin browse the source] with Trac.
     27
     28== Example ==
     29
     30Suppose you have a testCase/suite you'd like to let you publish results directly into trac. Or perhaps you want to create a [http://loggging.apache.org/log4j/ Log4J] Logging Module publish their results into trac. WikiOutputStream usage is fairly simple, once you configure it (by creating a simple 'trac.properties' file in your classpath, or by doing the hardcoded-way), you can easily create a new instance this way:
     31
     32{{{
     33#!java
     34import junit.framework.TestCase;
     35import br.eng.leal.trac.WikiPageOutputStream;
     36
     37public class MyTestCaseWhichReportsAsAWiki extends TestCase {
     38  private PrintStream printStream;
     39 
     40  /**
     41   * Try to setup an WikiOutputStream, resorting do System.out as a fallback measure
     42   */
     43  protected void setUp() {
     44    try {
     45      this.printStream = new PrintStream(new WikiPageOutputStream(this.getName().substring("test".length()), true);
     46    } catch (Exception exc) {
     47      this.printStream = System.out;
     48    }
     49  }
     50
     51  /**
     52   * Somewhere later...
     53   */
     54  protected void tearDown() {
     55    this.printStream.close();
     56  }
     57
     58  /**
     59   *  On Sucessfull connection, this must create a page named "Something" over on trac's Wiki
     60   */
     61  public void testSomething() {
     62    this.printStream("[[br]]Hello, Trac![[br]]");
     63  }
     64}
     65}}}
     66
     67
     68== Recent Changes ==
     69
     70[[ChangeLog(wikioutputstreamplugin, 3)]]
     71
     72== Author/Contributors ==
     73
     74'''Author:''' [wiki:aldrinleal] [[BR]]
     75'''Contributors:'''