Skip to content

Commit

Permalink
Creating draft release
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewinne committed May 17, 2016
1 parent 1fb9618 commit dbfb82a
Show file tree
Hide file tree
Showing 10 changed files with 563 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.gradle
.idea
build
src/main/resources/ispw/cmd
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Preface #

This document describes the functionality provided by the xlr-ipsw-plugin.
This document describes the functionality provided by the xlr-ispw-plugin.

See the **[XL Release Documentation](https://docs.xebialabs.com/xl-release/index.html)** for background information on XL Release and release concepts.

Expand Down
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ apply plugin: 'maven'

version="1.0.0"

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
compile 'com.caucho:quercus:4.0.45'
compile 'org.apache.commons:commons-lang3:3.4'
}


license {
header rootProject.file('src/main/license/xebialabs_community.license')
strictCheck true
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/com/caucho/quercus/StringBuilderStream.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.caucho.quercus;

import com.caucho.vfs.StreamImpl;

import java.io.IOException;

public class StringBuilderStream extends StreamImpl {
private static StringBuilderStream _builder;
public StringBuilder output;

private StringBuilderStream() {
}

public static com.caucho.quercus.StringBuilderStream create() {
if(_builder == null) {
_builder = new StringBuilderStream();
_builder.output = new StringBuilder();
}

return _builder;
}

public boolean canWrite() {
return true;
}

public void write(byte[] buf, int offset, int length, boolean isEnd) throws IOException {
String text2 = new String(buf, "ISO-8859-1");
output.append(text2.toCharArray(),offset,length);
}

@Override
public String toString() {
return output.toString();
}

}
62 changes: 62 additions & 0 deletions src/main/java/com/caucho/quercus/XLRQuercus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (c) 1998-2012 Caucho Technology -- all rights reserved
*
* This file is part of Resin(R) Open Source
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Resin Open Source is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Resin Open Source is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
* of NON-INFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with Resin Open Source; if not, write to the
*
* Free Software Foundation, Inc.
* 59 Temple Place, Suite 330
* Boston, MA 02111-1307 USA
*
* @author Nam Nguyen
*/

package com.caucho.quercus;

import com.caucho.quercus.env.CliEnv;
import com.caucho.quercus.env.Env;
import com.caucho.quercus.page.QuercusPage;
import com.caucho.quercus.servlet.api.QuercusHttpServletRequest;
import com.caucho.quercus.servlet.api.QuercusHttpServletResponse;
import com.caucho.vfs.WriteStream;

public class XLRQuercus extends Quercus
{
@Override
public Env createEnv(QuercusPage page,
WriteStream out,
QuercusHttpServletRequest request,
QuercusHttpServletResponse response)
{
return new CliEnv(this, page, out, getArgv());
}

public void processArguments(String [] args) {
super.parseArgs(args);

}

/**
* Hard-coded to true for CLI according to php.net.
*/
@Override
public boolean isRegisterArgv() {
return true;
}
}
Loading

0 comments on commit dbfb82a

Please sign in to comment.