Skip to content
Browse files

releasing 0.2.2-RC2

Includes a Clojure 1.5 bug fix as well as multiple lein profiles to build against multiple clojure versions
  • Loading branch information...
1 parent 836fc8e commit ab80a702e23adf69f16475255f7995654483c286 @leonardoborges committed Jan 15, 2013
Showing with 15 additions and 11 deletions.
  1. +1 −0 .travis.yml
  2. +2 −0 CHANGELOG.md
  3. +4 −5 docs/uberdoc.html
  4. +5 −2 project.clj
  5. +3 −4 src/bouncer/core.clj
View
1 .travis.yml
@@ -1,5 +1,6 @@
language: clojure
lein: lein2
+script: lein2 with-profile 1.3:1.4:1.5 test
jdk:
- openjdk7
- oraclejdk7
View
2 CHANGELOG.md
@@ -20,6 +20,8 @@
```
- short-circuit for validators: if a map entry has multiple validators, it stops at the first failure, moving on to the next map entry.
+- fixed destructuring bug when using Clojure 1.5 (thanks to [Gary Johnson](gwjohnso@uvm.edu) for reporting it)
+- using leiningen profiles to build against Clojure 1.3, 1.4 and 1.5
## 0.2.1 (07/01/2013)
View
9 docs/uberdoc.html
@@ -3028,7 +3028,7 @@
build_tree: build_tree
};
})(SyntaxHighlighter);
-</script><title>bouncer -- Marginalia</title></head><body><table><tr><td class="docs"><div class="header"><h1 class="project-name">bouncer</h1><h2 class="project-version">0.2.2-RC1</h2><br /><p>A validation library for Clojure apps</p>
+</script><title>bouncer -- Marginalia</title></head><body><table><tr><td class="docs"><div class="header"><h1 class="project-name">bouncer</h1><h2 class="project-version">0.2.2-RC2</h2><br /><p>A validation library for Clojure apps</p>
</div><div class="dependencies"><h3>dependencies</h3><table><tr><td class="dep-name">org.clojure/clojure</td><td class="dotted"><hr /></td><td class="dep-version">1.4.0</td></tr><tr><td class="dep-name">org.clojure/algo.monads</td><td class="dotted"><hr /></td><td class="dep-version">0.1.0</td></tr></table></div></td><td class="codes" style="text-align: center; vertical-align: middle;color: #666;padding-right:20px"><br /><br /><br />(this space intentionally left almost blank)</td></tr><tr><td class="docs"><div class="toc"><a name="toc"><h3>namespaces</h3></a><ul><li><a href="#bouncer.core">bouncer.core</a></li><li><a href="#bouncer.helpers">bouncer.helpers</a></li><li><a href="#bouncer.validators">bouncer.validators</a></li></ul></div></td><td class="codes">&nbsp;</td></tr><tr><td class="docs"><div class="docs-header"><a class="anchor" href="#bouncer.core" name="bouncer.core"><h1 class="project-name">bouncer.core</h1><a class="toc-link" href="#toc">toc</a></a></div></td><td class="codes" /></tr><tr><td class="docs"><p>The <code>core</code> namespace provides the two main validation macros in bouncer:</p>
<ul>
@@ -3107,7 +3107,7 @@
<p>It only runs pred if:</p></li>
<li><p>the validator is optional <em>and</em> there is a non-nil value to be validated (this information is read from pred's metadata)</p></li>
-<li><p>there are no previous erros for the given path</p>
+<li><p>there are no previous errors for the given path</p>
<p>Returns <code>acc</code> augmented with a namespace qualified ::errors keyword</p></li>
</ul>
@@ -3117,9 +3117,8 @@
k (if (vector? k) k [k])
error-path (cons ::errors k)
{:keys [default-message-format optional]} (meta pred)
- [args {
- :keys [message] :or
- {message default-message-format}}] (split-with (complement keyword?) args)
+ [args opts] (split-with (complement keyword?) args)
+ {:keys [message] :or {message default-message-format}} (apply hash-map opts)
pred-subject (get-in acc k)]
(if (or (and optional (nil? pred-subject))
(not (empty? (get-in acc error-path)))
View
7 project.clj
@@ -1,8 +1,11 @@
-(defproject bouncer "0.2.2-RC1"
+(defproject bouncer "0.2.2-RC2"
:description "A validation library for Clojure apps"
:url "http://github.com/leonardoborges/bouncer"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/algo.monads "0.1.0"]]
- :plugins [[lein-marginalia "0.7.1"]])
+ :plugins [[lein-marginalia "0.7.1"]]
+ :profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
+ :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
+ :1.5 {:dependencies [[org.clojure/clojure "1.5.0-RC1"]]}})
View
7 src/bouncer/core.clj
@@ -97,7 +97,7 @@ If you'd like to know more about the motivation behind `bouncer`, check the
- the validator is optional *and* there is a non-nil value to be validated (this information is read from pred's metadata)
- - there are no previous erros for the given path
+ - there are no previous errors for the given path
Returns `acc` augmented with a namespace qualified ::errors keyword
"
@@ -106,9 +106,8 @@ If you'd like to know more about the motivation behind `bouncer`, check the
k (if (vector? k) k [k])
error-path (cons ::errors k)
{:keys [default-message-format optional]} (meta pred)
- [args {
- :keys [message] :or
- {message default-message-format}}] (split-with (complement keyword?) args)
+ [args opts] (split-with (complement keyword?) args)
+ {:keys [message] :or {message default-message-format}} (apply hash-map opts)
pred-subject (get-in acc k)]
(if (or (and optional (nil? pred-subject))
(not (empty? (get-in acc error-path)))

0 comments on commit ab80a70

Please sign in to comment.
Something went wrong with that request. Please try again.