From 5c0b773fa679c08e35e25717e85443ecca262453 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Besselat Date: Fri, 8 Dec 2017 16:15:43 +0100 Subject: [PATCH 1/5] [FIX] string are seqable, but (maybe) you want to render it instead of iterate over it --- src/clostache/parser.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clostache/parser.clj b/src/clostache/parser.clj index f91d30c..89497e4 100644 --- a/src/clostache/parser.clj +++ b/src/clostache/parser.clj @@ -339,7 +339,9 @@ result)) (let [section-data (cond (sequential? section-data) section-data (map? section-data) [section-data] - (seqable? section-data) (seq section-data) + (and + (seqable? section-data) + (not (string? section-data))) (seq section-data) :else [{}]) section-data (if (map? (first section-data)) section-data From fa117b851959e500dc33ed356157c80db76abbd8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Besselat Date: Fri, 8 Dec 2017 16:41:06 +0100 Subject: [PATCH 2/5] [FIX] compatible with clojure 0.1.9 --- project.clj | 3 +-- src/clostache/parser.clj | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/project.clj b/project.clj index 97b9dc3..30a7eba 100644 --- a/project.clj +++ b/project.clj @@ -5,8 +5,7 @@ :license {:name "GNU Lesser General Public License 2.1" :url "http://www.gnu.org/licenses/lgpl-2.1.txt" :distribution :repo} - :dependencies [[org.clojure/clojure "1.5.0"] - [org.clojure/core.incubator "0.1.2"]] + :dependencies [[org.clojure/clojure "1.9.0"]] :profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"] [jline/jline "0.9.94"]] :resource-paths ["test-resources"]} diff --git a/src/clostache/parser.clj b/src/clostache/parser.clj index 89497e4..0e9f8b2 100644 --- a/src/clostache/parser.clj +++ b/src/clostache/parser.clj @@ -1,7 +1,6 @@ (ns clostache.parser "A parser for mustache templates." - (:use [clojure.string :only (split)] - [clojure.core.incubator :only (seqable?)]) + (:use [clojure.string :only (split)]) (:refer-clojure :exclude (seqable?)) (:require [clojure.java.io :as io] [clojure.string :as str]) @@ -334,7 +333,7 @@ (if section-data (if (fn? section-data) (let [result (section-data (:body section))] - (if (fn? result) + (if (fn? result) (result #(render-template % data partials)) result)) (let [section-data (cond (sequential? section-data) section-data From 25bb20fc29a8d6888147bed6c9ba130849a04ddf Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Besselat Date: Fri, 8 Dec 2017 16:42:07 +0100 Subject: [PATCH 3/5] [VERSION] 0.1.5 --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 30a7eba..d4b2f39 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject de.ubercode.clostache/clostache "1.5.0-SNAPSHOT" +(defproject de.ubercode.clostache/clostache "1.5.0" :min-lein-version "2.0.0" :description "{{ mustache }} for Clojure" :url "http://github.com/fhd/clostache" From 588275a83193ef7a8835f4c78bd0954a31ea4dbc Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Besselat Date: Fri, 8 Dec 2017 17:01:09 +0100 Subject: [PATCH 4/5] [FIX] remove exclude --- project.clj | 2 +- src/clostache/parser.clj | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/project.clj b/project.clj index d4b2f39..f41d8d8 100644 --- a/project.clj +++ b/project.clj @@ -9,7 +9,7 @@ :profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"] [jline/jline "0.9.94"]] :resource-paths ["test-resources"]} - :1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}} + :1.5 {:dependencies [[org.clojure/clojure "1.9.0"]]}} :repositories {"clojure-releases" "http://build.clojure.org/releases"} :aliases {"all" ["with-profile" "dev:dev,1.5"]} :global-vars {*warn-on-reflection* true}) diff --git a/src/clostache/parser.clj b/src/clostache/parser.clj index 0e9f8b2..813ebb8 100644 --- a/src/clostache/parser.clj +++ b/src/clostache/parser.clj @@ -1,7 +1,6 @@ (ns clostache.parser "A parser for mustache templates." (:use [clojure.string :only (split)]) - (:refer-clojure :exclude (seqable?)) (:require [clojure.java.io :as io] [clojure.string :as str]) (:import java.util.regex.Matcher)) From 4f0f7b6e6b005c14d7851b124e7fdd1dac7ab064 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Besselat Date: Mon, 11 Dec 2017 10:33:06 +0100 Subject: [PATCH 5/5] [FIX] travis.yml outdated --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ce7453..ed3e339 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ language: clojure -lein: lein2 -script: lein2 all test +lein: lein +script: lein all test before_install: - git submodule update --init --recursive jdk: - - openjdk6 - openjdk7 + - openjdk8 - oraclejdk7 + - oraclejdk8