Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Dec 11, 2014
2 parents f34bd90 + b5e61f0 commit 6144fea
Show file tree
Hide file tree
Showing 6 changed files with 366 additions and 351 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
> This project uses [Break Versioning](https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md) as of **Aug 16, 2014**.
## v1.3.0-RC1 / 2014 Dec 11

> This is a maintenance release focused on general housekeeping + on adding some user-id flexibility.
* **DEPRECATED** [#85]: Server->user broadcasts should now use `:sente/all-users-without-uid` instead of `nil` uid when intending to broadcast to users _without_ a user id. The new behaviour is less accident prone.
* **CHANGE** [#84]: Warn when necessary Ring middleware is missing.
* **NEW** [#82]: Server-side `:user-id-fn`'s Ring request now includes a `:client-id` arg provided by clients.
* Various doc+example improvements.


## v1.2.0 / 2014 Oct 6

This is a maintenance update that is **non-breaking UNLESS**:
1. You are not using the default server-side chsk router.
2. You are relying on (`?reply-fn <args>)` to log a warning rather than throw an NPE for nil `?reply-fn`s.
> This is a maintenance release that is **non-breaking UNLESS**:
> 1. You are not using the default server-side chsk router.
> 2. You are relying on (`?reply-fn <args>)` to log a warning rather than throw an NPE for nil `?reply-fn`s.
* **FIX**: Broken chsk router shutdown due to http://goo.gl/be8CGP.
* **BREAKING** [#77]: No longer substitute a dummy (logging) `?reply-fn` for non-callback events.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
**[API docs][]** | **[CHANGELOG][]** | [other Clojure libs][] | [Twitter][] | [contact/contrib](#contact--contributing) | current [Break Version][]:

```clojure
[com.taoensso/sente "1.2.0"] ; Please see CHANGELOG for details
[com.taoensso/sente "1.2.0"] ; Stable
[com.taoensso/sente "1.3.0-RC1"] ; Please see CHANGELOG for details
```

# Sente, channel sockets for Clojure
Expand Down Expand Up @@ -210,7 +211,7 @@ If you want a simple _per-session_ identity, generate a _random uuid_. If you wa

> Note that user-ids are used **only** for server>user push. client>server requests don't take a user-id.
As of Sente v0.13.0+ it's also possible to send events to clients _without_ a user-id (they simply have a `nil` user-id, and you can send to that as you would any other id).
As of Sente v0.13.0+ it's also possible to send events to `:sente/all-users-without-uid`.

#### How do I integrate Sente with my usual login/auth procedure?

Expand Down
20 changes: 10 additions & 10 deletions example-project/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@

:dependencies
[;; [org.clojure/clojure "1.6.0"]
[org.clojure/clojure "1.7.0-alpha2"] ; May use any v1.5.1+
[org.clojure/clojure "1.7.0-alpha4"] ; May use any v1.5.1+
;;
[org.clojure/clojurescript "0.0-2356"]
[org.clojure/clojurescript "0.0-2411"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
;;
[cider/cider-nrepl "0.7.0"] ; Optional, for use with Emacs
;;
[com.taoensso/sente "1.2.0"] ; <--- Sente
[com.taoensso/sente "1.3.0-SNAPSHOT"] ; <--- Sente
[com.taoensso/timbre "3.3.1"]
;;
[http-kit "2.1.19"] ; <--- http-kit (currently required)
;;
[compojure "1.2.0"] ; Or routing lib of your choice
[ring "1.3.1"]
[compojure "1.3.1"] ; Or routing lib of your choice
[ring "1.3.2"]
;; [ring-anti-forgery "1.0.0"]
[ring/ring-defaults "0.1.2"] ; Incl. `ring-anti-forgery`, etc.
[hiccup "1.0.5"] ; Optional, just for HTML
;;
;;; Transit deps optional; may be used to aid perf. of larger data payloads
;;; (see reference example for details):
[com.cognitect/transit-clj "0.8.259"]
[com.cognitect/transit-cljs "0.8.188"]]
[com.cognitect/transit-cljs "0.8.194"]]

:plugins
[[lein-pprint "1.1.2"]
[lein-ancient "0.5.5"]
[com.cemerick/austin "0.1.4"]
[com.keminglabs/cljx "0.4.0"]
[lein-cljsbuild "1.0.3"]]
[com.keminglabs/cljx "0.5.0"]
[lein-cljsbuild "1.0.3"]
[cider/cider-nrepl "0.8.1"] ; Optional, for use with Emacs
]

:hooks [cljx.hooks leiningen.cljsbuild]
:cljx
Expand Down
8 changes: 7 additions & 1 deletion example-project/src/example/my_app.cljx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@
(let [ring-defaults-config
(assoc-in ring.middleware.defaults/site-defaults [:security :anti-forgery]
{:read-token (fn [req] (-> req :params :csrf-token))})]
(ring.middleware.defaults/wrap-defaults my-routes ring-defaults-config)))

;; NB: Sente requires the Ring `wrap-params` + `wrap-keyword-params`
;; middleware to work. These are included with
;; `ring.middleware.defaults/wrap-defaults` - but you'll need to ensure
;; that they're included yourself if you're not using `wrap-defaults`.
;;
(ring.middleware.defaults/wrap-defaults my-routes ring-defaults-config)))

;;;; Client-side setup

Expand Down
18 changes: 9 additions & 9 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject com.taoensso/sente "1.2.0"
(defproject com.taoensso/sente "1.3.0-RC1"
:author "Peter Taoussanis <https://www.taoensso.com>"
:description "Clojure channel sockets library"
:url "https://github.com/ptaoussanis/sente"
Expand All @@ -12,10 +12,10 @@

:dependencies
[[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2356"]
[org.clojure/clojurescript "0.0-2411"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.clojure/tools.reader "0.8.9"]
[com.taoensso/encore "1.11.2"]
[org.clojure/tools.reader "0.8.13"]
[com.taoensso/encore "1.18.2"]
[com.taoensso/timbre "3.3.1"]
[http-kit "2.1.19"]]

Expand All @@ -27,15 +27,15 @@
{;; :default [:base :system :user :provided :dev]
:server-jvm {:jvm-opts ^:replace ["-server"]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha2"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha3"]]}
:test {:dependencies [[com.cognitect/transit-clj "0.8.259"]
[com.cognitect/transit-cljs "0.8.188"]
[expectations "2.0.12"]
[org.clojure/test.check "0.5.9"]
[com.cognitect/transit-cljs "0.8.194"]
[expectations "2.0.13"]
[org.clojure/test.check "0.6.1"]
;; [com.cemerick/double-check "0.5.7"]
]
:plugins [[lein-expectations "0.0.8"]
[lein-autoexpect "1.3.0"]]}
[lein-autoexpect "1.4.0"]]}

:dev
[:1.7 :test
Expand Down
Loading

0 comments on commit 6144fea

Please sign in to comment.