Skip to content

Commit

Permalink
interpol8 ns => alandipert.interpol8; bump to 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
alandipert committed Apr 14, 2013
1 parent f91628c commit e687857
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ interpolation.
Add this to your `project.clj` if you're using [Leiningen](https://github.com/technomancy/leiningen/): Add this to your `project.clj` if you're using [Leiningen](https://github.com/technomancy/leiningen/):


```clojure ```clojure
[alandipert/interpol8 "0.0.2"] [alandipert/interpol8 "0.0.3"]
``` ```


Then, in the namespace you want string interpolation in: Then, in the namespace you want string interpolation in:


```clojure ```clojure
(ns your-ns (ns your-ns
(:use [interpol8 :only (interpolating)])) (:use [alandipert.interpol8 :only (interpolating)]))


(interpolating (interpolating
(def foo 10) (def foo 10)
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
(defproject alandipert/interpol8 "0.0.2" (defproject alandipert/interpol8 "0.0.3"
:description "Ruby-style string interpolation" :description "Ruby-style string interpolation"
:dependencies [[org.clojure/clojure "1.5.1"]]) :dependencies [[org.clojure/clojure "1.5.1"]])
4 changes: 2 additions & 2 deletions src/interpol8.clj → src/alandipert/interpol8.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns interpol8 (ns alandipert.interpol8
"Ruby-style string interpolation" "Ruby-style string interpolation"
(:use [clojure.walk :only (postwalk)]) (:use [clojure.walk :only (postwalk)])
(:require [clojure.string :as string])) (:require [clojure.string :as string]))
Expand Down Expand Up @@ -30,4 +30,4 @@ string:
(let [y 20] (let [y 20]
\"x is #{x} and y is #{y}\"))" \"x is #{x} and y is #{y}\"))"
[& body] [& body]
`(do ~@(postwalk #(if (string? %) `(i ~%) %) body))) `(do ~@(postwalk #(if (string? %) `(i ~%) %) body)))
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns interpol8.test (ns alandipert.interpol8.test
(:use clojure.test (:use clojure.test
interpol8)) alandipert.interpol8))


(deftest lexical-interpolation (deftest lexical-interpolation
(testing "that let bindings interpolate correctly") (testing "that let bindings interpolate correctly")
Expand All @@ -18,4 +18,4 @@
(def z 100) (def z 100)
(let [x 10 (let [x 10
y 20] y 20]
(is (= "1001020" "#{z}#{x}#{y}"))))) (is (= "1001020" "#{z}#{x}#{y}")))))

0 comments on commit e687857

Please sign in to comment.