Packages

Lasse: Server-Sent Event handler for Cowboy.

Current section

4 Versions

Jump to

Compare versions

6 files changed
+133 additions
-154 deletions
  @@ -1,4 +1,3 @@
1 - [![Stories in Ready](https://badge.waffle.io/inaka/lasse.png?label=ready&title=Ready)](https://waffle.io/inaka/lasse)
2 1 # Lasse
3 2
4 3 <img src="http://i61.tinypic.com/40pkl.jpg" align="right" style="float:right" height="400" />
  @@ -7,9 +6,9 @@ SSE handler for Cowboy.
7 6
8 7 ### References
9 8
10 - * [Cowboy](/extend/cowboy)
9 + * [Cowboy](https://github.com/extend/cowboy)
11 10 * [SSE](http://dev.w3.org/html5/eventsource/)
12 - * [canillita's handler](/canillita/blob/master/src/canillita_news_handler.erl) (as a reference)
11 + * [canillita's handler](https://github.com/inaka/canillita/blob/master/src/canillita_news_handler.erl) (as a reference)
13 12
14 13 ### Usage
15 14
  @@ -35,9 +34,6 @@ Additionally, in your module, you have to implement the ``lasse_handler`` behavi
35 34
36 35 ### Contact Us
37 36
38 - For **questions** or **general comments** regarding the use of this library, please use our public
39 - [hipchat room](http://inaka.net/hipchat).
40 -
41 37 If you find any **bugs** or have a **problem** while using this library, please [open an issue](https://github.com/inaka/lasse/issues/new) in this repo (or a pull request :)).
42 38
43 39 And you can check all of our open-source projects at [inaka.github.io](http://inaka.github.io)
  @@ -46,9 +42,6 @@ And you can check all of our open-source projects at [inaka.github.io](http://in
46 42
47 43 You can find some example applications that implement the ``lasse_handler`` in the ``examples`` folder.
48 44
49 - Running the examples is as simple as executing ``make run``, given you have the ``make`` tool, ``git``
50 - and ``erlang`` installed in your environment.
51 -
52 45 ## API
53 46
54 47 ### notify(Pid, Message) -> ok
  @@ -63,7 +56,7 @@ Types:
63 56 <a name="callbacks"></a>
64 57 ## Callbacks
65 58
66 - ### init(InitArgs, LastEventId, Req) -> {ok, NewReq, State}
59 + ### init(LastEventId, Req) -> {ok, NewReq, State}
67 60 | {ok, NewReq, InitialEvents, State}
68 61 | {no_content, NewReq, State}
69 62 | {shutdown, StatusCode, Headers, Body, NewReq, State}
  @@ -1,9 +1,9 @@
1 1 {<<"name">>,<<"lasse">>}.
2 - {<<"version">>,<<"1.1.1">>}.
2 + {<<"version">>,<<"1.2.0">>}.
3 3 {<<"requirements">>,
4 4 #{<<"cowboy">> =>
5 5 #{<<"app">> => <<"cowboy">>,<<"optional">> => false,
6 - <<"requirement">> => <<"1.0.4">>}}}.
6 + <<"requirement">> => <<"2.4.0">>}}}.
7 7 {<<"app">>,<<"lasse">>}.
8 8 {<<"maintainers">>,[<<"Inaka">>]}.
9 9 {<<"precompiled">>,false}.
  @@ -24,17 +24,17 @@
24 24
25 25 %% == Dependencies ==
26 26
27 - {deps, [{cowboy, "1.0.4"}]}.
27 + {deps, [{cowboy, "2.4.0"}]}.
28 28
29 29 %% == Profiles ==
30 30
31 31 {profiles, [
32 32 {test, [
33 - {deps, [ {shotgun, "0.2.3"}
34 - , {meck, "0.8.4"}
33 + {deps, [ {shotgun, "0.3.0"}
34 + , {meck, "0.8.9"}
35 35 , {katana, "0.4.0"}
36 - , {katana_test, "0.1.1"}
37 - , {mixer, "0.1.5", {pkg, inaka_mixer}}
36 + , {katana_test, "1.0.0"}
37 + , {mixer, "1.0.0", {pkg, inaka_mixer}}
38 38 ]}
39 39 ]}
40 40 ]}.
  @@ -75,4 +75,5 @@
75 75 , {plt_extra_apps, []}
76 76 , {plt_location, local}
77 77 , {base_plt_apps, [erts, stdlib, kernel]}
78 - , {base_plt_location, global}]}.
78 + , {base_plt_location, global}
79 + ]}.
  @@ -1,10 +1,10 @@
1 1 {"1.1.0",
2 - [{<<"cowboy">>,{pkg,<<"cowboy">>,<<"1.0.4">>},0},
3 - {<<"cowlib">>,{pkg,<<"cowlib">>,<<"1.0.2">>},1},
4 - {<<"ranch">>,{pkg,<<"ranch">>,<<"1.4.0">>},1}]}.
2 + [{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.4.0">>},0},
3 + {<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.3.0">>},1},
4 + {<<"ranch">>,{pkg,<<"ranch">>,<<"1.5.0">>},1}]}.
5 5 [
6 6 {pkg_hash,[
7 - {<<"cowboy">>, <<"A324A8DF9F2316C833A470D918AAF73AE894278B8AA6226CE7A9BF699388F878">>},
8 - {<<"cowlib">>, <<"9D769A1D062C9C3AC753096F868CA121E2730B9A377DE23DEC0F7E08B1DF84EE">>},
9 - {<<"ranch">>, <<"10272F95DA79340FA7E8774BA7930B901713D272905D0012B06CA6D994F8826B">>}]}
7 + {<<"cowboy">>, <<"F1B72FABE9C8A5FC64AC5AC85FB65474D64733D1DF52A26FAD5D4BA3D9F70A9F">>},
8 + {<<"cowlib">>, <<"BBD58EF537904E4F7C1DD62E6AA8BC831C8183CE4EFA9BD1150164FE15BE4CAA">>},
9 + {<<"ranch">>, <<"F04166F456790FEE2AC1AA05A02745CC75783C2BFB26D39FAF6AEFC9A3D3A58A">>}]}
10 10 ].
  @@ -1,6 +1,6 @@
1 1 {application,lasse,
2 2 [{description,"Lasse: Server-Sent Event handler for Cowboy."},
3 - {vsn,"1.1.1"},
3 + {vsn,"1.2.0"},
4 4 {modules,[]},
5 5 {applications,[kernel,stdlib,cowboy]},
6 6 {registered,[]},
Loading more files…