Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to clojure 1.4 with new :require, make lein2 compatible

  • Loading branch information...
commit a1b527c04ff424edea90314034313a12384eb559 1 parent 0cbcb18
@dakrone authored
View
8 project.clj
@@ -1,8 +1,8 @@
(defproject cld "0.1.1-SNAPSHOT"
:description "Clojure Language Detection"
- :dependencies [[org.clojure/clojure "1.3.0"]
+ :url "https://github.com/dakrone/cld"
+ :dependencies [[org.clojure/clojure "1.4.0"]
[org.clojars.thnetos/langdetect-lib "1.1"]]
- :dev-dependencies [[criterium "0.2.1-SNAPSHOT"]]
- :resources-path "resources"
- :dev-resources-path "resources"
+ :profiles {:dev {:dependencies [[criterium "0.2.1-SNAPSHOT"]]}}
+ :resource-paths ["resources"]
:warn-on-reflection false)
View
2  src/cld/core.clj
@@ -1,5 +1,5 @@
(ns cld.core
- (:use [clojure.java.io :only [resource file]])
+ (:require [clojure.java.io :refer [resource file]])
(:import (com.cybozu.labs.langdetect Detector DetectorFactory)
(java.util HashMap)))
View
10 test/cld/test/benchmarks.clj
@@ -1,7 +1,7 @@
(ns cld.test.benchmarks
- (:use [cld.core]
- [clojure.test])
- (require [criterium.core :as bench]))
+ (:require [cld.core :refer :all]
+ [clojure.test :refer :all]
+ [criterium.core :as bench]))
(default-init!)
@@ -24,11 +24,11 @@ With these additional ideas, we will have seen most of the basic technology that
(deftest t-benchmarks
(println "Benchmarks with large text," (count text) "chars.")
(bench/with-progress-reporting
- (bench/bench (detect text) :verbose)))
+ (bench/quick-bench (detect text) :verbose)))
(def text2 "This is a sentence, it is written in English. I like tacos. My cat is weird.")
(deftest t-benchmarks2
(println "Benchmarks with small text," (count text2) "chars.")
(bench/with-progress-reporting
- (bench/bench (detect text2) :verbose)))
+ (bench/quick-bench (detect text2) :verbose)))
View
5 test/cld/test/core.clj
@@ -1,6 +1,6 @@
(ns cld.test.core
- (:use [cld.core]
- [clojure.test]))
+ (:require [cld.core :refer :all]
+ [clojure.test :refer :all]))
(default-init!)
@@ -27,4 +27,3 @@
"reforma laboral aprobada por el Ejecutivo es ya "
"el campo de batalla en el que se librará "
"el enfrentamiento."))))))
-
Please sign in to comment.
Something went wrong with that request. Please try again.