Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Mar 21, 2016
1 parent 6538f8e commit 87b176a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
> This project uses [Break Versioning](https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md)
## v1.1.2 - 2016 Feb 26

* **Hotfix**: false vals were printing as "<nil>" in error messages
## v1.2.0 - 2016 Mar 21

```clojure
[com.taoensso/truss "1.1.2"]
[com.taoensso/truss "1.2.0"]
```

* **New**: added `set-error-fn!` [#3] to allow easier control over how invariant violations are reported

## v1.1.2 - 2016 Feb 26

* **Hotfix**: false vals were printing as "<nil>" in error messages

## v1.1.1 - 2016 Feb 18

* **Hotfix**: remove accidental encore reference [#1]
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**[CHANGELOG]** | [API] | current [Break Version]:

```clojure
[com.taoensso/truss "1.1.2"] ; Stable
[com.taoensso/truss "1.2.0"] ; Stable
```

Want to help [support taoensso/open-source]?
Expand Down Expand Up @@ -36,7 +36,7 @@ Want to help [support taoensso/open-source]?
Add the necessary dependency to your project:

```clojure
[com.taoensso/truss "1.1.2"]
[com.taoensso/truss "1.2.0"]
```

And setup your namespace imports:
Expand Down Expand Up @@ -357,6 +357,15 @@ No need for any special syntax or concepts, just define a function as you'd like

## FAQ

#### How can I report/log violations?

By default, Truss just throws an **exception** on any invariant violations. You can adjust that behaviour with the `set-error-fn!` and `with-error-fn` utils. Both take an arbitrary `(fn [msg data-map])`.

Some common usage ideas:

* Use `with-error-fn` to capture violations during unit testing
* Use `set-error-fn!` to _log_ violations with something like [Timbre]

#### Should I annotate my whole API?

**Please don't**! I'd encourage you to think of Truss assertions like **salt in good cooking**; a little can go a long way, and the need for too much salt can be a sign that something's gone wrong in the cooking.
Expand Down Expand Up @@ -512,3 +521,4 @@ Copyright &copy; 2015-2016 [Peter Taoussanis].
[@marick/structural-typing]: https://github.com/marick/structural-typing/
[Midje]: https://github.com/marick/Midje
[challenges]: #challenges
[Timbre]: https://github.com/ptaoussanis/timbre
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject com.taoensso/truss "1.1.2"
(defproject com.taoensso/truss "1.2.0"
:author "Peter Taoussanis <https://www.taoensso.com>"
:description "Assertions API for Clojure/Script"
:url "https://github.com/ptaoussanis/truss"
Expand Down Expand Up @@ -36,7 +36,7 @@
:plugins
[;; These must be in :dev, Ref. https://github.com/lynaghk/cljx/issues/47:
[com.keminglabs/cljx "0.6.0"]
[lein-cljsbuild "1.1.2"]]}]}
[lein-cljsbuild "1.1.3"]]}]}

;; :jar-exclusions [#"\.cljx|\.DS_Store"]

Expand Down

0 comments on commit 87b176a

Please sign in to comment.