This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>com.theoryinpractice.clojure</groupId> | |
<artifactId>clojure-maven-plugin</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<executions> | |
<execution> | |
<id>clojure-compile</id> | |
<goals> | |
<goal>compile</goal> | |
</goals> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.theoryinpractise.clojure.runnable | |
(:gen-class | |
:implements [java.lang.Runnable])) | |
(defn -run [this] | |
(println "Hello World... from clojure!")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.theoryinpractise.clojure; | |
import org.osgi.framework.ServiceReference; | |
import org.osgi.service.component.ComponentContext; | |
import java.util.Properties; | |
/** | |
* @scr.component | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java | |
index 502f00d..2e6e01b 100644 | |
--- a/src/jvm/clojure/lang/RT.java | |
+++ b/src/jvm/clojure/lang/RT.java | |
@@ -348,8 +348,7 @@ static public long lastModified(URL url,String libfile) throws Exception{ | |
} | |
else | |
{ | |
- File f = new File(url.toURI()); | |
- return f.lastModified(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.clojure</groupId> | |
<artifactId>clojure-maven-plugin</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<configuration> | |
<namespaces> | |
<namespace>clj-web-crawler</namespace> | |
<namespace>smx-api</namespace> | |
</namespaces> | |
<testScript>src/test/java/test.clj</testScript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tip-smtp) | |
(defn morph-javamail-session | |
"Lookup the javamail session provided by mor.ph" | |
[] | |
(.lookup (javax.naming.InitialContext.) "java:/comp/env/mail/Session")) | |
(defn sendmail [& optlist] | |
"Send an email" | |
(let [opts (apply hash-map optlist)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Convert history of the internet printable wiki into PDF | |
; source from http://www.nethistory.co.nz/index.php/Main_Page | |
(use 'clojure.contrib.str-utils) | |
(import '(java.io ByteArrayInputStream FileOutputStream File) | |
'(javax.xml.parsers DocumentBuilderFactory)) | |
(load-file "clj_web_crawler.clj") | |
(System/setProperty "xr.text.aa-fontsize-threshhold" "10") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EvalCommand extends AbstractCommand { | |
@Override | |
public void execute(CommandCall commandCall, Evaluator evaluator, ResultRecorder resultRecorder) { | |
Check.isFalse(commandCall.hasChildCommands(), "Nesting commands inside an 'eval' is not supported"); | |
Element element = commandCall.getElement(); | |
String evalString = element.getText(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
<span smx:eval="">Given a customer with a user</span>, | |
that user should be able to <span smx:eval="">edit their own Details</span>. | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void givenACustomerWithAUser() throws ScriptException, IOException, InterruptedException { | |
// do what ever is needed to create the customer, and a user, store as an instance var | |
} | |
public void editTheirOwnDetails() throws IOException { | |
// Do something to check the user can edit their details, throw an exception/assertion if false | |
} |
OlderNewer