Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ hs_err_pid*

# explicit include
!gradle/wrapper/gradle-wrapper.jar

*/target
*/out
80 changes: 39 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ version '0.1.4'
allprojects {
repositories {
jcenter()
mavenCentral()
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java'

sourceCompatibility = 1.8
}

subprojects{
dependencies{
testCompile 'junit:junit:4.12'
}
}

ext {
Expand Down Expand Up @@ -42,8 +51,9 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
}
}

apply plugin: 'com.jfrog.bintray'
sourceCompatibility = 1.8
//sourceCompatibility = 1.8

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
Expand Down Expand Up @@ -104,45 +114,33 @@ publishing {
}

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications =['MavenPub']
configurations = ['archives']
pkg {
repo = bintrayRepo
userOrg = 'testmonkeys'
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = false
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password")
//Optional. The passphrase for GPG signing'
}
}
}
}


//Properties properties = new Properties()
//properties.load(project.rootProject.file('local.properties').newDataInputStream())
//
//bintray {
// user = properties.getProperty("bintray.user")
// key = properties.getProperty("bintray.apikey")
// publications =['MavenPub']
// configurations = ['archives']
// pkg {
// repo = bintrayRepo
// userOrg = 'testmonkeys'
// name = bintrayName
// desc = libraryDescription
// websiteUrl = siteUrl
// vcsUrl = gitUrl
// licenses = allLicenses
// publish = false
// publicDownloadNumbers = true
// version {
// desc = libraryDescription
// gpg {
// sign = true //Determines whether to GPG sign the files. The default is false
// passphrase = properties.getProperty("bintray.gpg.password")
// //Optional. The passphrase for GPG signing'
// }
// }
// }
//}

repositories {
mavenCentral()
}

dependencies {
compile 'info.cukes:gherkin:2.12.2','info.cukes:gherkin-jvm-deps:1.0.3'
testCompile 'junit:junit:4.11',
'info.cukes:cucumber-java:1.2.4',
'info.cukes:cucumber-junit:1.2.4'
}

9 changes: 9 additions & 0 deletions cucumber1-formatter/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
group 'org.testmonkeys'
version '0.1.4'

dependencies {
compile 'info.cukes:gherkin:2.12.2','info.cukes:gherkin-jvm-deps:1.0.3'
testCompile 'junit:junit:4.11',
'info.cukes:cucumber-java:1.2.4',
'info.cukes:cucumber-junit:1.2.4'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,13 @@
import gherkin.deps.com.google.gson.Gson;
import gherkin.deps.com.google.gson.GsonBuilder;
import gherkin.deps.net.iharder.Base64;
import gherkin.formatter.model.Background;
import gherkin.formatter.model.Examples;
import gherkin.formatter.model.Feature;
import gherkin.formatter.model.Match;
import gherkin.formatter.model.Result;
import gherkin.formatter.model.Scenario;
import gherkin.formatter.model.ScenarioOutline;
import gherkin.formatter.model.Step;
import gherkin.formatter.Formatter;
import gherkin.formatter.Reporter;
import gherkin.formatter.NiceAppendable;
import gherkin.formatter.model.*;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -70,7 +60,7 @@ private enum Phase {step, match, embedding, output, result}
* @return the correct step for the current operation based on past method calls to the formatter interface
*/
private Map getCurrentStep(Phase phase) {
String target = phase.ordinal() <= Phase.match.ordinal()?Phase.match.name():Phase.result.name();
String target = phase.ordinal() <= Phase.match.ordinal()? Phase.match.name(): Phase.result.name();
Map lastWithValue = null;
for (Map stepOrHook : getSteps()) {
if (stepOrHook.get(target) == null) {
Expand Down
10 changes: 10 additions & 0 deletions cucumber2-formatter/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
group 'org.testmonkeys'
version '0.1.4'

dependencies {

compile 'io.cucumber:cucumber-core:3.0.2'

testCompile 'io.cucumber:cucumber-java:3.0.2',
'io.cucumber:cucumber-junit:3.0.2'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package org.testmonkeys.cucumber.ext.formatters;

public enum Nodes {

ELEMENTS("elements"),
STEPS("steps"),
MATCH("match"),
RESULT("result"),
URI("uri"),
KEYWORD("keyword"),
NAME("name"),
DESCRIPTION("description"),
LINE("line"),
ID("id"),
TAGS("tags"),
TYPE("type"),
BACKGROUND("background"),
SCENARIO("SCENARIO"),
DOC_STRING("doc_string"),
ROWS("rows"),
VAL("val"),
OFFSET("offset"),
ARGUMENTS("arguments"),
LOCATION("location"),
VALUE("value"),
CONTENT_TYPE("content_type"),
STATUS("status"),
ERROR_MESSAGE("error_message"),
DURATION("duration"),
AFTER("after"),
BEFORE("before"),
CELLS("cells"),
MIME_TYPE("mime_type"),
DATA("data"),
EMBEDDINGS("embeddings"),
OUTPUT("output");

public String value;

Nodes(String value){
this.value = value;
}

@Override
public String toString() {
return this.value;
}
}
Loading