Skip to content

Commit

Permalink
Fix private var bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Jul 26, 2013
1 parent bd6b6bb commit dfd6ff3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## v1.0.0 → v2.0.0-RC1
## v1.0.0 → v2.0.0-RC2
* **BREAKING**: All relevant fns now take an explicit config arg and test-subject id (you can use the `*ts-id*` thread-local binding for this).
* **BREAKING**: Renamed `mab-commit!` -> `commit!`, `pr-mab-results` -> `pr-results`.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**[API docs](http://ptaoussanis.github.io/touchstone/)** | **[CHANGELOG](https://github.com/ptaoussanis/touchstone/blob/master/CHANGELOG.md)** | [contact & contributing](#contact--contributing) | [other Clojure libs](https://www.taoensso.com/clojure-libraries) | [Twitter](https://twitter.com/#!/ptaoussanis) | current [semantic](http://semver.org/) version:

```clojure
[com.taoensso/touchstone "2.0.0-RC1"] ; Development (notes below)
[com.taoensso/touchstone "2.0.0-RC2"] ; Development (notes below)
[com.taoensso/touchstone "1.0.0"] ; Stable, needs Clojure 1.4+ as of 1.0.0
```

Expand Down Expand Up @@ -29,7 +29,7 @@ Touchstone is an attempt to bring **dead-simple, high-power split-testing** to a
Add the necessary dependency to your [Leiningen](http://leiningen.org/) `project.clj` and `require` the library in your ns:

```clojure
[com.taoensso/touchstone "2.0.0-RC1"] ; project.clj
[com.taoensso/touchstone "2.0.0-RC2"] ; project.clj
(ns my-app (:require [taoensso.touchstone :as touchstone :refer (*ts-id*)])) ; ns
```

Expand Down Expand Up @@ -81,4 +81,4 @@ Otherwise reach me (Peter Taoussanis) at [taoensso.com](https://www.taoensso.com

## License

Copyright © 2012, 2013 Peter Taoussanis. Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.
Copyright © 2012, 2013 Peter Taoussanis. Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.
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/touchstone "2.0.0-RC1"
(defproject com.taoensso/touchstone "2.0.0-RC2"
:description "Clojure A/B testing library"
:url "https://github.com/ptaoussanis/touchstone"
:license {:name "Eclipse Public License"
Expand Down Expand Up @@ -32,4 +32,4 @@
"sonatype-snapshots"
{:url "http://oss.sonatype.org/content/repositories/snapshots"
:snapshots true
:releases {:checksum :fail :update :always}}})
:releases {:checksum :fail :update :always}}})
6 changes: 3 additions & 3 deletions src/taoensso/touchstone.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(select-and-return-form! prior-selected-form-id)
(select-and-return-form! @leading-form))))))

(defmacro ^:private select-form!
(defmacro select-form! "Implementation detail."
[config strategy-fn ts-id test-id id-form-pairs]
(assert (even? (count id-form-pairs)))
(let [id-form-fn-pairs (into {} (for [[id f] (partition 2 id-form-pairs)]
Expand Down Expand Up @@ -211,13 +211,13 @@
Test forms can be freely added, reordered, or removed for an ongoing test at
any time, but avoid changing a particular form once id'd."
[config ts-id test-id & id-form-pairs]
`(#'select-form! ~config #'ucb1-select ~ts-id ~test-id ~id-form-pairs))
`(select-form! ~config ~#'ucb1-select ~ts-id ~test-id ~id-form-pairs))

(defmacro ab-select
"Like `mab-select` but uses simple, A/B-style random selection. Unless you
know all the implications, you probably want `mab-select` instead."
[config ts-id test-id & id-form-pairs]
`(#'select-form! ~config #'random-select ~ts-id ~test-id ~id-form-pairs))
`(select-form! ~config ~#'random-select ~ts-id ~test-id ~id-form-pairs))

(defmacro mab-select-id
"Like `mab-select` but takes only form ids and uses each id also as its form."
Expand Down

0 comments on commit dfd6ff3

Please sign in to comment.