Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/codewithleap/repo
Browse files Browse the repository at this point in the history
  • Loading branch information
cubiccompass committed Mar 19, 2015
2 parents 7cf8129 + cd68e5d commit d46a8d5
Show file tree
Hide file tree
Showing 11 changed files with 475 additions and 262 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,3 +13,4 @@ src/test/classes/
*.cls-meta.xml
*.trigger
*.trigger-meta.xml
.DS_Store
11 changes: 9 additions & 2 deletions README.md
Expand Up @@ -88,19 +88,26 @@ From the command line of any Salesforce development environment:
</target>

<target name="delete">
<leap:deleteObjects query="SELECT Id FROM ApexClass WHERE Name Like 'SomePattern%Test'" failonerror="true|false" />
<leap:deleteObjects query="SELECT Id FROM ApexClass WHERE Name Like 'SomePattern%Test'" failonerror="true|false" username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" se rverurl="${sf.dev.url}" />
</target>

<target name="execAnon">
<leap:executeAnonymous code="MyApexClass.staticMethod();" failonerror="true|false" />
<leap:executeAnonymous code="MyApexClass.staticMethod();" failonerror="true|false" username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" se rverurl="${sf.dev.url}" />
</target>

<target name="runtests">
<leap:runtests classes="MyApexClass,MyApexClass_Tests" regex="regex matching pattern" username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}" failonerror="true|false" />
</target>
</project>
</pre>

<h2>Attributes</h2>
Notes on attributes.
failonerror: When set to "true" will stop the build process.

<h2>Proxy Confguration</h2>
To connect to Salesforce using a proxy, define an environment variable named HTTPS_PROXY in the format host:port.
Example: proxy.internal.domain.com:8080

<h2>Open Source</h2>
Leap is open sourced under the BSD license.
Expand Down
Binary file modified bin/ant-leap.jar
Binary file not shown.
6 changes: 5 additions & 1 deletion build.xml
Expand Up @@ -33,7 +33,11 @@
srcUsername="${sf.src.username}" srcPassword="${sf.src.password}" srcToken="${sf.src.token}" srcServerurl="${sf.src.url}"
srcFolder="${src.folder}" destFolder="${dest.folder}" outFolder="${out.folder}" />
</target>


<target name="compileAndTest">
<leap:compileandtest username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}" files="FileName" />
</target>

<target name="pushdev">
<sf:deploy username="${sf.dev.username}" password="${sf.dev.password}" token="${sf.dev.token}" serverurl="${sf.dev.url}" deployRoot="src/">
</sf:deploy>
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -24,6 +24,11 @@
<artifactId>commons-codec</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>

<!-- Salesforce -->
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/leap/ExecuteAnonymousTask.java
Expand Up @@ -17,26 +17,26 @@ public void execute() {
result = this.salesforceConnection().getApexConnection().executeAnonymous(this.m_code);
} catch (ConnectionException e) {
e.printStackTrace();
if(this.getFailOnError()){ System.exit(1); }
if(this.failOnError()){ System.exit(1); }
} finally {
System.out.println("Execute Anonymous results");
if(result == null){
System.out.println("Failed to execute. See stack trace output.");
if(this.getFailOnError()){ System.exit(1); }
if(this.failOnError()){ System.exit(1); }
return;
}
System.out.println("\tCompiled: " + result.isCompiled() );
if( !result.isCompiled() ){
System.out.println("\tCompiler Error:");
System.out.println(result.getCompileProblem() );
if(this.getFailOnError()){ System.exit(1); }
if(this.failOnError()){ System.exit(1); }
}
System.out.println("");
System.out.println("\tSuccess: " + result.isSuccess());
if( !result.isSuccess() ){
System.out.println(result.getExceptionMessage());
System.out.println(result.getExceptionStackTrace() );
if(this.getFailOnError()){ System.exit(1); }
if(this.failOnError()){ System.exit(1); }
}
}
}
Expand Down

0 comments on commit d46a8d5

Please sign in to comment.